]> git.pld-linux.org Git - packages/xen.git/blob - xen.spec
- updated to 4.4.3
[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.3
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:  fae37c3afc92e7d5d3e93fbe9b81ec2c
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 # http://git.alpinelinux.org/cgit/aports/plain/main/xen/gnutls-3.4.0.patch
122 Patch20:        %{name}-gnutls-3.4.patch
123 URL:            http://www.xen.org/products/xenhyp.html
124 %if %{with qemu_traditional}
125 %{?with_opengl:BuildRequires:   OpenGL-devel}
126 %{?with_sdl:BuildRequires:      SDL-devel >= 1.2.1}
127 %endif
128 %ifarch %{ix86} %{x8664}
129 BuildRequires:  acpica
130 BuildRequires:  autoconf
131 BuildRequires:  bcc
132 BuildRequires:  bin86
133 %endif
134 %if %{with qemu_traditional}
135 %{?with_bluetooth:BuildRequires:        bluez-libs-devel}
136 %{?with_brlapi:BuildRequires:   brlapi-devel}
137 %endif
138 %{?with_efi:BuildRequires:      binutils >= 3:2.23.51.0.3-2}
139 BuildRequires:  bzip2-devel
140 BuildRequires:  curl-devel
141 BuildRequires:  cyrus-sasl-devel >= 2
142 %if %{with xsm}
143 BuildRequires:  checkpolicy
144 %endif
145 BuildRequires:  e2fsprogs-devel
146 BuildRequires:  gcc >= 6:4.1
147 %ifarch %{x8664}
148 BuildRequires:  gcc-multilib-32 >= 6:4.1
149 %endif
150 BuildRequires:  gettext-tools
151 BuildRequires:  glib2-devel >= 1:2.12
152 BuildRequires:  gnutls-devel
153 BuildRequires:  keyutils-devel
154 BuildRequires:  latex2html >= 2008
155 BuildRequires:  libaio-devel
156 BuildRequires:  libcap-devel
157 BuildRequires:  libjpeg-devel
158 BuildRequires:  libpng-devel
159 BuildRequires:  libuuid-devel
160 BuildRequires:  lzo-devel >= 2
161 BuildRequires:  ncurses-devel
162 %if %{with ocaml}
163 BuildRequires:  ocaml >= 3.04-7
164 BuildRequires:  ocaml-findlib
165 %endif
166 BuildRequires:  nss-devel >= 3.12.8
167 BuildRequires:  openssl-devel
168 BuildRequires:  pciutils-devel
169 BuildRequires:  perl-base
170 BuildRequires:  perl-tools-pod
171 BuildRequires:  pkgconfig
172 BuildRequires:  python-devel
173 BuildRequires:  rpm-pythonprov
174 BuildRequires:  rpmbuild(macros) >= 1.647
175 BuildRequires:  seabios
176 BuildRequires:  texi2html
177 BuildRequires:  texlive-dvips
178 BuildRequires:  texlive-latex-psnfss
179 BuildRequires:  texlive-xetex
180 BuildRequires:  transfig
181 %{?with_qemu_traditional: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
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 %patch9 -p1
425 %patch10 -p1
426 %patch11 -p1
427 %patch12 -p1
428 %patch13 -p1
429 %patch14 -p1
430 %patch15 -p1
431 %patch16 -p1
432 %patch17 -p1
433 %patch18 -p1
434 %patch19 -p1
435 %patch20 -p1
436
437 # stubdom sources
438 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
439 ln -s %{SOURCE17} %{SOURCE18} %{SOURCE19} stubdom
440 ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz
441
442 # do not allow fetching anything via git
443 echo GIT=/bin/false >> Config.mk
444
445 %build
446 # based on the 'autoconf.sh' from the sources
447 %{__autoconf}
448 cd tools
449 %{__autoconf}
450 %{__autoheader}
451 cd ../stubdom
452 %{__autoconf}
453 cd ../docs
454 %{__autoconf}
455 cd ..
456
457 # if gold is used then bioses and grub doesn't build
458 install -d our-ld
459 ln -f -s /usr/bin/ld.bfd our-ld/ld
460 export PATH=$(pwd)/our-ld:$PATH
461
462 export CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
463 export CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses"
464
465 # NOTE:
466 # - there is a quoting bug (in tools/driver/Makefile) that causes
467 #   openssl is used instead of gcrypt; that's OK, openssl is obligatory
468 #   anyway (see configure), gcrypt is optional
469 # - prevent libiconv from being detected (not needed with glibc)
470 %configure \
471         CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" \
472         ac_cv_lib_iconv_libiconv_open=no \
473         %{__enable_disable qemu_traditional qemu-traditional} \
474         %{__enable_disable blktap1 blktap1} \
475         %{__enable_disable xend xend} \
476         --with-system-seabios=/usr/share/seabios/bios.bin \
477 %ifarch %{x8664}
478         --with-system-qemu=/usr/bin/qemu-system-x86_64 \
479 %else
480         --with-system-qemu=/usr/bin/qemu-system-i386 \
481 %endif
482         --disable-debug
483
484 %{__make} -j1 dist-xen dist-tools dist-docs \
485         %{!?with_ocaml:OCAML_TOOLS=n} \
486         XSM_ENABLE=%{?with_xsm:y}%{!?with_xsm:n} \
487         CC="%{__cc}" \
488         CXX="%{__cxx}" \
489         V=1
490
491 unset CFLAGS
492 unset CXXFLAGS
493
494 %if %{with stubdom}
495 %{__make} -j1 dist-stubdom \
496         %{!?with_ocaml:OCAML_TOOLS=n} \
497         XSM_ENABLE=%{?with_xsm:y}%{!?with_xsm:n} \
498         CC="%{__cc}" \
499         CXX="%{__cxx}" \
500         V=1
501 %endif
502
503 %install
504 rm -rf $RPM_BUILD_ROOT
505 install -d $RPM_BUILD_ROOT/etc/{xen/examples,modules-load.d,logrotate.d} \
506         $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir},/var/log/xen/console}
507
508 %if %{with efi}
509 install -d $RPM_BUILD_ROOT/etc/efi-boot/update.d
510 %endif
511
512 %{__make} -j1 install-xen install-tools %{?with_stubdom:install-stubdom} install-docs \
513         %{!?with_ocaml:OCAML_TOOLS=n} \
514         XSM_ENABLE=%{?with_xsm:y}%{!?with_xsm:n} \
515         DESTDIR=$RPM_BUILD_ROOT \
516         HOTPLUGS=install-udev
517
518 %if %{with qemu_traditional}
519 %if "%{_lib}" == "lib64"
520 ln -s %{_prefix}/lib/%{name}/bin/qemu-dm $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/qemu-dm
521 %endif
522 %endif
523
524 install %{SOURCE30} $RPM_BUILD_ROOT%{systemdunitdir}/proc-xen.mount
525 install %{SOURCE31} $RPM_BUILD_ROOT%{systemdunitdir}/var-lib-xenstored.mount
526 %if %{with blktap1}
527 install %{SOURCE32} $RPM_BUILD_ROOT%{systemdunitdir}/blktapctrl.service
528 install %{SOURCE33} $RPM_BUILD_ROOT/etc/sysconfig/blktapctrl
529 %endif
530 install %{SOURCE34} $RPM_BUILD_ROOT%{systemdunitdir}/xenconsoled.service
531 install %{SOURCE35} $RPM_BUILD_ROOT/etc/sysconfig/xenconsoled
532 install %{SOURCE36} $RPM_BUILD_ROOT%{systemdunitdir}/xenstored.service
533 install %{SOURCE37} $RPM_BUILD_ROOT/etc/sysconfig/xenstored
534 install %{SOURCE38} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xenstored.conf
535 %if %{with xend}
536 install %{SOURCE39} $RPM_BUILD_ROOT%{systemdunitdir}/xend.service
537 install %{SOURCE40} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xend.conf
538 %endif
539 install %{SOURCE41} $RPM_BUILD_ROOT%{systemdunitdir}/xen-watchdog.service
540 install %{SOURCE42} $RPM_BUILD_ROOT/etc/modules-load.d/xen-dom0.conf
541 install %{SOURCE43} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/bin/xendomains.sh
542 install %{SOURCE44} $RPM_BUILD_ROOT%{systemdunitdir}/xendomains.service
543 install %{SOURCE45} $RPM_BUILD_ROOT%{systemdunitdir}/xen-qemu-dom0-disk-backend.service
544 # sysvinit scripts
545 %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/*
546 %{__rm} $RPM_BUILD_ROOT/etc/sysconfig/xencommons
547 %if %{with xend}
548 install %{SOURCE50} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
549 %endif
550 install %{SOURCE51} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenconsoled
551 install %{SOURCE52} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenstored
552 install %{SOURCE53} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-watchdog
553 install %{SOURCE54} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
554 install %{SOURCE46} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-qemu-dom0-disk-backend
555 install %{SOURCE55} $RPM_BUILD_ROOT/etc/logrotate.d/xen
556 install %{SOURCE56} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xen.conf
557
558 install %{SOURCE60} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/bin/xen-init-list
559 install %{SOURCE61} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/bin/xen-toolstack
560
561 %if %{with efi}
562 install %{SOURCE57} $RPM_BUILD_ROOT/etc/efi-boot/xen.cfg
563 sed -e's;@libdir@;%{_libdir};g' -e's;@target_cpu@;%{_target_cpu};g' \
564                         %{SOURCE58} > $RPM_BUILD_ROOT/etc/efi-boot/update.d/xen.conf
565 %endif
566
567 mv $RPM_BUILD_ROOT/etc/xen/{xlexample*,examples}
568
569 install %{SOURCE59} $RPM_BUILD_ROOT%{_sysconfdir}/xen/scripts/vif-openvswitch
570
571 # for %%doc
572 install -d _doc
573 for tool in blktap blktap2 pygrub xenmon ; do
574         cp -p tools/$tool/README _doc/README.$tool
575 done
576
577 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
578 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
579
580 %py_postclean
581
582 # remove unneeded files
583 %if %{with hypervisor}
584 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.4.gz
585 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz
586 %endif
587 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
588 %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
589
590 %if %{without xend}
591 %{__rm} -r $RPM_BUILD_ROOT/var/run/xend
592 %endif
593
594 %clean
595 rm -rf $RPM_BUILD_ROOT
596
597 %post
598 /sbin/chkconfig --add xen-watchdog
599 /sbin/chkconfig --add xenconsoled
600 /sbin/chkconfig --add xenstored
601 /sbin/chkconfig --add xendomains
602 /sbin/chkconfig --add xen-qemu-dom0-disk-backend
603 NORESTART=1
604 %systemd_post xen-watchdog.service xenconsoled.service xenstored.service xendomains.service xen-qemu-dom0-disk-backend.service
605
606 %preun
607 if [ "$1" = "0" ]; then
608         %service xendomains stop
609         /sbin/chkconfig --del xendomains
610
611         %service xenconsoled stop
612         /sbin/chkconfig --del xenconsoled
613
614         %service xenstored stop
615         /sbin/chkconfig --del xenstored
616
617         %service xen-watchdog stop
618         /sbin/chkconfig --del xen-watchdog
619
620         %service xen-qemu-dom0-disk-backend stop
621         /sbin/chkconfig --del xen-qemu-dom0-disk-backend
622 fi
623 %systemd_preun xen-watchdog.service xenconsoled.service xenstored.service xendomains.service xen-qemu-dom0-disk-backend.service
624
625 %postun
626 %systemd_reload
627
628 %post xend
629 /sbin/chkconfig --add xend
630 %systemd_post xend.service
631
632 %preun xend
633 if [ "$1" = "0" ]; then
634         %service xend stop
635         /sbin/chkconfig --del xend
636 fi
637 %systemd_preun xend.service
638
639 %postun xend
640 %systemd_reload
641
642 %post   libs -p /sbin/ldconfig
643 %postun libs -p /sbin/ldconfig
644
645 %post   libs-guest -p /sbin/ldconfig
646 %postun libs-guest -p /sbin/ldconfig
647
648 %post efi
649 [ -x /sbin/efi-boot-update ] && /sbin/efi-boot-update --auto || :
650
651 %files
652 %defattr(644,root,root,755)
653 %doc COPYING README* docs/misc/* docs/html/* _doc/*
654 %if %{with hypervisor}
655 /boot/%{name}-syms-%{version}
656 /boot/%{name}-%{version}.gz
657 /boot/%{name}.gz
658 %endif
659 %if %{with xsm}
660 /boot/xenpolicy.24
661 %endif
662 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenconsoled
663 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenstored
664 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xendomains
665 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/xen
666 %attr(754,root,root) /etc/rc.d/init.d/xen-watchdog
667 %attr(754,root,root) /etc/rc.d/init.d/xenconsoled
668 %attr(754,root,root) /etc/rc.d/init.d/xenstored
669 %attr(754,root,root) /etc/rc.d/init.d/xendomains
670 %attr(754,root,root) /etc/rc.d/init.d/xen-qemu-dom0-disk-backend
671 %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/xen-dom0.conf
672 %{systemdunitdir}/proc-xen.mount
673 %{systemdunitdir}/var-lib-xenstored.mount
674 %{systemdunitdir}/xen-watchdog.service
675 %{systemdunitdir}/xenconsoled.service
676 %{systemdunitdir}/xenstored.service
677 %{systemdunitdir}/xendomains.service
678 %{systemdunitdir}/xen-qemu-dom0-disk-backend.service
679 %dir %{_sysconfdir}/xen
680 %dir %{_sysconfdir}/xen/auto
681 %dir %{_sysconfdir}/xen/examples
682 %dir %{_sysconfdir}/xen/scripts
683 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
684 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/examples/*
685 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README*
686 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool
687 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf
688 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/xen-backend.rules
689 %attr(755,root,root) %{_bindir}/pygrub
690 %if %{with qemu_traditional}
691 %attr(755,root,root) %{_bindir}/qemu-img-xen
692 %attr(755,root,root) %{_bindir}/qemu-nbd-xen
693 %endif
694 %attr(755,root,root) %{_bindir}/remus
695 %attr(755,root,root) %{_bindir}/xencons
696 %attr(755,root,root) %{_bindir}/xencov_split
697 %attr(755,root,root) %{_bindir}/xentrace*
698 %if %{with blktap1}
699 %attr(755,root,root) %{_sbindir}/blktapctrl
700 %endif
701 %if %{with xsm}
702 %attr(755,root,root) %{_sbindir}/flask-*
703 %endif
704 %attr(755,root,root) %{_sbindir}/gdbsx
705 %attr(755,root,root) %{_sbindir}/gtrace*
706 %attr(755,root,root) %{_sbindir}/img2qcow
707 %attr(755,root,root) %{_sbindir}/kdd
708 %attr(755,root,root) %{_sbindir}/lock-util
709 %attr(755,root,root) %{_sbindir}/qcow-create
710 %attr(755,root,root) %{_sbindir}/qcow2raw
711 %attr(755,root,root) %{_sbindir}/tap-ctl
712 %attr(755,root,root) %{_sbindir}/tapdisk*
713 %attr(755,root,root) %{_sbindir}/td-util
714 %attr(755,root,root) %{_sbindir}/vhd-*
715 %attr(755,root,root) %{_sbindir}/xen-*
716 %attr(755,root,root) %{_sbindir}/xenbaked
717 %attr(755,root,root) %{_sbindir}/xenconsoled
718 %attr(755,root,root) %{_sbindir}/xencov
719 %attr(755,root,root) %{_sbindir}/xenlockprof
720 %attr(755,root,root) %{_sbindir}/xenmon.py
721 %attr(755,root,root) %{_sbindir}/xenperf
722 %attr(755,root,root) %{_sbindir}/xenpm
723 %attr(755,root,root) %{_sbindir}/xenpmd
724 %attr(755,root,root) %{_sbindir}/xenstored
725 %attr(755,root,root) %{_sbindir}/xentop
726 %attr(755,root,root) %{_sbindir}/xentrace_setmask
727 %attr(755,root,root) %{_sbindir}/xenwatchdogd
728 %attr(755,root,root) %{_sbindir}/xl
729 %dir %{_libdir}/%{name}
730 %dir %{_libdir}/%{name}/bin
731 %attr(744,root,root) %{_libdir}/%{name}/bin/*
732 %if "%{_lib}" != "lib"
733 %dir %{_prefix}/lib/%{name}
734 %dir %{_prefix}/lib/%{name}/bin
735 %attr(755,root,root) %{_prefix}/lib/%{name}/bin/*
736 %endif
737 %dir %{_prefix}/lib/%{name}/boot
738 %if %{with stubdom}
739 %if %{with qemu_traditional}
740 %{_prefix}/lib/%{name}/boot/ioemu-stubdom.gz
741 %endif
742 %ifarch %{ix86} %{x8664}
743 %{_prefix}/lib/%{name}/boot/pv-grub-x86_32.gz
744 %endif
745 %ifarch %{x8664}
746 %{_prefix}/lib/%{name}/boot/pv-grub-x86_64.gz
747 %endif
748 %{_prefix}/lib/%{name}/boot/vtpm-stubdom.gz
749 %{_prefix}/lib/%{name}/boot/vtpmmgr-stubdom.gz
750 %{_prefix}/lib/%{name}/boot/xenstore-stubdom.gz
751 %endif
752 %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader
753 %{_mandir}/man1/xenstore-chmod.1*
754 %{_mandir}/man1/xenstore-ls.1*
755 %{_mandir}/man1/xenstore.1*
756 %{_mandir}/man1/xentop.1*
757 %{_mandir}/man1/xentrace_format.1*
758 %{_mandir}/man1/xl.1*
759 %if %{with xend}
760 %{_mandir}/man1/xm.1*
761 %{_mandir}/man5/xend-config.sxp.5*
762 %endif
763 %{_mandir}/man5/xl.cfg.5*
764 %{_mandir}/man5/xl.conf.5*
765 %{_mandir}/man5/xlcpupool.cfg.5*
766 %{_mandir}/man5/xmdomain.cfg.5*
767 %{_mandir}/man8/xentrace.8*
768 %{_sharedstatedir}/xen
769 %{_sharedstatedir}/xenstored
770 %dir /var/run/xenstored
771 %{systemdtmpfilesdir}/xenstored.conf
772 %{systemdtmpfilesdir}/xen.conf
773 %dir %attr(0700,root,root) /var/log/xen
774 %dir %attr(0700,root,root) /var/log/xen/console
775 %if %{with qemu_traditional}
776 %{_datadir}/xen
777 %endif
778
779 %files guest
780 %defattr(644,root,root,755)
781 %attr(755,root,root) %{_bindir}/xen-detect
782 %attr(755,root,root) %{_bindir}/xenstore*
783
784 %files libs
785 %defattr(644,root,root,755)
786 %if %{with blktap1}
787 %attr(755,root,root) %{_libdir}/libblktap.so.*.*.*
788 %attr(755,root,root) %ghost %{_libdir}/libblktap.so.3.0
789 %endif
790 %attr(755,root,root) %{_libdir}/libblktapctl.so.*.*.*
791 %attr(755,root,root) %ghost %{_libdir}/libblktapctl.so.1.0
792 %attr(755,root,root) %{_libdir}/libfsimage.so.*.*.*
793 %attr(755,root,root) %ghost %{_libdir}/libfsimage.so.1.0
794 %attr(755,root,root) %{_libdir}/libvhd.so.*.*.*
795 %attr(755,root,root) %ghost %{_libdir}/libvhd.so.1.0
796 %attr(755,root,root) %{_libdir}/libxenctrl.so.*.*.*
797 %attr(755,root,root) %ghost %{_libdir}/libxenctrl.so.4.4
798 %attr(755,root,root) %{_libdir}/libxenguest.so.*.*.*
799 %attr(755,root,root) %ghost %{_libdir}/libxenguest.so.4.4
800 %attr(755,root,root) %{_libdir}/libxenlight.so.*.*.*
801 %attr(755,root,root) %ghost %{_libdir}/libxenlight.so.4.4
802 %attr(755,root,root) %{_libdir}/libxenstat.so.*.*
803 %attr(755,root,root) %ghost %{_libdir}/libxenstat.so.0
804 %attr(755,root,root) %{_libdir}/libxenvchan.so.*.*.*
805 %attr(755,root,root) %ghost %{_libdir}/libxenvchan.so.1.0
806 %attr(755,root,root) %{_libdir}/libxlutil.so.*.*.*
807 %attr(755,root,root) %ghost %{_libdir}/libxlutil.so.4.3
808 %dir %{_libdir}/fs
809 %dir %{_libdir}/fs/ext2fs-lib
810 %dir %{_libdir}/fs/fat
811 %dir %{_libdir}/fs/iso9660
812 %dir %{_libdir}/fs/reiserfs
813 %dir %{_libdir}/fs/ufs
814 %dir %{_libdir}/fs/xfs
815 %dir %{_libdir}/fs/zfs
816 %attr(755,root,root) %{_libdir}/fs/*/fsimage.so
817
818 %files libs-guest
819 %defattr(644,root,root,755)
820 %attr(755,root,root) %{_libdir}/libxenstore.so.*.*.*
821 %attr(755,root,root) %ghost %{_libdir}/libxenstore.so.3.0
822
823 %files devel
824 %defattr(644,root,root,755)
825 %if %{with blktap1}
826 %attr(755,root,root) %{_libdir}/libblktap.so
827 %endif
828 %attr(755,root,root) %{_libdir}/libblktapctl.so
829 %attr(755,root,root) %{_libdir}/libfsimage.so
830 %attr(755,root,root) %{_libdir}/libvhd.so
831 %attr(755,root,root) %{_libdir}/libxenctrl.so
832 %attr(755,root,root) %{_libdir}/libxenguest.so
833 %attr(755,root,root) %{_libdir}/libxenlight.so
834 %attr(755,root,root) %{_libdir}/libxenstat.so
835 %attr(755,root,root) %{_libdir}/libxenstore.so
836 %attr(755,root,root) %{_libdir}/libxenvchan.so
837 %attr(755,root,root) %{_libdir}/libxlutil.so
838 %{_includedir}/_libxl_list.h
839 %{_includedir}/_libxl_types.h
840 %{_includedir}/_libxl_types_json.h
841 %if %{with blktap1}
842 %{_includedir}/blktaplib.h
843 %endif
844 %{_includedir}/fsimage*.h
845 %{_includedir}/libxenvchan.h
846 %{_includedir}/libxl*.h
847 %{_includedir}/xen*.h
848 %{_includedir}/xs*.h
849 %{_includedir}/xen
850 %{_includedir}/xenstore-compat
851
852 %files static
853 %defattr(644,root,root,755)
854 %if %{with blktap1}
855 %{_libdir}/libblktap.a
856 %endif
857 %{_libdir}/libblktapctl.a
858 %{_libdir}/libvhd.a
859 %{_libdir}/libxenctrl.a
860 %{_libdir}/libxenguest.a
861 %{_libdir}/libxenlight.a
862 %{_libdir}/libxenvchan.a
863 %{_libdir}/libxenstat.a
864 %{_libdir}/libxenstore.a
865 %{_libdir}/libxlutil.a
866
867 %if %{with xend}
868 %files xend
869 %defattr(644,root,root,755)
870 %if %{with blktap1}
871 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/blktapctrl
872 %{systemdunitdir}/blktapctrl.service
873 %endif
874 %{systemdunitdir}/xend.service
875 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend
876 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/xend.rules
877 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm*
878 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend*
879 %attr(755,root,root) %{_sbindir}/xend
880 %attr(755,root,root) %{_sbindir}/xm
881 %dir %attr(700,root,root) /var/run/xend
882 %{systemdtmpfilesdir}/xend.conf
883 %endif
884
885 %if %{with ocaml}
886 %files -n ocaml-xen
887 %defattr(644,root,root,755)
888 %doc tools/ocaml/LICENSE
889 %attr(755,root,root) %{_sbindir}/oxenstored
890 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/oxenstored.conf
891 %dir %{_libdir}/ocaml/site-lib/xenbus
892 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenbus/dllxenbus_stubs.so
893 %dir %{_libdir}/ocaml/site-lib/xenctrl
894 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenctrl/dllxenctrl_stubs.so
895 %dir %{_libdir}/ocaml/site-lib/xeneventchn
896 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xeneventchn/dllxeneventchn_stubs.so
897 %dir %{_libdir}/ocaml/site-lib/xenlight
898 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenlight/dllxenlight_stubs.so
899 %dir %{_libdir}/ocaml/site-lib/xenmmap
900 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenmmap/dllxenmmap_stubs.so
901 %dir %{_libdir}/ocaml/site-lib/xentoollog
902 %attr(755,root,root) %{_libdir}/ocaml/site-lib/xentoollog/dllxentoollog_stubs.so
903
904 %files -n ocaml-xen-devel
905 %defattr(644,root,root,755)
906 %{_libdir}/ocaml/site-lib/xenbus/META
907 %{_libdir}/ocaml/site-lib/xenbus/libxenbus_stubs.a
908 %{_libdir}/ocaml/site-lib/xenbus/xenbus.a
909 %{_libdir}/ocaml/site-lib/xenbus/*.cm[aixo]*
910 %{_libdir}/ocaml/site-lib/xenctrl/META
911 %{_libdir}/ocaml/site-lib/xenctrl/libxenctrl_stubs.a
912 %{_libdir}/ocaml/site-lib/xenctrl/xenctrl.a
913 %{_libdir}/ocaml/site-lib/xenctrl/xenctrl.cm[aix]*
914 %{_libdir}/ocaml/site-lib/xeneventchn/META
915 %{_libdir}/ocaml/site-lib/xeneventchn/libxeneventchn_stubs.a
916 %{_libdir}/ocaml/site-lib/xeneventchn/xeneventchn.a
917 %{_libdir}/ocaml/site-lib/xeneventchn/xeneventchn.cm[aix]*
918 %{_libdir}/ocaml/site-lib/xenmmap/META
919 %{_libdir}/ocaml/site-lib/xenmmap/libxenmmap_stubs.a
920 %{_libdir}/ocaml/site-lib/xenmmap/xenmmap.a
921 %{_libdir}/ocaml/site-lib/xenmmap/xenmmap.cm[aix]*
922 %{_libdir}/ocaml/site-lib/xenlight/META
923 %{_libdir}/ocaml/site-lib/xenlight/libxenlight_stubs.a
924 %{_libdir}/ocaml/site-lib/xenlight/xenlight.a
925 %{_libdir}/ocaml/site-lib/xenlight/xenlight.cm[aix]*
926 %dir %{_libdir}/ocaml/site-lib/xenstore
927 %{_libdir}/ocaml/site-lib/xenstore/META
928 %{_libdir}/ocaml/site-lib/xenstore/xenstore.a
929 %{_libdir}/ocaml/site-lib/xenstore/*.cm[aixo]*
930 %{_libdir}/ocaml/site-lib/xentoollog/META
931 %{_libdir}/ocaml/site-lib/xentoollog/libxentoollog_stubs.a
932 %{_libdir}/ocaml/site-lib/xentoollog/xentoollog.a
933 %{_libdir}/ocaml/site-lib/xentoollog/*.cm[aixo]*
934 %endif
935
936 %files -n python-xen
937 %defattr(644,root,root,755)
938 %attr(755,root,root) %{py_sitedir}/fsimage.so
939 %{py_sitedir}/grub
940 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/checkpoint.so
941 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/flask.so
942 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/netlink.so
943 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/ptsname.so
944 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/xc.so
945 %if %{with xend}
946 %{py_sitedir}/xen/remus
947 %{py_sitedir}/xen/util
948 %{py_sitedir}/xen/web
949 %{py_sitedir}/xen/xend
950 %{py_sitedir}/xen/xm
951 %endif
952 %if "%{py_ver}" > "2.4"
953 %{py_sitedir}/pygrub-0.3-py*.egg-info
954 %{py_sitedir}/xen-3.0-py*.egg-info
955 %endif
956
957 %files -n python-xen-guest
958 %defattr(644,root,root,755)
959 %dir %{py_sitedir}/xen
960 %{py_sitedir}/xen/__init__.py*
961 %dir %{py_sitedir}/xen/lowlevel
962 %{py_sitedir}/xen/lowlevel/__init__.py*
963 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/xs.so
964
965 %files -n bash-completion-%{name}
966 %defattr(644,root,root,755)
967 /etc/bash_completion.d/xl.sh
968
969 %if %{with efi}
970 %files efi
971 %defattr(644,root,root,755)
972 %dir %{_libdir}/efi
973 %{_libdir}/efi/*.efi
974 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/efi-boot/xen.cfg
975 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/efi-boot/update.d/xen.conf
976 %endif
This page took 0.113757 seconds and 4 git commands to generate.