]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # TODO: | |
3 | # - most of the qemu config options aren't detected (curses, NPTL, vde, fdt) | |
4 | # - package the ocaml stuff | |
5 | # | |
6 | %define xen_extfiles_url http://xenbits.xensource.com/xen-extfiles | |
7 | Summary: Xen - a virtual machine monitor | |
8 | Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej | |
9 | Name: xen | |
10 | Version: 4.1.2 | |
11 | Release: 0.3 | |
12 | License: GPL | |
13 | Group: Applications/System | |
14 | Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 73561faf3c1b5e36ec5c089b5db848ad | |
16 | # used by stubdoms | |
17 | Source10: %{xen_extfiles_url}/lwip-1.3.0.tar.gz | |
18 | # Source10-md5: 36cc57650cffda9a0269493be2a169bb | |
19 | Source11: %{xen_extfiles_url}/newlib-1.16.0.tar.gz | |
20 | # Source11-md5: bf8f1f9e3ca83d732c00a79a6ef29bc4 | |
21 | Source12: %{xen_extfiles_url}/zlib-1.2.3.tar.gz | |
22 | # Source12-md5: debc62758716a169df9f62e6ab2bc634 | |
23 | Source13: %{xen_extfiles_url}/pciutils-2.2.9.tar.bz2 | |
24 | # Source13-md5: cec05e7785497c5e19da2f114b934ffd | |
25 | Source14: %{xen_extfiles_url}/grub-0.97.tar.gz | |
26 | # Source14-md5: cd3f3eb54446be6003156158d51f4884 | |
27 | Source15: %{xen_extfiles_url}/ipxe-git-v1.0.0.tar.gz | |
28 | # Source15-md5: fb7df96781d337899066d82059346885 | |
29 | Source30: proc-xen.mount | |
30 | Source31: var-lib-xenstored.mount | |
31 | Source32: blktapctrl.service | |
32 | Source33: blktapctrl.sysconfig | |
33 | Source34: xenconsoled.service | |
34 | Source35: xenconsoled.sysconfig | |
35 | Source36: xenstored.service | |
36 | Source37: xenstored.sysconfig | |
37 | Source38: xenstored.tmpfiles | |
38 | Source39: xend.service | |
39 | Source40: xend.tmpfiles | |
40 | Source41: xen-watchdog.service | |
41 | Source42: xen-dom0-modules-load.conf | |
42 | # sysvinit scripts | |
43 | Source50: xend.init | |
44 | Source51: xenconsoled.init | |
45 | Source52: xenstored.init | |
46 | Source53: xen-watchdog.init | |
47 | Source54: xendomains.init | |
48 | Source55: xen.logrotate | |
49 | Patch0: %{name}-python_scripts.patch | |
50 | Patch1: %{name}-symbols.patch | |
51 | Patch2: %{name}-curses.patch | |
52 | Patch3: %{name}-xz.patch | |
53 | Patch4: pygrubfix.patch | |
54 | Patch5: pygrubfix2.patch | |
55 | Patch6: qemu-xen-4.1-testing.git-3cf61880403b4e484539596a95937cc066243388.patch | |
56 | Patch7: xen-4.1-testing.23190.patch | |
57 | Patch8: xend.catchbt.patch | |
58 | Patch9: xend.empty.xml.patch | |
59 | Patch10: xend-pci-loop.patch | |
60 | Patch11: xen-dumpdir.patch | |
61 | Patch12: xen-net-disable-iptables-on-bridge.patch | |
62 | Patch13: xen-configure-xend.patch | |
63 | # stubdom patch | |
64 | Patch100: grub-ext4-support.patch | |
65 | URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html | |
66 | BuildRequires: SDL-devel | |
67 | BuildRequires: acpica | |
68 | BuildRequires: bcc | |
69 | BuildRequires: curl-devel | |
70 | BuildRequires: e2fsprogs-devel | |
71 | BuildRequires: gcc >= 5:3.4 | |
72 | BuildRequires: gettext-devel | |
73 | BuildRequires: latex2html | |
74 | BuildRequires: libidn-devel | |
75 | BuildRequires: ncurses-devel | |
76 | BuildRequires: pciutils-devel | |
77 | BuildRequires: pkgconfig | |
78 | BuildRequires: python-devel | |
79 | BuildRequires: rpm-pythonprov | |
80 | BuildRequires: rpmbuild(macros) >= 1.268 | |
81 | #BuildRequires: texlive-dvips | |
82 | #BuildRequires: texlive-latex-data | |
83 | BuildRequires: texlive-latex-psnfss | |
84 | BuildRequires: transfig | |
85 | BuildRequires: which | |
86 | BuildRequires: zlib-devel | |
87 | Requires(post,preun): /sbin/chkconfig | |
88 | Requires: %{name}-libs = %{version}-%{release} | |
89 | Requires: ZopeInterface | |
90 | Requires: bridge-utils | |
91 | Requires: coreutils | |
92 | Requires: diffutils | |
93 | Requires: gawk | |
94 | Requires: iptables | |
95 | Requires: losetup | |
96 | Requires: net-tools | |
97 | Requires: python-%{name} = %{version}-%{release} | |
98 | Requires: rc-scripts | |
99 | Requires: sed | |
100 | Requires: util-linux | |
101 | Requires: which | |
102 | Obsoletes: xen-doc | |
103 | Obsoletes: xen-udev | |
104 | ExclusiveArch: %{ix86} %{x8664} | |
105 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
106 | ||
107 | # some PPC/SPARC boot image in ELF format | |
108 | %define _noautostrip .*%{_datadir}/xen/qemu/openbios-.* | |
109 | ||
110 | %description | |
111 | This package contains the Xen hypervisor and Xen tools, needed to run | |
112 | virtual machines on x86 systems, together with the kernel-xen* | |
113 | packages. Information on how to use Xen can be found at the Xen | |
114 | project pages. | |
115 | ||
116 | Virtualisation can be used to run multiple versions or multiple Linux | |
117 | distributions on one system, or to test untrusted applications in a | |
118 | sandboxed environment. Note that the Xen technology is still in | |
119 | development, and this RPM has received extremely little testing. Don't | |
120 | be surprised if this RPM eats your data, drinks your coffee or makes | |
121 | fun of you in front of your friends. | |
122 | ||
123 | %description -l pl.UTF-8 | |
124 | Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do | |
125 | uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami | |
126 | kernel-xen*. Informacje jak używać Xena można znaleźć na stronach | |
127 | projektu. | |
128 | ||
129 | Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu | |
130 | dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych | |
131 | aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia | |
132 | Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy | |
133 | być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie | |
134 | się wyśmiewał w obecności przyjaciół. | |
135 | ||
136 | %package libs | |
137 | Summary: xen libraries | |
138 | Summary(pl.UTF-8): Biblioteki xena | |
139 | Group: Libraries | |
140 | ||
141 | %description libs | |
142 | xen libraries. | |
143 | ||
144 | %description libs -l pl.UTF-8 | |
145 | Biblioteki xena. | |
146 | ||
147 | %package devel | |
148 | Summary: Header files for xen | |
149 | Summary(pl.UTF-8): Pliki nagłówkowe xena | |
150 | Group: Development/Libraries | |
151 | Requires: %{name}-libs = %{version}-%{release} | |
152 | ||
153 | %description devel | |
154 | Header files for xen. | |
155 | ||
156 | %description devel -l pl.UTF-8 | |
157 | Pliki nagłówkowe xena. | |
158 | ||
159 | %package static | |
160 | Summary: Static xen libraries | |
161 | Summary(pl.UTF-8): Statyczne biblioteki xena | |
162 | Group: Development/Libraries | |
163 | Requires: %{name}-devel = %{version}-%{release} | |
164 | ||
165 | %description static | |
166 | Static xen libraries. | |
167 | ||
168 | %description static -l pl.UTF-8 | |
169 | Statyczne biblioteki xena. | |
170 | ||
171 | %package xend | |
172 | Summary: xend daemon | |
173 | Summary(pl.UTF-8): Demon xend | |
174 | Group: Daemons | |
175 | ||
176 | %description xend | |
177 | xend daemon. | |
178 | ||
179 | %description xend -l pl.UTF-8 | |
180 | Demon xend. | |
181 | ||
182 | %package -n python-xen | |
183 | Summary: xen Python modules | |
184 | Summary(pl.UTF-8): Moduły Pythona dla xena | |
185 | Group: Libraries | |
186 | Conflicts: xen < 3.2.1-0.3 | |
187 | ||
188 | %description -n python-xen | |
189 | xen Python modules. | |
190 | ||
191 | %description -n python-xen -l pl.UTF-8 | |
192 | Moduły Pythona dla xena. | |
193 | ||
194 | %package -n bash-completion-%{name} | |
195 | Summary: bash-completion for xen | |
196 | Group: Applications/Shells | |
197 | Requires: %{name} = %{version}-%{release} | |
198 | Requires: bash-completion | |
199 | ||
200 | %description -n bash-completion-%{name} | |
201 | This package provides bash-completion for xen. | |
202 | ||
203 | %prep | |
204 | %setup -q | |
205 | %patch0 -p1 | |
206 | %patch1 -p1 | |
207 | %patch2 -p1 | |
208 | %patch3 -p1 | |
209 | %patch4 -p1 | |
210 | %patch5 -p1 | |
211 | %patch6 -p1 | |
212 | %patch7 -p1 | |
213 | %patch8 -p1 | |
214 | %patch9 -p1 | |
215 | %patch10 -p1 | |
216 | %patch11 -p1 | |
217 | %patch12 -p1 | |
218 | %patch13 -p1 | |
219 | ||
220 | %{__rm} -v tools/check/*.orig | |
221 | ||
222 | # stubdom sources | |
223 | ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom | |
224 | ln -s %{PATCH100} stubdom/grub.patches/99grub-ext4-support.patch | |
225 | ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz | |
226 | ||
227 | %build | |
228 | export CFLAGS="%{rpmcflags} -I/usr/include/ncurses" | |
229 | export CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" | |
230 | ||
231 | %{__make} dist-xen dist-tools dist-docs \ | |
232 | prefix=%{_prefix} \ | |
233 | CC="%{__cc}" \ | |
234 | CXX="%{__cxx}" | |
235 | ||
236 | unset CFLAGS | |
237 | unset CXXFLAGS | |
238 | %{__make} -j1 dist-stubdom \ | |
239 | CC="%{__cc}" \ | |
240 | CXX="%{__cxx}" | |
241 | ||
242 | %install | |
243 | rm -rf $RPM_BUILD_ROOT | |
244 | install -d $RPM_BUILD_ROOT/etc/{xen/examples,modules-load.d,logrotate.d} \ | |
245 | $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,%{systemdunitdir}} | |
246 | ||
247 | %{__make} -j1 install-xen install-tools install-stubdom install-docs \ | |
248 | prefix=%{_prefix} \ | |
249 | DESTDIR=$RPM_BUILD_ROOT | |
250 | ||
251 | %if "%{_lib}" == "lib64" | |
252 | ln -s %{_prefix}/lib/%{name}/bin/qemu-dm $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/qemu-dm | |
253 | %endif | |
254 | ||
255 | install %{SOURCE30} $RPM_BUILD_ROOT%{systemdunitdir}/proc-xen.mount | |
256 | install %{SOURCE31} $RPM_BUILD_ROOT%{systemdunitdir}/var-lib-xenstored.mount | |
257 | # started internally by xend | |
258 | #install %{SOURCE32} $RPM_BUILD_ROOT%{systemdunitdir}/blktapctrl.service | |
259 | #install %{SOURCE33} $RPM_BUILD_ROOT/etc/sysconfig/blktapctrl | |
260 | install %{SOURCE34} $RPM_BUILD_ROOT%{systemdunitdir}/xenconsoled.service | |
261 | install %{SOURCE35} $RPM_BUILD_ROOT/etc/sysconfig/xenconsoled | |
262 | install %{SOURCE36} $RPM_BUILD_ROOT%{systemdunitdir}/xenstored.service | |
263 | install %{SOURCE37} $RPM_BUILD_ROOT/etc/sysconfig/xenstored | |
264 | install %{SOURCE38} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xenstored.conf | |
265 | install %{SOURCE39} $RPM_BUILD_ROOT%{systemdunitdir}/xend.service | |
266 | install %{SOURCE40} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/xend.conf | |
267 | install %{SOURCE41} $RPM_BUILD_ROOT%{systemdunitdir}/xen-watchdog.service | |
268 | install %{SOURCE42} $RPM_BUILD_ROOT/etc/modules-load.d/xen-dom0.conf | |
269 | # sysvinit scripts | |
270 | %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/* | |
271 | install %{SOURCE50} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend | |
272 | install %{SOURCE51} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenconsoled | |
273 | install %{SOURCE52} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenstored | |
274 | install %{SOURCE53} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-watchdog | |
275 | install %{SOURCE54} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains | |
276 | install %{SOURCE55} $RPM_BUILD_ROOT/etc/logrotate.d/xen | |
277 | ||
278 | mv $RPM_BUILD_ROOT/etc/xen/{xmexample*,examples} | |
279 | ||
280 | cp -p tools/blktap/README{,.blktap} | |
281 | cp -p tools/xenmon/README{,.xenmon} | |
282 | ||
283 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
284 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
285 | ||
286 | %py_postclean | |
287 | ||
288 | # remove unneeded files | |
289 | %{__rm} $RPM_BUILD_ROOT/boot/xen-4.1.gz | |
290 | %{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz | |
291 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen | |
292 | %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING | |
293 | ||
294 | %clean | |
295 | rm -rf $RPM_BUILD_ROOT | |
296 | ||
297 | %post | |
298 | /sbin/chkconfig --add xen-watchdog | |
299 | /sbin/chkconfig --add xenconsoled | |
300 | /sbin/chkconfig --add xenstored | |
301 | /sbin/chkconfig --add xendomains | |
302 | ||
303 | %preun | |
304 | if [ "$1" = "0" ]; then | |
305 | %service xendomains stop | |
306 | /sbin/chkconfig --del xendomains | |
307 | ||
308 | %service xenconsoled stop | |
309 | /sbin/chkconfig --del xenconsoled | |
310 | ||
311 | %service xenstored stop | |
312 | /sbin/chkconfig --del xenstored | |
313 | ||
314 | %service xen-watchdog stop | |
315 | /sbin/chkconfig --del xen-watchdog | |
316 | fi | |
317 | ||
318 | %post xend | |
319 | /sbin/chkconfig --add xend | |
320 | ||
321 | %preun xend | |
322 | if [ "$1" = "0" ]; then | |
323 | %service xend stop | |
324 | /sbin/chkconfig --del xend | |
325 | fi | |
326 | ||
327 | %post libs -p /sbin/ldconfig | |
328 | %postun libs -p /sbin/ldconfig | |
329 | ||
330 | %files | |
331 | %defattr(644,root,root,755) | |
332 | %doc COPYING README* docs/misc/* | |
333 | %doc docs/html/* | |
334 | %doc tools/blktap/README.blktap tools/xenmon/README.xenmon | |
335 | %doc tools/ioemu-dir/*.html | |
336 | /boot/%{name}-syms-%{version} | |
337 | /boot/%{name}-%{version}.gz | |
338 | /boot/%{name}.gz | |
339 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenconsoled | |
340 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenstored | |
341 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xendomains | |
342 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/xen | |
343 | %attr(754,root,root) /etc/rc.d/init.d/xen-watchdog | |
344 | %attr(754,root,root) /etc/rc.d/init.d/xenconsoled | |
345 | %attr(754,root,root) /etc/rc.d/init.d/xenstored | |
346 | %attr(754,root,root) /etc/rc.d/init.d/xendomains | |
347 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/xen-dom0.conf | |
348 | %{systemdunitdir}/proc-xen.mount | |
349 | %{systemdunitdir}/var-lib-xenstored.mount | |
350 | %{systemdunitdir}/xen-watchdog.service | |
351 | %{systemdunitdir}/xenconsoled.service | |
352 | %{systemdunitdir}/xenstored.service | |
353 | %dir %{_sysconfdir}/xen | |
354 | %dir %{_sysconfdir}/xen/auto | |
355 | %dir %{_sysconfdir}/xen/examples | |
356 | %dir %{_sysconfdir}/xen/scripts | |
357 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/* | |
358 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/examples/* | |
359 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README* | |
360 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool | |
361 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf | |
362 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/* | |
363 | %attr(755,root,root) %{_bindir}/* | |
364 | %attr(755,root,root) %{_sbindir}/[bfgikloqtv]* | |
365 | %attr(755,root,root) %{_sbindir}/xen??* | |
366 | %attr(755,root,root) %{_sbindir}/xl | |
367 | %attr(755,root,root) %{_sbindir}/xsview | |
368 | %dir %{_libdir}/%{name} | |
369 | %dir %{_libdir}/%{name}/bin | |
370 | %attr(744,root,root) %{_libdir}/%{name}/bin/* | |
371 | %if "%{_lib}" != "lib" | |
372 | %dir %{_prefix}/lib/%{name} | |
373 | %dir %{_prefix}/lib/%{name}/bin | |
374 | %attr(755,root,root) %{_prefix}/lib/%{name}/bin/qemu-dm | |
375 | %attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdom-dm | |
376 | %attr(755,root,root) %{_prefix}/lib/%{name}/bin/stubdompath.sh | |
377 | %endif | |
378 | %dir %{_prefix}/lib/%{name}/boot | |
379 | %{_prefix}/lib/%{name}/boot/ioemu-stubdom.gz | |
380 | %{_prefix}/lib/%{name}/boot/pv-grub-x86_32.gz | |
381 | %{_prefix}/lib/%{name}/boot/pv-grub-x86_64.gz | |
382 | %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader | |
383 | %{_datadir}/xen | |
384 | %{_mandir}/man?/* | |
385 | %{_sharedstatedir}/xen | |
386 | %{_sharedstatedir}/xenstored | |
387 | %dir /var/run/xenstored | |
388 | %{systemdtmpfilesdir}/xenstored.conf | |
389 | ||
390 | %files libs | |
391 | %defattr(644,root,root,755) | |
392 | %attr(755,root,root) %{_libdir}/lib*.so.* | |
393 | %dir %{_libdir}/fs | |
394 | %dir %{_libdir}/fs/ext2fs-lib | |
395 | %dir %{_libdir}/fs/fat | |
396 | %dir %{_libdir}/fs/iso9660 | |
397 | %dir %{_libdir}/fs/reiserfs | |
398 | %dir %{_libdir}/fs/ufs | |
399 | %dir %{_libdir}/fs/zfs | |
400 | %attr(755,root,root) %{_libdir}/fs/*/*.so | |
401 | ||
402 | %files devel | |
403 | %defattr(644,root,root,755) | |
404 | %attr(755,root,root) %{_libdir}/lib*.so | |
405 | %{_includedir}/* | |
406 | ||
407 | %files static | |
408 | %defattr(644,root,root,755) | |
409 | %{_libdir}/lib*.a | |
410 | ||
411 | %files xend | |
412 | %defattr(644,root,root,755) | |
413 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/blktapctrl | |
414 | #%{systemdunitdir}/blktapctrl.service | |
415 | %{systemdunitdir}/xend.service | |
416 | %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend | |
417 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm* | |
418 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend* | |
419 | %attr(755,root,root) %{_sbindir}/xend | |
420 | %attr(755,root,root) %{_sbindir}/xm | |
421 | %dir %attr(700,root,root) /var/run/xend | |
422 | %{systemdtmpfilesdir}/xend.conf | |
423 | ||
424 | %files -n python-xen | |
425 | %defattr(644,root,root,755) | |
426 | %attr(755,root,root) %{py_sitedir}/fsimage.so | |
427 | %{py_sitedir}/grub | |
428 | %dir %{py_sitedir}/xen | |
429 | %dir %{py_sitedir}/xen/lowlevel | |
430 | %{py_sitedir}/xen/lowlevel/*.py* | |
431 | %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so | |
432 | %{py_sitedir}/xen/remus | |
433 | %{py_sitedir}/xen/sv | |
434 | %{py_sitedir}/xen/util | |
435 | %{py_sitedir}/xen/web | |
436 | %{py_sitedir}/xen/xend | |
437 | %{py_sitedir}/xen/xm | |
438 | %{py_sitedir}/xen/xsview | |
439 | %{py_sitedir}/xen/*.py* | |
440 | %if "%{py_ver}" > "2.4" | |
441 | %{py_sitedir}/*.egg-info | |
442 | %endif | |
443 | ||
444 | %files -n bash-completion-%{name} | |
445 | %defattr(644,root,root,755) | |
446 | /etc/bash_completion.d/* |