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 Patch3: %{name}-curses.patch
34 Patch4: %{name}-python27.patch
35 URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
36 BuildRequires: SDL-devel
37 %{?with_hvm:BuildRequires: bcc}
38 BuildRequires: curl-devel
39 BuildRequires: e2fsprogs-devel
40 BuildRequires: gcc >= 5:3.4
41 BuildRequires: gettext-devel
42 BuildRequires: latex2html
43 BuildRequires: libidn-devel
44 BuildRequires: ncurses-devel
45 BuildRequires: pciutils-devel
46 BuildRequires: pkgconfig
47 BuildRequires: python-devel
48 BuildRequires: rpm-pythonprov
49 BuildRequires: rpmbuild(macros) >= 1.268
50 BuildRequires: texlive-dvips
51 #BuildRequires: texlive-latex-data
52 BuildRequires: texlive-latex-psnfss
53 BuildRequires: transfig
55 BuildRequires: zlib-devel
56 Requires(post,preun): /sbin/chkconfig
57 Requires: %{name}-libs = %{version}-%{release}
58 Requires: ZopeInterface
59 Requires: bridge-utils
64 Requires: kernel(xen0)
67 Requires: python-%{name} = %{version}-%{release}
73 ExclusiveArch: %{ix86} %{x8664}
74 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76 # some PPC/SPARC boot image in ELF format
77 %define _noautostrip .*%{_datadir}/xen/qemu/openbios-.*
79 %ifnarch i686 athlon pentium3 pentium4
84 This package contains the Xen hypervisor and Xen tools, needed to run
85 virtual machines on x86 systems, together with the kernel-xen*
86 packages. Information on how to use Xen can be found at the Xen
89 Virtualisation can be used to run multiple versions or multiple Linux
90 distributions on one system, or to test untrusted applications in a
91 sandboxed environment. Note that the Xen technology is still in
92 development, and this RPM has received extremely little testing. Don't
93 be surprised if this RPM eats your data, drinks your coffee or makes
94 fun of you in front of your friends.
96 %description -l pl.UTF-8
97 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
98 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
99 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
102 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
103 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
104 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
105 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
106 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
107 się wyśmiewał w obecności przyjaciół.
110 Summary: xen libraries
111 Summary(pl.UTF-8): Biblioteki xena
117 %description libs -l pl.UTF-8
121 Summary: Header files for xen
122 Summary(pl.UTF-8): Pliki nagłówkowe xena
123 Group: Development/Libraries
124 Requires: %{name}-libs = %{version}-%{release}
127 Header files for xen.
129 %description devel -l pl.UTF-8
130 Pliki nagłówkowe xena.
133 Summary: Static xen libraries
134 Summary(pl.UTF-8): Statyczne biblioteki xena
135 Group: Development/Libraries
136 Requires: %{name}-devel = %{version}-%{release}
139 Static xen libraries.
141 %description static -l pl.UTF-8
142 Statyczne biblioteki xena.
145 Summary: xen hotplug scripts
146 Summary(pl.UTF-8): Skrypty hotplug dla xena
147 Group: Applications/System
152 %description hotplug -l pl.UTF-8
153 Skrypty hotplug dla xena.
156 Summary: xen udev scripts
157 Summary(pl.UTF-8): Skrypty udev dla xena
158 Group: Applications/System
163 %description udev -l pl.UTF-8
164 Skrypty udev dla xena.
166 %package -n python-xen
167 Summary: xen Python modules
168 Summary(pl.UTF-8): Moduły Pythona dla xena
170 Conflicts: xen < 3.2.1-0.3
172 %description -n python-xen
175 %description -n python-xen -l pl.UTF-8
176 Moduły Pythona dla xena.
186 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
189 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
190 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
191 %{__make} -j1 xen tools \
192 %{?with_pae:XEN_TARGET_X86_PAE=y} \
197 rm -rf $RPM_BUILD_ROOT
198 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
200 %{__make} install-xen install-tools install-docs \
203 %{?with_pae:XEN_TARGET_X86_PAE=y} \
204 DESTDIR=$RPM_BUILD_ROOT \
205 XEN_PYTHON_NATIVE_INSTALL=1
207 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
208 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
209 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
211 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
212 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
214 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
215 cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
217 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
218 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
221 # remove unneeded files
222 %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
223 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
224 %{__rm} -r $RPM_BUILD_ROOT/''etc/init.d
225 %{__rm} $RPM_BUILD_ROOT/boot/xen-3.4.gz
226 %{__rm} $RPM_BUILD_ROOT/boot/xen-3.gz
229 rm -rf $RPM_BUILD_ROOT
232 /sbin/chkconfig --add xend
233 /sbin/chkconfig --add xendomains
236 if [ "$1" = "0" ]; then
238 /sbin/chkconfig --del xend
240 %service xendomains stop
241 /sbin/chkconfig --del xendomains
244 %post libs -p /sbin/ldconfig
245 %postun libs -p /sbin/ldconfig
248 %defattr(644,root,root,755)
249 %doc COPYING README docs/misc/*
251 /boot/%{name}-syms-%{version}
252 /boot/%{name}-%{version}.gz
254 %attr(754,root,root) /etc/rc.d/init.d/*
255 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
256 %dir %{_sysconfdir}/xen
257 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
258 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
259 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README
260 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[123]
261 %dir %{_sysconfdir}/xen/auto
262 %dir %{_sysconfdir}/xen/scripts
263 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
264 %attr(755,root,root) %{_bindir}/*
265 %attr(755,root,root) %{_sbindir}/*
266 %dir %{_libdir}/%{name}
267 %dir %{_libdir}/%{name}/bin
268 %attr(744,root,root) %{_libdir}/%{name}/bin/*
269 %if "%{_lib}" != "lib"
270 %dir %{_prefix}/lib/%{name}
272 %dir %{_prefix}/lib/%{name}/boot
273 %{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader}
276 %{_sharedstatedir}/xen
277 %{_sharedstatedir}/xenstored
278 %dir /var/run/xen-hotplug
279 %dir %attr(700,root,root) /var/run/xend
280 %dir /var/run/xenstored
283 %defattr(644,root,root,755)
284 %attr(755,root,root) %{_libdir}/lib*.so.*
286 %dir %{_libdir}/fs/ext2fs-lib
287 %dir %{_libdir}/fs/fat
288 %dir %{_libdir}/fs/iso9660
289 %dir %{_libdir}/fs/reiserfs
290 %dir %{_libdir}/fs/ufs
291 %dir %{_libdir}/fs/zfs
292 %attr(755,root,root) %{_libdir}/fs/*/*.so
295 %defattr(644,root,root,755)
296 %attr(755,root,root) %{_libdir}/lib*.so
300 %defattr(644,root,root,755)
304 %defattr(644,root,root,755)
305 %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