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