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