3 # - this is userspace for xen-3.2.0 (provided by kernel-xen.spec)
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
8 # - pldized init scripts
12 %bcond_with pae # build with PAE (HIGHMEM64G) support
13 %bcond_with hvm # build with hvm (full virtualization) support
17 Summary: Xen - a virtual machine monitor
18 Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej
20 Version: %{major}.%{minor}
23 Group: Applications/System
24 Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
25 Source1: %{name}-xend.init
26 Source2: %{name}-xendomains.init
27 Patch0: %{name}-python_scripts.patch
28 Patch1: %{name}-gcc.patch
29 URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
30 %{?with_hvm:BuildRequires: bcc}
31 BuildRequires: curl-devel
32 BuildRequires: e2fsprogs-devel
33 BuildRequires: gcc >= 5:3.4
34 BuildRequires: latex2html
35 BuildRequires: libidn-devel
36 BuildRequires: ncurses-devel
37 BuildRequires: python-devel
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.268
40 BuildRequires: tetex-dvips
41 BuildRequires: tetex-format-latex
42 BuildRequires: tetex-latex-psnfss
43 BuildRequires: transfig
45 BuildRequires: zlib-devel
46 Requires(post,preun): /sbin/chkconfig
47 Requires: %{name}-libs = %{version}-%{release}
48 Requires: ZopeInterface
49 Requires: bridge-utils
54 Requires: kernel(xen0) = %{major}
59 Requires: util-linux-ng
62 ExclusiveArch: %{ix86} %{x8664}
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 %ifnarch i686 athlon pentium3 pentium4
70 This package contains the Xen hypervisor and Xen tools, needed to run
71 virtual machines on x86 systems, together with the kernel-xen*
72 packages. Information on how to use Xen can be found at the Xen
75 Virtualisation can be used to run multiple versions or multiple Linux
76 distributions on one system, or to test untrusted applications in a
77 sandboxed environment. Note that the Xen technology is still in
78 development, and this RPM has received extremely little testing. Don't
79 be surprised if this RPM eats your data, drinks your coffee or makes
80 fun of you in front of your friends.
82 %description -l pl.UTF-8
83 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
84 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
85 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
88 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
89 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
90 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
91 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
92 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
93 się wyśmiewał w obecności przyjaciół.
96 Summary: xen libraries
97 Summary(pl.UTF-8): Biblioteki xena
103 %description libs -l pl.UTF-8
108 Group: Application/System
115 Group: Application/System
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.
149 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
152 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
153 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
154 %{__make} -j1 xen tools \
155 %{?with_pae:XEN_TARGET_X86_PAE=y} \
160 rm -rf $RPM_BUILD_ROOT
161 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
163 %{__make} install-xen install-tools install-docs \
166 %{?with_pae:XEN_TARGET_X86_PAE=y} \
167 DESTDIR=$RPM_BUILD_ROOT \
168 XEN_PYTHON_NATIVE_INSTALL=1
170 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
171 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
172 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
174 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
175 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
177 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
178 cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
180 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
181 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
184 # remove unneeded files
185 rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
186 rm -rf $RPM_BUILD_ROOT%{_docdir}/xen
187 rm -rf $RPM_BUILD_ROOT/''etc/init.d
188 rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz
189 rm -f $RPM_BUILD_ROOT/boot/xen-3.gz
192 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1
193 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1
196 rm -rf $RPM_BUILD_ROOT
199 /sbin/chkconfig --add xend
200 /sbin/chkconfig --add xendomains
203 if [ "$1" = "0" ]; then
205 /sbin/chkconfig --del xend
207 %service xendomains stop
208 /sbin/chkconfig --del xendomains
211 %post libs -p /sbin/ldconfig
212 %postun libs -p /sbin/ldconfig
215 %defattr(644,root,root,755)
216 %doc COPYING README docs/misc/*
218 /boot/%{name}-syms-%{version}
219 /boot/%{name}-%{version}.gz
221 %attr(754,root,root) /etc/rc.d/init.d/*
222 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
223 %dir %{_sysconfdir}/xen
224 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
225 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
226 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b*
227 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12]
228 %dir %{_sysconfdir}/xen/auto
229 %dir %{_sysconfdir}/xen/scripts
230 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
231 %attr(755,root,root) %{_bindir}/*
232 %attr(755,root,root) %{_sbindir}/*
233 %dir %{_libdir}/%{name}
234 %dir %{_libdir}/%{name}/bin
235 %attr(744,root,root) %{_libdir}/%{name}/bin/*
236 %if "%{_lib}" != "lib"
237 %dir %{_prefix}/lib/%{name}
239 %dir %{_prefix}/lib/%{name}/boot
240 %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader
242 %{py_sitedir}/fsimage.so
244 %dir %{py_sitedir}/xen
245 %dir %{py_sitedir}/xen/lowlevel
246 %{py_sitedir}/xen/lowlevel/*.py*
247 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
249 %{py_sitedir}/xen/util
250 %{py_sitedir}/xen/web
251 %{py_sitedir}/xen/xend
253 %{py_sitedir}/xen/xsview
254 %{py_sitedir}/xen/*.py*
255 %if "%{py_ver}" > "2.4"
256 %{py_sitedir}/*.egg-info
259 %{_sharedstatedir}/xen
260 %{_sharedstatedir}/xenstored
261 %dir /var/run/xen-hotplug
262 %dir %attr(700,root,root) /var/run/xend
263 %dir /var/run/xenstored
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_libdir}/lib*.so.*
269 %dir %{_libdir}/fs/ext2fs-lib
270 %dir %{_libdir}/fs/fat
271 %dir %{_libdir}/fs/iso9660
272 %dir %{_libdir}/fs/reiserfs
273 %dir %{_libdir}/fs/ufs
274 %attr(755,root,root) %{_libdir}/fs/*/*.so
278 %defattr(644,root,root,755)
279 %attr(755,root,root) /etc/hotplug/*
283 %defattr(644,root,root,755)
284 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
287 %defattr(644,root,root,755)
288 %attr(755,root,root) %{_libdir}/lib*.so
292 %defattr(644,root,root,755)