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
13 %bcond_with pae # build with PAE (HIGHMEM64G) support
14 %bcond_with hvm # build with hvm (full virtualization) support
18 Summary: Xen - a virtual machine monitor
19 Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej
21 Version: %{major}.%{minor}
24 Group: Applications/System
25 Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
26 Source1: %{name}-xend.init
27 Source2: %{name}-xendomains.init
28 Patch0: %{name}-python_scripts.patch
29 Patch1: %{name}-gcc.patch
30 URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
31 %{?with_hvm:BuildRequires: bcc}
32 BuildRequires: curl-devel
33 BuildRequires: e2fsprogs-devel
34 BuildRequires: gcc >= 5:3.4
35 BuildRequires: latex2html
36 BuildRequires: libidn-devel
37 BuildRequires: ncurses-devel
38 BuildRequires: python-devel
39 BuildRequires: rpm-pythonprov
40 BuildRequires: rpmbuild(macros) >= 1.268
41 BuildRequires: texlive-dvips
42 BuildRequires: texlive-latex-data
43 BuildRequires: texlive-latex-psnfss
44 BuildRequires: transfig
46 BuildRequires: zlib-devel
47 Requires(post,preun): /sbin/chkconfig
48 Requires: %{name}-libs = %{version}-%{release}
49 Requires: ZopeInterface
50 Requires: bridge-utils
55 Requires: kernel(xen0) = %{major}
58 Requires: python-%{name} = %{version}-%{release}
64 ExclusiveArch: %{ix86} %{x8664}
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 %ifnarch i686 athlon pentium3 pentium4
72 This package contains the Xen hypervisor and Xen tools, needed to run
73 virtual machines on x86 systems, together with the kernel-xen*
74 packages. Information on how to use Xen can be found at the Xen
77 Virtualisation can be used to run multiple versions or multiple Linux
78 distributions on one system, or to test untrusted applications in a
79 sandboxed environment. Note that the Xen technology is still in
80 development, and this RPM has received extremely little testing. Don't
81 be surprised if this RPM eats your data, drinks your coffee or makes
82 fun of you in front of your friends.
84 %description -l pl.UTF-8
85 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
86 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
87 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
90 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
91 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
92 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
93 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
94 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
95 się wyśmiewał w obecności przyjaciół.
98 Summary: xen libraries
99 Summary(pl.UTF-8): Biblioteki xena
105 %description libs -l pl.UTF-8
109 Summary: Header files for xen
110 Summary(pl.UTF-8): Pliki nagłówkowe xena
111 Group: Development/Libraries
112 Requires: %{name}-libs = %{version}-%{release}
115 Header files for xen.
117 %description devel -l pl.UTF-8
118 Pliki nagłówkowe xena.
121 Summary: Static xen libraries
122 Summary(pl.UTF-8): Statyczne biblioteki xena
123 Group: Development/Libraries
124 Requires: %{name}-devel = %{version}-%{release}
127 Static xen libraries.
129 %description static -l pl.UTF-8
130 Statyczne biblioteki xena.
133 Summary: xen hotplug scripts
134 Summary(pl.UTF-8): Skrypty hotplug dla xena
135 Group: Application/System
140 %description hotplug -l pl.UTF-8
141 Skrypty hotplug dla xena.
144 Summary: xen udev scripts
145 Summary(pl.UTF-8): Skrypty udev dla xena
146 Group: Application/System
151 %description udev -l pl.UTF-8
152 Skrypty udev dla xena.
154 %package -n python-xen
155 Summary: xen Python modules
156 Summary(pl.UTF-8): Moduły Pythona dla xena
158 Conflicts: xen < 3.2.1-0.3
160 %description -n python-xen
163 %description -n python-xen -l pl.UTF-8
164 Moduły Pythona dla xena.
171 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
174 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
175 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
176 %{__make} -j1 xen tools \
177 %{?with_pae:XEN_TARGET_X86_PAE=y} \
182 rm -rf $RPM_BUILD_ROOT
183 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
185 %{__make} install-xen install-tools install-docs \
188 %{?with_pae:XEN_TARGET_X86_PAE=y} \
189 DESTDIR=$RPM_BUILD_ROOT \
190 XEN_PYTHON_NATIVE_INSTALL=1
192 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
193 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
194 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
196 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
197 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
199 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
200 cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
202 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
203 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
206 # remove unneeded files
207 rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
208 rm -rf $RPM_BUILD_ROOT%{_docdir}/xen
209 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html
210 rm -rf $RPM_BUILD_ROOT/''etc/init.d
211 rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz
212 rm -f $RPM_BUILD_ROOT/boot/xen-3.gz
213 # strip - Unable to recognise the format of the input file
214 rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc32
215 rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc64
219 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1
220 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1
223 rm -rf $RPM_BUILD_ROOT
226 /sbin/chkconfig --add xend
227 /sbin/chkconfig --add xendomains
230 if [ "$1" = "0" ]; then
232 /sbin/chkconfig --del xend
234 %service xendomains stop
235 /sbin/chkconfig --del xendomains
238 %post libs -p /sbin/ldconfig
239 %postun libs -p /sbin/ldconfig
242 %defattr(644,root,root,755)
243 %doc COPYING README docs/misc/*
245 /boot/%{name}-syms-%{version}
246 /boot/%{name}-%{version}.gz
248 %attr(754,root,root) /etc/rc.d/init.d/*
249 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
250 %dir %{_sysconfdir}/xen
251 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
252 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
253 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b*
254 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12]
255 %dir %{_sysconfdir}/xen/auto
256 %dir %{_sysconfdir}/xen/scripts
257 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
258 %attr(755,root,root) %{_bindir}/*
259 %attr(755,root,root) %{_sbindir}/*
260 %dir %{_libdir}/%{name}
261 %dir %{_libdir}/%{name}/bin
262 %attr(744,root,root) %{_libdir}/%{name}/bin/*
263 %if "%{_lib}" != "lib"
264 %dir %{_prefix}/lib/%{name}
266 %dir %{_prefix}/lib/%{name}/boot
267 %{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader}
270 %{_sharedstatedir}/xen
271 %{_sharedstatedir}/xenstored
272 %dir /var/run/xen-hotplug
273 %dir %attr(700,root,root) /var/run/xend
274 %dir /var/run/xenstored
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_libdir}/lib*.so.*
280 %dir %{_libdir}/fs/ext2fs-lib
281 %dir %{_libdir}/fs/fat
282 %dir %{_libdir}/fs/iso9660
283 %dir %{_libdir}/fs/reiserfs
284 %dir %{_libdir}/fs/ufs
285 %attr(755,root,root) %{_libdir}/fs/*/*.so
288 %defattr(644,root,root,755)
289 %attr(755,root,root) %{_libdir}/lib*.so
293 %defattr(644,root,root,755)
298 %defattr(644,root,root,755)
299 %attr(755,root,root) /etc/hotplug/*
303 %defattr(644,root,root,755)
304 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{py_sitedir}/fsimage.so
310 %dir %{py_sitedir}/xen
311 %dir %{py_sitedir}/xen/lowlevel
312 %{py_sitedir}/xen/lowlevel/*.py*
313 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
315 %{py_sitedir}/xen/util
316 %{py_sitedir}/xen/web
317 %{py_sitedir}/xen/xend
319 %{py_sitedir}/xen/xsview
320 %{py_sitedir}/xen/*.py*
321 %if "%{py_ver}" > "2.4"
322 %{py_sitedir}/*.egg-info