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