3 # - most of the qemu config options aren't detected (curses, NPTL, vde, fdt)
4 # - package the ocaml stuff
6 %define xen_extfiles_url http://xenbits.xensource.com/xen-extfiles
7 Summary: Xen - a virtual machine monitor
8 Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej
13 Group: Applications/System
14 Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 73561faf3c1b5e36ec5c089b5db848ad
17 Source10: %{xen_extfiles_url}/lwip-1.3.0.tar.gz
18 # Source10-md5: 36cc57650cffda9a0269493be2a169bb
19 Source11: %{xen_extfiles_url}/newlib-1.16.0.tar.gz
20 # Source11-md5: bf8f1f9e3ca83d732c00a79a6ef29bc4
21 Source12: %{xen_extfiles_url}/zlib-1.2.3.tar.gz
22 # Source12-md5: debc62758716a169df9f62e6ab2bc634
23 Source13: %{xen_extfiles_url}/pciutils-2.2.9.tar.bz2
24 # Source13-md5: cec05e7785497c5e19da2f114b934ffd
25 Source14: %{xen_extfiles_url}/grub-0.97.tar.gz
26 # Source14-md5: cd3f3eb54446be6003156158d51f4884
27 Source15: %{xen_extfiles_url}/ipxe-git-v1.0.0.tar.gz
28 # Source15-md5: fb7df96781d337899066d82059346885
29 Source30: proc-xen.mount
30 Source31: var-lib-xenstored.mount
31 Source32: blktapctrl.service
32 Source33: blktapctrl.sysconfig
33 Source34: xenconsoled.service
34 Source35: xenconsoled.sysconfig
35 Source36: xenstored.service
36 Source37: xenstored.sysconfig
37 Source38: xenstored.tmpfiles
38 Source39: xend.service
39 Source40: xend.tmpfiles
40 Source41: xen-watchdog.service
43 Source51: xenconsoled.init
44 Source52: xenstored.init
45 Source53: xen-watchdog.init
46 Source54: xendomains.init
47 Source55: xen.logrotate
48 Patch0: %{name}-python_scripts.patch
49 Patch1: %{name}-symbols.patch
50 Patch2: %{name}-curses.patch
51 Patch3: %{name}-xz.patch
52 Patch4: pygrubfix.patch
53 Patch5: pygrubfix2.patch
54 Patch6: qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc066243388.patch
55 Patch7: xen-4.1-testing.23190.patch
56 Patch8: xend.catchbt.patch
57 Patch9: xend.empty.xml.patch
58 Patch10: xend-pci-loop.patch
59 Patch11: xen-dumpdir.patch
60 Patch12: xen-net-disable-iptables-on-bridge.patch
61 Patch13: xen-configure-xend.patch
63 Patch100: grub-ext4-support.patch
64 URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
65 BuildRequires: SDL-devel
68 BuildRequires: curl-devel
69 BuildRequires: e2fsprogs-devel
70 BuildRequires: gcc >= 5:3.4
71 BuildRequires: gettext-devel
72 BuildRequires: latex2html
73 BuildRequires: libidn-devel
74 BuildRequires: ncurses-devel
75 BuildRequires: pciutils-devel
76 BuildRequires: pkgconfig
77 BuildRequires: python-devel
78 BuildRequires: rpm-pythonprov
79 BuildRequires: rpmbuild(macros) >= 1.268
80 #BuildRequires: texlive-dvips
81 #BuildRequires: texlive-latex-data
82 BuildRequires: texlive-latex-psnfss
83 BuildRequires: transfig
85 BuildRequires: zlib-devel
86 Requires(post,preun): /sbin/chkconfig
87 Requires: %{name}-libs = %{version}-%{release}
88 Requires: ZopeInterface
89 Requires: bridge-utils
96 Requires: python-%{name} = %{version}-%{release}
103 ExclusiveArch: %{ix86} %{x8664}
104 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
106 # some PPC/SPARC boot image in ELF format
107 %define _noautostrip .*%{_datadir}/xen/qemu/openbios-.*
110 This package contains the Xen hypervisor and Xen tools, needed to run
111 virtual machines on x86 systems, together with the kernel-xen*
112 packages. Information on how to use Xen can be found at the Xen
115 Virtualisation can be used to run multiple versions or multiple Linux
116 distributions on one system, or to test untrusted applications in a
117 sandboxed environment. Note that the Xen technology is still in
118 development, and this RPM has received extremely little testing. Don't
119 be surprised if this RPM eats your data, drinks your coffee or makes
120 fun of you in front of your friends.
122 %description -l pl.UTF-8
123 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
124 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
125 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
128 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
129 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
130 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
131 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
132 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
133 się wyśmiewał w obecności przyjaciół.
136 Summary: xen libraries
137 Summary(pl.UTF-8): Biblioteki xena
143 %description libs -l pl.UTF-8
147 Summary: Header files for xen
148 Summary(pl.UTF-8): Pliki nagłówkowe xena
149 Group: Development/Libraries
150 Requires: %{name}-libs = %{version}-%{release}
153 Header files for xen.
155 %description devel -l pl.UTF-8
156 Pliki nagłówkowe xena.
159 Summary: Static xen libraries
160 Summary(pl.UTF-8): Statyczne biblioteki xena
161 Group: Development/Libraries
162 Requires: %{name}-devel = %{version}-%{release}
165 Static xen libraries.
167 %description static -l pl.UTF-8
168 Statyczne biblioteki xena.
172 Summary(pl.UTF-8): Demon xend
178 %description xend -l pl.UTF-8
181 %package -n python-xen
182 Summary: xen Python modules
183 Summary(pl.UTF-8): Moduły Pythona dla xena
185 Conflicts: xen < 3.2.1-0.3
187 %description -n python-xen
190 %description -n python-xen -l pl.UTF-8
191 Moduły Pythona dla xena.
193 %package -n bash-completion-%{name}
194 Summary: bash-completion for xen
195 Group: Applications/Shells
196 Requires: %{name} = %{version}-%{release}
197 Requires: bash-completion
199 %description -n bash-completion-%{name}
200 This package provides bash-completion for xen.
219 %{__rm} -v tools/check/*.orig
222 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
223 ln -s %{PATCH100} stubdom/grub.patches/99grub-ext4-support.patch
224 ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz
227 export CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
228 export CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses"
230 %{__make} dist-xen dist-tools dist-docs \
237 %{__make} -j1 dist-stubdom \
242 rm -rf $RPM_BUILD_ROOT
243 install -d $RPM_BUILD_ROOT/etc/xen/examples \
244 $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,%{systemdunitdir}}
246 %{__make} -j1 install-xen install-tools install-stubdom install-docs \
248 DESTDIR=$RPM_BUILD_ROOT
250 install %{SOURCE30} $RPM_BUILD_ROOT%{systemdunitdir}/proc-xen.mount
251 install %{SOURCE31} $RPM_BUILD_ROOT%{systemdunitdir}/var-lib-xenstored.mount
252 # started internally by xend
253 #install %{SOURCE32} $RPM_BUILD_ROOT%{systemdunitdir}/blktapctrl.service
254 #install %{SOURCE33} $RPM_BUILD_ROOT/etc/sysconfig/blktapctrl
255 install %{SOURCE34} $RPM_BUILD_ROOT%{systemdunitdir}/xenconsoled.service
256 install %{SOURCE35} $RPM_BUILD_ROOT/etc/sysconfig/xenconsoled
257 install %{SOURCE36} $RPM_BUILD_ROOT%{systemdunitdir}/xenstored.service
258 install %{SOURCE37} $RPM_BUILD_ROOT/etc/sysconfig/xenstored
259 install %{SOURCE38} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xenstored.conf
260 install %{SOURCE39} $RPM_BUILD_ROOT%{systemdunitdir}/xend.service
261 install %{SOURCE40} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xend.conf
262 install %{SOURCE41} $RPM_BUILD_ROOT%{systemdunitdir}/xen-watchdog.service
264 %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/*
265 install %{SOURCE50} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
266 install %{SOURCE51} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenconsoled
267 install %{SOURCE52} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenstored
268 install %{SOURCE53} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-watchdog
269 install %{SOURCE54} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
270 #install %{SOURCE55} $RPM_BUILD_ROOT/etc/logrotate.d/xen
272 mv $RPM_BUILD_ROOT/etc/xen/{xmexample*,examples}
274 cp -p tools/blktap/README{,.blktap}
275 cp -p tools/xenmon/README{,.xenmon}
277 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
278 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
282 # remove unneeded files
283 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.1.gz
284 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz
285 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
286 %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
289 rm -rf $RPM_BUILD_ROOT
292 /sbin/chkconfig --add xen-watchdog
293 /sbin/chkconfig --add xenconsoled
294 /sbin/chkconfig --add xenstored
295 /sbin/chkconfig --add xendomains
298 if [ "$1" = "0" ]; then
299 %service xendomains stop
300 /sbin/chkconfig --del xendomains
302 %service xenconsoled stop
303 /sbin/chkconfig --del xenconsoled
305 %service xenstored stop
306 /sbin/chkconfig --del xenstored
308 %service xen-watchdog stop
309 /sbin/chkconfig --del xen-watchdog
313 /sbin/chkconfig --add xend
316 if [ "$1" = "0" ]; then
318 /sbin/chkconfig --del xend
321 %post libs -p /sbin/ldconfig
322 %postun libs -p /sbin/ldconfig
325 %defattr(644,root,root,755)
326 %doc COPYING README* docs/misc/*
328 %doc tools/blktap/README.blktap tools/xenmon/README.xenmon
329 %doc tools/ioemu-dir/*.html
330 /boot/%{name}-syms-%{version}
331 /boot/%{name}-%{version}.gz
333 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenconsoled
334 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenstored
335 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xendomains
336 %attr(754,root,root) /etc/rc.d/init.d/xen-watchdog
337 %attr(754,root,root) /etc/rc.d/init.d/xenconsoled
338 %attr(754,root,root) /etc/rc.d/init.d/xenstored
339 %attr(754,root,root) /etc/rc.d/init.d/xendomains
340 %{systemdunitdir}/proc-xen.mount
341 %{systemdunitdir}/var-lib-xenstored.mount
342 %{systemdunitdir}/xen-watchdog.service
343 %{systemdunitdir}/xenconsoled.service
344 %{systemdunitdir}/xenstored.service
345 %dir %{_sysconfdir}/xen
346 %dir %{_sysconfdir}/xen/auto
347 %dir %{_sysconfdir}/xen/examples
348 %dir %{_sysconfdir}/xen/scripts
349 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
350 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/examples/*
351 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README*
352 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool
353 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf
354 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
355 %attr(755,root,root) %{_bindir}/*
356 %attr(755,root,root) %{_sbindir}/[bfgikloqtv]*
357 %attr(755,root,root) %{_sbindir}/xen??*
358 %attr(755,root,root) %{_sbindir}/xl
359 %attr(755,root,root) %{_sbindir}/xsview
360 %dir %{_libdir}/%{name}
361 %dir %{_libdir}/%{name}/bin
362 %attr(744,root,root) %{_libdir}/%{name}/bin/*
363 %if "%{_lib}" != "lib"
364 %dir %{_prefix}/lib/%{name}
365 %dir %{_prefix}/lib/%{name}/bin
366 %attr(755,root,root) %{_prefix}/lib/%{name}/bin/qemu-dm
367 %attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdom-dm
368 %attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdompath.sh
370 %dir %{_prefix}/lib/%{name}/boot
371 %{_prefix}/lib/%{name}/boot/ioemu-stubdom.gz
372 %{_prefix}/lib/%{name}/boot/pv-grub-x86_32.gz
373 %{_prefix}/lib/%{name}/boot/pv-grub-x86_64.gz
374 %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader
377 %{_sharedstatedir}/xen
378 %{_sharedstatedir}/xenstored
379 %dir /var/run/xenstored
380 %{systemdtmpfilesdir}/xenstored.conf
383 %defattr(644,root,root,755)
384 %attr(755,root,root) %{_libdir}/lib*.so.*
386 %dir %{_libdir}/fs/ext2fs-lib
387 %dir %{_libdir}/fs/fat
388 %dir %{_libdir}/fs/iso9660
389 %dir %{_libdir}/fs/reiserfs
390 %dir %{_libdir}/fs/ufs
391 %dir %{_libdir}/fs/zfs
392 %attr(755,root,root) %{_libdir}/fs/*/*.so
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/lib*.so
400 %defattr(644,root,root,755)
404 %defattr(644,root,root,755)
405 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/blktapctrl
406 #%{systemdunitdir}/blktapctrl.service
407 %{systemdunitdir}/xend.service
408 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend
409 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm*
410 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend*
411 %attr(755,root,root) %{_sbindir}/xend
412 %attr(755,root,root) %{_sbindir}/xm
413 %dir %attr(700,root,root) /var/run/xend
414 %{systemdtmpfilesdir}/xend.conf
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{py_sitedir}/fsimage.so
420 %dir %{py_sitedir}/xen
421 %dir %{py_sitedir}/xen/lowlevel
422 %{py_sitedir}/xen/lowlevel/*.py*
423 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
424 %{py_sitedir}/xen/remus
426 %{py_sitedir}/xen/util
427 %{py_sitedir}/xen/web
428 %{py_sitedir}/xen/xend
430 %{py_sitedir}/xen/xsview
431 %{py_sitedir}/xen/*.py*
432 %if "%{py_ver}" > "2.4"
433 %{py_sitedir}/*.egg-info
436 %files -n bash-completion-%{name}
437 %defattr(644,root,root,755)
438 /etc/bash_completion.d/*