X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=xen.spec;h=2cab02777771cb8464a19dd9e7f9cb553fe5c565;hb=3e18837d6abc7588b0d62c5108b7c96826d2869a;hp=a02aa6b62e872c9a0655b2b0a1cfe0b1a6055832;hpb=36bd36292492b35050fa415eba7fe1c745b05471;p=packages%2Fxen.git diff --git a/xen.spec b/xen.spec index a02aa6b..2cab027 100644 --- a/xen.spec +++ b/xen.spec @@ -6,35 +6,45 @@ # Xen Makefiles) # - fix %doc - some files are installed in docdir both by make install and %d, # other are installed once -# - now the build dependencies are insane (because of what qemu can use) -# we should make them optional or get rid of them all properly -# +# - mini-os objects are relinked on install (because of .PHONY rules used to make them) # # Conditional build: -%bcond_without opengl # disable OpenGL support in Xen qemu -%bcond_without sdl # disable SDL support in Xen qemu -%bcond_without bluetooth # disable bluetooth support in Xen qemu -%bcond_without brlapi # disable brlapi support in Xen qemu -%bcond_without ocaml # build Ocaml libraries for Xen tools -%bcond_without efi # build the EFI hypervisor - +%bcond_without qemu_traditional # without qemu-xen-traditional +%bcond_without opengl # OpenGL support in Xen qemu +%bcond_without sdl # SDL support in Xen qemu +%bcond_without bluetooth # bluetooth support in Xen qemu +%bcond_without brlapi # brlapi support in Xen qemu +%bcond_without ocaml # Ocaml libraries for Xen tools +%bcond_without efi # EFI hypervisor +%bcond_without hypervisor # Xen hypervisor build +%bcond_without stubdom # stubdom build +%bcond_without xsm # XSM security module (by default, Flask) + +%ifnarch %{x8664} arm +%undefine with_hypervisor +%endif %ifnarch %{x8664} %undefine with_efi %endif +%ifnarch %{ix86} %{x8664} +%undefine with_stubdom +%endif -# from Config.mk: -%define seabios_version 1.6.3.2 +# from ./stubdom/configure.ac +%define polarssl_version 1.1.4 +%define tpm_emulator_version 0.7.4 +%define gmp_version 4.3.2 %define xen_extfiles_url http://xenbits.xensource.com/xen-extfiles Summary: Xen - a virtual machine monitor Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej Name: xen -Version: 4.2.2 -Release: 3 +Version: 4.6.5 +Release: 1 License: GPL v2, interface parts on BSD-like Group: Applications/System Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz -# Source0-md5: f7362b19401a47826f2d8fd603a1782a +# Source0-md5: 63c80317ee662fb237d709d6c4e161c8 # used by stubdoms Source10: %{xen_extfiles_url}/lwip-1.3.0.tar.gz # Source10-md5: 36cc57650cffda9a0269493be2a169bb @@ -48,27 +58,17 @@ Source14: %{xen_extfiles_url}/grub-0.97.tar.gz # Source14-md5: cd3f3eb54446be6003156158d51f4884 Source15: http://xenbits.xen.org/xen-extfiles/ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz # Source15-md5: 7496268cebf47d5c9ccb0696e3b26065 -# http://xenbits.xen.org/git-http/seabios.git/ -# git archive --prefix=tools/firmware/seabios/ --format=tar rel-%{seabios_version} | xz > seabios-%{seabios_version}.tar.xz -Source16: seabios-%{seabios_version}.tar.xz -# Source16-md5: 145e07ff5618a3999f94f2e830d06b05 -Source30: proc-xen.mount -Source31: var-lib-xenstored.mount -Source32: blktapctrl.service -Source33: blktapctrl.sysconfig -Source34: xenconsoled.service +Source17: %{xen_extfiles_url}/polarssl-%{polarssl_version}-gpl.tgz +# Source17-md5: 7b72caf22b01464ee7d6165f2fd85f44 +Source18: http://xenbits.xen.org/xen-extfiles/tpm_emulator-%{tpm_emulator_version}.tar.gz +# Source18-md5: e26becb8a6a2b6695f6b3e8097593db8 +Source19: ftp://ftp.gmplib.org/pub/gmp-%{gmp_version}/gmp-%{gmp_version}.tar.bz2 +# Source19-md5: dd60683d7057917e34630b4a787932e8 Source35: xenconsoled.sysconfig -Source36: xenstored.service Source37: xenstored.sysconfig Source38: xenstored.tmpfiles -Source39: xend.service -Source40: xend.tmpfiles -Source41: xen-watchdog.service -Source42: xen-dom0-modules-load.conf -Source43: xendomains.sh -Source44: xendomains.service # sysvinit scripts -Source50: xend.init +Source46: xen-qemu-dom0-disk-backend.init Source51: xenconsoled.init Source52: xenstored.init Source53: xen-watchdog.init @@ -84,121 +84,102 @@ Patch0: %{name}-python_scripts.patch Patch1: %{name}-symbols.patch Patch2: %{name}-curses.patch Patch3: pygrubfix.patch -Patch4: xend.catchbt.patch -Patch5: xend-pci-loop.patch -Patch6: %{name}-dumpdir.patch # Warning: this disables ingress filtering implemented in xen scripts! Patch7: %{name}-net-disable-iptables-on-bridge.patch -Patch8: %{name}-configure-xend.patch -Patch9: %{name}-initscript.patch -Patch10: %{name}-quemu-softloat-c99.patch -Patch11: %{name}-qemu.patch -Patch12: %{name}-scripts-locking.patch -Patch13: %{name}-close_lockfd_after_lock_attempt.patch -Patch14: %{name}-librt.patch -Patch15: %{name}-ulong.patch -Patch16: %{name}-doc.patch -Patch100: CVE-2013-1918-1 -Patch101: CVE-2013-1918-2 -Patch102: CVE-2013-1918-3 -Patch103: CVE-2013-1918-4 -Patch104: CVE-2013-1918-5 -Patch105: CVE-2013-1918-6 -Patch106: CVE-2013-1918-7 -Patch107: CVE-2013-1952 -Patch108: CVE-2013-2072 -Patch109: CVE-2013-2076 -Patch110: CVE-2013-2077 -Patch111: CVE-2013-2078 -#CVE-2013-2194 XEN XSA-55 integer overflows -#CVE-2013-2195 XEN XSA-55 pointer dereferences -#CVE-2013-2196 XEN XSA-55 other problems -Patch112: 0001-libelf-abolish-libelf-relocate.c.patch -Patch113: 0002-libxc-introduce-xc_dom_seg_to_ptr_pages.patch -Patch114: 0003-libxc-Fix-range-checking-in-xc_dom_pfn_to_ptr-etc.patch -Patch115: 0004-libelf-add-struct-elf_binary-parameter-to-elf_load_i.patch -Patch116: 0005-libelf-abolish-elf_sval-and-elf_access_signed.patch -Patch117: 0006-libelf-move-include-of-asm-guest_access.h-to-top-of-.patch -Patch118: 0007-libelf-xc_dom_load_elf_symtab-Do-not-use-syms-uninit.patch -Patch119: 0008-libelf-introduce-macros-for-memory-access-and-pointe.patch -Patch120: 0009-tools-xcutils-readnotes-adjust-print_l1_mfn_valid_no.patch -Patch121: 0010-libelf-check-nul-terminated-strings-properly.patch -Patch122: 0011-libelf-check-all-pointer-accesses.patch -Patch123: 0012-libelf-Check-pointer-references-in-elf_is_elfbinary.patch -Patch124: 0013-libelf-Make-all-callers-call-elf_check_broken.patch -Patch125: 0014-libelf-use-C99-bool-for-booleans.patch -Patch126: 0015-libelf-use-only-unsigned-integers.patch -Patch127: 0016-libelf-check-loops-for-running-away.patch -Patch128: 0017-libelf-abolish-obsolete-macros.patch -Patch129: 0018-libxc-Add-range-checking-to-xc_dom_binloader.patch -Patch130: 0019-libxc-check-failure-of-xc_dom_-_to_ptr-xc_map_foreig.patch -Patch131: 0020-libxc-check-return-values-from-malloc.patch -Patch132: 0021-libxc-range-checks-in-xc_dom_p2m_host-and-_guest.patch -Patch133: 0022-libxc-check-blob-size-before-proceeding-in-xc_dom_ch.patch -Patch134: 0023-libxc-Better-range-check-in-xc_dom_alloc_segment.patch -Patch135: CVE-2013-2211 -Patch136: CVE-2013-1432 +Patch9: %{name}-gawk.patch +Patch10: %{name}-qemu.patch +Patch12: %{name}-doc.patch +Patch13: %{name}-paths.patch +Patch14: %{name}-no_fetcher.patch +Patch15: odd-glib2-fix.patch +Patch16: %{name}-gmp-abi.patch +Patch18: %{name}-make.patch +Patch19: %{name}-no_Werror.patch +Patch22: %{name}-stubdom-build.patch +Patch23: link.patch +Patch24: %{name}-systemd.patch +Patch25: fix-misleading-indentation.patch +Patch26: deprecated-readdir_r.patch +Patch27: ipxe-build.patch +Patch28: sysmacros.patch +Patch29: unused-function.patch URL: http://www.xen.org/products/xenhyp.html -%{?with_opengl:BuildRequires: OpenGL-devel} -%{?with_sdl:BuildRequires: SDL-devel >= 1.2.1} +BuildRequires: autoconf >= 2.67 %ifarch %{ix86} %{x8664} BuildRequires: acpica BuildRequires: bcc +BuildRequires: bin86 %endif -%{?with_bluetooth:BuildRequires: bluez-libs-devel} -%{?with_brlapi:BuildRequires: brlapi-devel} %{?with_efi:BuildRequires: binutils >= 3:2.23.51.0.3-2} BuildRequires: bzip2-devel -BuildRequires: ceph-devel +%if %{with xsm} +BuildRequires: checkpolicy +%endif BuildRequires: curl-devel BuildRequires: cyrus-sasl-devel >= 2 BuildRequires: e2fsprogs-devel -BuildRequires: gcc >= 5:3.4 -BuildRequires: gettext-devel +BuildRequires: gcc >= 6:4.1 +%ifarch %{x8664} +BuildRequires: gcc-multilib-32 >= 6:4.1 +%endif +BuildRequires: gettext-tools BuildRequires: glib2-devel >= 1:2.12 BuildRequires: gnutls-devel +BuildRequires: keyutils-devel BuildRequires: latex2html >= 2008 BuildRequires: libaio-devel -BuildRequires: libiscsi-devel +BuildRequires: libcap-devel +%ifarch arm aarch64 +BuildRequires: libfdt-devel +%endif BuildRequires: libjpeg-devel +BuildRequires: libnl-devel >= 3.2.8 BuildRequires: libpng-devel BuildRequires: libuuid-devel BuildRequires: lzo-devel >= 2 BuildRequires: ncurses-devel %if %{with ocaml} -BuildRequires: ocaml >= 3.04-7 +BuildRequires: ocaml >= 3.11.0 BuildRequires: ocaml-findlib %endif BuildRequires: nss-devel >= 3.12.8 BuildRequires: openssl-devel BuildRequires: pciutils-devel BuildRequires: perl-base +BuildRequires: perl-tools-pod BuildRequires: pkgconfig BuildRequires: python-devel BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.647 -BuildRequires: spice-protocol >= 0.6.0 -BuildRequires: spice-server-devel >= 0.6.0 +BuildRequires: seabios BuildRequires: texi2html BuildRequires: texlive-dvips BuildRequires: texlive-latex-psnfss BuildRequires: texlive-xetex -BuildRequires: usbredir-devel -BuildRequires: vde2-devel +BuildRequires: transfig BuildRequires: which # for xfsctl () BuildRequires: xfsprogs-devel -BuildRequires: xorg-lib-libX11-devel -BuildRequires: xorg-lib-libXext-devel BuildRequires: xz-devel BuildRequires: yajl-devel BuildRequires: zlib-devel +%if %{with qemu_traditional} +%{?with_opengl:BuildRequires: OpenGL-devel} +%{?with_sdl:BuildRequires: SDL-devel >= 1.2.1} +%{?with_bluetooth:BuildRequires: bluez-libs-devel} +%{?with_brlapi:BuildRequires: brlapi-devel} +BuildRequires: vde2-devel +BuildRequires: xorg-lib-libX11-devel +BuildRequires: xorg-lib-libXext-devel +%endif +%if %{with qemu_traditional} # FIXME: see qemu configure comments on top of spec %{!?with_opengl:BuildConflicts: OpenGL-devel} %{!?with_sdl:BuildConflicts: SDL-devel} %{!?with_sdl:BuildConflicts: SDL-devel} %{!?with_bluetooth:BuildConflicts: bluez-libs-devel} %{!?with_brlapi:BuildConflicts: brlapi-devel} +%endif Requires(post,preun): /sbin/chkconfig Requires(post,preun,postun): systemd-units >= 38 Requires: %{name}-libs = %{version}-%{release} @@ -219,11 +200,16 @@ Requires: which Requires: %{name}-guest = %{version}-%{release} Obsoletes: xen-doc Obsoletes: xen-udev -ExclusiveArch: %{ix86} %{x8664} +Obsoletes: xen-xend +ExclusiveArch: %{ix86} %{x8664} arm +%ifarch %{ix86} %{x8664} +# for HVM +Suggests: qemu-system-x86 +%endif BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # some PPC/SPARC boot images in ELF format -%define _noautostrip .*%{_datadir}/\\(xen/qemu\\|qemu-xen\\)/\\(openbios-.*\\|palcode-clipper\\) +%define _noautostrip .*%{_datadir}/\\(xen\\|qemu-xen\\)/qemu/\\(openbios-.*\\|palcode-clipper\\|s390-ccw.img\\) %description This package contains the Xen hypervisor and Xen tools, needed to run @@ -310,19 +296,6 @@ Static Xen libraries. %description static -l pl.UTF-8 Statyczne biblioteki Xena. -%package xend -Summary: xend daemon -Summary(pl.UTF-8): Demon xend -Group: Daemons -Requires(post,preun,postun): systemd-units >= 38 -Requires: systemd-units >= 38 - -%description xend -xend daemon. - -%description xend -l pl.UTF-8 -Demon xend. - %package -n ocaml-xen Summary: OCaml bindings for Xen Summary(pl.UTF-8): Wiązania OCamla dla Xena @@ -382,11 +355,11 @@ Xen Python modules for both dom0 and domU virtual machines. Moduły Pythona dla maszyn wirtualnych dom0 i domU. %package -n bash-completion-%{name} -Summary: bash-completion for Xen (xl) +Summary: bash-completion for Xen (xl) Summary(pl.UTF-8): Bashowe dopełnianie poleceń dla Xena (xl) -Group: Applications/Shells -Requires: %{name} = %{version}-%{release} -Requires: bash-completion +Group: Applications/Shells +Requires: %{name} = %{version}-%{release} +Requires: bash-completion %description -n bash-completion-%{name} This package provides bash-completion for Xen (xl). @@ -409,94 +382,78 @@ Nadzorca Xen w postaci, która może być uruchomiona wprost z firmware (U)EFI, bez potrzeby oddzielnego bootloadera. %prep -%setup -q -a 16 +%setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 %patch7 -p1 -%patch8 -p1 %patch9 -p1 %patch10 -p1 -%patch11 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 -# CVE -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch104 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -%patch109 -p1 -%patch110 -p1 -%patch111 -p1 -%patch112 -p1 -%patch113 -p1 -%patch114 -p1 -%patch115 -p1 -%patch116 -p1 -%patch117 -p1 -%patch118 -p1 -%patch119 -p1 -%patch120 -p1 -%patch121 -p1 -%patch122 -p1 -%patch123 -p1 -%patch124 -p1 -%patch125 -p1 -%patch126 -p1 -%patch127 -p1 -%patch128 -p1 -%patch129 -p1 -%patch130 -p1 -%patch131 -p1 -%patch132 -p1 -%patch133 -p1 -%patch134 -p1 -%patch135 -p1 -%patch136 -p1 +%patch18 -p1 +%patch19 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 # stubdom sources ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom +ln -s %{SOURCE17} %{SOURCE18} %{SOURCE19} stubdom ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz # do not allow fetching anything via git echo GIT=/bin/false >> Config.mk %build +# based on the 'autoconf.sh' from the sources +%{__autoconf} +cd tools +%{__autoconf} +%{__autoheader} +cd ../stubdom +%{__autoconf} +cd ../docs +%{__autoconf} +cd .. + # if gold is used then bioses and grub doesn't build install -d our-ld -ln -s /usr/bin/ld.bfd our-ld/ld +ln -f -s /usr/bin/ld.bfd our-ld/ld export PATH=$(pwd)/our-ld:$PATH export CFLAGS="%{rpmcflags} -I/usr/include/ncurses" export CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" -# NOTE: -# - there is a quoting bug (in tools/driver/Makefile) that causes -# openssl is used instead of gcrypt; that's OK, openssl is obligatory -# anyway (see configure), gcrypt is optional +# NOTE on ac_cv_*: +# - use openssl (libcrypto) instead of libgcrypt as openssl is obligatory anyway # - prevent libiconv from being detected (not needed with glibc) -cd tools %configure \ CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" \ + ac_cv_lib_gcrypt_gcry_md_hash_buffer=no \ ac_cv_lib_iconv_libiconv_open=no \ - --disable-debug -cd .. + --disable-debug \ + %{__enable_disable qemu_traditional qemu-traditional} \ + --with-system-seabios=/usr/share/seabios/bios.bin \ +%ifarch %{x8664} + --with-system-qemu=/usr/bin/qemu-system-x86_64 \ +%else + --with-system-qemu=/usr/bin/qemu-system-i386 \ +%endif + --with-systemd=%{systemdunitdir} -%{__make} dist-xen dist-tools dist-docs \ +%{__make} -j1 dist-xen dist-tools dist-docs \ %{!?with_ocaml:OCAML_TOOLS=n} \ - prefix=%{_prefix} \ + XSM_ENABLE=%{?with_xsm:y}%{!?with_xsm:n} \ CC="%{__cc}" \ CXX="%{__cxx}" \ V=1 @@ -504,55 +461,48 @@ cd .. unset CFLAGS unset CXXFLAGS +%if %{with stubdom} %{__make} -j1 dist-stubdom \ %{!?with_ocaml:OCAML_TOOLS=n} \ + XSM_ENABLE=%{?with_xsm:y}%{!?with_xsm:n} \ CC="%{__cc}" \ CXX="%{__cxx}" \ V=1 +%endif %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT/etc/{xen/examples,modules-load.d,logrotate.d} \ - $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir},/var/log/xen/console} \ - $RPM_BUILD_ROOT/etc/efi-boot/update.d + $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir},/var/log/xen/console} + +%if %{with efi} +install -d $RPM_BUILD_ROOT/etc/efi-boot/update.d +%endif -%{__make} -j1 install-xen install-tools install-stubdom install-docs \ +%{__make} -j1 install-xen install-tools %{?with_stubdom:install-stubdom} install-docs \ %{!?with_ocaml:OCAML_TOOLS=n} \ - prefix=%{_prefix} \ + XSM_ENABLE=%{?with_xsm:y}%{!?with_xsm:n} \ DESTDIR=$RPM_BUILD_ROOT \ HOTPLUGS=install-udev -%if "%{_lib}" == "lib64" -ln -s %{_prefix}/lib/%{name}/bin/qemu-dm $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/qemu-dm -%endif - -install %{SOURCE30} $RPM_BUILD_ROOT%{systemdunitdir}/proc-xen.mount -install %{SOURCE31} $RPM_BUILD_ROOT%{systemdunitdir}/var-lib-xenstored.mount -install %{SOURCE32} $RPM_BUILD_ROOT%{systemdunitdir}/blktapctrl.service -install %{SOURCE33} $RPM_BUILD_ROOT/etc/sysconfig/blktapctrl -install %{SOURCE34} $RPM_BUILD_ROOT%{systemdunitdir}/xenconsoled.service install %{SOURCE35} $RPM_BUILD_ROOT/etc/sysconfig/xenconsoled -install %{SOURCE36} $RPM_BUILD_ROOT%{systemdunitdir}/xenstored.service install %{SOURCE37} $RPM_BUILD_ROOT/etc/sysconfig/xenstored -install %{SOURCE38} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xenstored.conf -install %{SOURCE39} $RPM_BUILD_ROOT%{systemdunitdir}/xend.service -install %{SOURCE40} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xend.conf -install %{SOURCE41} $RPM_BUILD_ROOT%{systemdunitdir}/xen-watchdog.service -install %{SOURCE42} $RPM_BUILD_ROOT/etc/modules-load.d/xen-dom0.conf -install %{SOURCE43} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/bin/xendomains.sh -install %{SOURCE44} $RPM_BUILD_ROOT%{systemdunitdir}/xendomains.service + # sysvinit scripts %{__rm} $RPM_BUILD_ROOT/etc/rc.d/init.d/* -install %{SOURCE50} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend +%{__rm} $RPM_BUILD_ROOT/etc/sysconfig/xencommons install %{SOURCE51} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenconsoled install %{SOURCE52} $RPM_BUILD_ROOT/etc/rc.d/init.d/xenstored install %{SOURCE53} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-watchdog install %{SOURCE54} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains +install %{SOURCE46} $RPM_BUILD_ROOT/etc/rc.d/init.d/xen-qemu-dom0-disk-backend install %{SOURCE55} $RPM_BUILD_ROOT/etc/logrotate.d/xen install %{SOURCE56} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xen.conf +install -d $RPM_BUILD_ROOT/var/run/xenstored +install %{SOURCE38} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/xenstored.conf -install %{SOURCE60} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/bin/xen-init-list -install %{SOURCE61} $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/bin/xen-toolstack +install %{SOURCE60} $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/xen-init-list +install %{SOURCE61} $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/xen-toolstack %if %{with efi} install %{SOURCE57} $RPM_BUILD_ROOT/etc/efi-boot/xen.cfg @@ -560,33 +510,28 @@ sed -e's;@libdir@;%{_libdir};g' -e's;@target_cpu@;%{_target_cpu};g' \ %{SOURCE58} > $RPM_BUILD_ROOT/etc/efi-boot/update.d/xen.conf %endif -mv $RPM_BUILD_ROOT/etc/xen/{x{m,l}example*,examples} +%{__mv} $RPM_BUILD_ROOT/etc/xen/{xlexample*,examples} install %{SOURCE59} $RPM_BUILD_ROOT%{_sysconfdir}/xen/scripts/vif-openvswitch # for %%doc install -d _doc -for tool in blktap blktap2 pygrub xenmon ; do +for tool in blktap2 pygrub ; do cp -p tools/$tool/README _doc/README.$tool done -cp -al tools/qemu-xen/docs _doc/qemu-xen %py_comp $RPM_BUILD_ROOT%{py_sitedir} %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} %py_postclean -%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1 -mv $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img{,-xen}.1 -mv $RPM_BUILD_ROOT%{_mandir}/man8/qemu-nbd{,-xen}.8 -# seems not needed, the path is wrong anyway -%{__rm} $RPM_BUILD_ROOT%{_prefix}/etc/qemu/target-x86_64.conf - # remove unneeded files -%{__rm} $RPM_BUILD_ROOT/boot/xen-4.2.gz +%if %{with hypervisor} +%{__mv} xen/xen-syms $RPM_BUILD_ROOT/boot/%{name}-syms-%{version} +%{__rm} $RPM_BUILD_ROOT/boot/xen-4.6.gz %{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz +%endif %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen -%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/qemu %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING %clean @@ -597,8 +542,9 @@ rm -rf $RPM_BUILD_ROOT /sbin/chkconfig --add xenconsoled /sbin/chkconfig --add xenstored /sbin/chkconfig --add xendomains +/sbin/chkconfig --add xen-qemu-dom0-disk-backend NORESTART=1 -%systemd_post xen-watchdog.service xenconsoled.service xenstored.service xendomains.service +%systemd_post xen-watchdog.service xenconsoled.service xenstored.service xendomains.service xen-qemu-dom0-disk-backend.service %preun if [ "$1" = "0" ]; then @@ -613,24 +559,13 @@ if [ "$1" = "0" ]; then %service xen-watchdog stop /sbin/chkconfig --del xen-watchdog -fi -%systemd_preun xen-watchdog.service xenconsoled.service xenstored.service xendomains.service -%postun -%systemd_reload - -%post xend -/sbin/chkconfig --add xend -%systemd_post xend.service - -%preun xend -if [ "$1" = "0" ]; then - %service xend stop - /sbin/chkconfig --del xend + %service xen-qemu-dom0-disk-backend stop + /sbin/chkconfig --del xen-qemu-dom0-disk-backend fi -%systemd_preun xend.service +%systemd_preun xen-watchdog.service xenconsoled.service xenstored.service xendomains.service xen-qemu-dom0-disk-backend.service -%postun xend +%postun %systemd_reload %post libs -p /sbin/ldconfig @@ -644,29 +579,35 @@ fi %files %defattr(644,root,root,755) -%doc COPYING README* docs/misc/* -%doc docs/html/* -%doc tools/qemu-xen-dir/*.html -%doc _doc/* +%doc COPYING README* docs/misc/* docs/html/* _doc/* +%if %{with hypervisor} /boot/%{name}-syms-%{version} /boot/%{name}-%{version}.gz /boot/%{name}.gz +%endif +%if %{with xsm} +/boot/xenpolicy-%{version} +%endif %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenconsoled %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xenstored %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xendomains -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xencommons %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/xen %attr(754,root,root) /etc/rc.d/init.d/xen-watchdog %attr(754,root,root) /etc/rc.d/init.d/xenconsoled %attr(754,root,root) /etc/rc.d/init.d/xenstored %attr(754,root,root) /etc/rc.d/init.d/xendomains -%config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/xen-dom0.conf +%attr(754,root,root) /etc/rc.d/init.d/xen-qemu-dom0-disk-backend +%{_prefix}/lib/modules-load.d/xen.conf %{systemdunitdir}/proc-xen.mount %{systemdunitdir}/var-lib-xenstored.mount +%{systemdunitdir}/xen-init-dom0.service %{systemdunitdir}/xen-watchdog.service %{systemdunitdir}/xenconsoled.service %{systemdunitdir}/xenstored.service +%{systemdunitdir}/xenstored.socket +%{systemdunitdir}/xenstored_ro.socket %{systemdunitdir}/xendomains.service +%{systemdunitdir}/xen-qemu-dom0-disk-backend.service %dir %{_sysconfdir}/xen %dir %{_sysconfdir}/xen/auto %dir %{_sysconfdir}/xen/examples @@ -676,15 +617,18 @@ fi %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README* %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf -%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/xen-backend.rules %attr(755,root,root) %{_bindir}/pygrub +%if %{with qemu_traditional} %attr(755,root,root) %{_bindir}/qemu-img-xen %attr(755,root,root) %{_bindir}/qemu-nbd-xen -%attr(755,root,root) %{_bindir}/remus +%endif +%attr(755,root,root) %{_bindir}/xenalyze %attr(755,root,root) %{_bindir}/xencons -%attr(755,root,root) %{_bindir}/xentrace* -%attr(755,root,root) %{_sbindir}/blktapctrl +%attr(755,root,root) %{_bindir}/xencov_split +%attr(755,root,root) %{_bindir}/xentrace_format +%if %{with xsm} %attr(755,root,root) %{_sbindir}/flask-* +%endif %attr(755,root,root) %{_sbindir}/gdbsx %attr(755,root,root) %{_sbindir}/gtrace* %attr(755,root,root) %{_sbindir}/img2qcow @@ -699,6 +643,7 @@ fi %attr(755,root,root) %{_sbindir}/xen-* %attr(755,root,root) %{_sbindir}/xenbaked %attr(755,root,root) %{_sbindir}/xenconsoled +%attr(755,root,root) %{_sbindir}/xencov %attr(755,root,root) %{_sbindir}/xenlockprof %attr(755,root,root) %{_sbindir}/xenmon.py %attr(755,root,root) %{_sbindir}/xenperf @@ -706,57 +651,67 @@ fi %attr(755,root,root) %{_sbindir}/xenpmd %attr(755,root,root) %{_sbindir}/xenstored %attr(755,root,root) %{_sbindir}/xentop +%attr(755,root,root) %{_sbindir}/xentrace %attr(755,root,root) %{_sbindir}/xentrace_setmask +%attr(755,root,root) %{_sbindir}/xentrace_setsize %attr(755,root,root) %{_sbindir}/xenwatchdogd %attr(755,root,root) %{_sbindir}/xl -%attr(755,root,root) %{_sbindir}/xsview %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/bin %attr(744,root,root) %{_libdir}/%{name}/bin/* -%if "%{_lib}" != "lib" -%dir %{_prefix}/lib/%{name} -%dir %{_prefix}/lib/%{name}/bin -%attr(755,root,root) %{_prefix}/lib/%{name}/bin/* +%dir %{_libdir}/%{name}/boot +%if %{with stubdom} +%if %{with qemu_traditional} +%{_libdir}/%{name}/boot/ioemu-stubdom.gz +%endif +%ifarch %{ix86} %{x8664} +%{_libdir}/%{name}/boot/pv-grub-x86_32.gz %endif -%dir %{_prefix}/lib/%{name}/boot -%{_prefix}/lib/%{name}/boot/ioemu-stubdom.gz -%{_prefix}/lib/%{name}/boot/pv-grub-x86_32.gz %ifarch %{x8664} -%{_prefix}/lib/%{name}/boot/pv-grub-x86_64.gz +%{_libdir}/%{name}/boot/pv-grub-x86_64.gz %endif -%{_prefix}/lib/%{name}/boot/xenstore-stubdom.gz -%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader -%{_datadir}/xen -%{_mandir}/man1/qemu-img-xen.1* +%{_libdir}/%{name}/boot/vtpm-stubdom.gz +%{_libdir}/%{name}/boot/vtpmmgr-stubdom.gz +%{_libdir}/%{name}/boot/xenstore-stubdom.gz +%endif +%attr(744,root,root) %{_libdir}/%{name}/boot/hvmloader %{_mandir}/man1/xentop.1* %{_mandir}/man1/xentrace_format.1* %{_mandir}/man1/xl.1* -%{_mandir}/man1/xm.1* -%{_mandir}/man5/xend-config.sxp.5* %{_mandir}/man5/xl.cfg.5* %{_mandir}/man5/xl.conf.5* %{_mandir}/man5/xlcpupool.cfg.5* -%{_mandir}/man5/xmdomain.cfg.5* -%{_mandir}/man8/qemu-nbd-xen.8* %{_mandir}/man8/xentrace.8* %{_sharedstatedir}/xen %{_sharedstatedir}/xenstored %dir /var/run/xenstored -%{systemdtmpfilesdir}/xenstored.conf %{systemdtmpfilesdir}/xen.conf +%{systemdtmpfilesdir}/xenstored.conf %dir %attr(0700,root,root) /var/log/xen %dir %attr(0700,root,root) /var/log/xen/console -%{_datadir}/qemu-xen +%if %{with qemu_traditional} +%{_datadir}/xen +%endif %files guest %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/xen-detect -%attr(755,root,root) %{_bindir}/xenstore* +%attr(755,root,root) %{_bindir}/xenstore +%attr(755,root,root) %{_bindir}/xenstore-chmod +%attr(755,root,root) %{_bindir}/xenstore-control +%attr(755,root,root) %{_bindir}/xenstore-exists +%attr(755,root,root) %{_bindir}/xenstore-list +%attr(755,root,root) %{_bindir}/xenstore-ls +%attr(755,root,root) %{_bindir}/xenstore-read +%attr(755,root,root) %{_bindir}/xenstore-rm +%attr(755,root,root) %{_bindir}/xenstore-watch +%attr(755,root,root) %{_bindir}/xenstore-write +%{_mandir}/man1/xenstore.1* +%{_mandir}/man1/xenstore-chmod.1* +%{_mandir}/man1/xenstore-ls.1* %files libs %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libblktap.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libblktap.so.3.0 %attr(755,root,root) %{_libdir}/libblktapctl.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libblktapctl.so.1.0 %attr(755,root,root) %{_libdir}/libfsimage.so.*.*.* @@ -764,17 +719,17 @@ fi %attr(755,root,root) %{_libdir}/libvhd.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libvhd.so.1.0 %attr(755,root,root) %{_libdir}/libxenctrl.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libxenctrl.so.4.2 +%attr(755,root,root) %ghost %{_libdir}/libxenctrl.so.4.6 %attr(755,root,root) %{_libdir}/libxenguest.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libxenguest.so.4.2 +%attr(755,root,root) %ghost %{_libdir}/libxenguest.so.4.6 %attr(755,root,root) %{_libdir}/libxenlight.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libxenlight.so.2.0 +%attr(755,root,root) %ghost %{_libdir}/libxenlight.so.4.6 %attr(755,root,root) %{_libdir}/libxenstat.so.*.* %attr(755,root,root) %ghost %{_libdir}/libxenstat.so.0 %attr(755,root,root) %{_libdir}/libxenvchan.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libxenvchan.so.1.0 %attr(755,root,root) %{_libdir}/libxlutil.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libxlutil.so.1.0 +%attr(755,root,root) %ghost %{_libdir}/libxlutil.so.4.6 %dir %{_libdir}/fs %dir %{_libdir}/fs/ext2fs-lib %dir %{_libdir}/fs/fat @@ -792,7 +747,6 @@ fi %files devel %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libblktap.so %attr(755,root,root) %{_libdir}/libblktapctl.so %attr(755,root,root) %{_libdir}/libfsimage.so %attr(755,root,root) %{_libdir}/libvhd.so @@ -806,7 +760,6 @@ fi %{_includedir}/_libxl_list.h %{_includedir}/_libxl_types.h %{_includedir}/_libxl_types_json.h -%{_includedir}/blktaplib.h %{_includedir}/fsimage*.h %{_includedir}/libxenvchan.h %{_includedir}/libxl*.h @@ -814,10 +767,11 @@ fi %{_includedir}/xs*.h %{_includedir}/xen %{_includedir}/xenstore-compat +%{_npkgconfigdir}/xenlight.pc +%{_npkgconfigdir}/xlutil.pc %files static %defattr(644,root,root,755) -%{_libdir}/libblktap.a %{_libdir}/libblktapctl.a %{_libdir}/libvhd.a %{_libdir}/libxenctrl.a @@ -828,20 +782,6 @@ fi %{_libdir}/libxenstore.a %{_libdir}/libxlutil.a -%files xend -%defattr(644,root,root,755) -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/blktapctrl -%{systemdunitdir}/blktapctrl.service -%{systemdunitdir}/xend.service -%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend -%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/xend.rules -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm* -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend* -%attr(755,root,root) %{_sbindir}/xend -%attr(755,root,root) %{_sbindir}/xm -%dir %attr(700,root,root) /var/run/xend -%{systemdtmpfilesdir}/xend.conf - %if %{with ocaml} %files -n ocaml-xen %defattr(644,root,root,755) @@ -858,6 +798,8 @@ fi %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenlight/dllxenlight_stubs.so %dir %{_libdir}/ocaml/site-lib/xenmmap %attr(755,root,root) %{_libdir}/ocaml/site-lib/xenmmap/dllxenmmap_stubs.so +%dir %{_libdir}/ocaml/site-lib/xentoollog +%attr(755,root,root) %{_libdir}/ocaml/site-lib/xentoollog/dllxentoollog_stubs.so %files -n ocaml-xen-devel %defattr(644,root,root,755) @@ -885,24 +827,20 @@ fi %{_libdir}/ocaml/site-lib/xenstore/META %{_libdir}/ocaml/site-lib/xenstore/xenstore.a %{_libdir}/ocaml/site-lib/xenstore/*.cm[aixo]* +%{_libdir}/ocaml/site-lib/xentoollog/META +%{_libdir}/ocaml/site-lib/xentoollog/libxentoollog_stubs.a +%{_libdir}/ocaml/site-lib/xentoollog/xentoollog.a +%{_libdir}/ocaml/site-lib/xentoollog/*.cm[aixo]* %endif %files -n python-xen %defattr(644,root,root,755) %attr(755,root,root) %{py_sitedir}/fsimage.so -%{py_sitedir}/grub -%attr(755,root,root) %{py_sitedir}/xen/lowlevel/checkpoint.so -%attr(755,root,root) %{py_sitedir}/xen/lowlevel/flask.so -%attr(755,root,root) %{py_sitedir}/xen/lowlevel/netlink.so -%attr(755,root,root) %{py_sitedir}/xen/lowlevel/ptsname.so +%dir %{py_sitedir}/xen +%dir %{py_sitedir}/xen/lowlevel %attr(755,root,root) %{py_sitedir}/xen/lowlevel/xc.so -%{py_sitedir}/xen/remus -%{py_sitedir}/xen/sv -%{py_sitedir}/xen/util -%{py_sitedir}/xen/web -%{py_sitedir}/xen/xend -%{py_sitedir}/xen/xm -%{py_sitedir}/xen/xsview +%{py_sitedir}/xen/migration +%{py_sitedir}/grub %if "%{py_ver}" > "2.4" %{py_sitedir}/pygrub-0.3-py*.egg-info %{py_sitedir}/xen-3.0-py*.egg-info