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