3 # - most of the qemu config options aren't detected (curses, NPTL, vde, fdt)
4 # - package the ocaml stuff
8 %bcond_with ocaml # build Ocaml libraries for Xen tools
10 %define xen_extfiles_url http://xenbits.xensource.com/xen-extfiles
11 Summary: Xen - a virtual machine monitor
12 Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej
17 Group: Applications/System
18 Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: 73561faf3c1b5e36ec5c089b5db848ad
21 Source10: %{xen_extfiles_url}/lwip-1.3.0.tar.gz
22 # Source10-md5: 36cc57650cffda9a0269493be2a169bb
23 Source11: %{xen_extfiles_url}/newlib-1.16.0.tar.gz
24 # Source11-md5: bf8f1f9e3ca83d732c00a79a6ef29bc4
25 Source12: %{xen_extfiles_url}/zlib-1.2.3.tar.gz
26 # Source12-md5: debc62758716a169df9f62e6ab2bc634
27 Source13: %{xen_extfiles_url}/pciutils-2.2.9.tar.bz2
28 # Source13-md5: cec05e7785497c5e19da2f114b934ffd
29 Source14: %{xen_extfiles_url}/grub-0.97.tar.gz
30 # Source14-md5: cd3f3eb54446be6003156158d51f4884
31 Source15: %{xen_extfiles_url}/ipxe-git-v1.0.0.tar.gz
32 # Source15-md5: fb7df96781d337899066d82059346885
33 Source30: proc-xen.mount
34 Source31: var-lib-xenstored.mount
35 Source32: blktapctrl.service
36 Source33: blktapctrl.sysconfig
37 Source34: xenconsoled.service
38 Source35: xenconsoled.sysconfig
39 Source36: xenstored.service
40 Source37: xenstored.sysconfig
41 Source38: xenstored.tmpfiles
42 Source39: xend.service
43 Source40: xend.tmpfiles
44 Source41: xen-watchdog.service
45 Source42: xen-dom0-modules-load.conf
48 Source51: xenconsoled.init
49 Source52: xenstored.init
50 Source53: xen-watchdog.init
51 Source54: xendomains.init
52 Source55: xen.logrotate
53 Patch0: %{name}-python_scripts.patch
54 Patch1: %{name}-symbols.patch
55 Patch2: %{name}-curses.patch
56 Patch3: %{name}-xz.patch
57 Patch4: pygrubfix.patch
58 Patch5: pygrubfix2.patch
59 Patch6: qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc066243388.patch
60 Patch7: xen-4.1-testing.23190.patch
61 Patch8: xend.catchbt.patch
62 Patch9: xend.empty.xml.patch
63 Patch10: xend-pci-loop.patch
64 Patch11: xen-dumpdir.patch
65 Patch12: xen-net-disable-iptables-on-bridge.patch
66 Patch13: xen-configure-xend.patch
67 Patch14: xen-initscript.patch
69 Patch100: grub-ext4-support.patch
70 URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
71 BuildRequires: SDL-devel
74 BuildRequires: curl-devel
75 BuildRequires: e2fsprogs-devel
76 BuildRequires: gcc >= 5:3.4
77 BuildRequires: gettext-devel
78 BuildRequires: latex2html
79 BuildRequires: libidn-devel
80 BuildRequires: ncurses-devel
82 BuildRequires: ocaml >= 3.04-7
83 BuildRequires: ocaml-findlib
84 %requires_eq ocaml-runtime
86 BuildRequires: pciutils-devel
87 BuildRequires: pkgconfig
88 BuildRequires: python-devel
89 BuildRequires: rpm-pythonprov
90 BuildRequires: rpmbuild(macros) >= 1.647
91 #BuildRequires: texlive-dvips
92 #BuildRequires: texlive-latex-data
93 BuildRequires: texlive-latex-psnfss
94 BuildRequires: transfig
96 BuildRequires: zlib-devel
97 Requires(post,preun): /sbin/chkconfig
98 Requires: %{name}-libs = %{version}-%{release}
99 Requires: ZopeInterface
100 Requires: bridge-utils
107 Requires: python-%{name} = %{version}-%{release}
110 Requires: systemd-units >= 38
115 ExclusiveArch: %{ix86} %{x8664}
116 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
118 # some PPC/SPARC boot image in ELF format
119 %define _noautostrip .*%{_datadir}/xen/qemu/openbios-.*
122 This package contains the Xen hypervisor and Xen tools, needed to run
123 virtual machines on x86 systems, together with the kernel-xen*
124 packages. Information on how to use Xen can be found at the Xen
127 Virtualisation can be used to run multiple versions or multiple Linux
128 distributions on one system, or to test untrusted applications in a
129 sandboxed environment. Note that the Xen technology is still in
130 development, and this RPM has received extremely little testing. Don't
131 be surprised if this RPM eats your data, drinks your coffee or makes
132 fun of you in front of your friends.
134 %description -l pl.UTF-8
135 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
136 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
137 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
140 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
141 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
142 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
143 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
144 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
145 się wyśmiewał w obecności przyjaciół.
148 Summary: xen libraries
149 Summary(pl.UTF-8): Biblioteki xena
155 %description libs -l pl.UTF-8
159 Summary: Header files for xen
160 Summary(pl.UTF-8): Pliki nagłówkowe xena
161 Group: Development/Libraries
162 Requires: %{name}-libs = %{version}-%{release}
165 Header files for xen.
167 %description devel -l pl.UTF-8
168 Pliki nagłówkowe xena.
171 Summary: Static xen libraries
172 Summary(pl.UTF-8): Statyczne biblioteki xena
173 Group: Development/Libraries
174 Requires: %{name}-devel = %{version}-%{release}
177 Static xen libraries.
179 %description static -l pl.UTF-8
180 Statyczne biblioteki xena.
184 Summary(pl.UTF-8): Demon xend
186 Requires: systemd-units >= 38
191 %description xend -l pl.UTF-8
194 %package -n python-xen
195 Summary: xen Python modules
196 Summary(pl.UTF-8): Moduły Pythona dla xena
198 Conflicts: xen < 3.2.1-0.3
200 %description -n python-xen
203 %description -n python-xen -l pl.UTF-8
204 Moduły Pythona dla xena.
206 %package -n bash-completion-%{name}
207 Summary: bash-completion for xen
208 Group: Applications/Shells
209 Requires: %{name} = %{version}-%{release}
210 Requires: bash-completion
212 %description -n bash-completion-%{name}
213 This package provides bash-completion for xen.
233 %{__rm} -v tools/check/*.orig
236 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
237 ln -s %{PATCH100} stubdom/grub.patches/99grub-ext4-support.patch
238 ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz
241 export CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
242 export CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses"
244 %{__make} dist-xen dist-tools dist-docs \
245 %{!?with_ocaml:OCAML_TOOLS=n} \
252 %{__make} -j1 dist-stubdom \
253 %{!?with_ocaml:OCAML_TOOLS=n} \
258 rm -rf $RPM_BUILD_ROOT
259 install -d $RPM_BUILD_ROOT/etc/{xen/examples,modules-load.d,logrotate.d} \
260 $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,%{systemdunitdir}}
262 %{__make} -j1 install-xen install-tools install-stubdom install-docs \
263 %{!?with_ocaml:OCAML_TOOLS=n} \
265 DESTDIR=$RPM_BUILD_ROOT
267 %if "%{_lib}" == "lib64"
268 ln -s %{_prefix}/lib/%{name}/bin/qemu-dm $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/qemu-dm
271 install %{SOURCE30} $RPM_BUILD_ROOT%{systemdunitdir}/proc-xen.mount
272 install %{SOURCE31} $RPM_BUILD_ROOT%{systemdunitdir}/var-lib-xenstored.mount
273 install %{SOURCE32} $RPM_BUILD_ROOT%{systemdunitdir}/blktapctrl.service
274 install %{SOURCE33} $RPM_BUILD_ROOT/etc/sysconfig/blktapctrl
275 install %{SOURCE34} $RPM_BUILD_ROOT%{systemdunitdir}/xenconsoled.service
276 install %{SOURCE35} $RPM_BUILD_ROOT/etc/sysconfig/xenconsoled
277 install %{SOURCE36} $RPM_BUILD_ROOT%{systemdunitdir}/xenstored.service
278 install %{SOURCE37} $RPM_BUILD_ROOT/etc/sysconfig/xenstored
279 install %{SOURCE38} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xenstored.conf
280 install %{SOURCE39} $RPM_BUILD_ROOT%{systemdunitdir}/xend.service
281 install %{SOURCE40} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xend.conf
282 install %{SOURCE41} $RPM_BUILD_ROOT%{systemdunitdir}/xen-watchdog.service
283 install %{SOURCE42} $RPM_BUILD_ROOT/etc/modules-load.d/xen-dom0.conf
285 %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/*
286 install %{SOURCE50} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
287 install %{SOURCE51} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenconsoled
288 install %{SOURCE52} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenstored
289 install %{SOURCE53} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-watchdog
290 install %{SOURCE54} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
291 install %{SOURCE55} $RPM_BUILD_ROOT/etc/logrotate.d/xen
293 mv $RPM_BUILD_ROOT/etc/xen/{xmexample*,examples}
295 cp -p tools/blktap/README{,.blktap}
296 cp -p tools/xenmon/README{,.xenmon}
298 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
299 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
303 # remove unneeded files
304 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.1.gz
305 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz
306 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
307 %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
310 rm -rf $RPM_BUILD_ROOT
313 /sbin/chkconfig --add xen-watchdog
314 /sbin/chkconfig --add xenconsoled
315 /sbin/chkconfig --add xenstored
316 /sbin/chkconfig --add xendomains
317 %systemd_post xen-watchdog.service xenconsoled.service xenstored.service
320 if [ "$1" = "0" ]; then
321 %service xendomains stop
322 /sbin/chkconfig --del xendomains
324 %service xenconsoled stop
325 /sbin/chkconfig --del xenconsoled
327 %service xenstored stop
328 /sbin/chkconfig --del xenstored
330 %service xen-watchdog stop
331 /sbin/chkconfig --del xen-watchdog
333 %systemd_preun xen-watchdog.service xenconsoled.service xenstored.service
339 /sbin/chkconfig --add xend
340 %systemd_post xend.service
343 if [ "$1" = "0" ]; then
345 /sbin/chkconfig --del xend
347 %systemd_preun xend.service
352 %post libs -p /sbin/ldconfig
353 %postun libs -p /sbin/ldconfig
356 %defattr(644,root,root,755)
357 %doc COPYING README* docs/misc/*
359 %doc tools/blktap/README.blktap tools/xenmon/README.xenmon
360 %doc tools/ioemu-dir/*.html
361 /boot/%{name}-syms-%{version}
362 /boot/%{name}-%{version}.gz
364 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenconsoled
365 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenstored
366 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xendomains
367 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/xen
368 %attr(754,root,root) /etc/rc.d/init.d/xen-watchdog
369 %attr(754,root,root) /etc/rc.d/init.d/xenconsoled
370 %attr(754,root,root) /etc/rc.d/init.d/xenstored
371 %attr(754,root,root) /etc/rc.d/init.d/xendomains
372 %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/xen-dom0.conf
373 %{systemdunitdir}/proc-xen.mount
374 %{systemdunitdir}/var-lib-xenstored.mount
375 %{systemdunitdir}/xen-watchdog.service
376 %{systemdunitdir}/xenconsoled.service
377 %{systemdunitdir}/xenstored.service
378 %dir %{_sysconfdir}/xen
379 %dir %{_sysconfdir}/xen/auto
380 %dir %{_sysconfdir}/xen/examples
381 %dir %{_sysconfdir}/xen/scripts
382 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
383 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/examples/*
384 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README*
385 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool
386 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf
387 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
388 %attr(755,root,root) %{_bindir}/*
389 %attr(755,root,root) %{_sbindir}/[bfgikloqtv]*
390 %attr(755,root,root) %{_sbindir}/xen??*
391 %attr(755,root,root) %{_sbindir}/xl
392 %attr(755,root,root) %{_sbindir}/xsview
393 %dir %{_libdir}/%{name}
394 %dir %{_libdir}/%{name}/bin
395 %attr(744,root,root) %{_libdir}/%{name}/bin/*
396 %if "%{_lib}" != "lib"
397 %dir %{_prefix}/lib/%{name}
398 %dir %{_prefix}/lib/%{name}/bin
399 %attr(755,root,root) %{_prefix}/lib/%{name}/bin/qemu-dm
400 %attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdom-dm
401 %attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdompath.sh
403 %dir %{_prefix}/lib/%{name}/boot
404 %{_prefix}/lib/%{name}/boot/ioemu-stubdom.gz
405 %{_prefix}/lib/%{name}/boot/pv-grub-x86_32.gz
407 %{_prefix}/lib/%{name}/boot/pv-grub-x86_64.gz
409 %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader
412 %{_sharedstatedir}/xen
413 %{_sharedstatedir}/xenstored
414 %dir /var/run/xenstored
415 %{systemdtmpfilesdir}/xenstored.conf
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_libdir}/lib*.so.*
421 %dir %{_libdir}/fs/ext2fs-lib
422 %dir %{_libdir}/fs/fat
423 %dir %{_libdir}/fs/iso9660
424 %dir %{_libdir}/fs/reiserfs
425 %dir %{_libdir}/fs/ufs
426 %dir %{_libdir}/fs/zfs
427 %attr(755,root,root) %{_libdir}/fs/*/*.so
430 %defattr(644,root,root,755)
431 %attr(755,root,root) %{_libdir}/lib*.so
435 %defattr(644,root,root,755)
439 %defattr(644,root,root,755)
440 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/blktapctrl
441 %{systemdunitdir}/blktapctrl.service
442 %{systemdunitdir}/xend.service
443 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend
444 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm*
445 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend*
446 %attr(755,root,root) %{_sbindir}/xend
447 %attr(755,root,root) %{_sbindir}/xm
448 %dir %attr(700,root,root) /var/run/xend
449 %{systemdtmpfilesdir}/xend.conf
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{py_sitedir}/fsimage.so
455 %dir %{py_sitedir}/xen
456 %dir %{py_sitedir}/xen/lowlevel
457 %{py_sitedir}/xen/lowlevel/*.py*
458 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
459 %{py_sitedir}/xen/remus
461 %{py_sitedir}/xen/util
462 %{py_sitedir}/xen/web
463 %{py_sitedir}/xen/xend
465 %{py_sitedir}/xen/xsview
466 %{py_sitedir}/xen/*.py*
467 %if "%{py_ver}" > "2.4"
468 %{py_sitedir}/*.egg-info
471 %files -n bash-completion-%{name}
472 %defattr(644,root,root,755)
473 /etc/bash_completion.d/*