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 Patch5: %{name}-drbd-hvm.patch
36 URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
37 BuildRequires: SDL-devel
38 %{?with_hvm:BuildRequires: bcc}
39 BuildRequires: curl-devel
40 BuildRequires: e2fsprogs-devel
41 BuildRequires: gcc >= 5:3.4
42 BuildRequires: gettext-devel
43 BuildRequires: latex2html
44 BuildRequires: libidn-devel
45 BuildRequires: ncurses-devel
46 BuildRequires: pciutils-devel
47 BuildRequires: pkgconfig
48 BuildRequires: python-devel
49 BuildRequires: rpm-pythonprov
50 BuildRequires: rpmbuild(macros) >= 1.268
51 BuildRequires: texlive-dvips
52 #BuildRequires: texlive-latex-data
53 BuildRequires: texlive-latex-psnfss
54 BuildRequires: transfig
56 BuildRequires: zlib-devel
57 Requires(post,preun): /sbin/chkconfig
58 Requires: %{name}-libs = %{version}-%{release}
59 Requires: ZopeInterface
60 Requires: bridge-utils
65 Requires: kernel(xen0)
68 Requires: python-%{name} = %{version}-%{release}
74 ExclusiveArch: %{ix86} %{x8664}
75 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77 # some PPC/SPARC boot image in ELF format
78 %define _noautostrip .*%{_datadir}/xen/qemu/openbios-.*
80 %ifnarch i686 athlon pentium3 pentium4
85 This package contains the Xen hypervisor and Xen tools, needed to run
86 virtual machines on x86 systems, together with the kernel-xen*
87 packages. Information on how to use Xen can be found at the Xen
90 Virtualisation can be used to run multiple versions or multiple Linux
91 distributions on one system, or to test untrusted applications in a
92 sandboxed environment. Note that the Xen technology is still in
93 development, and this RPM has received extremely little testing. Don't
94 be surprised if this RPM eats your data, drinks your coffee or makes
95 fun of you in front of your friends.
97 %description -l pl.UTF-8
98 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
99 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
100 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
103 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
104 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
105 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
106 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
107 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
108 się wyśmiewał w obecności przyjaciół.
111 Summary: xen libraries
112 Summary(pl.UTF-8): Biblioteki xena
118 %description libs -l pl.UTF-8
122 Summary: Header files for xen
123 Summary(pl.UTF-8): Pliki nagłówkowe xena
124 Group: Development/Libraries
125 Requires: %{name}-libs = %{version}-%{release}
128 Header files for xen.
130 %description devel -l pl.UTF-8
131 Pliki nagłówkowe xena.
134 Summary: Static xen libraries
135 Summary(pl.UTF-8): Statyczne biblioteki xena
136 Group: Development/Libraries
137 Requires: %{name}-devel = %{version}-%{release}
140 Static xen libraries.
142 %description static -l pl.UTF-8
143 Statyczne biblioteki xena.
146 Summary: xen hotplug scripts
147 Summary(pl.UTF-8): Skrypty hotplug dla xena
148 Group: Applications/System
153 %description hotplug -l pl.UTF-8
154 Skrypty hotplug dla xena.
157 Summary: xen udev scripts
158 Summary(pl.UTF-8): Skrypty udev dla xena
159 Group: Applications/System
164 %description udev -l pl.UTF-8
165 Skrypty udev dla xena.
167 %package -n python-xen
168 Summary: xen Python modules
169 Summary(pl.UTF-8): Moduły Pythona dla xena
171 Conflicts: xen < 3.2.1-0.3
173 %description -n python-xen
176 %description -n python-xen -l pl.UTF-8
177 Moduły Pythona dla xena.
188 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
191 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
192 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
193 %{__make} -j1 xen tools \
194 %{?with_pae:XEN_TARGET_X86_PAE=y} \
199 rm -rf $RPM_BUILD_ROOT
200 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
202 %{__make} install-xen install-tools install-docs \
205 %{?with_pae:XEN_TARGET_X86_PAE=y} \
206 DESTDIR=$RPM_BUILD_ROOT \
207 XEN_PYTHON_NATIVE_INSTALL=1
209 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
210 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
211 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
213 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
214 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
216 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
217 cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
219 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
220 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
223 # remove unneeded files
224 %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
225 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
226 %{__rm} -r $RPM_BUILD_ROOT/''etc/init.d
227 %{__rm} $RPM_BUILD_ROOT/boot/xen-3.4.gz
228 %{__rm} $RPM_BUILD_ROOT/boot/xen-3.gz
231 rm -rf $RPM_BUILD_ROOT
234 /sbin/chkconfig --add xend
235 /sbin/chkconfig --add xendomains
238 if [ "$1" = "0" ]; then
240 /sbin/chkconfig --del xend
242 %service xendomains stop
243 /sbin/chkconfig --del xendomains
246 %post libs -p /sbin/ldconfig
247 %postun libs -p /sbin/ldconfig
250 %defattr(644,root,root,755)
251 %doc COPYING README docs/misc/*
253 /boot/%{name}-syms-%{version}
254 /boot/%{name}-%{version}.gz
256 %attr(754,root,root) /etc/rc.d/init.d/*
257 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
258 %dir %{_sysconfdir}/xen
259 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
260 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
261 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README
262 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[123]
263 %dir %{_sysconfdir}/xen/auto
264 %dir %{_sysconfdir}/xen/scripts
265 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
266 %attr(755,root,root) %{_bindir}/*
267 %attr(755,root,root) %{_sbindir}/*
268 %dir %{_libdir}/%{name}
269 %dir %{_libdir}/%{name}/bin
270 %attr(744,root,root) %{_libdir}/%{name}/bin/*
271 %if "%{_lib}" != "lib"
272 %dir %{_prefix}/lib/%{name}
274 %dir %{_prefix}/lib/%{name}/boot
275 %{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader}
278 %{_sharedstatedir}/xen
279 %{_sharedstatedir}/xenstored
280 %dir /var/run/xen-hotplug
281 %dir %attr(700,root,root) /var/run/xend
282 %dir /var/run/xenstored
285 %defattr(644,root,root,755)
286 %attr(755,root,root) %{_libdir}/lib*.so.*
288 %dir %{_libdir}/fs/ext2fs-lib
289 %dir %{_libdir}/fs/fat
290 %dir %{_libdir}/fs/iso9660
291 %dir %{_libdir}/fs/reiserfs
292 %dir %{_libdir}/fs/ufs
293 %dir %{_libdir}/fs/zfs
294 %attr(755,root,root) %{_libdir}/fs/*/*.so
297 %defattr(644,root,root,755)
298 %attr(755,root,root) %{_libdir}/lib*.so
302 %defattr(644,root,root,755)
306 %defattr(644,root,root,755)
307 %attr(755,root,root) /etc/hotplug/*
310 %defattr(644,root,root,755)
311 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{py_sitedir}/fsimage.so
317 %dir %{py_sitedir}/xen
318 %dir %{py_sitedir}/xen/lowlevel
319 %{py_sitedir}/xen/lowlevel/*.py*
320 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
322 %{py_sitedir}/xen/util
323 %{py_sitedir}/xen/web
324 %{py_sitedir}/xen/xend
326 %{py_sitedir}/xen/xsview
327 %{py_sitedir}/xen/*.py*
328 %if "%{py_ver}" > "2.4"
329 %{py_sitedir}/*.egg-info