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