]> git.pld-linux.org Git - packages/xen.git/blob - xen.spec
Trying update to 4.4.0; nfy
[packages/xen.git] / xen.spec
1 #
2 # TODO:
3 #  - check if other tools/libs are not usable in domU, move them to -guest
4 #    packages if so
5 #  - pass bconds to qemu configure script (tricky, as the script is called from
6 #    Xen Makefiles)
7 #  - fix %doc - some files are installed in docdir both by make install and %d,
8 #    other are installed once
9 #  - now the build dependencies are insane (because of what qemu can use)
10 #    we should make them optional or get rid of them all properly
11 #
12 # Conditional build:
13 %bcond_without  opengl          # OpenGL support in Xen qemu
14 %bcond_without  sdl             # SDL support in Xen qemu
15 %bcond_without  bluetooth       # bluetooth support in Xen qemu
16 %bcond_without  brlapi          # brlapi support in Xen qemu
17 %bcond_without  ocaml           # Ocaml libraries for Xen tools
18 %bcond_without  efi             # EFI hypervisor
19 %bcond_without  hypervisor      # Xen hypervisor build
20 %bcond_without  stubdom         # stubdom build
21
22 %ifnarch %{x8664} arm
23 %undefine       with_hypervisor
24 %endif
25 %ifnarch %{x8664}
26 %undefine       with_efi
27 %endif
28 %ifnarch %{ix86} %{x8664}
29 %undefine       with_stubdom
30 %endif
31
32 # from Config.mk:
33 %define seabios_version         1.6.3.2
34
35 # from ./stubdom/configure.ac
36 %define polarssl_version        1.1.4
37 %define tpm_emulator_version    0.7.4
38 %define gmp_version             4.3.2
39
40 %define xen_extfiles_url        http://xenbits.xensource.com/xen-extfiles
41 Summary:        Xen - a virtual machine monitor
42 Summary(pl.UTF-8):      Xen - monitor maszyny wirtualnej
43 Name:           xen
44 Version:        4.4.0
45 Release:        0.1
46 License:        GPL v2, interface parts on BSD-like
47 Group:          Applications/System
48 Source0:        http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
49 # Source0-md5:  fd9031d499af38c5d04108681734027e
50 # used by stubdoms
51 Source10:       %{xen_extfiles_url}/lwip-1.3.0.tar.gz
52 # Source10-md5: 36cc57650cffda9a0269493be2a169bb
53 Source11:       %{xen_extfiles_url}/newlib-1.16.0.tar.gz
54 # Source11-md5: bf8f1f9e3ca83d732c00a79a6ef29bc4
55 Source12:       %{xen_extfiles_url}/zlib-1.2.3.tar.gz
56 # Source12-md5: debc62758716a169df9f62e6ab2bc634
57 Source13:       %{xen_extfiles_url}/pciutils-2.2.9.tar.bz2
58 # Source13-md5: cec05e7785497c5e19da2f114b934ffd
59 Source14:       %{xen_extfiles_url}/grub-0.97.tar.gz
60 # Source14-md5: cd3f3eb54446be6003156158d51f4884
61 Source15:       http://xenbits.xen.org/xen-extfiles/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz
62 # Source15-md5: 7496268cebf47d5c9ccb0696e3b26065
63 # http://xenbits.xen.org/git-http/seabios.git/
64 # git archive --prefix=tools/firmware/seabios/ --format=tar rel-%{seabios_version} | xz > seabios-%{seabios_version}.tar.xz
65 Source16:       seabios-%{seabios_version}.tar.xz
66 # Source16-md5: 145e07ff5618a3999f94f2e830d06b05
67 Source17:       %{xen_extfiles_url}/polarssl-%{polarssl_version}-gpl.tgz
68 # Source17-md5: 7b72caf22b01464ee7d6165f2fd85f44
69 Source18:       http://xenbits.xen.org/xen-extfiles/tpm_emulator-%{tpm_emulator_version}.tar.gz
70 # Source18-md5: e26becb8a6a2b6695f6b3e8097593db8
71 Source19:       ftp://ftp.gmplib.org/pub/gmp-%{gmp_version}/gmp-%{gmp_version}.tar.bz2
72 # Source19-md5: dd60683d7057917e34630b4a787932e8
73 Source30:       proc-xen.mount
74 Source31:       var-lib-xenstored.mount
75 Source32:       blktapctrl.service
76 Source33:       blktapctrl.sysconfig
77 Source34:       xenconsoled.service
78 Source35:       xenconsoled.sysconfig
79 Source36:       xenstored.service
80 Source37:       xenstored.sysconfig
81 Source38:       xenstored.tmpfiles
82 Source39:       xend.service
83 Source40:       xend.tmpfiles
84 Source41:       xen-watchdog.service
85 Source42:       xen-dom0-modules-load.conf
86 Source43:       xendomains.sh
87 Source44:       xendomains.service
88 # sysvinit scripts
89 Source50:       xend.init
90 Source51:       xenconsoled.init
91 Source52:       xenstored.init
92 Source53:       xen-watchdog.init
93 Source54:       xendomains.init
94 Source55:       xen.logrotate
95 Source56:       xen.tmpfiles
96 Source57:       xen.cfg
97 Source58:       xen.efi-boot-update
98 Source59:       vif-openvswitch
99 Source60:       xen-init-list
100 Source61:       xen-toolstack
101 Patch0:         %{name}-python_scripts.patch
102 Patch1:         %{name}-symbols.patch
103 Patch2:         %{name}-curses.patch
104 Patch3:         pygrubfix.patch
105 Patch4:         xend.catchbt.patch
106 Patch5:         xend-pci-loop.patch
107 Patch6:         %{name}-dumpdir.patch
108 # Warning: this disables ingress filtering implemented in xen scripts!
109 Patch7:         %{name}-net-disable-iptables-on-bridge.patch
110 Patch8:         %{name}-configure-xend.patch
111 Patch10:        %{name}-qemu.patch
112 Patch11:        %{name}-ulong.patch
113 Patch12:        %{name}-doc.patch
114 Patch13:        %{name}-paths.patch
115 Patch14:        %{name}-no_fetcher.patch
116 URL:            http://www.xen.org/products/xenhyp.html
117 %{?with_opengl:BuildRequires:   OpenGL-devel}
118 %{?with_sdl:BuildRequires:      SDL-devel >= 1.2.1}
119 %ifarch %{ix86} %{x8664}
120 BuildRequires:  acpica
121 BuildRequires:  autoconf
122 BuildRequires:  bcc
123 BuildRequires:  bin86
124 %endif
125 %{?with_bluetooth:BuildRequires:        bluez-libs-devel}
126 %{?with_brlapi:BuildRequires:   brlapi-devel}
127 %{?with_efi:BuildRequires:      binutils >= 3:2.23.51.0.3-2}
128 BuildRequires:  bzip2-devel
129 BuildRequires:  ceph-devel
130 BuildRequires:  curl-devel
131 BuildRequires:  cyrus-sasl-devel >= 2
132 BuildRequires:  e2fsprogs-devel
133 BuildRequires:  gcc >= 6:4.1
134 BuildRequires:  gettext-devel
135 BuildRequires:  glib2-devel >= 1:2.12
136 BuildRequires:  glusterfs-devel >= 3.4
137 BuildRequires:  gnutls-devel
138 BuildRequires:  keyutils-devel
139 BuildRequires:  latex2html >= 2008
140 BuildRequires:  libaio-devel
141 BuildRequires:  libcap-devel
142 BuildRequires:  libcap-ng-devel
143 BuildRequires:  libiscsi-devel
144 BuildRequires:  libjpeg-devel
145 BuildRequires:  libpng-devel
146 BuildRequires:  libseccomp-devel >= 1.0.0
147 BuildRequires:  libuuid-devel
148 BuildRequires:  lzo-devel >= 2
149 BuildRequires:  ncurses-devel
150 %if %{with ocaml}
151 BuildRequires:  ocaml >= 3.04-7
152 BuildRequires:  ocaml-findlib
153 %endif
154 BuildRequires:  nss-devel >= 3.12.8
155 BuildRequires:  openssl-devel
156 BuildRequires:  pciutils-devel
157 BuildRequires:  perl-base
158 BuildRequires:  perl-tools-pod
159 BuildRequires:  pixman-devel
160 BuildRequires:  pkgconfig
161 BuildRequires:  python-devel
162 BuildRequires:  rpm-pythonprov
163 BuildRequires:  rpmbuild(macros) >= 1.647
164 BuildRequires:  spice-protocol >= 0.12.2
165 BuildRequires:  spice-server-devel >= 0.12.0
166 BuildRequires:  texi2html
167 BuildRequires:  texlive-dvips
168 BuildRequires:  texlive-latex-psnfss
169 BuildRequires:  texlive-xetex
170 BuildRequires:  transfig
171 BuildRequires:  usbredir-devel >= 0.5.3
172 BuildRequires:  vde2-devel
173 BuildRequires:  which
174 # for xfsctl (<xfs/xfs.h>)
175 BuildRequires:  xfsprogs-devel
176 BuildRequires:  xorg-lib-libX11-devel
177 BuildRequires:  xorg-lib-libXext-devel
178 BuildRequires:  xz-devel
179 BuildRequires:  yajl-devel
180 BuildRequires:  zlib-devel
181 # FIXME: see qemu configure comments on top of spec
182 %{!?with_opengl:BuildConflicts: OpenGL-devel}
183 %{!?with_sdl:BuildConflicts:    SDL-devel}
184 %{!?with_sdl:BuildConflicts:    SDL-devel}
185 %{!?with_bluetooth:BuildConflicts:      bluez-libs-devel}
186 %{!?with_brlapi:BuildConflicts: brlapi-devel}
187 Requires(post,preun):   /sbin/chkconfig
188 Requires(post,preun,postun):    systemd-units >= 38
189 Requires:       %{name}-libs = %{version}-%{release}
190 Requires:       ZopeInterface
191 Requires:       bridge-utils
192 Requires:       coreutils
193 Requires:       diffutils
194 Requires:       gawk
195 Requires:       iptables
196 Requires:       losetup
197 Requires:       net-tools
198 Requires:       python-%{name} = %{version}-%{release}
199 Requires:       rc-scripts
200 Requires:       sed
201 Requires:       systemd-units >= 38
202 Requires:       util-linux
203 Requires:       which
204 Requires:       %{name}-guest = %{version}-%{release}
205 Obsoletes:      xen-doc
206 Obsoletes:      xen-udev
207 ExclusiveArch:  %{ix86} %{x8664} arm
208 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
209
210 # some PPC/SPARC boot images in ELF format
211 %define         _noautostrip    .*%{_datadir}/\\(xen\\|qemu-xen\\)/qemu/\\(openbios-.*\\|palcode-clipper\\)
212
213 %description
214 This package contains the Xen hypervisor and Xen tools, needed to run
215 virtual machines on x86 systems, together with the kernel-xen*
216 packages. Information on how to use Xen can be found at the Xen
217 project pages.
218
219 Virtualisation can be used to run multiple versions or multiple Linux
220 distributions on one system, or to test untrusted applications in a
221 sandboxed environment. Note that the Xen technology is still in
222 development, and this RPM has received extremely little testing. Don't
223 be surprised if this RPM eats your data, drinks your coffee or makes
224 fun of you in front of your friends.
225
226 %description -l pl.UTF-8
227 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
228 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
229 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
230 projektu.
231
232 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
233 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
234 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
235 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
236 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
237 się wyśmiewał w obecności przyjaciół.
238
239 %package guest
240 Summary:        Xen tools for virtual machines
241 Summary(pl.UTF-8):      Narzędzia Xen dla maszyn virtualnych
242 Group:          Applications/System
243 Requires:       %{name}-libs-guest = %{version}-%{release}
244
245 %description guest
246 Xen utilities for both dom0 and domU virtual domains.
247
248 %description guest -l pl.UTF-8
249 Narzędzia Xena dla maszyn wirtualnych dom0 i domU.
250
251 %package libs
252 Summary:        Xen libraries
253 Summary(pl.UTF-8):      Biblioteki Xena
254 Group:          Libraries
255 Requires:       %{name}-libs-guest = %{version}-%{release}
256
257 %description libs
258 Xen libraries.
259
260 %description libs -l pl.UTF-8
261 Biblioteki Xena.
262
263 %package libs-guest
264 Summary:        Xen libraries for virtual machines
265 Summary(pl.UTF-8):      Biblioteki Xena dla maszyn wirtualnych
266 Group:          Libraries
267
268 %description libs-guest
269 Xen libraries for both dom0 and domU virtual machines.
270
271 %description libs-guest -l pl.UTF-8
272 Biblioteki Xena dla maszyn wirtualnych dom0 i domU.
273
274 %package devel
275 Summary:        Header files for Xen
276 Summary(pl.UTF-8):      Pliki nagłówkowe Xena
277 Group:          Development/Libraries
278 Requires:       %{name}-libs = %{version}-%{release}
279
280 %description devel
281 Header files for Xen.
282
283 %description devel -l pl.UTF-8
284 Pliki nagłówkowe Xena.
285
286 %package static
287 Summary:        Static Xen libraries
288 Summary(pl.UTF-8):      Statyczne biblioteki Xena
289 Group:          Development/Libraries
290 Requires:       %{name}-devel = %{version}-%{release}
291
292 %description static
293 Static Xen libraries.
294
295 %description static -l pl.UTF-8
296 Statyczne biblioteki Xena.
297
298 %package xend
299 Summary:        xend daemon
300 Summary(pl.UTF-8):      Demon xend
301 Group:          Daemons
302 Requires(post,preun,postun):    systemd-units >= 38
303 Requires:       systemd-units >= 38
304
305 %description xend
306 xend daemon.
307
308 %description xend -l pl.UTF-8
309 Demon xend.
310
311 %package -n ocaml-xen
312 Summary:        OCaml bindings for Xen
313 Summary(pl.UTF-8):      Wiązania OCamla dla Xena
314 License:        LGPL v2.1 with linking exception
315 Group:          Libraries
316 Requires:       %{name}-libs = %{version}-%{release}
317 %if %{with ocaml}
318 %requires_eq    ocaml-runtime
319 %endif
320
321 %description -n ocaml-xen
322 OCaml bindings for Xen.
323
324 %description -n ocaml-xen -l pl.UTF-8
325 Wiązania OCamla dla Xena.
326
327 %package -n ocaml-xen-devel
328 Summary:        OCaml bindings for Xen - development files
329 Summary(pl.UTF-8):      Wiązania OCamla dla Xena - pliki programistyczne
330 License:        LGPL v2.1 with linking exception
331 Group:          Development/Libraries
332 Requires:       ocaml-xen = %{version}-%{release}
333 %if %{with ocaml}
334 %requires_eq    ocaml
335 %endif
336
337 %description -n ocaml-xen-devel
338 OCaml bindings for Xen - development files.
339
340 %description -n ocaml-xen-devel -l pl.UTF-8
341 Wiązania OCamla dla Xena - pliki programistyczne.
342
343 %package -n python-xen
344 Summary:        Xen Python modules
345 Summary(pl.UTF-8):      Moduły Pythona dla Xena
346 Group:          Libraries
347 Requires:       %{name}-libs = %{version}-%{release}
348 Conflicts:      xen < 3.2.1-0.3
349
350 %description -n python-xen
351 Xen Python modules.
352
353 %description -n python-xen -l pl.UTF-8
354 Moduły Pythona dla Xena.
355
356 %package -n python-xen-guest
357 Summary:        Xen Python modules for virtual machines
358 Summary(pl.UTF-8):      Moduły Pythona dla maszyn wirtualnych Xena
359 Group:          Libraries
360 Requires:       %{name}-libs-guest = %{version}-%{release}
361 Conflicts:      xen < 3.2.1-0.3
362
363 %description -n python-xen-guest
364 Xen Python modules for both dom0 and domU virtual machines.
365
366 %description -n python-xen-guest -l pl.UTF-8
367 Moduły Pythona dla maszyn wirtualnych dom0 i domU.
368
369 %package -n bash-completion-%{name}
370 Summary:    bash-completion for Xen (xl)
371 Summary(pl.UTF-8):      Bashowe dopełnianie poleceń dla Xena (xl)
372 Group:      Applications/Shells
373 Requires:   %{name} = %{version}-%{release}
374 Requires:   bash-completion
375
376 %description -n bash-completion-%{name}
377 This package provides bash-completion for Xen (xl).
378
379 %description -n bash-completion-%{name} -l pl.UTF-8
380 Ten pakiet zapewnia bashowe dopełnianie poleceń dla Xena (xl).
381
382 %package efi
383 Summary:        Xen hypervisor binary for EFI
384 Summary(pl.UTF-8):      Hipernadzorca Xen dla EFI
385 Group:          Applications/System
386 Requires:       %{name}-libs-guest = %{version}-%{release}
387
388 %description efi
389 Xen hypervisor EFI binary, which can be booted directly from (U)EFI
390 firmware without help from any additional bootloader.
391
392 %description efi -l pl.UTF-8
393 Nadzorca Xen w postaci, która może być uruchomiona wprost z firmware
394 (U)EFI, bez potrzeby oddzielnego bootloadera.
395
396 %prep
397 %setup -q -a 16
398 %patch0 -p1
399 %patch1 -p1
400 %patch2 -p1
401 %patch3 -p1
402 %patch4 -p1
403 %patch5 -p1
404 %patch6 -p1
405 %patch7 -p1
406 %patch8 -p1
407 %patch10 -p1
408 %patch11 -p1
409 %patch12 -p1
410 %patch13 -p1
411 %patch14 -p1
412
413 # stubdom sources
414 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
415 ln -s %{SOURCE17} %{SOURCE18} %{SOURCE19} stubdom
416 ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz
417
418 # do not allow fetching anything via git
419 echo GIT=/bin/false >> Config.mk
420
421 %build
422 # based on the 'autoconf.sh' from the sources
423 %{__autoconf}
424 cd tools
425 %{__autoconf}
426 %{__autoheader}
427 cd ../stubdom
428 %{__autoconf}
429 cd ../docs
430 %{__autoconf}
431 cd ..
432
433 # if gold is used then bioses and grub doesn't build
434 install -d our-ld
435 ln -f -s /usr/bin/ld.bfd our-ld/ld
436 export PATH=$(pwd)/our-ld:$PATH
437
438 export CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
439 export CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses"
440
441 # NOTE:
442 # - there is a quoting bug (in tools/driver/Makefile) that causes
443 #   openssl is used instead of gcrypt; that's OK, openssl is obligatory
444 #   anyway (see configure), gcrypt is optional
445 # - prevent libiconv from being detected (not needed with glibc)
446 %configure \
447         CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" \
448         ac_cv_lib_iconv_libiconv_open=no \
449         --disable-debug
450
451 %{__make} -j1 dist-xen dist-tools dist-docs \
452         %{!?with_ocaml:OCAML_TOOLS=n} \
453         CC="%{__cc}" \
454         CXX="%{__cxx}" \
455         V=1
456
457 unset CFLAGS
458 unset CXXFLAGS
459
460 %if %{with stubdom}
461 %{__make} -j1 dist-stubdom \
462         %{!?with_ocaml:OCAML_TOOLS=n} \
463         CC="%{__cc}" \
464         CXX="%{__cxx}" \
465         V=1
466 %endif
467
468 %install
469 rm -rf $RPM_BUILD_ROOT
470 install -d $RPM_BUILD_ROOT/etc/{xen/examples,modules-load.d,logrotate.d} \
471         $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir},/var/log/xen/console}
472
473 %if %{with efi}
474 install -d $RPM_BUILD_ROOT/etc/efi-boot/update.d
475 %endif
476
477 %{__make} -j1 install-xen install-tools %{?with_stubdom:install-stubdom} install-docs \
478         %{!?with_ocaml:OCAML_TOOLS=n} \
479         DESTDIR=$RPM_BUILD_ROOT \
480         HOTPLUGS=install-udev
481
482 %if "%{_lib}" == "lib64"
483 ln -s %{_prefix}/lib/%{name}/bin/qemu-dm $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/qemu-dm
484 %endif
485
486 install %{SOURCE30} $RPM_BUILD_ROOT%{systemdunitdir}/proc-xen.mount
487 install %{SOURCE31} $RPM_BUILD_ROOT%{systemdunitdir}/var-lib-xenstored.mount
488 install %{SOURCE32} $RPM_BUILD_ROOT%{systemdunitdir}/blktapctrl.service
489 install %{SOURCE33} $RPM_BUILD_ROOT/etc/sysconfig/blktapctrl
490 install %{SOURCE34} $RPM_BUILD_ROOT%{systemdunitdir}/xenconsoled.service
491 install %{SOURCE35} $RPM_BUILD_ROOT/etc/sysconfig/xenconsoled
492 install %{SOURCE36} $RPM_BUILD_ROOT%{systemdunitdir}/xenstored.service
493 install %{SOURCE37} $RPM_BUILD_ROOT/etc/sysconfig/xenstored
494 install %{SOURCE38} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xenstored.conf
495 install %{SOURCE39} $RPM_BUILD_ROOT%{systemdunitdir}/xend.service
496 install %{SOURCE40} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xend.conf
497 install %{SOURCE41} $RPM_BUILD_ROOT%{systemdunitdir}/xen-watchdog.service
498 install %{SOURCE42} $RPM_BUILD_ROOT/etc/modules-load.d/xen-dom0.conf
499 install %{SOURCE43} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/bin/xendomains.sh
500 install %{SOURCE44} $RPM_BUILD_ROOT%{systemdunitdir}/xendomains.service
501 # sysvinit scripts
502 %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/*
503 %{__rm} $RPM_BUILD_ROOT/etc/sysconfig/xencommons
504 install %{SOURCE50} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
505 install %{SOURCE51} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenconsoled
506 install %{SOURCE52} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenstored
507 install %{SOURCE53} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-watchdog
508 install %{SOURCE54} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
509 install %{SOURCE55} $RPM_BUILD_ROOT/etc/logrotate.d/xen
510 install %{SOURCE56} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xen.conf
511
512 install %{SOURCE60} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/bin/xen-init-list
513 install %{SOURCE61} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/bin/xen-toolstack
514
515 %if %{with efi}
516 install %{SOURCE57} $RPM_BUILD_ROOT/etc/efi-boot/xen.cfg
517 sed -e's;@libdir@;%{_libdir};g' -e's;@target_cpu@;%{_target_cpu};g' \
518                         %{SOURCE58} > $RPM_BUILD_ROOT/etc/efi-boot/update.d/xen.conf
519 %endif
520
521 mv $RPM_BUILD_ROOT/etc/xen/{x{m,l}example*,examples}
522
523 install %{SOURCE59} $RPM_BUILD_ROOT%{_sysconfdir}/xen/scripts/vif-openvswitch
524
525 # for %%doc
526 install -d _doc
527 for tool in blktap blktap2 pygrub xenmon ; do
528         cp -p tools/$tool/README _doc/README.$tool
529 done
530 cp -al tools/qemu-xen/docs _doc/qemu-xen
531
532 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
533 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
534
535 %py_postclean
536
537 # seems not needed, the path is wrong anyway
538 %{__rm} $RPM_BUILD_ROOT%{_prefix}/etc/qemu/target-x86_64.conf
539
540 # remove unneeded files
541 %if %{with hypervisor}
542 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.3.gz
543 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz
544 %endif
545 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
546 %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
547
548 %clean
549 rm -rf $RPM_BUILD_ROOT
550
551 %post
552 /sbin/chkconfig --add xen-watchdog
553 /sbin/chkconfig --add xenconsoled
554 /sbin/chkconfig --add xenstored
555 /sbin/chkconfig --add xendomains
556 NORESTART=1
557 %systemd_post xen-watchdog.service xenconsoled.service xenstored.service xendomains.service
558
559 %preun
560 if [ "$1" = "0" ]; then
561         %service xendomains stop
562         /sbin/chkconfig --del xendomains
563
564         %service xenconsoled stop
565         /sbin/chkconfig --del xenconsoled
566
567         %service xenstored stop
568         /sbin/chkconfig --del xenstored
569
570         %service xen-watchdog stop
571         /sbin/chkconfig --del xen-watchdog
572 fi
573 %systemd_preun xen-watchdog.service xenconsoled.service xenstored.service xendomains.service
574
575 %postun
576 %systemd_reload
577
578 %post xend
579 /sbin/chkconfig --add xend
580 %systemd_post xend.service
581
582 %preun xend
583 if [ "$1" = "0" ]; then
584         %service xend stop
585         /sbin/chkconfig --del xend
586 fi
587 %systemd_preun xend.service
588
589 %postun xend
590 %systemd_reload
591
592 %post   libs -p /sbin/ldconfig
593 %postun libs -p /sbin/ldconfig
594
595 %post   libs-guest -p /sbin/ldconfig
596 %postun libs-guest -p /sbin/ldconfig
597
598 %post efi
599 [ -x /sbin/efi-boot-update ] && /sbin/efi-boot-update --auto || :
600
601 %files
602 %defattr(644,root,root,755)
603 %doc COPYING README* docs/misc/* docs/html/* _doc/*
604 %if %{with hypervisor}
605 /boot/%{name}-syms-%{version}
606 /boot/%{name}-%{version}.gz
607 /boot/%{name}.gz
608 %endif
609 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenconsoled
610 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenstored
611 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xendomains
612 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/xen
613 %attr(754,root,root) /etc/rc.d/init.d/xen-watchdog
614 %attr(754,root,root) /etc/rc.d/init.d/xenconsoled
615 %attr(754,root,root) /etc/rc.d/init.d/xenstored
616 %attr(754,root,root) /etc/rc.d/init.d/xendomains
617 %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/xen-dom0.conf
618 %{systemdunitdir}/proc-xen.mount
619 %{systemdunitdir}/var-lib-xenstored.mount
620 %{systemdunitdir}/xen-watchdog.service
621 %{systemdunitdir}/xenconsoled.service
622 %{systemdunitdir}/xenstored.service
623 %{systemdunitdir}/xendomains.service
624 %dir %{_sysconfdir}/xen
625 %dir %{_sysconfdir}/xen/auto
626 %dir %{_sysconfdir}/xen/examples
627 %dir %{_sysconfdir}/xen/scripts
628 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
629 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/examples/*
630 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README*
631 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool
632 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf
633 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/xen-backend.rules
634 %attr(755,root,root) %{_bindir}/pygrub
635 %attr(755,root,root) %{_bindir}/qemu-img-xen
636 %attr(755,root,root) %{_bindir}/qemu-nbd-xen
637 %attr(755,root,root) %{_bindir}/remus
638 %attr(755,root,root) %{_bindir}/xencons
639 %attr(755,root,root) %{_bindir}/xencov_split
640 %attr(755,root,root) %{_bindir}/xentrace*
641 %attr(755,root,root) %{_sbindir}/blktapctrl
642 %attr(755,root,root) %{_sbindir}/flask-*
643 %attr(755,root,root) %{_sbindir}/gdbsx
644 %attr(755,root,root) %{_sbindir}/gtrace*
645 %attr(755,root,root) %{_sbindir}/img2qcow
646 %attr(755,root,root) %{_sbindir}/kdd
647 %attr(755,root,root) %{_sbindir}/lock-util
648 %attr(755,root,root) %{_sbindir}/qcow-create
649 %attr(755,root,root) %{_sbindir}/qcow2raw
650 %attr(755,root,root) %{_sbindir}/tap-ctl
651 %attr(755,root,root) %{_sbindir}/tapdisk*
652 %attr(755,root,root) %{_sbindir}/td-util
653 %attr(755,root,root) %{_sbindir}/vhd-*
654 %attr(755,root,root) %{_sbindir}/xen-*
655 %attr(755,root,root) %{_sbindir}/xenbaked
656 %attr(755,root,root) %{_sbindir}/xenconsoled
657 %attr(755,root,root) %{_sbindir}/xencov
658 %attr(755,root,root) %{_sbindir}/xenlockprof
659 %attr(755,root,root) %{_sbindir}/xenmon.py
660 %attr(755,root,root) %{_sbindir}/xenperf
661 %attr(755,root,root) %{_sbindir}/xenpm
662 %attr(755,root,root) %{_sbindir}/xenpmd
663 %attr(755,root,root) %{_sbindir}/xenstored
664 %attr(755,root,root) %{_sbindir}/xentop
665 %attr(755,root,root) %{_sbindir}/xentrace_setmask
666 %attr(755,root,root) %{_sbindir}/xenwatchdogd
667 %attr(755,root,root) %{_sbindir}/xl
668 %attr(755,root,root) %{_sbindir}/xsview
669 %dir %{_libdir}/%{name}
670 %dir %{_libdir}/%{name}/bin
671 %attr(744,root,root) %{_libdir}/%{name}/bin/*
672 %if "%{_lib}" != "lib"
673 %dir %{_prefix}/lib/%{name}
674 %dir %{_prefix}/lib/%{name}/bin
675 %attr(755,root,root) %{_prefix}/lib/%{name}/bin/*
676 %endif
677 %dir %{_prefix}/lib/%{name}/boot
678 %if %{with stubdom}
679 %{_prefix}/lib/%{name}/boot/ioemu-stubdom.gz
680 %ifarch %{ix86} %{x8664}
681 %{_prefix}/lib/%{name}/boot/pv-grub-x86_32.gz
682 %endif
683 %ifarch %{x8664}
684 %{_prefix}/lib/%{name}/boot/pv-grub-x86_64.gz
685 %endif
686 %{_prefix}/lib/%{name}/boot/vtpm-stubdom.gz
687 %{_prefix}/lib/%{name}/boot/vtpmmgr-stubdom.gz
688 %{_prefix}/lib/%{name}/boot/xenstore-stubdom.gz
689 %endif
690 %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader
691 %{_datadir}/xen
692 %{_mandir}/man1/xentop.1*
693 %{_mandir}/man1/xentrace_format.1*
694 %{_mandir}/man1/xl.1*
695 %{_mandir}/man1/xm.1*
696 %{_mandir}/man5/xend-config.sxp.5*
697 %{_mandir}/man5/xl.cfg.5*
698 %{_mandir}/man5/xl.conf.5*
699 %{_mandir}/man5/xlcpupool.cfg.5*
700 %{_mandir}/man5/xmdomain.cfg.5*
701 %{_mandir}/man8/xentrace.8*
702 %{_sharedstatedir}/xen
703 %{_sharedstatedir}/xenstored
704 %dir /var/run/xenstored
705 %{systemdtmpfilesdir}/xenstored.conf
706 %{systemdtmpfilesdir}/xen.conf
707 %dir %attr(0700,root,root) /var/log/xen
708 %dir %attr(0700,root,root) /var/log/xen/console
709 %{_datadir}/qemu-xen
710
711 %files guest
712 %defattr(644,root,root,755)
713 %attr(755,root,root) %{_bindir}/xen-detect
714 %attr(755,root,root) %{_bindir}/xenstore*
715
716 %files libs
717 %defattr(644,root,root,755)
718 %attr(755,root,root) %{_libdir}/libblktap.so.*.*.*
719 %attr(755,root,root) %ghost %{_libdir}/libblktap.so.3.0
720 %attr(755,root,root) %{_libdir}/libblktapctl.so.*.*.*
721 %attr(755,root,root) %ghost %{_libdir}/libblktapctl.so.1.0
722 %attr(755,root,root) %{_libdir}/libfsimage.so.*.*.*
723 %attr(755,root,root) %ghost %{_libdir}/libfsimage.so.1.0
724 %attr(755,root,root) %{_libdir}/libvhd.so.*.*.*
725 %attr(755,root,root) %ghost %{_libdir}/libvhd.so.1.0
726 %attr(755,root,root) %{_libdir}/libxenctrl.so.*.*.*
727 %attr(755,root,root) %ghost %{_libdir}/libxenctrl.so.4.3
728 %attr(755,root,root) %{_libdir}/libxenguest.so.*.*.*
729 %attr(755,root,root) %ghost %{_libdir}/libxenguest.so.4.3
730 %attr(755,root,root) %{_libdir}/libxenlight.so.*.*.*
731 %attr(755,root,root) %ghost %{_libdir}/libxenlight.so.4.3
732 %attr(755,root,root) %{_libdir}/libxenstat.so.*.*
733 %attr(755,root,root) %ghost %{_libdir}/libxenstat.so.0
734 %attr(755,root,root) %{_libdir}/libxenvchan.so.*.*.*
735 %attr(755,root,root) %ghost %{_libdir}/libxenvchan.so.1.0
736 %attr(755,root,root) %{_libdir}/libxlutil.so.*.*.*
737 %attr(755,root,root) %ghost %{_libdir}/libxlutil.so.4.3
738 %dir %{_libdir}/fs
739 %dir %{_libdir}/fs/ext2fs-lib
740 %dir %{_libdir}/fs/fat
741 %dir %{_libdir}/fs/iso9660
742 %dir %{_libdir}/fs/reiserfs
743 %dir %{_libdir}/fs/ufs
744 %dir %{_libdir}/fs/xfs
745 %dir %{_libdir}/fs/zfs
746 %attr(755,root,root) %{_libdir}/fs/*/fsimage.so
747
748 %files libs-guest
749 %defattr(644,root,root,755)
750 %attr(755,root,root) %{_libdir}/libxenstore.so.*.*.*
751 %attr(755,root,root) %ghost %{_libdir}/libxenstore.so.3.0
752
753 %files devel
754 %defattr(644,root,root,755)
755 %attr(755,root,root) %{_libdir}/libblktap.so
756 %attr(755,root,root) %{_libdir}/libblktapctl.so
757 %attr(755,root,root) %{_libdir}/libfsimage.so
758 %attr(755,root,root) %{_libdir}/libvhd.so
759 %attr(755,root,root) %{_libdir}/libxenctrl.so
760 %attr(755,root,root) %{_libdir}/libxenguest.so
761 %attr(755,root,root) %{_libdir}/libxenlight.so
762 %attr(755,root,root) %{_libdir}/libxenstat.so
763 %attr(755,root,root) %{_libdir}/libxenstore.so
764 %attr(755,root,root) %{_libdir}/libxenvchan.so
765 %attr(755,root,root) %{_libdir}/libxlutil.so
766 %{_includedir}/_libxl_list.h
767 %{_includedir}/_libxl_types.h
768 %{_includedir}/_libxl_types_json.h
769 %{_includedir}/blktaplib.h
770 %{_includedir}/fsimage*.h
771 %{_includedir}/libxenvchan.h
772 %{_includedir}/libxl*.h
773 %{_includedir}/xen*.h
774 %{_includedir}/xs*.h
775 %{_includedir}/xen
776 %{_includedir}/xenstore-compat
777
778 %files static
779 %defattr(644,root,root,755)
780 %{_libdir}/libblktap.a
781 %{_libdir}/libblktapctl.a
782 %{_libdir}/libvhd.a
783 %{_libdir}/libxenctrl.a
784 %{_libdir}/libxenguest.a
785 %{_libdir}/libxenlight.a
786 %{_libdir}/libxenvchan.a
787 %{_libdir}/libxenstat.a
788 %{_libdir}/libxenstore.a
789 %{_libdir}/libxlutil.a
790
791 %files xend
792 %defattr(644,root,root,755)
793 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/blktapctrl
794 %{systemdunitdir}/blktapctrl.service
795 %{systemdunitdir}/xend.service
796 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend
797 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/xend.rules
798 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm*
799 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend*
800 %attr(755,root,root) %{_sbindir}/xend
801 %attr(755,root,root) %{_sbindir}/xm
802 %dir %attr(700,root,root) /var/run/xend
803 %{systemdtmpfilesdir}/xend.conf
804
805 %if %{with ocaml}
806 %files -n ocaml-xen
807 %defattr(644,root,root,755)
808 %doc tools/ocaml/LICENSE
809 %attr(755,root,root) %{_sbindir}/oxenstored
810 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/oxenstored.conf
811 %dir %{_libdir}/ocaml/site-lib/xenbus
812 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenbus/dllxenbus_stubs.so
813 %dir %{_libdir}/ocaml/site-lib/xenctrl
814 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenctrl/dllxenctrl_stubs.so
815 %dir %{_libdir}/ocaml/site-lib/xeneventchn
816 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xeneventchn/dllxeneventchn_stubs.so
817 %dir %{_libdir}/ocaml/site-lib/xenlight
818 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenlight/dllxenlight_stubs.so
819 %dir %{_libdir}/ocaml/site-lib/xenmmap
820 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenmmap/dllxenmmap_stubs.so
821
822 %files -n ocaml-xen-devel
823 %defattr(644,root,root,755)
824 %{_libdir}/ocaml/site-lib/xenbus/META
825 %{_libdir}/ocaml/site-lib/xenbus/libxenbus_stubs.a
826 %{_libdir}/ocaml/site-lib/xenbus/xenbus.a
827 %{_libdir}/ocaml/site-lib/xenbus/*.cm[aixo]*
828 %{_libdir}/ocaml/site-lib/xenctrl/META
829 %{_libdir}/ocaml/site-lib/xenctrl/libxenctrl_stubs.a
830 %{_libdir}/ocaml/site-lib/xenctrl/xenctrl.a
831 %{_libdir}/ocaml/site-lib/xenctrl/xenctrl.cm[aix]*
832 %{_libdir}/ocaml/site-lib/xeneventchn/META
833 %{_libdir}/ocaml/site-lib/xeneventchn/libxeneventchn_stubs.a
834 %{_libdir}/ocaml/site-lib/xeneventchn/xeneventchn.a
835 %{_libdir}/ocaml/site-lib/xeneventchn/xeneventchn.cm[aix]*
836 %{_libdir}/ocaml/site-lib/xenmmap/META
837 %{_libdir}/ocaml/site-lib/xenmmap/libxenmmap_stubs.a
838 %{_libdir}/ocaml/site-lib/xenmmap/xenmmap.a
839 %{_libdir}/ocaml/site-lib/xenmmap/xenmmap.cm[aix]*
840 %{_libdir}/ocaml/site-lib/xenlight/META
841 %{_libdir}/ocaml/site-lib/xenlight/libxenlight_stubs.a
842 %{_libdir}/ocaml/site-lib/xenlight/xenlight.a
843 %{_libdir}/ocaml/site-lib/xenlight/xenlight.cm[aix]*
844 %dir %{_libdir}/ocaml/site-lib/xenstore
845 %{_libdir}/ocaml/site-lib/xenstore/META
846 %{_libdir}/ocaml/site-lib/xenstore/xenstore.a
847 %{_libdir}/ocaml/site-lib/xenstore/*.cm[aixo]*
848 %endif
849
850 %files -n python-xen
851 %defattr(644,root,root,755)
852 %attr(755,root,root) %{py_sitedir}/fsimage.so
853 %{py_sitedir}/grub
854 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/checkpoint.so
855 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/flask.so
856 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/netlink.so
857 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/ptsname.so
858 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/xc.so
859 %{py_sitedir}/xen/remus
860 %{py_sitedir}/xen/sv
861 %{py_sitedir}/xen/util
862 %{py_sitedir}/xen/web
863 %{py_sitedir}/xen/xend
864 %{py_sitedir}/xen/xm
865 %{py_sitedir}/xen/xsview
866 %if "%{py_ver}" > "2.4"
867 %{py_sitedir}/pygrub-0.3-py*.egg-info
868 %{py_sitedir}/xen-3.0-py*.egg-info
869 %endif
870
871 %files -n python-xen-guest
872 %defattr(644,root,root,755)
873 %dir %{py_sitedir}/xen
874 %{py_sitedir}/xen/__init__.py*
875 %dir %{py_sitedir}/xen/lowlevel
876 %{py_sitedir}/xen/lowlevel/__init__.py*
877 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/xs.so
878
879 %files -n bash-completion-%{name}
880 %defattr(644,root,root,755)
881 /etc/bash_completion.d/xl.sh
882
883 %if %{with efi}
884 %files efi
885 %defattr(644,root,root,755)
886 %dir %{_libdir}/efi
887 %{_libdir}/efi/*.efi
888 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/efi-boot/xen.cfg
889 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/efi-boot/update.d/xen.conf
890 %endif
This page took 0.115359 seconds and 4 git commands to generate.