--- xen4f.spec.orig 2021-11-12 09:20:32.000000000 -0800 +++ xen4f.spec 2021-11-12 14:47:21.316758064 -0800 @@ -90,8 +90,8 @@ Source2: %{name}.logrotate Source3: https://code.coreboot.org/p/seabios/downloads/seabios-1.12.1.tar.gz Source4: http://xenbits.xen.org/xen-extfiles/ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz -Source5: ovmf.bin.4f -Source6: ovmf.bin.sha1 +#Source5: ovmf.bin.4f +#Source6: ovmf.bin.sha1 #Source6: ovmf-dir.tar.gz.nov10 Source7: macros.prymar56 Source8: git_init @@ -100,6 +100,7 @@ # obsolete patch, but archive it #Source9: xen47-0051-EFI-support-for-C7-using-mingw-loader.patch.bad +%if ! %{defined _with_noqemu} # used by stubdoms Source10: http://xenbits.xen.org/xen-extfiles/lwip-1.3.0.tar.gz Source11: http://xenbits.xen.org/xen-extfiles/newlib-1.16.0.tar.gz @@ -109,9 +110,10 @@ Source15: http://xenbits.xen.org/xen-extfiles/polarssl-1.1.4-gpl.tgz Source16: http://xenbits.xen.org/xen-extfiles/tpm_emulator-0.7.4.tar.gz Source17: http://xenbits.xen.org/xen-extfiles/gmp-4.3.2.tar.bz2 +%endif Source18: xcfg-el8 # last commit of ovmf is the lite version -Source19: ovmf.bin.4f.lite +#Source19: ovmf.bin.4f.lite # this script is used to create xcfg-el7 Source20: cfg-dump Source21: add-debug-perf.patch @@ -131,7 +133,7 @@ Source33: tools-cfg Source34: README.cfg-dump Source35: README.install-sh -Source36: src-qemu-keymap.tar.xz +#Source36: src-qemu-keymap.tar.xz %if %{defined _with_minsize} NoSource: 0 @@ -179,7 +181,8 @@ BuildRequires: ncurses-devel libaio-devel # for the docs -BuildRequires: perl perl(Pod::Man) perl(Pod::Text) texinfo python3-sphinx +BuildRequires: perl perl(Pod::Man) perl(Pod::Text) texinfo +# python3-sphinx BuildRequires: bison flex python3-markdown # perl-Pod-Simple # so that the makefile knows to install udev rules @@ -219,10 +222,6 @@ BuildRequires: checkpolicy m4 %endif -# qemu-xen BR -# now done via macro qemu-config.br -%include %{SOURCE32} - #Requires: bridge-utils Requires: python3-lxml Requires: udev >= 059 @@ -348,6 +347,7 @@ This package contains libraries for developing ocaml tools to manage Xen virtual machines. +%if ! %{defined _with_noqemu} %package -n qemuu Version: 6.1.0+1 Release: 3%{?dist} @@ -362,6 +362,10 @@ # 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} +# qemu-xen BuildRequires via macro +# now done via macro qemu-config.br +%include %{SOURCE32} + %description -n qemuu This package contains the runtime programs which @@ -376,6 +380,7 @@ %description -n qemuu-img This package contains the QEMU command line tool for manipulating disk images +%endif %if %with_tumeq %package -n qemut @@ -394,6 +399,7 @@ %description -n qemut This package contains the runtime programs which form the qemut part of the core Xen userspace environment. +BuildRequires: SDL-devel %endif @@ -437,16 +443,18 @@ #-C /usr/bin #fi mkdir -p tools/firmware/ovmf-dir/ -cp -p %{SOURCE5} tools/firmware/ovmf-dir/ovmf.bin -cp -p %{SOURCE5} ./ovmf.bin -cp -p %{SOURCE19} ./ovmf.bin.lite +#cp -p %{SOURCE5} tools/firmware/ovmf-dir/ovmf.bin +#cp -p %{SOURCE5} ./ovmf.bin +#cp -p %{SOURCE19} ./ovmf.bin.lite # no need to build this until upstream changes # no Makefile, no joy # (cd {buildtree}/tools/firmware;cp ovmf-makefile ovmf-dir/Makefile) +%if ! %{defined _with_noqemu} # stubdom sources cp -v %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} stubdom +%endif # fix for gmp-crosslib config bug (xen bugzilla) is now a patch to stubdom @@ -459,7 +467,7 @@ #sed -i -e 's|xenstore\/compat\/include|xenstore/include/compat|' tools/Makefile #sed -i -e '/EXTRAVER/ s/.1-pre/.0/' xen/Makefile -sed -i -e '/^[[:space:]]\+gzip/ s/gzip \-f \-9/gzip -n -f -9/' extras/mini-os/Makefile ; +#sed -i -e '/^[[:space:]]\+gzip/ s/gzip \-f \-9/gzip -n -f -9/' extras/mini-os/Makefile ; # python3 support sed -i -e '/^PY_CFLAGS/ s/$/ -Wno-error/' tools/python/Makefile sed -i -e '/^extra_compile_args/ s/-Werror/-Wno-error/' tools/python/setup.py @@ -585,6 +593,7 @@ PYTHON=/usr/bin/python3 %{__make} -j5 dist-tools PYTHON=/usr/bin/python3 %{__make} -j5 dist-docs +%if ! %{defined _with_noqemu} # system-qemu patch was set in config, so build qemu-xen, staged to dist/uumeq sed -i -e '/^CONFIG_QEMU_XEN/ s|= n$|= y|' config/Tools.mk ; @@ -608,6 +617,7 @@ if [ -d $PWD/dist/uumeq/usr/lib/xen/lib/qemu ]; then chmod 755 $PWD/dist/uumeq/usr/lib/xen/lib/qemu/*.so fi +%endif %if %with_tumeq export QUT=${PWD}/dist/tumeq @@ -670,14 +680,15 @@ ## install ## %install -#if [ ! -f config/Stubdom.mk ]; then -if [ -f config/Stubdom.mk ]; then +if [ ! -f config/Stubdom.mk ]; then +#if [ -f config/Stubdom.mk ]; then # stubdom build is disabled if [ -f /tmp/reuse-stubdom-4f.tar.xz ]; then tar -xf /tmp/reuse-stubdom-4f.tar.xz -C dist/install/usr/lib/xen/boot fi fi +%if ! %{defined _with_noqemu} (cd dist/uumeq;find . -type f -or -type l | sed -e s/^.// -e /^$/d) | sort -u > uumeq.lst sed -i -e '/man\/man/ s|$|.gz|' uumeq.lst @@ -694,6 +705,13 @@ sed -i -e '/qemu-nbd/d' uumeq.lst sed -i -e '/qemu-io/d' uumeq.lst +## ovmf cleanup ## +if [ -f ovmf.bin ]; then +install -m 644 ovmf.bin %{buildroot}/usr/share/qemu-xen/qemu/ +install -m 644 ovmf.bin.lite %{buildroot}/usr/share/qemu-xen/qemu/ +fi + +%endif %if %with_tumeq (cd dist/tumeq;find . -type f -or -type l | sed -e s/^.// -e /^$/d) | sort -u > tumeq.lst @@ -731,11 +749,6 @@ ## kconfig cleanup ## -## ovmf cleanup ## -if [ -f ovmf.bin ]; then -install -m 644 ovmf.bin %{buildroot}/usr/share/qemu-xen/qemu/ -install -m 644 ovmf.bin.lite %{buildroot}/usr/share/qemu-xen/qemu/ -fi ## qemuu cleanup ## #cp -p tools/qemu-xen/README README.qemuu @@ -943,6 +956,7 @@ %systemd_postun %endif +%if ! %{defined _with_noqemu} %post -n qemuu #xen-qemu-dom0-disk-backend.service @@ -961,6 +975,7 @@ %endif fi %endif +%endif %files # Base package contains xl, xendomains & python stuff @@ -1006,6 +1021,7 @@ #{_datadir}/xen/qemu/* %endif +%if ! %{defined _with_noqemu} %files -n qemuu -f uumeq.lst %defattr(-,root,root) #license COPYING @@ -1021,7 +1037,7 @@ %defattr(-,root,root) #license COPYING %doc README INSTALL - +%endif # All runtime stuff except for XenD/xm python stuff %files runtime -f runtime.lst