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