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