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