# Please keep this package in sync with FC %define major 3.0 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d # Build a debug hypervisor only if rpmbuild was run with --with debug %define build_debug %{?_with_debug: 1} %{?!_with_debug: 0} # Build ocaml bits unless rpmbuild was run with --without ocaml # or ocamlopt is missing (the xen makefile doesn't build ocaml bits if it isn't there) %define with_ocaml %{?_without_ocaml: 0} %{?!_without_ocaml: 1} %define build_ocaml %(test -x %{_bindir}/ocamlopt && echo %{with_ocaml} || echo 0) %define build_docs 0 # Build with stubdom unless rpmbuild was run with --without stubdom %define build_stubdom %{?_without_stubdom: 0} %{?!_without_stubdom: 1} # Only build with qemu-traditional if rpmbuild was run with --with qemutrad %define build_qemutrad %{?_with_qemutrad: 1} %{?!_with_qemutrad: 0} # build with ovmf from edk2-ovmf unless rpmbuild was run with --without ovmf %define build_ovmf %{?_without_ovmf: 0} %{?!_without_ovmf: 1} # set to 0 for archs that don't use qemu or ovmf (reduces build dependencies) %ifnarch x86_64 %{ix86} %define build_qemutrad 0 %define build_ovmf 0 %endif # Build with xen hypervisor unless rpmbuild was run with --without hyp %define build_hyp %{?_without_hyp: 0} %{?!_without_hyp: 1} # build xsm support unless rpmbuild was run with --without xsm # or required packages are missing %define with_xsm %{?_without_xsm: 0} %{?!_without_xsm: 1} %define build_xsm %(test -x %{_bindir}/checkpolicy && test -x %{_bindir}/m4 && echo %{with_xsm} || echo 0) # cross compile 64-bit hypervisor on ix86 unless rpmbuild was run # with --without crosshyp %define build_crosshyp %{?_without_crosshyp: 0} %{?!_without_crosshyp: 1} %ifnarch %{ix86} %define build_crosshyp 0 %else %if ! %build_crosshyp %define build_hyp 0 %endif %endif # no point in trying to build xsm on ix86 without a hypervisor %if ! %build_hyp %define build_xsm 0 %endif %ifnarch %arm %define build_xsm 0 %endif # build an efi boot image (where supported) unless rpmbuild was run with # --without efi %define build_efi %{?_without_efi: 0} %{?!_without_efi: 1} # xen only supports efi boot images on x86_64 or aarch64 # i686 builds a x86_64 hypervisor so add that as well %ifnarch x86_64 aarch64 %{ix86} %define build_efi 0 %endif # Hypervisor ABI %define hv_abi 4.18 %define build_tpm 0 %ifarch x86_64 %define build_tpm 1 %endif # disable lto %global _lto_cflags %{nil} Summary: Xen is a virtual machine monitor Name: xen Version: 4.18.2 Release: %mkrel 1 Group: System/Kernel and hardware License: GPLv2+ and LGPLv2+ and BSD URL: https://xen.org/ Source0: https://downloads.xenproject.org/release/xen/%{version}/xen-%{version}.tar.gz Source2: %{name}.logrotate # used by stubdoms # (from https://xenbits.xen.org/xen-extfiles/): Source10: lwip-1.3.0.tar.gz Source11: newlib-1.16.0.tar.gz Source12: zlib-1.2.3.tar.gz Source13: pciutils-2.2.9.tar.bz2 Source14: grub-0.97.tar.gz Source15: polarssl-1.1.4-gpl.tgz Source16: tpm_emulator-0.7.4.tar.gz Source17: gmp-4.3.2.tar.bz2 # (from https://aur.archlinux.org/xen.git) Source18: vtpm-gcc12-fixes.patch # .config file for xen hypervisor Source21: xen.hypervisor.config Source22: xen.hypervisor.config.debug # Fedora patches: Patch4: CVE-2014-0150.patch Patch5: xen.fedora.systemd.patch Patch6: xen.ocaml.selinux.fix.patch Patch7: xen.fedora.crypt.patch Patch8: qemu.trad.CVE-2015-6815.patch Patch9: qemu.trad.CVE-2015-5279.patch Patch10: qemu.trad.CVE-2015-5278.patch Patch11: qemu.trad.CVE-2015-7295.patch Patch12: qemu.trad.CVE-2015-8345.patch Patch13: qemu.trad.CVE-2015-7512.patch Patch14: qemu.trad.CVE-2015-8504.patch Patch15: qemu.trad.CVE-2016-1714.patch Patch16: qemu.trad.CVE-2016-1981.patch Patch17: qemu.trad.CVE-2016-2841.patch Patch18: qemu.trad.CVE-2016-2538.patch Patch19: qemu.trad.CVE-2016-2857.patch Patch20: qemu.trad.CVE-2016-4001.patch Patch21: qemu.trad.CVE-2016-4002.patch Patch22: qemu.trad.CVE-2016-4439.patch Patch23: qemu.trad.CVE-2016-4441.patch Patch24: qemu.trad.CVE-2016-5238.patch Patch25: qemu.trad.CVE-2016-5338.patch Patch27: qemu.trad.CVE-2016-6351.patch Patch29: qemu.trad.CVE-2016-8669.patch Patch30: qemu.trad.CVE-2016-8910.patch Patch31: qemu.trad.bug1399055.patch Patch32: qemu.trad.CVE-2016-9776.patch Patch33: xen.gcc7.fix.patch Patch34: xen.canonicalize.patch Patch35: qemu.trad.CVE-2017-6505.patch Patch36: qemu.trad.CVE-2017-7718.patch Patch37: droplibvirtconflict.patch Patch38: qemu.trad.CVE-2017-8309.patch Patch39: qemu.trad.CVE-2017-9330.patch Patch40: xen.drop.brctl.patch Patch41: xen.gcc9.fixes.patch Patch43: xen.gcc11.fixes.patch Patch45: xen.gcc12.fixes.patch Patch46: xen.efi.build.patch Patch47: xen.gcc13.fixes.patch Patch49: xen.python3.12.patch #Patch50: xen.ocaml5.fixes.patch Patch52: xen.gcc14.fixes.patch Patch53: newlib.gcc14.fixes.patch # Mageia patches: Patch201: xen-4.1.2-fix-stubdom-Makefile.patch Patch202: xen-4.1.3-fix-doc-build.patch Patch203: xen-4.2.1-fix-glibc-build.patch Patch204: xen.armv8l.arm32.patch # opensuse patches: # aur Patch600: add-stubdom-fixes.patch # upstream patches (from https://xenbits.xen.org/git-http/xen.git) %if %build_tpm BuildRequires: cmake %endif BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(ncurses) %if %build_qemutrad BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(sdl) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: libaio-devel %endif # build using Fedora seabios and ipxe packages for roms BuildRequires: seabios BuildRequires: seabios-bin BuildRequires: ipxe-roms-qemu %ifarch %{ix86} x86_64 # for the VMX "bios" BuildRequires: dev86-devel %endif BuildRequires: glibc-devel BuildRequires: gettext BuildRequires: pkgconfig(gnutls) BuildRequires: libgcrypt-devel BuildRequires: brlapi-devel BuildRequires: pkgconfig(openssl) # For ioemu PCI passthrough BuildRequires: pkgconfig(libpci) # Several tools now use uuid BuildRequires: pkgconfig(uuid) # iasl needed to build hvmloader BuildRequires: acpica-tools # for spice support BuildRequires: pkgconfig(spice-server) BuildRequires: spice-protocol BuildRequires: pkgconfig(libusbredirparser-0.5) >= 0.6 # modern compressed kernels BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libzstd) # libfsimage BuildRequires: e2fsprogs-devel # tools now require yajl and wget BuildRequires: pkgconfig(yajl) BuildRequires: wget # remus support now needs libnl3 BuildRequires: libnl3-devel %if %with_xsm # xsm policy file needs needs checkpolicy and m4 BuildRequires: checkpolicy m4 %endif # for virtfs support BuildRequires: attr-devel BuildRequires: pkgconfig(libcap) Requires: iptables %if %build_crosshyp # cross compiler for building 64-bit hypervisor on ix86 BuildRequires: gcc-x86_64-linux-gnu %endif BuildRequires: gcc make Requires: iproute Requires: python3-lxml Requires: xen-runtime = %{version}-%{release} # Not strictly a dependency, but kpartx is by far the most useful tool right # now for accessing domU data from within a dom0 so bring it in when the user # installs xen. Requires: kpartx ExclusiveArch: %{ix86} x86_64 armv7hl aarch64 %if %with_ocaml BuildRequires: ocaml >= 4.12.0 BuildRequires: ocaml-findlib-devel %endif Requires(post): systemd Requires(preun): systemd BuildRequires: pkgconfig(libsystemd) %ifarch %arm aarch64 BuildRequires: libfdt-devel %endif %if %build_hyp BuildRequires: bison flex %endif BuildRequires: hostname %description This package contains the XenD daemon and xm command line tools, needed to manage virtual machines running under the Xen hypervisor %package -n %{libname} Summary: Libraries for Xen tools Group: System/Libraries Conflicts: %{name} < 3.1.0-5 Requires: xen-licenses %description -n %{libname} This package contains the libraries needed to run applications which manage Xen virtual machines. %package runtime Summary: Core Xen runtime environment Requires: %libname = %{version}-%{release} #Requires: /usr/bin/qemu-img /usr/bin/qemu-nbd Requires: qemu-img # Ensure we at least have a suitable kernel installed, though we can't # force user to actually boot it. Requires: xen-hypervisor-abi = %{hv_abi} %ifnarch %arm Requires: kernel-server %endif # perl is used in /etc/xen/scripts/locking.sh Recommends: perl %ifnarch armv7hl aarch64 # use /usr/bin/qemu-system-i386 in Fedora instead of qemu-xen Recommends: qemu-system-x86-core # rom file for qemu-xen-traditional Recommends: ipxe-roms-qemu %endif Conflicts: xen <= 4.14.0-4.mga8 %description runtime This package contains the runtime programs and daemons which form the core Xen userspace environment. %package hypervisor Summary: Libraries for Xen tools Group: System/Kernel and hardware Provides: xen-hypervisor-abi = %{hv_abi} Requires: xen-licenses %if %build_hyp %ifarch %{ix86} Recommends: grub2-common %endif %ifarch x86_64 Recommends: grub2-efi %endif %endif %if %build_ovmf Recommends: edk2-ovmf-xen %endif %description hypervisor This package contains the Xen hypervisor. %if %build_docs %package doc Summary: Xen documentation Group: Documentation BuildArch: noarch Requires: xen-licenses # for the docs BuildRequires: perl(Pod::Man) perl(Pod::Text) perl(File::Find) BuildRequires: transfig perl(Pod::Html) #BuildRequires: pandoc %description doc This package contains the Xen documentation. %endif %package -n %{develname} Summary: Development libraries for Xen tools Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Conflicts: %{name} < 4.13.0-6 %description -n %{develname} This package contains what's needed to develop applications which manage Xen virtual machines. %package licenses Summary: License files from Xen source %description licenses This package contains the license files from the source used to build the xen packages. %if %build_ocaml %package -n ocaml-xen Summary: Ocaml libraries for Xen tools Group: Development/Other Conflicts: %{name} < 3.1.0-5 %description -n ocaml-xen This package contains libraries for ocaml tools to manage Xen virtual machines. %package -n ocaml-xen-devel Summary: Ocaml development libraries for Xen tools Group: Development/Other Requires: %{name}-devel = %{version}-%{release} %description -n ocaml-xen-devel This package contains libraries for developing ocaml tools to manage Xen virtual machines. %endif %prep %setup -q # FC patches: %patch -P4 -p1 %patch -P5 -p1 %patch -P6 -p1 %patch -P7 -p1 %patch -P8 -p1 %patch -P9 -p1 %patch -P10 -p1 %patch -P11 -p1 %patch -P12 -p1 %patch -P13 -p1 %patch -P14 -p1 %patch -P15 -p1 %patch -P16 -p1 %patch -P17 -p1 %patch -P18 -p1 %patch -P19 -p1 %patch -P20 -p1 %patch -P21 -p1 %patch -P22 -p1 %patch -P23 -p1 %patch -P24 -p1 %patch -P25 -p1 %patch -P33 -p1 %patch -P34 -p1 %patch -P37 -p1 %patch -P40 -p1 %patch -P41 -p1 %patch -P43 -p1 %patch -P45 -p1 %patch -P46 -p1 %patch -P47 -p1 %patch -P49 -p1 %patch -P52 -p1 %patch -P53 -p1 # qemu-xen-traditional patches pushd tools/qemu-xen-traditional %patch -P27 -p1 %patch -P29 -p1 %patch -P30 -p1 %patch -P31 -p1 %patch -P32 -p1 %patch -P35 -p1 %patch -P36 -p1 %patch -P38 -p1 %patch -P39 -p1 popd # qemu-xen patches pushd tools/qemu-xen popd # Mageia patches: %patch -P201 -p1 %patch -P202 -p1 #patch203 -p1 %patch -P204 -p1 # opensuse patches # aur patches %if %build_tpm %patch -P600 -p1 %endif # stubdom sources cp -v %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} stubdom %if %build_tpm cp -v %{SOURCE16} %{SOURCE17} %{SOURCE18} stubdom %endif # copy xen hypervisor .config file to change settings %if !%build_debug cp -v %{SOURCE21} xen/.config %else cp -v %{SOURCE22} xen/.config %endif %build export CFLAGS="%{build_cflags}" export CXXFLAGS="%{build_cxxflags}" %if !%build_ocaml %define ocaml_flags OCAML_TOOLS=n %endif %if %build_efi mkdir -p dist/install/boot/efi/efi/fedora %endif %if %build_ocaml mkdir -p dist/install%{_libdir}/ocaml/stublibs %endif export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS -Wno-error=use-after-free $LDFLAGS" export EXTRA_CFLAGS_QEMU_TRADITIONAL="$RPM_OPT_FLAGS" export EXTRA_CFLAGS_QEMU_XEN="$RPM_OPT_FLAGS" export PYTHON="/usr/bin/python3" export LDFLAGS_SAVE=`echo $LDFLAGS | sed -e 's/-Wl,//g' -e 's/,/ /g' -e 's? -specs=[-a-z/0-9]*??g'` export CFLAGS_SAVE="$CFLAGS" %if %build_qemutrad CONFIG_EXTRA="--enable-qemu-traditional" %else CONFIG_EXTRA="" %endif %if %build_ovmf CONFIG_EXTRA="$CONFIG_EXTRA --with-system-ovmf=/usr/share/edk2/xen/OVMF.fd" %endif %ifnarch armv7hl aarch64 CONFIG_EXTRA="$CONFIG_EXTRA --with-system-ipxe=/usr/share/ipxe/10ec8139.rom" %endif %if %(test -f /usr/share/seabios/bios-256k.bin && echo 1|| echo 0) CONFIG_EXTRA="$CONFIG_EXTRA --with-system-seabios=/usr/share/seabios/bios-256k.bin" %else CONFIG_EXTRA="$CONFIG_EXTRA --disable-seabios" %endif ./configure --prefix=%{_prefix} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --with-system-qemu=/usr/bin/qemu-system-i386 --with-linux-backend-modules="xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback xen-scsiback xen-acpi-processor" $CONFIG_EXTRA unset CFLAGS CXXFLAGS FFLAGS LDFLAGS export LDFLAGS="$LDFLAGS_SAVE" export CFLAGS="$CFLAGS_SAVE -Wno-error=address" %if %build_hyp %if %build_crosshyp export CFLAGS=`echo $CFLAGS | sed -e 's/-m32//g' -e 's/-march=i686//g' 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1//g'` XEN_TARGET_ARCH=x86_64 %make_build prefix=/usr xen CC="/usr/bin/x86_64-linux-gnu-gcc" %else %ifarch armv7hl export CFLAGS=`echo $CFLAGS | sed -e 's/-mfloat-abi=hard//g' -e 's/-march=armv7-a//g'` %endif # armv7hl aarch64 or x86_64 %make_build prefix=/usr xen %endif %endif unset CFLAGS CXXFLAGS FFLAGS LDFLAGS %make_build %{?ocaml_flags} prefix=/usr tools %if %build_docs make prefix=/usr docs %endif export RPM_OPT_FLAGS_RED=`echo $RPM_OPT_FLAGS | sed -e 's/-m64//g' -e 's/--param=ssp-buffer-size=4//g' -e's/-fstack-protector-strong//'` %ifarch %{ix86} export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS_RED" %endif %if %build_stubdom %ifnarch armv7hl aarch64 make mini-os-dir make -C stubdom build %endif %ifarch x86_64 export EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS_RED" XEN_TARGET_ARCH=x86_32 make -C stubdom pv-grub-if-enabled %endif %endif %install mkdir -p %{buildroot} cp -prlP dist/install/* %{buildroot} %if %build_stubdom %ifnarch armv7hl aarch64 make DESTDIR=%{buildroot} %{?ocaml_flags} prefix=/usr install-stubdom %endif %endif %ifarch %{ix86} cat > README.install.urpmi <<_EOF Since xen 4.3, the hypervisor is no longer supported on x86_32. But fear not, you can actually use the x86_64 xen hypervisor, even when using a 32bit kernel and system. This is because the hypervisor is loaded before the kernel and OS. Keep in mind that a x86_64 capable processor is still required, but then if you are installing a hypervisor, you really should be using 64bit anyway. _EOF ln -f README.install.urpmi README.4.3.0.upgrade.urpmi %endif %if %build_efi mv %{buildroot}/boot/efi/efi %{buildroot}/boot/efi/EFI %endif %if %build_xsm # policy file should be in /boot/flask mkdir %{buildroot}/boot/flask mv %{buildroot}/boot/xenpolicy* %{buildroot}/boot/flask %else rm -f %{buildroot}/boot/xenpolicy* %endif ############ kill unwanted stuff ############ # stubdom: newlib rm -rf %{buildroot}/usr/*-xen-elf # hypervisor symlinks rm -rf %{buildroot}/boot/xen-%{hv_abi}.gz rm -rf %{buildroot}/boot/xen-4.gz rm -rf %{buildroot}/boot/xen.gz %if !%build_hyp rm -rf %{buildroot}/boot %endif # silly doc dir fun rm -fr %{buildroot}%{_datadir}/doc/xen # Pointless helper rm -f %{buildroot}%{_sbindir}/xen-python-path # qemu stuff (unused or available from upstream) rm -rf %{buildroot}/usr/share/xen/man rm -rf %{buildroot}/usr/bin/qemu-*-xen ln -s qemu-img %{buildroot}/%{_bindir}/qemu-img-xen ln -s qemu-img %{buildroot}/%{_bindir}/qemu-nbd-xen for file in bios.bin openbios-sparc32 openbios-sparc64 ppc_rom.bin \ pxe-e1000.bin pxe-ne2k_pci.bin pxe-pcnet.bin pxe-rtl8139.bin \ vgabios.bin vgabios-cirrus.bin video.x openbios-ppc bamboo.dtb do rm -f %{buildroot}/%{_datadir}/xen/qemu/$file done # README's not intended for end users rm -f %{buildroot}/%{_sysconfdir}/xen/README* # standard gnu info files rm -rf %{buildroot}/usr/info # adhere to Static Library Packaging Guidelines rm -rf %{buildroot}/%{_libdir}/*.a %if %build_efi # clean up extra efi files %ifarch %{ix86} rm -f %{buildroot}/usr/lib64/efi/xen-%{hv_abi}.efi rm -f %{buildroot}/usr/lib64/efi/xen-4.efi rm -f %{buildroot}/usr/lib64/efi/xen.efi cp -p %{buildroot}/usr/lib64/efi/xen-%{version}{,.notstripped}.efi strip -s %{buildroot}/usr/lib64/efi/xen-%{version}.efi %else rm -f %{buildroot}/%{_libdir}/efi/xen-%{hv_abi}.efi rm -f %{buildroot}/%{_libdir}/efi/xen-4.efi rm -f %{buildroot}/%{_libdir}/efi/xen.efi cp -p %{buildroot}/%{_libdir}/efi/xen-%{version}{,.notstripped}.efi strip -s %{buildroot}/%{_libdir}/efi/xen-%{version}.efi %endif %endif %if ! %build_ocaml rm -rf %{buildroot}/%{_unitdir}/oxenstored.service %endif ############ fixup files in /etc ############ # logrotate mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/ install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # init scripts %define initdloc %(test -d /etc/rc.d/init.d/ && echo rc.d/init.d || echo init.d ) rm %{buildroot}%{_sysconfdir}/%{initdloc}/xen-watchdog rm %{buildroot}%{_sysconfdir}/%{initdloc}/xencommons rm %{buildroot}%{_sysconfdir}/%{initdloc}/xendomains rm %{buildroot}%{_sysconfdir}/%{initdloc}/xendriverdomain ############ create dirs in /var ############ mkdir -p %{buildroot}%{_localstatedir}/lib/xen/images mkdir -p %{buildroot}%{_localstatedir}/log/xen/console ############ create symlink for x86_64 for compatibility with 4.4 ############ %if "%{_libdir}" != "/usr/lib" ln -s %{_libexecdir}/%{name} %{buildroot}/%{_libdir}/%{name} %endif ############ create symlink to qemu-system-i386 in /usr/bin ############ ln -s /usr/bin/qemu-system-i386 %{buildroot}/%{_libexecdir}/%{name}/bin/qemu-system-i386 # no selinux support #sed -i -E '/^Options=/ s/,context=".*?"//' %{buildroot}%{_unitdir}/var-lib-xenstored.mount # gprintify has a bug handling some constructs in xendomain export DONT_GPRINTIFY=1 %if %build_efi pushd %{buildroot}/boot/ mv efi/EFI/{fedora,mageia} mv efi EFI popd %endif rm -fr %{buildroot}/usr/share/locale/*/LC_MESSAGES/qemu.mo ############ assemble license files ############ mkdir licensedir # avoid licensedir to avoid recursion, also stubdom/ioemu and dist # which are copies of files elsewhere find . -path licensedir -prune -o -path stubdom/ioemu -prune -o \ -path dist -prune -o -name COPYING -o -name LICENSE | while read file; do mkdir -p licensedir/`dirname $file` install -m 644 $file licensedir/$file done ############ all done now ############ %post %systemd_post xendomains.service %preun %systemd_preun xendomains.service %post runtime %systemd_post xenstored.service xenconsoled.service %preun runtime %systemd_preun xenstored.service xenconsoled.service %if %build_hyp %post hypervisor do_it() { DIR=$1 TARGET=$2 if [ -d $DIR ]; then if [ ! -d $TARGET ]; then mkdir $TARGET fi for m in relocator.mod multiboot2.mod; do if [ -f $DIR/$m ]; then if [ ! -f $TARGET/$m ] || ! cmp -s $DIR/$m $TARGET/$m; then cp -p $DIR/$m $TARGET/$m fi fi done fi } if [ $1 == 1 -a -f /sbin/grub2-mkconfig ]; then for f in /boot/grub2/grub.cfg; do if [ -f $f ]; then /sbin/grub2-mkconfig -o $f sed -i -e '/insmod module2/d' $f fi done fi if [ -f /sbin/grub2-mkconfig ]; then if [ -f /boot/grub2/grub.cfg ]; then DIR=/usr/lib/grub/i386-pc TARGET=/boot/grub2/i386-pc do_it $DIR $TARGET DIR=/usr/lib/grub/x86_64-efi TARGET=/boot/grub2/x86_64-efi do_it $DIR $TARGET fi fi %postun hypervisor if [ -f /sbin/grub2-mkconfig ]; then for f in /boot/grub2/grub.cfg; do if [ -f $f ]; then /sbin/grub2-mkconfig -o $f sed -i -e '/insmod module2/d' $f fi done fi %endif %if %build_ocaml %post -n ocaml-xen %systemd_post oxenstored.service %preun -n ocaml-xen %systemd_preun oxenstored.service %endif # Base package only contains XenD/xm python stuff %files %if %build_docs %dir %{_docdir}/%{name} %endif %doc COPYING README %{python3_sitearch}/%{name} %{python3_sitearch}/xen-*.egg-info # Guest autostart links %dir %attr(0700,root,root) %{_sysconfdir}/%{name}/auto # Autostart of guests %config(noreplace) %{_sysconfdir}/sysconfig/xendomains %{_unitdir}/xendomains.service %files -n %{libname} %{_libdir}/*.so.* %{_libdir}/xenfsimage # All runtime stuff except for XenD/xm python stuff %files runtime # Hotplug rules %dir %attr(0700,root,root) %{_sysconfdir}/%{name} %dir %attr(0700,root,root) %{_sysconfdir}/%{name}/scripts/ %config %attr(0700,root,root) %{_sysconfdir}/%{name}/scripts/* %{_sysconfdir}/bash_completion.d/xl %{_unitdir}/proc-xen.mount %{_unitdir}/xenstored.service %{_unitdir}/xenconsoled.service %{_unitdir}/xen-watchdog.service %{_unitdir}/xen-qemu-dom0-disk-backend.service %{_unitdir}/xendriverdomain.service /usr/lib/modules-load.d/xen.conf %config(noreplace) %{_sysconfdir}/sysconfig/xencommons %config(noreplace) %{_sysconfdir}/xen/xl.conf %config(noreplace) %{_sysconfdir}/xen/cpupool %config(noreplace) %{_sysconfdir}/xen/xlexample* # Rotate console log files %config(noreplace) %{_sysconfdir}/logrotate.d/xen # Programs run by other programs %dir %{_libexecdir}/%{name} %dir %{_libexecdir}/%{name}/bin %attr(0700,root,root) %{_libexecdir}/%{name}/bin/* # QEMU runtime files %if %build_qemutrad %ifnarch armv7hl aarch64 %dir %{_datadir}/%{name}/qemu %dir %{_datadir}/%{name}/qemu/keymaps %{_datadir}/%{name}/qemu/keymaps/* %endif %endif # man pages %if %build_docs %{_mandir}/man*/* %endif %{python3_sitearch}/xenfsimage*.so %{python3_sitearch}/grub %{python3_sitearch}/pygrub-*.egg-info # The firmware %ifarch %{ix86} x86_64 %dir %{_libexecdir}/%{name}/boot %{_libexecdir}/xen/boot/hvmloader %ifnarch %{ix86} %{_libexecdir}/%{name}/boot/xen-shim /usr/lib/debug%{_libexecdir}/xen/boot/xen-shim-syms %endif %if %build_stubdom %if %build_qemutrad %{_libexecdir}/xen/boot/ioemu-stubdom.gz %endif %if %build_tpm %{_libexecdir}/xen/boot/vtpm-stubdom.gz %{_libexecdir}/xen/boot/vtpmmgr-stubdom.gz %endif %{_libexecdir}/xen/boot/xenstore-stubdom.gz %{_libexecdir}/xen/boot/xenstorepvh-stubdom.gz %endif %endif %if "%{_libdir}" != "/usr/lib" %{_libdir}/%{name} %endif # General Xen state %dir %{_localstatedir}/lib/%{name} %dir %{_localstatedir}/lib/%{name}/dump %dir %{_localstatedir}/lib/%{name}/images # Xenstore runtime state %ghost %{_localstatedir}/run/xenstored # All xenstore CLI tools %{_bindir}/qemu-*-xen %{_bindir}/xenstore %{_bindir}/xenstore-* %{_bindir}/pygrub %{_bindir}/xentrace* # XSM %{_sbindir}/flask-* # Misc stuff %ifnarch armv7hl aarch64 %{_bindir}/xen-detect %endif %{_bindir}/xencov_split %ifnarch armv7hl aarch64 %{_sbindir}/gdbsx %{_sbindir}/xen-kdd %endif %ifnarch armv7hl aarch64 %{_sbindir}/xen-hptool %{_sbindir}/xen-hvmcrash %{_sbindir}/xen-hvmctx %endif %{_sbindir}/xenconsoled %{_sbindir}/xenlockprof %{_sbindir}/xenmon %{_sbindir}/xentop %{_sbindir}/xentrace_setmask %{_sbindir}/xenbaked %{_sbindir}/xenstored %{_sbindir}/xenpm %{_sbindir}/xenpmd %{_sbindir}/xenperf %{_sbindir}/xenwatchdogd %{_sbindir}/xl %ifnarch armv7hl aarch64 %{_sbindir}/xen-lowmemd %endif %{_sbindir}/xencov %ifnarch armv7hl aarch64 %{_sbindir}/xen-mfndump %endif %{_bindir}/xenalyze %{_sbindir}/xentrace %{_sbindir}/xentrace_setsize %ifnarch armv7hl aarch64 %{_bindir}/xen-cpuid %endif %{_sbindir}/xen-livepatch %{_sbindir}/xen-diag %ifnarch armv7hl aarch64 %{_sbindir}/xen-ucode %{_sbindir}/xen-memshare %{_sbindir}/xen-mceinj %{_sbindir}/xen-vmtrace %endif %{_bindir}/vchan-socket-proxy %{_sbindir}/xenhypfs %{_sbindir}/xen-access # Xen logfiles %dir %attr(0700,root,root) %{_localstatedir}/log/xen # Guest/HV console logs %dir %attr(0700,root,root) %{_localstatedir}/log/xen/console %files hypervisor %ifarch %{ix86} %doc README.4.3.0.upgrade.urpmi README.install.urpmi %endif %if %build_hyp %ifnarch armv7hl aarch64 /boot/xen-*.gz /boot/xen*.config %else /boot/xen* %endif %if %build_xsm %dir %attr(0755,root,root) /boot/flask /boot/flask/xenpolicy* %endif /usr/lib/debug/xen* %endif %if %build_efi %ifarch %{ix86} /usr/lib64/efi/*.efi %else %{_libdir}/efi/*.efi %endif %endif %if %build_docs %files doc %{_docdir}/%{name}/* %doc docs/txt/* docs/html/* %endif %files -n %{develname} %{_includedir}/*.h %dir %{_includedir}/xen %{_includedir}/xen/* %dir %{_includedir}/xenstore-compat %{_includedir}/xenstore-compat/* %{_libdir}/*.so %{_libdir}/pkgconfig/* %files licenses %doc licensedir/* %if %build_ocaml %files -n ocaml-xen %{_libdir}/ocaml/xen* %exclude %{_libdir}/ocaml/xen*/*.a %exclude %{_libdir}/ocaml/xen*/*.cmxa %exclude %{_libdir}/ocaml/xen*/*.cmx %{_libdir}/ocaml/stublibs/*.so %{_libdir}/ocaml/stublibs/*.so.owner %{_sbindir}/oxenstored %config(noreplace) %{_sysconfdir}/xen/oxenstored.conf %{_unitdir}/oxenstored.service %files -n ocaml-xen-devel %{_libdir}/ocaml/xen*/*.a %{_libdir}/ocaml/xen*/*.cmxa %{_libdir}/ocaml/xen*/*.cmx %endif