3 # - this xen-3.3.0 kernel and userspace
4 # if you are looking for xen-3.0.2 (kernel.spec:LINUX_2_6_16), checkout
5 # this spec from XEN_3_0_2 branch
6 # - you will also need dom0 enabled kernel
9 # - pldized init scripts
10 # - script for rc-boot
11 # - %%build fails on i686
14 %bcond_with pae # build with PAE (HIGHMEM64G) support
15 %bcond_with hvm # build with hvm (full virtualization) support
19 Summary: Xen - a virtual machine monitor
20 Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej
22 Version: %{major}.%{minor}
25 Group: Applications/System
26 Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
27 # Source0-md5: f8d001eb9e08525c451d38deb93908b1
28 Source1: %{name}-xend.init
29 Source2: %{name}-xendomains.init
30 Patch0: %{name}-python_scripts.patch
31 Patch1: %{name}-gcc.patch
32 Patch2: %{name}-symbols.patch
33 URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
34 BuildRequires: SDL-devel
35 %{?with_hvm:BuildRequires: bcc}
36 BuildRequires: curl-devel
37 BuildRequires: e2fsprogs-devel
38 BuildRequires: gcc >= 5:3.4
39 BuildRequires: gettext-devel
40 BuildRequires: latex2html
41 BuildRequires: libidn-devel
42 BuildRequires: ncurses-devel
43 BuildRequires: pciutils-devel
44 BuildRequires: pkgconfig
45 BuildRequires: python-devel
46 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.268
48 BuildRequires: texlive-dvips
49 #BuildRequires: texlive-latex-data
50 BuildRequires: texlive-latex-psnfss
51 BuildRequires: transfig
53 BuildRequires: zlib-devel
54 Requires(post,preun): /sbin/chkconfig
55 Requires: %{name}-libs = %{version}-%{release}
56 Requires: ZopeInterface
57 Requires: bridge-utils
62 Requires: kernel(xen0)
65 Requires: python-%{name} = %{version}-%{release}
71 ExclusiveArch: %{ix86} %{x8664}
72 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74 # some PPC/SPARC boot image in ELF format
75 %define _noautostrip .*%{_datadir}/xen/qemu/openbios-.*
77 %ifnarch i686 athlon pentium3 pentium4
82 This package contains the Xen hypervisor and Xen tools, needed to run
83 virtual machines on x86 systems, together with the kernel-xen*
84 packages. Information on how to use Xen can be found at the Xen
87 Virtualisation can be used to run multiple versions or multiple Linux
88 distributions on one system, or to test untrusted applications in a
89 sandboxed environment. Note that the Xen technology is still in
90 development, and this RPM has received extremely little testing. Don't
91 be surprised if this RPM eats your data, drinks your coffee or makes
92 fun of you in front of your friends.
94 %description -l pl.UTF-8
95 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
96 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
97 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
100 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
101 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
102 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
103 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
104 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
105 się wyśmiewał w obecności przyjaciół.
108 Summary: xen libraries
109 Summary(pl.UTF-8): Biblioteki xena
115 %description libs -l pl.UTF-8
119 Summary: Header files for xen
120 Summary(pl.UTF-8): Pliki nagłówkowe xena
121 Group: Development/Libraries
122 Requires: %{name}-libs = %{version}-%{release}
125 Header files for xen.
127 %description devel -l pl.UTF-8
128 Pliki nagłówkowe xena.
131 Summary: Static xen libraries
132 Summary(pl.UTF-8): Statyczne biblioteki xena
133 Group: Development/Libraries
134 Requires: %{name}-devel = %{version}-%{release}
137 Static xen libraries.
139 %description static -l pl.UTF-8
140 Statyczne biblioteki xena.
143 Summary: xen hotplug scripts
144 Summary(pl.UTF-8): Skrypty hotplug dla xena
145 Group: Applications/System
150 %description hotplug -l pl.UTF-8
151 Skrypty hotplug dla xena.
154 Summary: xen udev scripts
155 Summary(pl.UTF-8): Skrypty udev dla xena
156 Group: Applications/System
161 %description udev -l pl.UTF-8
162 Skrypty udev dla xena.
164 %package -n python-xen
165 Summary: xen Python modules
166 Summary(pl.UTF-8): Moduły Pythona dla xena
168 Conflicts: xen < 3.2.1-0.3
170 %description -n python-xen
173 %description -n python-xen -l pl.UTF-8
174 Moduły Pythona dla xena.
182 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
185 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
186 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
187 %{__make} -j1 xen tools \
188 %{?with_pae:XEN_TARGET_X86_PAE=y} \
193 rm -rf $RPM_BUILD_ROOT
194 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
196 %{__make} install-xen install-tools install-docs \
199 %{?with_pae:XEN_TARGET_X86_PAE=y} \
200 DESTDIR=$RPM_BUILD_ROOT \
201 XEN_PYTHON_NATIVE_INSTALL=1
203 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
204 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
205 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
207 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
208 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
210 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
211 cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
213 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
214 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
217 # remove unneeded files
218 rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
219 rm -rf $RPM_BUILD_ROOT%{_docdir}/xen
220 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html
221 rm -rf $RPM_BUILD_ROOT/''etc/init.d
222 rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz
223 rm -f $RPM_BUILD_ROOT/boot/xen-3.4.gz
224 rm -f $RPM_BUILD_ROOT/boot/xen-3.gz
225 # # strip - Unable to recognise the format of the input file
226 # rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc32
227 # rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc64
231 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1
232 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1
235 rm -rf $RPM_BUILD_ROOT
238 /sbin/chkconfig --add xend
239 /sbin/chkconfig --add xendomains
242 if [ "$1" = "0" ]; then
244 /sbin/chkconfig --del xend
246 %service xendomains stop
247 /sbin/chkconfig --del xendomains
250 %post libs -p /sbin/ldconfig
251 %postun libs -p /sbin/ldconfig
254 %defattr(644,root,root,755)
255 %doc COPYING README docs/misc/*
257 /boot/%{name}-syms-%{version}
258 /boot/%{name}-%{version}.gz
260 %attr(754,root,root) /etc/rc.d/init.d/*
261 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
262 %dir %{_sysconfdir}/xen
263 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
264 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
265 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README
266 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[123]
267 %dir %{_sysconfdir}/xen/auto
268 %dir %{_sysconfdir}/xen/scripts
269 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
270 %attr(755,root,root) %{_bindir}/*
271 %attr(755,root,root) %{_sbindir}/*
272 %dir %{_libdir}/%{name}
273 %dir %{_libdir}/%{name}/bin
274 %attr(744,root,root) %{_libdir}/%{name}/bin/*
275 %if "%{_lib}" != "lib"
276 %dir %{_prefix}/lib/%{name}
278 %dir %{_prefix}/lib/%{name}/boot
279 %{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader}
282 %{_sharedstatedir}/xen
283 %{_sharedstatedir}/xenstored
284 %dir /var/run/xen-hotplug
285 %dir %attr(700,root,root) /var/run/xend
286 %dir /var/run/xenstored
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_libdir}/lib*.so.*
292 %dir %{_libdir}/fs/ext2fs-lib
293 %dir %{_libdir}/fs/fat
294 %dir %{_libdir}/fs/iso9660
295 %dir %{_libdir}/fs/reiserfs
296 %dir %{_libdir}/fs/ufs
297 %dir %{_libdir}/fs/zfs
298 %attr(755,root,root) %{_libdir}/fs/*/*.so
301 %defattr(644,root,root,755)
302 %attr(755,root,root) %{_libdir}/lib*.so
306 %defattr(644,root,root,755)
310 %defattr(644,root,root,755)
311 %attr(755,root,root) /etc/hotplug/*
314 %defattr(644,root,root,755)
315 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{py_sitedir}/fsimage.so
321 %dir %{py_sitedir}/xen
322 %dir %{py_sitedir}/xen/lowlevel
323 %{py_sitedir}/xen/lowlevel/*.py*
324 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
326 %{py_sitedir}/xen/util
327 %{py_sitedir}/xen/web
328 %{py_sitedir}/xen/xend
330 %{py_sitedir}/xen/xsview
331 %{py_sitedir}/xen/*.py*
332 %if "%{py_ver}" > "2.4"
333 %{py_sitedir}/*.egg-info