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