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