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