]> git.pld-linux.org Git - packages/xen.git/blame - xen.spec
- blktapctrl is started by xend, consider reworking xend
[packages/xen.git] / xen.spec
CommitLineData
2f3b83cd 1#
403a0e9f 2# TODO:
e9753e37 3# - most of the qemu config options aren't detected (curses, NPTL, vde, fdt)
52e56365 4# - package the ocaml stuff
b650a78f 5#
c1281a11 6%define xen_extfiles_url http://xenbits.xensource.com/xen-extfiles
adbb6385 7Summary: Xen - a virtual machine monitor
a1a3c257 8Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej
fda6847b 9Name: xen
e9753e37 10Version: 4.1.2
736bd040 11Release: 0.1
fda6847b 12License: GPL
129858a4 13Group: Applications/System
98fa2458 14Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
e9753e37 15# Source0-md5: 73561faf3c1b5e36ec5c089b5db848ad
c1281a11
ER
16# used by stubdoms
17Source10: %{xen_extfiles_url}/lwip-1.3.0.tar.gz
18# Source10-md5: 36cc57650cffda9a0269493be2a169bb
19Source11: %{xen_extfiles_url}/newlib-1.16.0.tar.gz
20# Source11-md5: bf8f1f9e3ca83d732c00a79a6ef29bc4
21Source12: %{xen_extfiles_url}/zlib-1.2.3.tar.gz
22# Source12-md5: debc62758716a169df9f62e6ab2bc634
23Source13: %{xen_extfiles_url}/pciutils-2.2.9.tar.bz2
24# Source13-md5: cec05e7785497c5e19da2f114b934ffd
25Source14: %{xen_extfiles_url}/grub-0.97.tar.gz
26# Source14-md5: cd3f3eb54446be6003156158d51f4884
27Source15: %{xen_extfiles_url}/ipxe-git-v1.0.0.tar.gz
28# Source15-md5: fb7df96781d337899066d82059346885
2e8b91a6
JR
29Source30: proc-xen.mount
30Source31: var-lib-xenstored.mount
31Source32: blktapctrl.service
32Source33: blktapctrl.sysconfig
33Source34: xenconsoled.service
34Source35: xenconsoled.sysconfig
35Source36: xenstored.service
36Source37: xenstored.sysconfig
37Source38: xenstored.tmpfiles
38Source39: xend.service
39Source40: xend.tmpfiles
40Source41: xen-watchdog.service
41# sysvinit scripts
42Source50: xend.init
43Source51: xenconsoled.init
44Source52: xenstored.init
45Source53: xen-watchdog.init
46Source54: xendomains.init
47Source55: xen.logrotate
47d65e01 48Patch0: %{name}-python_scripts.patch
e9753e37
MM
49Patch1: %{name}-symbols.patch
50Patch2: %{name}-curses.patch
6ca9eddd
JR
51Patch3: %{name}-xz.patch
52Patch4: pygrubfix.patch
53Patch5: pygrubfix2.patch
54Patch6: qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc066243388.patch
55Patch7: xen-4.1-testing.23190.patch
56Patch8: xend.catchbt.patch
57Patch9: xend.empty.xml.patch
58Patch10: xend-pci-loop.patch
59Patch11: xen-dumpdir.patch
60# stubdom patch
61Patch100: grub-ext4-support.patch
67494ff6 62URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
abdd4c6d 63BuildRequires: SDL-devel
24d6dc2b 64BuildRequires: acpica
2e8b91a6 65BuildRequires: bcc
39eabac9 66BuildRequires: curl-devel
d9ee3ddc 67BuildRequires: e2fsprogs-devel
fc7816dc 68BuildRequires: gcc >= 5:3.4
abdd4c6d 69BuildRequires: gettext-devel
47d65e01 70BuildRequires: latex2html
403a0e9f 71BuildRequires: libidn-devel
403a0e9f 72BuildRequires: ncurses-devel
42bff0c7 73BuildRequires: pciutils-devel
abdd4c6d 74BuildRequires: pkgconfig
53503036 75BuildRequires: python-devel
48c47956 76BuildRequires: rpm-pythonprov
129858a4 77BuildRequires: rpmbuild(macros) >= 1.268
e9753e37 78#BuildRequires: texlive-dvips
abdd4c6d 79#BuildRequires: texlive-latex-data
f03e6adf 80BuildRequires: texlive-latex-psnfss
53503036 81BuildRequires: transfig
12f352e2 82BuildRequires: which
53503036 83BuildRequires: zlib-devel
129858a4 84Requires(post,preun): /sbin/chkconfig
9f9b2612 85Requires: %{name}-libs = %{version}-%{release}
53503036
JB
86Requires: ZopeInterface
87Requires: bridge-utils
e77e45ff
AM
88Requires: coreutils
89Requires: diffutils
d78769bd 90Requires: gawk
e77e45ff 91Requires: iptables
53503036 92Requires: losetup
e77e45ff 93Requires: net-tools
8e6e2740 94Requires: python-%{name} = %{version}-%{release}
129858a4 95Requires: rc-scripts
e77e45ff 96Requires: sed
a674a8b2 97Requires: util-linux
e77e45ff 98Requires: which
cef7399d 99Obsoletes: xen-doc
2e8b91a6 100Obsoletes: xen-udev
971d1e2c 101ExclusiveArch: %{ix86} %{x8664}
fda6847b
AM
102BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
103
8f12ec8f 104# some PPC/SPARC boot image in ELF format
7fb9617b 105%define _noautostrip .*%{_datadir}/xen/qemu/openbios-.*
8f12ec8f 106
fda6847b
AM
107%description
108This package contains the Xen hypervisor and Xen tools, needed to run
109virtual machines on x86 systems, together with the kernel-xen*
110packages. Information on how to use Xen can be found at the Xen
111project pages.
112
113Virtualisation can be used to run multiple versions or multiple Linux
114distributions on one system, or to test untrusted applications in a
115sandboxed environment. Note that the Xen technology is still in
116development, and this RPM has received extremely little testing. Don't
117be surprised if this RPM eats your data, drinks your coffee or makes
118fun of you in front of your friends.
119
d2a30a0d 120%description -l pl.UTF-8
3615a8c8 121Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
adbb6385 122uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
3615a8c8 123kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
adbb6385
JB
124projektu.
125
3615a8c8 126Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
dcba01a0 127dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
3615a8c8
ER
128aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
129Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
130być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
131się wyśmiewał w obecności przyjaciół.
403a0e9f 132
26412ee3
JB
133%package libs
134Summary: xen libraries
135Summary(pl.UTF-8): Biblioteki xena
136Group: Libraries
137
138%description libs
139xen libraries.
140
141%description libs -l pl.UTF-8
142Biblioteki xena.
143
403a0e9f 144%package devel
6eccf3e8 145Summary: Header files for xen
3615a8c8 146Summary(pl.UTF-8): Pliki nagłówkowe xena
403a0e9f 147Group: Development/Libraries
9f9b2612 148Requires: %{name}-libs = %{version}-%{release}
403a0e9f
AM
149
150%description devel
6eccf3e8
JB
151Header files for xen.
152
d2a30a0d 153%description devel -l pl.UTF-8
3615a8c8 154Pliki nagłówkowe xena.
403a0e9f
AM
155
156%package static
157Summary: Static xen libraries
a1a3c257 158Summary(pl.UTF-8): Statyczne biblioteki xena
403a0e9f 159Group: Development/Libraries
9f9b2612 160Requires: %{name}-devel = %{version}-%{release}
403a0e9f
AM
161
162%description static
163Static xen libraries.
adbb6385 164
d2a30a0d 165%description static -l pl.UTF-8
6eccf3e8
JB
166Statyczne biblioteki xena.
167
e9753e37
MM
168%package xend
169Summary: xend daemon
170Summary(pl.UTF-8): Demon xend
171Group: Daemons
172
173%description xend
174xend daemon.
175
176%description xend -l pl.UTF-8
177Demon xend.
178
5dd334af
JB
179%package -n python-xen
180Summary: xen Python modules
3615a8c8 181Summary(pl.UTF-8): Moduły Pythona dla xena
5dd334af 182Group: Libraries
e35fda92 183Conflicts: xen < 3.2.1-0.3
5dd334af
JB
184
185%description -n python-xen
186xen Python modules.
187
188%description -n python-xen -l pl.UTF-8
3615a8c8 189Moduły Pythona dla xena.
5dd334af 190
e9753e37
MM
191%package -n bash-completion-%{name}
192Summary: bash-completion for xen
193Group: Applications/Shells
194Requires: %{name} = %{version}-%{release}
195Requires: bash-completion
196
197%description -n bash-completion-%{name}
198This package provides bash-completion for xen.
199
fda6847b 200%prep
98fa2458 201%setup -q
47d65e01
JK
202%patch0 -p1
203%patch1 -p1
42bff0c7 204%patch2 -p1
6ca9eddd 205%patch3 -p1
53ff2d70 206%patch4 -p1
6ca9eddd
JR
207%patch5 -p1
208%patch6 -p1
209%patch7 -p1
210%patch8 -p1
211%patch9 -p1
212%patch10 -p1
213%patch11 -p1
4015585b 214
c1281a11
ER
215%{__rm} -v tools/check/*.orig
216
217# stubdom sources
218ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
6ca9eddd 219ln -s %{PATCH100} stubdom/grub.patches/99grub-ext4-support.patch
c1281a11 220ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz
fda6847b
AM
221
222%build
2e8b91a6
JR
223export CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
224export CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses"
225
226%{__make} dist-xen dist-tools dist-docs \
227 prefix=%{_prefix} \
228 CC="%{__cc}" \
229 CXX="%{__cxx}"
230
231unset CFLAGS
232unset CXXFLAGS
233%{__make} -j1 dist-stubdom \
403a0e9f 234 CC="%{__cc}" \
da88b5cd 235 CXX="%{__cxx}"
fda6847b
AM
236
237%install
238rm -rf $RPM_BUILD_ROOT
2e8b91a6
JR
239install -d $RPM_BUILD_ROOT/etc/xen/examples \
240 $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,%{systemdunitdir}}
adbb6385 241
2e8b91a6
JR
242%{__make} -j1 install-xen install-tools install-stubdom install-docs \
243 prefix=%{_prefix} \
e9753e37 244 DESTDIR=$RPM_BUILD_ROOT
403a0e9f 245
2e8b91a6
JR
246install %{SOURCE30} $RPM_BUILD_ROOT%{systemdunitdir}/proc-xen.mount
247install %{SOURCE31} $RPM_BUILD_ROOT%{systemdunitdir}/var-lib-xenstored.mount
6ca9eddd
JR
248# started internally by xend
249#install %{SOURCE32} $RPM_BUILD_ROOT%{systemdunitdir}/blktapctrl.service
250#install %{SOURCE33} $RPM_BUILD_ROOT/etc/sysconfig/blktapctrl
2e8b91a6 251install %{SOURCE34} $RPM_BUILD_ROOT%{systemdunitdir}/xenconsoled.service
4a5ac969 252install %{SOURCE35} $RPM_BUILD_ROOT/etc/sysconfig/xenconsoled
2e8b91a6 253install %{SOURCE36} $RPM_BUILD_ROOT%{systemdunitdir}/xenstored.service
4a5ac969 254install %{SOURCE37} $RPM_BUILD_ROOT/etc/sysconfig/xenstored
2e8b91a6
JR
255install %{SOURCE38} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xenstored.conf
256install %{SOURCE39} $RPM_BUILD_ROOT%{systemdunitdir}/xend.service
257install %{SOURCE40} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xend.conf
258install %{SOURCE41} $RPM_BUILD_ROOT%{systemdunitdir}/xen-watchdog.service
259# sysvinit scripts
260%{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/*
261install %{SOURCE50} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
262install %{SOURCE51} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenconsoled
263install %{SOURCE52} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenstored
264install %{SOURCE53} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-watchdog
265install %{SOURCE54} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
266#install %{SOURCE55} $RPM_BUILD_ROOT/etc/logrotate.d/xen
267
e9753e37 268mv $RPM_BUILD_ROOT/etc/xen/{xmexample*,examples}
fda6847b 269
c1281a11
ER
270cp -p tools/blktap/README{,.blktap}
271cp -p tools/xenmon/README{,.xenmon}
67494ff6 272
90eccaeb
ER
273%py_comp $RPM_BUILD_ROOT%{py_sitedir}
274%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
275
276%py_postclean
e9753e37 277
86497794 278# remove unneeded files
e9753e37
MM
279%{__rm} $RPM_BUILD_ROOT/boot/xen-4.1.gz
280%{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz
8641374c 281%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
e9753e37 282%{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
d26491b9 283
fda6847b
AM
284%clean
285rm -rf $RPM_BUILD_ROOT
286
403a0e9f 287%post
90a21d83 288/sbin/chkconfig --add xen-watchdog
2e8b91a6
JR
289/sbin/chkconfig --add xenconsoled
290/sbin/chkconfig --add xenstored
403a0e9f
AM
291/sbin/chkconfig --add xendomains
292
403a0e9f 293%preun
e9753e37
MM
294if [ "$1" = "0" ]; then
295 %service xendomains stop
296 /sbin/chkconfig --del xendomains
297
2e8b91a6
JR
298 %service xenconsoled stop
299 /sbin/chkconfig --del xenconsoled
300
301 %service xenstored stop
302 /sbin/chkconfig --del xenstored
90a21d83
MM
303
304 %service xen-watchdog stop
305 /sbin/chkconfig --del xen-watchdog
e9753e37
MM
306fi
307
308%post xend
309/sbin/chkconfig --add xend
310
311%preun xend
403a0e9f 312if [ "$1" = "0" ]; then
129858a4 313 %service xend stop
403a0e9f 314 /sbin/chkconfig --del xend
e9753e37 315fi
129858a4 316
26412ee3
JB
317%post libs -p /sbin/ldconfig
318%postun libs -p /sbin/ldconfig
319
fda6847b
AM
320%files
321%defattr(644,root,root,755)
e9753e37 322%doc COPYING README* docs/misc/*
47d65e01 323%doc docs/html/*
e9753e37
MM
324%doc tools/blktap/README.blktap tools/xenmon/README.xenmon
325%doc tools/ioemu-dir/*.html
98fa2458
AM
326/boot/%{name}-syms-%{version}
327/boot/%{name}-%{version}.gz
fda6847b 328/boot/%{name}.gz
6ca9eddd
JR
329%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenconsoled
330%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenstored
331%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xendomains
90a21d83 332%attr(754,root,root) /etc/rc.d/init.d/xen-watchdog
2e8b91a6
JR
333%attr(754,root,root) /etc/rc.d/init.d/xenconsoled
334%attr(754,root,root) /etc/rc.d/init.d/xenstored
e9753e37 335%attr(754,root,root) /etc/rc.d/init.d/xendomains
2e8b91a6
JR
336%{systemdunitdir}/proc-xen.mount
337%{systemdunitdir}/var-lib-xenstored.mount
2e8b91a6
JR
338%{systemdunitdir}/xen-watchdog.service
339%{systemdunitdir}/xenconsoled.service
340%{systemdunitdir}/xenstored.service
403a0e9f 341%dir %{_sysconfdir}/xen
403a0e9f 342%dir %{_sysconfdir}/xen/auto
e9753e37 343%dir %{_sysconfdir}/xen/examples
403a0e9f
AM
344%dir %{_sysconfdir}/xen/scripts
345%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
e9753e37
MM
346%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/examples/*
347%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README*
348%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool
349%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf
2e8b91a6 350%config(noreplace) %verify(not md5 mtime size) /etc/udev/*
403a0e9f 351%attr(755,root,root) %{_bindir}/*
e9753e37
MM
352%attr(755,root,root) %{_sbindir}/[bfgikloqtv]*
353%attr(755,root,root) %{_sbindir}/xen??*
354%attr(755,root,root) %{_sbindir}/xl
355%attr(755,root,root) %{_sbindir}/xsview
47d65e01
JK
356%dir %{_libdir}/%{name}
357%dir %{_libdir}/%{name}/bin
358%attr(744,root,root) %{_libdir}/%{name}/bin/*
38e9ca75 359%if "%{_lib}" != "lib"
81c76053 360%dir %{_prefix}/lib/%{name}
2e8b91a6
JR
361%dir %{_prefix}/lib/%{name}/bin
362%attr(755,root,root) %{_prefix}/lib/%{name}/bin/qemu-dm
363%attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdom-dm
364%attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdompath.sh
38e9ca75 365%endif
81c76053 366%dir %{_prefix}/lib/%{name}/boot
2e8b91a6
JR
367%{_prefix}/lib/%{name}/boot/ioemu-stubdom.gz
368%{_prefix}/lib/%{name}/boot/pv-grub-x86_32.gz
369%{_prefix}/lib/%{name}/boot/pv-grub-x86_64.gz
370%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader
47d65e01 371%{_datadir}/xen
403a0e9f 372%{_mandir}/man?/*
47d65e01
JK
373%{_sharedstatedir}/xen
374%{_sharedstatedir}/xenstored
47d65e01 375%dir /var/run/xenstored
2e8b91a6 376%{systemdtmpfilesdir}/xenstored.conf
403a0e9f 377
26412ee3 378%files libs
403a0e9f 379%defattr(644,root,root,755)
26412ee3 380%attr(755,root,root) %{_libdir}/lib*.so.*
4015585b 381%dir %{_libdir}/fs
d9ee3ddc 382%dir %{_libdir}/fs/ext2fs-lib
2f3b83cd
AG
383%dir %{_libdir}/fs/fat
384%dir %{_libdir}/fs/iso9660
4015585b 385%dir %{_libdir}/fs/reiserfs
386%dir %{_libdir}/fs/ufs
20aeda6e 387%dir %{_libdir}/fs/zfs
4015585b 388%attr(755,root,root) %{_libdir}/fs/*/*.so
26412ee3 389
5dd334af
JB
390%files devel
391%defattr(644,root,root,755)
392%attr(755,root,root) %{_libdir}/lib*.so
393%{_includedir}/*
394
395%files static
396%defattr(644,root,root,755)
397%{_libdir}/lib*.a
398
e9753e37
MM
399%files xend
400%defattr(644,root,root,755)
6ca9eddd
JR
401#%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/blktapctrl
402#%{systemdunitdir}/blktapctrl.service
2e8b91a6 403%{systemdunitdir}/xend.service
6ca9eddd 404%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend
e9753e37
MM
405%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm*
406%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend*
407%attr(755,root,root) %{_sbindir}/xend
408%attr(755,root,root) %{_sbindir}/xm
409%dir %attr(700,root,root) /var/run/xend
2e8b91a6 410%{systemdtmpfilesdir}/xend.conf
e9753e37 411
8e6e2740
ER
412%files -n python-xen
413%defattr(644,root,root,755)
5dd334af 414%attr(755,root,root) %{py_sitedir}/fsimage.so
8e6e2740
ER
415%{py_sitedir}/grub
416%dir %{py_sitedir}/xen
417%dir %{py_sitedir}/xen/lowlevel
418%{py_sitedir}/xen/lowlevel/*.py*
419%attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
e9753e37 420%{py_sitedir}/xen/remus
8e6e2740
ER
421%{py_sitedir}/xen/sv
422%{py_sitedir}/xen/util
423%{py_sitedir}/xen/web
424%{py_sitedir}/xen/xend
425%{py_sitedir}/xen/xm
426%{py_sitedir}/xen/xsview
427%{py_sitedir}/xen/*.py*
428%if "%{py_ver}" > "2.4"
429%{py_sitedir}/*.egg-info
430%endif
e9753e37
MM
431
432%files -n bash-completion-%{name}
433%defattr(644,root,root,755)
434/etc/bash_completion.d/*
This page took 0.087453 seconds and 4 git commands to generate.