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