]>
Commit | Line | Data |
---|---|---|
2f3b83cd | 1 | # |
403a0e9f | 2 | # TODO: |
e9753e37 | 3 | # - most of the qemu config options aren't detected (curses, NPTL, vde, fdt) |
52e56365 | 4 | # - package the ocaml stuff |
b650a78f JK |
5 | # |
6 | # Conditional build: | |
e9753e37 | 7 | %bcond_without hvm # build with hvm (full virtualization) support |
c1281a11 ER |
8 | |
9 | %define xen_extfiles_url http://xenbits.xensource.com/xen-extfiles | |
adbb6385 | 10 | Summary: Xen - a virtual machine monitor |
a1a3c257 | 11 | Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej |
fda6847b | 12 | Name: xen |
e9753e37 | 13 | Version: 4.1.2 |
90a21d83 | 14 | Release: 0.2 |
fda6847b | 15 | License: GPL |
129858a4 | 16 | Group: Applications/System |
98fa2458 | 17 | Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz |
e9753e37 | 18 | # Source0-md5: 73561faf3c1b5e36ec5c089b5db848ad |
403a0e9f AM |
19 | Source1: %{name}-xend.init |
20 | Source2: %{name}-xendomains.init | |
c1281a11 ER |
21 | # used by stubdoms |
22 | Source10: %{xen_extfiles_url}/lwip-1.3.0.tar.gz | |
23 | # Source10-md5: 36cc57650cffda9a0269493be2a169bb | |
24 | Source11: %{xen_extfiles_url}/newlib-1.16.0.tar.gz | |
25 | # Source11-md5: bf8f1f9e3ca83d732c00a79a6ef29bc4 | |
26 | Source12: %{xen_extfiles_url}/zlib-1.2.3.tar.gz | |
27 | # Source12-md5: debc62758716a169df9f62e6ab2bc634 | |
28 | Source13: %{xen_extfiles_url}/pciutils-2.2.9.tar.bz2 | |
29 | # Source13-md5: cec05e7785497c5e19da2f114b934ffd | |
30 | Source14: %{xen_extfiles_url}/grub-0.97.tar.gz | |
31 | # Source14-md5: cd3f3eb54446be6003156158d51f4884 | |
32 | Source15: %{xen_extfiles_url}/ipxe-git-v1.0.0.tar.gz | |
33 | # Source15-md5: fb7df96781d337899066d82059346885 | |
47d65e01 | 34 | Patch0: %{name}-python_scripts.patch |
e9753e37 MM |
35 | Patch1: %{name}-symbols.patch |
36 | Patch2: %{name}-curses.patch | |
37 | Patch3: %{name}-gcc.patch | |
67494ff6 | 38 | URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html |
abdd4c6d | 39 | BuildRequires: SDL-devel |
fc7816dc | 40 | %{?with_hvm:BuildRequires: bcc} |
39eabac9 | 41 | BuildRequires: curl-devel |
d9ee3ddc | 42 | BuildRequires: e2fsprogs-devel |
fc7816dc | 43 | BuildRequires: gcc >= 5:3.4 |
abdd4c6d | 44 | BuildRequires: gettext-devel |
47d65e01 | 45 | BuildRequires: latex2html |
403a0e9f | 46 | BuildRequires: libidn-devel |
403a0e9f | 47 | BuildRequires: ncurses-devel |
42bff0c7 | 48 | BuildRequires: pciutils-devel |
abdd4c6d | 49 | BuildRequires: pkgconfig |
53503036 | 50 | BuildRequires: python-devel |
48c47956 | 51 | BuildRequires: rpm-pythonprov |
129858a4 | 52 | BuildRequires: rpmbuild(macros) >= 1.268 |
e9753e37 | 53 | #BuildRequires: texlive-dvips |
abdd4c6d | 54 | #BuildRequires: texlive-latex-data |
f03e6adf | 55 | BuildRequires: texlive-latex-psnfss |
53503036 | 56 | BuildRequires: transfig |
12f352e2 | 57 | BuildRequires: which |
53503036 | 58 | BuildRequires: zlib-devel |
129858a4 | 59 | Requires(post,preun): /sbin/chkconfig |
9f9b2612 | 60 | Requires: %{name}-libs = %{version}-%{release} |
53503036 JB |
61 | Requires: ZopeInterface |
62 | Requires: bridge-utils | |
e77e45ff AM |
63 | Requires: coreutils |
64 | Requires: diffutils | |
d78769bd | 65 | Requires: gawk |
e77e45ff | 66 | Requires: iptables |
fb59b595 | 67 | Requires: kernel(xen0) |
53503036 | 68 | Requires: losetup |
e77e45ff | 69 | Requires: net-tools |
8e6e2740 | 70 | Requires: python-%{name} = %{version}-%{release} |
129858a4 | 71 | Requires: rc-scripts |
e77e45ff | 72 | Requires: sed |
a674a8b2 | 73 | Requires: util-linux |
e77e45ff | 74 | Requires: which |
cef7399d | 75 | Obsoletes: xen-doc |
971d1e2c | 76 | ExclusiveArch: %{ix86} %{x8664} |
fda6847b AM |
77 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
78 | ||
8f12ec8f | 79 | # some PPC/SPARC boot image in ELF format |
7fb9617b | 80 | %define _noautostrip .*%{_datadir}/xen/qemu/openbios-.* |
8f12ec8f | 81 | |
fda6847b AM |
82 | %description |
83 | This package contains the Xen hypervisor and Xen tools, needed to run | |
84 | virtual machines on x86 systems, together with the kernel-xen* | |
85 | packages. Information on how to use Xen can be found at the Xen | |
86 | project pages. | |
87 | ||
88 | Virtualisation can be used to run multiple versions or multiple Linux | |
89 | distributions on one system, or to test untrusted applications in a | |
90 | sandboxed environment. Note that the Xen technology is still in | |
91 | development, and this RPM has received extremely little testing. Don't | |
92 | be surprised if this RPM eats your data, drinks your coffee or makes | |
93 | fun of you in front of your friends. | |
94 | ||
d2a30a0d | 95 | %description -l pl.UTF-8 |
3615a8c8 | 96 | Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do |
adbb6385 | 97 | uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami |
3615a8c8 | 98 | kernel-xen*. Informacje jak używać Xena można znaleźć na stronach |
adbb6385 JB |
99 | projektu. |
100 | ||
3615a8c8 | 101 | Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu |
dcba01a0 | 102 | dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych |
3615a8c8 ER |
103 | aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia |
104 | Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy | |
105 | być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie | |
106 | się wyśmiewał w obecności przyjaciół. | |
403a0e9f | 107 | |
26412ee3 JB |
108 | %package libs |
109 | Summary: xen libraries | |
110 | Summary(pl.UTF-8): Biblioteki xena | |
111 | Group: Libraries | |
112 | ||
113 | %description libs | |
114 | xen libraries. | |
115 | ||
116 | %description libs -l pl.UTF-8 | |
117 | Biblioteki xena. | |
118 | ||
403a0e9f | 119 | %package devel |
6eccf3e8 | 120 | Summary: Header files for xen |
3615a8c8 | 121 | Summary(pl.UTF-8): Pliki nagłówkowe xena |
403a0e9f | 122 | Group: Development/Libraries |
9f9b2612 | 123 | Requires: %{name}-libs = %{version}-%{release} |
403a0e9f AM |
124 | |
125 | %description devel | |
6eccf3e8 JB |
126 | Header files for xen. |
127 | ||
d2a30a0d | 128 | %description devel -l pl.UTF-8 |
3615a8c8 | 129 | Pliki nagłówkowe xena. |
403a0e9f AM |
130 | |
131 | %package static | |
132 | Summary: Static xen libraries | |
a1a3c257 | 133 | Summary(pl.UTF-8): Statyczne biblioteki xena |
403a0e9f | 134 | Group: Development/Libraries |
9f9b2612 | 135 | Requires: %{name}-devel = %{version}-%{release} |
403a0e9f AM |
136 | |
137 | %description static | |
138 | Static xen libraries. | |
adbb6385 | 139 | |
d2a30a0d | 140 | %description static -l pl.UTF-8 |
6eccf3e8 JB |
141 | Statyczne biblioteki xena. |
142 | ||
5dd334af JB |
143 | %package udev |
144 | Summary: xen udev scripts | |
145 | Summary(pl.UTF-8): Skrypty udev dla xena | |
abdd4c6d | 146 | Group: Applications/System |
5dd334af JB |
147 | |
148 | %description udev | |
149 | xen udev scripts. | |
150 | ||
151 | %description udev -l pl.UTF-8 | |
152 | Skrypty udev dla xena. | |
153 | ||
e9753e37 MM |
154 | %package xend |
155 | Summary: xend daemon | |
156 | Summary(pl.UTF-8): Demon xend | |
157 | Group: Daemons | |
158 | ||
159 | %description xend | |
160 | xend daemon. | |
161 | ||
162 | %description xend -l pl.UTF-8 | |
163 | Demon xend. | |
164 | ||
5dd334af JB |
165 | %package -n python-xen |
166 | Summary: xen Python modules | |
3615a8c8 | 167 | Summary(pl.UTF-8): Moduły Pythona dla xena |
5dd334af | 168 | Group: Libraries |
e35fda92 | 169 | Conflicts: xen < 3.2.1-0.3 |
5dd334af JB |
170 | |
171 | %description -n python-xen | |
172 | xen Python modules. | |
173 | ||
174 | %description -n python-xen -l pl.UTF-8 | |
3615a8c8 | 175 | Moduły Pythona dla xena. |
5dd334af | 176 | |
e9753e37 MM |
177 | %package -n bash-completion-%{name} |
178 | Summary: bash-completion for xen | |
179 | Group: Applications/Shells | |
180 | Requires: %{name} = %{version}-%{release} | |
181 | Requires: bash-completion | |
182 | ||
183 | %description -n bash-completion-%{name} | |
184 | This package provides bash-completion for xen. | |
185 | ||
fda6847b | 186 | %prep |
98fa2458 | 187 | %setup -q |
47d65e01 JK |
188 | %patch0 -p1 |
189 | %patch1 -p1 | |
42bff0c7 | 190 | %patch2 -p1 |
e9753e37 | 191 | #%%patch3 -p1 |
4015585b | 192 | |
c1281a11 ER |
193 | %{__rm} -v tools/check/*.orig |
194 | ||
195 | # stubdom sources | |
196 | ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom | |
197 | ln -s %{PATCH23} stubdom/grub.patches/99grub-ext4-support.patch | |
198 | ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz | |
fda6847b AM |
199 | |
200 | %build | |
47d65e01 JK |
201 | CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ |
202 | CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ | |
2f3b83cd | 203 | %{__make} -j1 xen tools \ |
403a0e9f | 204 | CC="%{__cc}" \ |
da88b5cd | 205 | CXX="%{__cxx}" |
fda6847b AM |
206 | |
207 | %install | |
208 | rm -rf $RPM_BUILD_ROOT | |
e9753e37 | 209 | install -d $RPM_BUILD_ROOT/etc/xen/examples |
adbb6385 | 210 | |
c1281a11 | 211 | %{__make} install-xen install-tools install-stubdom install-docs \ |
4b02d844 ER |
212 | CC="%{__cc}" \ |
213 | CXX="%{__cxx}" \ | |
e9753e37 | 214 | DESTDIR=$RPM_BUILD_ROOT |
403a0e9f | 215 | |
e9753e37 | 216 | mv $RPM_BUILD_ROOT/etc/xen/{xmexample*,examples} |
fda6847b | 217 | |
c1281a11 ER |
218 | cp -p tools/blktap/README{,.blktap} |
219 | cp -p tools/xenmon/README{,.xenmon} | |
67494ff6 | 220 | |
90eccaeb ER |
221 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
222 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
223 | ||
224 | %py_postclean | |
e9753e37 | 225 | |
86497794 | 226 | # remove unneeded files |
e9753e37 MM |
227 | %{__rm} $RPM_BUILD_ROOT/boot/xen-4.1.gz |
228 | %{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz | |
8641374c | 229 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen |
e9753e37 | 230 | %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING |
d26491b9 | 231 | |
fda6847b AM |
232 | %clean |
233 | rm -rf $RPM_BUILD_ROOT | |
234 | ||
403a0e9f | 235 | %post |
90a21d83 | 236 | /sbin/chkconfig --add xen-watchdog |
e9753e37 | 237 | /sbin/chkconfig --add xencommons |
403a0e9f AM |
238 | /sbin/chkconfig --add xendomains |
239 | ||
403a0e9f | 240 | %preun |
e9753e37 MM |
241 | if [ "$1" = "0" ]; then |
242 | %service xendomains stop | |
243 | /sbin/chkconfig --del xendomains | |
244 | ||
245 | %service xencommons stop | |
246 | /sbin/chkconfig --del xencommons | |
90a21d83 MM |
247 | |
248 | %service xen-watchdog stop | |
249 | /sbin/chkconfig --del xen-watchdog | |
e9753e37 MM |
250 | fi |
251 | ||
252 | %post xend | |
253 | /sbin/chkconfig --add xend | |
254 | ||
255 | %preun xend | |
403a0e9f | 256 | if [ "$1" = "0" ]; then |
129858a4 | 257 | %service xend stop |
403a0e9f | 258 | /sbin/chkconfig --del xend |
e9753e37 | 259 | fi |
129858a4 | 260 | |
26412ee3 JB |
261 | %post libs -p /sbin/ldconfig |
262 | %postun libs -p /sbin/ldconfig | |
263 | ||
fda6847b AM |
264 | %files |
265 | %defattr(644,root,root,755) | |
e9753e37 | 266 | %doc COPYING README* docs/misc/* |
47d65e01 | 267 | %doc docs/html/* |
e9753e37 MM |
268 | %doc tools/blktap/README.blktap tools/xenmon/README.xenmon |
269 | %doc tools/ioemu-dir/*.html | |
98fa2458 AM |
270 | /boot/%{name}-syms-%{version} |
271 | /boot/%{name}-%{version}.gz | |
fda6847b | 272 | /boot/%{name}.gz |
90a21d83 | 273 | %attr(754,root,root) /etc/rc.d/init.d/xen-watchdog |
e9753e37 MM |
274 | %attr(754,root,root) /etc/rc.d/init.d/xencommons |
275 | %attr(754,root,root) /etc/rc.d/init.d/xendomains | |
47d65e01 | 276 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/* |
403a0e9f | 277 | %dir %{_sysconfdir}/xen |
403a0e9f | 278 | %dir %{_sysconfdir}/xen/auto |
e9753e37 | 279 | %dir %{_sysconfdir}/xen/examples |
403a0e9f AM |
280 | %dir %{_sysconfdir}/xen/scripts |
281 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/* | |
e9753e37 MM |
282 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/examples/* |
283 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README* | |
284 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool | |
285 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf | |
403a0e9f | 286 | %attr(755,root,root) %{_bindir}/* |
e9753e37 MM |
287 | %attr(755,root,root) %{_sbindir}/[bfgikloqtv]* |
288 | %attr(755,root,root) %{_sbindir}/xen??* | |
289 | %attr(755,root,root) %{_sbindir}/xl | |
290 | %attr(755,root,root) %{_sbindir}/xsview | |
47d65e01 JK |
291 | %dir %{_libdir}/%{name} |
292 | %dir %{_libdir}/%{name}/bin | |
293 | %attr(744,root,root) %{_libdir}/%{name}/bin/* | |
38e9ca75 | 294 | %if "%{_lib}" != "lib" |
81c76053 | 295 | %dir %{_prefix}/lib/%{name} |
38e9ca75 | 296 | %endif |
81c76053 | 297 | %dir %{_prefix}/lib/%{name}/boot |
bbcbc194 | 298 | %{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader} |
47d65e01 | 299 | %{_datadir}/xen |
403a0e9f | 300 | %{_mandir}/man?/* |
47d65e01 JK |
301 | %{_sharedstatedir}/xen |
302 | %{_sharedstatedir}/xenstored | |
47d65e01 | 303 | %dir /var/run/xenstored |
403a0e9f | 304 | |
26412ee3 | 305 | %files libs |
403a0e9f | 306 | %defattr(644,root,root,755) |
26412ee3 | 307 | %attr(755,root,root) %{_libdir}/lib*.so.* |
4015585b | 308 | %dir %{_libdir}/fs |
d9ee3ddc | 309 | %dir %{_libdir}/fs/ext2fs-lib |
2f3b83cd AG |
310 | %dir %{_libdir}/fs/fat |
311 | %dir %{_libdir}/fs/iso9660 | |
4015585b | 312 | %dir %{_libdir}/fs/reiserfs |
313 | %dir %{_libdir}/fs/ufs | |
20aeda6e | 314 | %dir %{_libdir}/fs/zfs |
4015585b | 315 | %attr(755,root,root) %{_libdir}/fs/*/*.so |
26412ee3 | 316 | |
5dd334af JB |
317 | %files devel |
318 | %defattr(644,root,root,755) | |
319 | %attr(755,root,root) %{_libdir}/lib*.so | |
320 | %{_includedir}/* | |
321 | ||
322 | %files static | |
323 | %defattr(644,root,root,755) | |
324 | %{_libdir}/lib*.a | |
325 | ||
2f3b83cd AG |
326 | %files udev |
327 | %defattr(644,root,root,755) | |
328 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/* | |
329 | ||
e9753e37 MM |
330 | %files xend |
331 | %defattr(644,root,root,755) | |
332 | %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend | |
333 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm* | |
334 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend* | |
335 | %attr(755,root,root) %{_sbindir}/xend | |
336 | %attr(755,root,root) %{_sbindir}/xm | |
337 | %dir %attr(700,root,root) /var/run/xend | |
338 | ||
8e6e2740 ER |
339 | %files -n python-xen |
340 | %defattr(644,root,root,755) | |
5dd334af | 341 | %attr(755,root,root) %{py_sitedir}/fsimage.so |
8e6e2740 ER |
342 | %{py_sitedir}/grub |
343 | %dir %{py_sitedir}/xen | |
344 | %dir %{py_sitedir}/xen/lowlevel | |
345 | %{py_sitedir}/xen/lowlevel/*.py* | |
346 | %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so | |
e9753e37 | 347 | %{py_sitedir}/xen/remus |
8e6e2740 ER |
348 | %{py_sitedir}/xen/sv |
349 | %{py_sitedir}/xen/util | |
350 | %{py_sitedir}/xen/web | |
351 | %{py_sitedir}/xen/xend | |
352 | %{py_sitedir}/xen/xm | |
353 | %{py_sitedir}/xen/xsview | |
354 | %{py_sitedir}/xen/*.py* | |
355 | %if "%{py_ver}" > "2.4" | |
356 | %{py_sitedir}/*.egg-info | |
357 | %endif | |
e9753e37 MM |
358 | |
359 | %files -n bash-completion-%{name} | |
360 | %defattr(644,root,root,755) | |
361 | /etc/bash_completion.d/* |