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: f009a7abf51017aeee697c9130b6f8a6
28 Source1: %{name}-xend.init
29 Source2: %{name}-xendomains.init
30 Patch0: %{name}-python_scripts.patch
31 Patch1: %{name}-gcc.patch
32 URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
33 %{?with_hvm:BuildRequires: bcc}
34 BuildRequires: curl-devel
35 BuildRequires: e2fsprogs-devel
36 BuildRequires: gcc >= 5:3.4
37 BuildRequires: latex2html
38 BuildRequires: libidn-devel
39 BuildRequires: ncurses-devel
40 BuildRequires: python-devel
41 BuildRequires: rpm-pythonprov
42 BuildRequires: rpmbuild(macros) >= 1.268
43 BuildRequires: texlive-dvips
44 BuildRequires: texlive-latex-data
45 BuildRequires: texlive-latex-psnfss
46 BuildRequires: transfig
48 BuildRequires: zlib-devel
49 Requires(post,preun): /sbin/chkconfig
50 Requires: %{name}-libs = %{version}-%{release}
51 Requires: ZopeInterface
52 Requires: bridge-utils
57 Requires: kernel(xen0) = %{major}
60 Requires: python-%{name} = %{version}-%{release}
66 ExclusiveArch: %{ix86} %{x8664}
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 # some PPC/SPARC boot image in ELF format
70 %define _noautostrip .*%{_datadir}/%{name}/qemu/openbios-.*
72 %ifnarch i686 athlon pentium3 pentium4
77 This package contains the Xen hypervisor and Xen tools, needed to run
78 virtual machines on x86 systems, together with the kernel-xen*
79 packages. Information on how to use Xen can be found at the Xen
82 Virtualisation can be used to run multiple versions or multiple Linux
83 distributions on one system, or to test untrusted applications in a
84 sandboxed environment. Note that the Xen technology is still in
85 development, and this RPM has received extremely little testing. Don't
86 be surprised if this RPM eats your data, drinks your coffee or makes
87 fun of you in front of your friends.
89 %description -l pl.UTF-8
90 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
91 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
92 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
95 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
96 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
97 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
98 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
99 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
100 się wyśmiewał w obecności przyjaciół.
103 Summary: xen libraries
104 Summary(pl.UTF-8): Biblioteki xena
110 %description libs -l pl.UTF-8
114 Summary: Header files for xen
115 Summary(pl.UTF-8): Pliki nagłówkowe xena
116 Group: Development/Libraries
117 Requires: %{name}-libs = %{version}-%{release}
120 Header files for xen.
122 %description devel -l pl.UTF-8
123 Pliki nagłówkowe xena.
126 Summary: Static xen libraries
127 Summary(pl.UTF-8): Statyczne biblioteki xena
128 Group: Development/Libraries
129 Requires: %{name}-devel = %{version}-%{release}
132 Static xen libraries.
134 %description static -l pl.UTF-8
135 Statyczne biblioteki xena.
138 Summary: xen hotplug scripts
139 Summary(pl.UTF-8): Skrypty hotplug dla xena
140 Group: Application/System
145 %description hotplug -l pl.UTF-8
146 Skrypty hotplug dla xena.
149 Summary: xen udev scripts
150 Summary(pl.UTF-8): Skrypty udev dla xena
151 Group: Application/System
156 %description udev -l pl.UTF-8
157 Skrypty udev dla xena.
159 %package -n python-xen
160 Summary: xen Python modules
161 Summary(pl.UTF-8): Moduły Pythona dla xena
163 Conflicts: xen < 3.2.1-0.3
165 %description -n python-xen
168 %description -n python-xen -l pl.UTF-8
169 Moduły Pythona dla xena.
176 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
179 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
180 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
181 %{__make} -j1 xen tools \
182 %{?with_pae:XEN_TARGET_X86_PAE=y} \
187 rm -rf $RPM_BUILD_ROOT
188 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
190 %{__make} install-xen install-tools install-docs \
193 %{?with_pae:XEN_TARGET_X86_PAE=y} \
194 DESTDIR=$RPM_BUILD_ROOT \
195 XEN_PYTHON_NATIVE_INSTALL=1
197 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
198 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
199 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
201 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
202 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
204 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
205 cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
207 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
208 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
211 # remove unneeded files
212 rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
213 rm -rf $RPM_BUILD_ROOT%{_docdir}/xen
214 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html
215 rm -rf $RPM_BUILD_ROOT/''etc/init.d
216 rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz
217 rm -f $RPM_BUILD_ROOT/boot/xen-3.gz
218 # strip - Unable to recognise the format of the input file
219 rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc32
220 rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc64
224 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1
225 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1
228 rm -rf $RPM_BUILD_ROOT
231 /sbin/chkconfig --add xend
232 /sbin/chkconfig --add xendomains
235 if [ "$1" = "0" ]; then
237 /sbin/chkconfig --del xend
239 %service xendomains stop
240 /sbin/chkconfig --del xendomains
243 %post libs -p /sbin/ldconfig
244 %postun libs -p /sbin/ldconfig
247 %defattr(644,root,root,755)
248 %doc COPYING README docs/misc/*
250 /boot/%{name}-syms-%{version}
251 /boot/%{name}-%{version}.gz
253 %attr(754,root,root) /etc/rc.d/init.d/*
254 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
255 %dir %{_sysconfdir}/xen
256 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
257 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
258 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b*
259 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12]
260 %dir %{_sysconfdir}/xen/auto
261 %dir %{_sysconfdir}/xen/scripts
262 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
263 %attr(755,root,root) %{_bindir}/*
264 %attr(755,root,root) %{_sbindir}/*
265 %dir %{_libdir}/%{name}
266 %dir %{_libdir}/%{name}/bin
267 %attr(744,root,root) %{_libdir}/%{name}/bin/*
268 %if "%{_lib}" != "lib"
269 %dir %{_prefix}/lib/%{name}
271 %dir %{_prefix}/lib/%{name}/boot
272 %{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader}
275 %{_sharedstatedir}/xen
276 %{_sharedstatedir}/xenstored
277 %dir /var/run/xen-hotplug
278 %dir %attr(700,root,root) /var/run/xend
279 %dir /var/run/xenstored
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_libdir}/lib*.so.*
285 %dir %{_libdir}/fs/ext2fs-lib
286 %dir %{_libdir}/fs/fat
287 %dir %{_libdir}/fs/iso9660
288 %dir %{_libdir}/fs/reiserfs
289 %dir %{_libdir}/fs/ufs
290 %attr(755,root,root) %{_libdir}/fs/*/*.so
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_libdir}/lib*.so
298 %defattr(644,root,root,755)
303 %defattr(644,root,root,755)
304 %attr(755,root,root) /etc/hotplug/*
308 %defattr(644,root,root,755)
309 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{py_sitedir}/fsimage.so
315 %dir %{py_sitedir}/xen
316 %dir %{py_sitedir}/xen/lowlevel
317 %{py_sitedir}/xen/lowlevel/*.py*
318 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
320 %{py_sitedir}/xen/util
321 %{py_sitedir}/xen/web
322 %{py_sitedir}/xen/xend
324 %{py_sitedir}/xen/xsview
325 %{py_sitedir}/xen/*.py*
326 %if "%{py_ver}" > "2.4"
327 %{py_sitedir}/*.egg-info