From 698c429494e72d63d102c313e029f442db9a766ac9056df128f64a013c7f0683 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Wed, 24 Feb 2021 14:16:12 +0000 Subject: [PATCH] Accepting request 874876 from home:bfrogers:branches:Virtualization - Fix issue of virtio-9p-ccw having been mistakenly dropped from qemu (bsc#1182496) hw-s390x-fix-build-for-virtio-9p-ccw.patch - Tweaked some spec file details to be again compatible with quilt setup using the spec file as input - Remove BuildRequires that were added in anticipation of building ovmf within this package. We have not taken that route OBS-URL: https://build.opensuse.org/request/show/874876 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=619 --- _constraints | 2 +- bundles.tar.xz | 4 +- config.sh | 90 ++++---- hw-s390x-fix-build-for-virtio-9p-ccw.patch | 40 ++++ qemu.changes | 15 ++ qemu.spec | 205 +++++++++--------- qemu.spec.in | 85 ++++---- ...e-app-avoid-crash-when-core-spice-mo.patch | 11 +- update_git.sh | 13 ++ ...Help-compiler-out-to-avoid-a-warning.patch | 2 +- 10 files changed, 271 insertions(+), 196 deletions(-) create mode 100644 hw-s390x-fix-build-for-virtio-9p-ccw.patch diff --git a/_constraints b/_constraints index c0737498..5cee89c1 100644 --- a/_constraints +++ b/_constraints @@ -8,7 +8,7 @@ - 9 + 10 diff --git a/bundles.tar.xz b/bundles.tar.xz index 89fba0ab..214a85de 100644 --- a/bundles.tar.xz +++ b/bundles.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e5ec03af31b06a8ef8c104a478eba0d2ae79c9eb52a52b2865a254e2ab4be82 -size 60492 +oid sha256:4c62b4f7cb23a896ae882f3ce7871a36a65d2c36850932fdeaf1df1c5a8c4988 +size 60624 diff --git a/config.sh b/config.sh index a5addc3a..b92ff216 100644 --- a/config.sh +++ b/config.sh @@ -24,16 +24,57 @@ GIT_DIR=/dev/shm/qemu-factory-git-dir CMP_DIR=/dev/shm/qemu-factory-cmp-dir BUNDLE_DIR=/dev/shm/qemu-factory-bundle-dir -# For the following, use 1 or 0 as needed +# In following, use 1 or 0 as needed (representing true or false respectively) NUMBERED_PATCHES=0 PATCH_RANGE=1000 REPO_COUNT=36 +# This tracks the git submodule path within the superproject (1st entry) +PATCH_PATH_MAP=( + "" + "roms/seabios/" + "roms/ipxe/" + "roms/sgabios/" + "roms/edk2/" + "roms/skiboot/" + "roms/SLOF/" + "roms/openbios/" + "ui/keycodemapdb/" + "slirp/" + "roms/u-boot/" + "roms/qboot/" + "dtc/" + "roms/opensbi/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/" + "capstone/" + "roms/qemu-palcode/" + "roms/seabios-hppa/" + "roms/u-boot-sam460ex/" + "roms/QemuMacDrivers/" + "meson/" + "tests/fp/berkeley-softfloat-3/" + "tests/fp/berkeley-testfloat-3/" + "roms/edk2/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/boringssl/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/krb5/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/pyca-cryptography/" + "roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/" + "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/" + "roms/edk2/MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/" + "roms/edk2/UnitTestFrameworkPkg/Library/CmockaLib/cmocka/" + "roms/vbootrom/" + "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/research/esaxx/" + "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/research/libdivsufsort/" + "roms/edk2/MdeModulePkg/Library/BrotliCompress/brotli/research/esaxx/" + "roms/edk2/MdeModulePkg/Library/BrotliCompress/brotli/research/libdivsufsort/" +) + # Perhaps we need to instead use the terminal local dirname as the index # and store the ~/git/ as a separate VARIABLE # This way, we only have one big array instead of two # BUT STILL WE NEED TO START WITH THE DATA STORED SOMEWHERE!!!!!! +# (order must correspond to PATCH_PATH_MAP) LOCAL_REPO_MAP=( ~/git/qemu-opensuse ~/git/qemu-seabios @@ -77,50 +118,3 @@ LOCAL_REPO_MAP=( REQUIRED_LOCAL_REPO_MAP=( ~/git/qemu-opensuse ) - -PATCH_PATH_MAP=( - "" - "roms/seabios/" - "roms/ipxe/" - "roms/sgabios/" - "roms/edk2/" - "roms/skiboot/" - "roms/SLOF/" - "roms/openbios/" - "ui/keycodemapdb/" - "slirp/" - "roms/u-boot/" - "roms/qboot/" - "dtc/" - "roms/opensbi/" - "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/" - "capstone/" - "roms/qemu-palcode/" - "roms/seabios-hppa/" - "roms/u-boot-sam460ex/" - "roms/QemuMacDrivers/" - "meson/" - "tests/fp/berkeley-softfloat-3/" - "tests/fp/berkeley-testfloat-3/" - "roms/edk2/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3/" - "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/boringssl/" - "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/krb5/" - "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/pyca-cryptography/" - "roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/" - "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/" - "roms/edk2/MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/" - "roms/edk2/UnitTestFrameworkPkg/Library/CmockaLib/cmocka/" - "roms/vbootrom/" - "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/research/esaxx/" - "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/research/libdivsufsort/" - "roms/edk2/MdeModulePkg/Library/BrotliCompress/brotli/research/esaxx/" - "roms/edk2/MdeModulePkg/Library/BrotliCompress/brotli/research/libdivsufsort/" - -) - -# Zero based numbering, so we subtract 1 here: -if (( (REPO_COUNT * PATCH_RANGE) - 1 > 9999 )); then - FIVE_DIGIT_POTENTIAL=1 -else - FIVE_DIGIT_POTENTIAL=0 -fi diff --git a/hw-s390x-fix-build-for-virtio-9p-ccw.patch b/hw-s390x-fix-build-for-virtio-9p-ccw.patch new file mode 100644 index 00000000..9af70be8 --- /dev/null +++ b/hw-s390x-fix-build-for-virtio-9p-ccw.patch @@ -0,0 +1,40 @@ +From: Halil Pasic +Date: Thu, 18 Feb 2021 04:40:59 +0100 +Subject: hw/s390x: fix build for virtio-9p-ccw + +Git-commit: 0000000000000000000000000000000000000000 +References: bsc#1182496 + +Commit 2c44220d05 ("meson: convert hw/arch*"), which migrated the old +Makefile.objs to meson.build accidentally excluded virtio-ccw-9p.c and +thus the virtio-9p-ccw device from the build (and potentially also +included the file virtio-ccw-blk.c twice in the source set). And since +CONFIG_VIRTFS can't be used the way it was used here (see commit +2c9dce0196 ("meson: do not use CONFIG_VIRTFS")), the preconditions have +to be written differently. + +Let's fix this! + +Signed-off-by: Halil Pasic +Fixes: 2c44220d05 ("meson: convert hw/arch*") +Reported-by: Jakob Naucke +Cc: qemu-stable@nongnu.org +[BR: back out the part which depends on the have_virtfs change] +Signed-off-by: Bruce Rogers +--- + hw/s390x/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/s390x/meson.build b/hw/s390x/meson.build +index 2a7818d94b94d3832c0e944ecc42..e53b7a69930a27dd030994ab6a54 100644 +--- a/hw/s390x/meson.build ++++ b/hw/s390x/meson.build +@@ -40,7 +40,7 @@ virtio_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-ccw-net.c')) + virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-ccw-rng.c')) + virtio_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio-ccw-scsi.c')) + virtio_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-ccw-serial.c')) +-virtio_ss.add(when: ['CONFIG_VIRTIO_9P', 'CONFIG_VIRTFS'], if_true: files('virtio-ccw-blk.c')) ++virtio_ss.add(when: ['CONFIG_VIRTIO_9P', 'CONFIG_VIRTFS'], if_true: files('virtio-ccw-9p.c')) + virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-ccw.c')) + virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs-ccw.c')) + s390x_ss.add_all(when: 'CONFIG_VIRTIO_CCW', if_true: virtio_ss) diff --git a/qemu.changes b/qemu.changes index 75aa79e0..08445d41 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Fri Feb 19 15:10:56 UTC 2021 - Bruce Rogers + +- Fix issue of virtio-9p-ccw having been mistakenly dropped from + qemu (bsc#1182496) + hw-s390x-fix-build-for-virtio-9p-ccw.patch + +------------------------------------------------------------------- +Thu Feb 18 16:41:28 UTC 2021 - Bruce Rogers + +- Tweaked some spec file details to be again compatible with quilt + setup using the spec file as input +- Remove BuildRequires that were added in anticipation of building + ovmf within this package. We have not taken that route + ------------------------------------------------------------------- Wed Feb 17 02:06:20 UTC 2021 - Bruce Rogers diff --git a/qemu.spec b/qemu.spec index ae21eeea..f9fc13d2 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,5 +1,5 @@ # -# spec file for package qemu%{name_suffix} +# spec file for package qemu-linux-user # # Copyright (c) 2021 SUSE LLC # @@ -76,15 +76,14 @@ %define liburing_min_version 0.3 %endif -# qemu, qemu-linux-user, and qemu-testsuite "flavors" enabled via OBS Multibuild -%define flavor @BUILD_FLAVOR@%{nil} -%if "%flavor" == "" +# qemu, qemu-linux-user, and qemu-testsuite "flavors" are enabled via OBS Multibuild +%global flavor @BUILD_FLAVOR@%{nil} %define name_suffix %{nil} -%else -%define name_suffix -%flavor +%if "%flavor" == "testsuite" +%define name_suffix -testsuite %endif - %if "%flavor" == "linux-user" +%define name_suffix -linux-user %define summary_string CPU emulator for user space %else %define summary_string Machine emulator and virtualizer @@ -156,62 +155,63 @@ Patch00021: qemu-nbd-Use-SOMAXCONN-for-socket-listen.patch Patch00022: qemu-storage-daemon-Enable-object-add.patch Patch00023: blockjob-Fix-crash-with-IOthread-when-bl.patch Patch00024: monitor-Fix-assertion-failure-on-shutdow.patch -Patch00025: XXX-dont-dump-core-on-sigabort.patch -Patch00026: qemu-binfmt-conf-Modify-default-path.patch -Patch00027: qemu-cvs-gettimeofday.patch -Patch00028: qemu-cvs-ioctl_debug.patch -Patch00029: qemu-cvs-ioctl_nodirection.patch -Patch00030: linux-user-add-binfmt-wrapper-for-argv-0.patch -Patch00031: PPC-KVM-Disable-mmu-notifier-check.patch -Patch00032: linux-user-binfmt-support-host-binaries.patch -Patch00033: linux-user-Fake-proc-cpuinfo.patch -Patch00034: linux-user-use-target_ulong.patch -Patch00035: Make-char-muxer-more-robust-wrt-small-FI.patch -Patch00036: linux-user-lseek-explicitly-cast-non-set.patch -Patch00037: AIO-Reduce-number-of-threads-for-32bit-h.patch -Patch00038: xen_disk-Add-suse-specific-flush-disable.patch -Patch00039: qemu-bridge-helper-reduce-security-profi.patch -Patch00040: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch -Patch00041: roms-Makefile-pass-a-packaging-timestamp.patch -Patch00042: Raise-soft-address-space-limit-to-hard-l.patch -Patch00043: increase-x86_64-physical-bits-to-42.patch -Patch00044: i8254-Fix-migration-from-SLE11-SP2.patch -Patch00045: acpi_piix4-Fix-migration-from-SLE11-SP2.patch -Patch00046: Make-installed-scripts-explicitly-python.patch -Patch00047: hw-smbios-handle-both-file-formats-regar.patch -Patch00048: xen-add-block-resize-support-for-xen-dis.patch -Patch00049: tests-qemu-iotests-Triple-timeout-of-i-o.patch -Patch00050: tests-Fix-block-tests-to-be-compatible-w.patch -Patch00051: xen-ignore-live-parameter-from-xen-save-.patch -Patch00052: tests-change-error-message-in-test-162.patch -Patch00053: hw-intc-exynos4210_gic-provide-more-room.patch -Patch00054: configure-only-populate-roms-if-softmmu.patch -Patch00055: pc-bios-s390-ccw-net-avoid-warning-about.patch -Patch00056: roms-change-cross-compiler-naming-to-be-.patch -Patch00057: test-add-mapping-from-arch-of-i686-to-qe.patch -Patch00058: configure-remove-pkgversion-from-CONFIG_.patch -Patch00059: docs-add-SUSE-support-statements-to-html.patch -Patch00060: s390x-Fix-stringop-truncation-issue-repo.patch -Patch00061: Revert-qht-constify-qht_statistics_init.patch -Patch00062: qht-Revert-some-constification-in-qht.c.patch -Patch00063: meson-install-ivshmem-client-and-ivshmem.patch -Patch00064: Revert-roms-efirom-tests-uefi-test-tools.patch -Patch00065: Makefile-Don-t-check-pc-bios-as-pre-requ.patch -Patch00066: roms-Makefile-add-cross-file-to-qboot-me.patch -Patch00067: usb-Help-compiler-out-to-avoid-a-warning.patch -Patch00068: module-for-virtio-gpu-pre-load-module-to.patch -Patch00069: spice-app-avoid-crash-when-core-spice-mo.patch -Patch00070: qom-handle-case-of-chardev-spice-module-.patch +Patch00025: spice-app-avoid-crash-when-core-spice-mo.patch +Patch00026: hw-s390x-fix-build-for-virtio-9p-ccw.patch +Patch00027: XXX-dont-dump-core-on-sigabort.patch +Patch00028: qemu-binfmt-conf-Modify-default-path.patch +Patch00029: qemu-cvs-gettimeofday.patch +Patch00030: qemu-cvs-ioctl_debug.patch +Patch00031: qemu-cvs-ioctl_nodirection.patch +Patch00032: linux-user-add-binfmt-wrapper-for-argv-0.patch +Patch00033: PPC-KVM-Disable-mmu-notifier-check.patch +Patch00034: linux-user-binfmt-support-host-binaries.patch +Patch00035: linux-user-Fake-proc-cpuinfo.patch +Patch00036: linux-user-use-target_ulong.patch +Patch00037: Make-char-muxer-more-robust-wrt-small-FI.patch +Patch00038: linux-user-lseek-explicitly-cast-non-set.patch +Patch00039: AIO-Reduce-number-of-threads-for-32bit-h.patch +Patch00040: xen_disk-Add-suse-specific-flush-disable.patch +Patch00041: qemu-bridge-helper-reduce-security-profi.patch +Patch00042: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch +Patch00043: roms-Makefile-pass-a-packaging-timestamp.patch +Patch00044: Raise-soft-address-space-limit-to-hard-l.patch +Patch00045: increase-x86_64-physical-bits-to-42.patch +Patch00046: i8254-Fix-migration-from-SLE11-SP2.patch +Patch00047: acpi_piix4-Fix-migration-from-SLE11-SP2.patch +Patch00048: Make-installed-scripts-explicitly-python.patch +Patch00049: hw-smbios-handle-both-file-formats-regar.patch +Patch00050: xen-add-block-resize-support-for-xen-dis.patch +Patch00051: tests-qemu-iotests-Triple-timeout-of-i-o.patch +Patch00052: tests-Fix-block-tests-to-be-compatible-w.patch +Patch00053: xen-ignore-live-parameter-from-xen-save-.patch +Patch00054: tests-change-error-message-in-test-162.patch +Patch00055: hw-intc-exynos4210_gic-provide-more-room.patch +Patch00056: configure-only-populate-roms-if-softmmu.patch +Patch00057: pc-bios-s390-ccw-net-avoid-warning-about.patch +Patch00058: roms-change-cross-compiler-naming-to-be-.patch +Patch00059: test-add-mapping-from-arch-of-i686-to-qe.patch +Patch00060: configure-remove-pkgversion-from-CONFIG_.patch +Patch00061: docs-add-SUSE-support-statements-to-html.patch +Patch00062: s390x-Fix-stringop-truncation-issue-repo.patch +Patch00063: Revert-qht-constify-qht_statistics_init.patch +Patch00064: qht-Revert-some-constification-in-qht.c.patch +Patch00065: meson-install-ivshmem-client-and-ivshmem.patch +Patch00066: Revert-roms-efirom-tests-uefi-test-tools.patch +Patch00067: Makefile-Don-t-check-pc-bios-as-pre-requ.patch +Patch00068: roms-Makefile-add-cross-file-to-qboot-me.patch +Patch00069: usb-Help-compiler-out-to-avoid-a-warning.patch +Patch00070: module-for-virtio-gpu-pre-load-module-to.patch +Patch00071: qom-handle-case-of-chardev-spice-module-.patch # Patches applied in roms/seabios/: Patch01000: seabios-use-python2-explicitly-as-needed.patch Patch01001: seabios-switch-to-python3-as-needed.patch Patch01002: enable-cross-compilation-on-ARM.patch Patch01003: build-be-explicit-about-mx86-used-note-n.patch # Patches applied in roms/ipxe/: -Patch02000: stub-out-the-SAN-req-s-in-int13.patch -Patch02001: ipxe-Makefile-fix-issues-of-build-reprod.patch -Patch02002: help-compiler-out-by-initializing-array.patch -Patch02003: ath5k-Add-missing-AR5K_EEPROM_READ-in-at.patch +Patch02000: ath5k-Add-missing-AR5K_EEPROM_READ-in-at.patch +Patch02001: stub-out-the-SAN-req-s-in-int13.patch +Patch02002: ipxe-Makefile-fix-issues-of-build-reprod.patch +Patch02003: help-compiler-out-by-initializing-array.patch # Patches applied in roms/sgabios/: Patch03000: sgabios-Makefile-fix-issues-of-build-rep.patch Patch03001: roms-sgabios-Fix-csum8-to-be-built-by-ho.patch @@ -224,7 +224,6 @@ Patch11000: qboot-add-cross.ini-file-to-handle-aarch.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -# ======================================================================== # Common BuildRequires listed here: BuildRequires: fdupes BuildRequires: gcc-c++ @@ -248,8 +247,9 @@ provides programs to run user space binaries and libraries meant for another architecture. The syscall interface is intercepted and execution below the syscall layer occurs on the native hardware and operating system. +# above section is for qemu-linux-user # ------------------------------------------------------------------------ -%else # ! qemu-linux-user +%else %if %{build_x86_firmware_from_source} BuildRequires: acpica %endif @@ -259,14 +259,6 @@ BuildRequires: binutils-devel %endif BuildRequires: bison BuildRequires: brlapi-devel -%ifnarch %{ix86} aarch64 %arm -BuildRequires: cross-aarch64-binutils -BuildRequires: cross-aarch64-gcc%gcc_version -%endif -%ifnarch %{ix86} %arm -BuildRequires: cross-arm-binutils -BuildRequires: cross-arm-gcc%gcc_version -%endif %if %{build_x86_firmware_from_source} %ifnarch %{ix86} x86_64 # We must cross-compile on non-x86* @@ -327,21 +319,18 @@ BuildRequires: pkgconfig(liburing) >= %liburing_min_version %endif BuildRequires: lzfse-devel BuildRequires: multipath-tools-devel -BuildRequires: pkgconfig(libudev) -BuildRequires: pkgconfig(libusb-1.0) >= 1.0.13 -BuildRequires: pkgconfig(lzo2) -BuildRequires: pkgconfig(vdeplug) -BuildRequires: pkgconfig(xkbcommon) -%if %{build_x86_firmware_from_source} -BuildRequires: nasm -%endif BuildRequires: pkgconfig BuildRequires: python3-Sphinx BuildRequires: rdma-core-devel BuildRequires: snappy-devel +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(libusb-1.0) >= 1.0.13 +BuildRequires: pkgconfig(lzo2) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(spice-protocol) >= 0.12.3 BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(vdeplug) +BuildRequires: pkgconfig(xkbcommon) %{?systemd_ordering} %if %{kvm_available} BuildRequires: pkgconfig(udev) @@ -423,7 +412,6 @@ Obsoletes: qemu-audio-oss < %{qemuver} Obsoletes: qemu-audio-sdl < %{qemuver} Obsoletes: qemu-ui-sdl < %{qemuver} -# ------------------------------------------------------------------------ %define generic_qemu_description QEMU provides full machine emulation and cross architecture usage. It closely\ integrates with KVM and Xen virtualization, allowing for excellent performance.\ Many options are available for defining the emulated environment, including\ @@ -967,7 +955,8 @@ merges anonymous (private) pages (not pagecache ones). This package provides a service file for starting and stopping KSM. -%else # qemu +# above section is for qemu +%else BuildRequires: bc BuildRequires: qemu-arm = %{qemuver} BuildRequires: qemu-audio-alsa = %{qemuver} @@ -1011,10 +1000,13 @@ BuildRequires: qemu-x86 = %{qemuver} %description This package records qemu testsuite results and represents successful testing. -%endif # ! qemu-testsuite -%endif # ! qemu-linux-user +# above section is for qemu-testsuite +%endif +# above section is for qemu and qemu-testsuite +%endif # ======================================================================== + %prep %setup -q -n %{srcname}-%{expand:%%(SV=%{srcver};echo ${SV%%%%+git*})} %patch00000 -p1 @@ -1076,32 +1068,33 @@ This package records qemu testsuite results and represents successful testing. %patch00056 -p1 %patch00057 -p1 %patch00058 -p1 -%if %{legacy_qemu_kvm} %patch00059 -p1 -%endif %patch00060 -p1 +%if %{legacy_qemu_kvm} %patch00061 -p1 +%endif %patch00062 -p1 %patch00063 -p1 %patch00064 -p1 %patch00065 -p1 -%ifarch aarch64 %patch00066 -p1 -%endif -%ifarch %arm %ix86 %patch00067 -p1 -%endif +%ifarch aarch64 %patch00068 -p1 +%endif +%ifarch %arm %ix86 ppc %patch00069 -p1 +%endif %patch00070 -p1 +%patch00071 -p1 %patch01000 -p1 %patch01001 -p1 %patch01002 -p1 %patch01003 -p1 -%if 0%{?patch-possibly-applied-elsewhere} %patch02000 -p1 -%endif +%if 0%{?patch-possibly-applied-elsewhere} %patch02001 -p1 +%endif %patch02002 -p1 %patch02003 -p1 %patch03000 -p1 @@ -1197,9 +1190,11 @@ efi-vmxnet3.rom} %{?x86_default_built_firmware} %{?x86_extra_built_firmware} \ %{?x86_64_only_default_built_firmware} %{?x86_64_only_extra_built_firmware} } -%endif # ! qemu-linux-user +# above section is for qemu and qemu-testsuite +%endif # ======================================================================== + %build # non-x86 archs still seem to have some issues with Link Time Optimization @@ -1354,8 +1349,9 @@ cd %blddir %endif --enable-xfsctl \ --enable-xkbcommon \ +# above section is for qemu and qemu-testsuite # ------------------------------------------------------------------------ -%else # qemu-linux-user +%else --without-default-devices \ --disable-system --enable-linux-user \ --disable-tools --disable-guest-agent \ @@ -1402,7 +1398,9 @@ cd %blddir --disable-vnc \ --disable-vvfat \ --disable-xkbcommon \ -%endif # qemu-linux-user + +# above section is for qemu-linux-user +%endif %if "%{name}" == "qemu" @@ -1528,7 +1526,8 @@ make %{?_smp_mflags} -C %srcdir/roms slof make %{?_smp_mflags} -C %srcdir/roms opensbi64-generic CROSS_COMPILE= %endif -%endif # qemu +# above section is for qemu +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-testsuite" @@ -1563,7 +1562,7 @@ make %{?_smp_mflags} tests/qtest/qom-test V=1 # ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379) make %{?_smp_mflags} check-report.tap V=1 -%endif # qemu-testsuite +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-linux-user" @@ -1594,9 +1593,10 @@ make %{?_smp_mflags} V=1 %define qemu_arch s390x %endif -%endif # qemu-linux-user +%endif # ======================================================================== + %check cd %blddir %if "%{name}" == "qemu-testsuite" @@ -1607,7 +1607,7 @@ export QEMU_IO_PROG=%_bindir/qemu-io export QEMU_NBD_PROG=%_bindir/qemu-nbd make %{?_smp_mflags} check-block V=1 -%endif # qemu-testsuite +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-linux-user" @@ -1618,7 +1618,7 @@ make %{?_smp_mflags} check-block V=1 make %{?_smp_mflags} check-softfloat %endif -%endif # qemu-linux-user +%endif # ======================================================================== @@ -1629,7 +1629,7 @@ cd %blddir install -D -m 0644 check-report.tap %{buildroot}%_datadir/qemu/check-report.tap -%endif # qemu-testsuite +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-linux-user" @@ -1673,7 +1673,7 @@ ln -s qemu-binfmt %{buildroot}%_bindir/qemu-xtensa-binfmt ln -s qemu-binfmt %{buildroot}%_bindir/qemu-xtensaeb-binfmt %fdupes -s %{buildroot} -%endif # qemu-linux-user +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu" @@ -1827,9 +1827,11 @@ if [ ! -f %{_datadir}/%name/skiboot.lid.qemu ] ; then update-alternatives --remove skiboot.lid %{_datadir}/%name/skiboot.lid.qemu fi -%endif # qemu +# above section is for qemu +%endif # ======================================================================== + %files %defattr(-, root, root) %doc README.rst VERSION @@ -2372,7 +2374,8 @@ fi %defattr(-, root, root) %{_unitdir}/ksm.service -%endif # qemu +# above section is for qemu +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-linux-user" @@ -2413,12 +2416,12 @@ fi %_bindir/qemu-*-binfmt %_sbindir/qemu-binfmt-conf.sh -%endif # qemu-linux-user +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-testsuite" %_datadir/qemu/check-report.tap -%endif # qemu-testsuite +%endif %changelog diff --git a/qemu.spec.in b/qemu.spec.in index c366cf2c..ec853ab7 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -76,15 +76,14 @@ %define liburing_min_version 0.3 %endif -# qemu, qemu-linux-user, and qemu-testsuite "flavors" enabled via OBS Multibuild -%define flavor @BUILD_FLAVOR@%{nil} -%if "%flavor" == "" +# qemu, qemu-linux-user, and qemu-testsuite "flavors" are enabled via OBS Multibuild +%global flavor @BUILD_FLAVOR@%{nil} %define name_suffix %{nil} -%else -%define name_suffix -%flavor +%if "%flavor" == "testsuite" +%define name_suffix -testsuite %endif - %if "%flavor" == "linux-user" +%define name_suffix -linux-user %define summary_string CPU emulator for user space %else %define summary_string Machine emulator and virtualizer @@ -133,7 +132,6 @@ PATCH_FILES BuildRoot: %{_tmppath}/%{name}-%{version}-build -# ======================================================================== # Common BuildRequires listed here: BuildRequires: fdupes BuildRequires: gcc-c++ @@ -157,8 +155,9 @@ provides programs to run user space binaries and libraries meant for another architecture. The syscall interface is intercepted and execution below the syscall layer occurs on the native hardware and operating system. +# above section is for qemu-linux-user # ------------------------------------------------------------------------ -%else # ! qemu-linux-user +%else %if %{build_x86_firmware_from_source} BuildRequires: acpica %endif @@ -168,14 +167,6 @@ BuildRequires: binutils-devel %endif BuildRequires: bison BuildRequires: brlapi-devel -%ifnarch %{ix86} aarch64 %arm -BuildRequires: cross-aarch64-binutils -BuildRequires: cross-aarch64-gcc%gcc_version -%endif -%ifnarch %{ix86} %arm -BuildRequires: cross-arm-binutils -BuildRequires: cross-arm-gcc%gcc_version -%endif %if %{build_x86_firmware_from_source} %ifnarch %{ix86} x86_64 # We must cross-compile on non-x86* @@ -236,21 +227,18 @@ BuildRequires: pkgconfig(liburing) >= %liburing_min_version %endif BuildRequires: lzfse-devel BuildRequires: multipath-tools-devel -BuildRequires: pkgconfig(libudev) -BuildRequires: pkgconfig(libusb-1.0) >= 1.0.13 -BuildRequires: pkgconfig(lzo2) -BuildRequires: pkgconfig(vdeplug) -BuildRequires: pkgconfig(xkbcommon) -%if %{build_x86_firmware_from_source} -BuildRequires: nasm -%endif BuildRequires: pkgconfig BuildRequires: python3-Sphinx BuildRequires: rdma-core-devel BuildRequires: snappy-devel +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(libusb-1.0) >= 1.0.13 +BuildRequires: pkgconfig(lzo2) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(spice-protocol) >= 0.12.3 BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(vdeplug) +BuildRequires: pkgconfig(xkbcommon) %{?systemd_ordering} %if %{kvm_available} BuildRequires: pkgconfig(udev) @@ -332,7 +320,6 @@ Obsoletes: qemu-audio-oss < %{qemuver} Obsoletes: qemu-audio-sdl < %{qemuver} Obsoletes: qemu-ui-sdl < %{qemuver} -# ------------------------------------------------------------------------ %define generic_qemu_description QEMU provides full machine emulation and cross architecture usage. It closely\ integrates with KVM and Xen virtualization, allowing for excellent performance.\ Many options are available for defining the emulated environment, including\ @@ -876,7 +863,8 @@ merges anonymous (private) pages (not pagecache ones). This package provides a service file for starting and stopping KSM. -%else # qemu +# above section is for qemu +%else BuildRequires: bc BuildRequires: qemu-arm = %{qemuver} BuildRequires: qemu-audio-alsa = %{qemuver} @@ -920,10 +908,13 @@ BuildRequires: qemu-x86 = %{qemuver} %description This package records qemu testsuite results and represents successful testing. -%endif # ! qemu-testsuite -%endif # ! qemu-linux-user +# above section is for qemu-testsuite +%endif +# above section is for qemu and qemu-testsuite +%endif # ======================================================================== + %prep %setup -q -n %{srcname}-%{expand:%%(SV=%{srcver};echo ${SV%%%%+git*})} PATCH_EXEC @@ -1016,9 +1007,11 @@ efi-vmxnet3.rom} %{?x86_default_built_firmware} %{?x86_extra_built_firmware} \ %{?x86_64_only_default_built_firmware} %{?x86_64_only_extra_built_firmware} } -%endif # ! qemu-linux-user +# above section is for qemu and qemu-testsuite +%endif # ======================================================================== + %build # non-x86 archs still seem to have some issues with Link Time Optimization @@ -1173,8 +1166,9 @@ cd %blddir %endif --enable-xfsctl \ --enable-xkbcommon \ +# above section is for qemu and qemu-testsuite # ------------------------------------------------------------------------ -%else # qemu-linux-user +%else --without-default-devices \ --disable-system --enable-linux-user \ --disable-tools --disable-guest-agent \ @@ -1221,7 +1215,9 @@ cd %blddir --disable-vnc \ --disable-vvfat \ --disable-xkbcommon \ -%endif # qemu-linux-user + +# above section is for qemu-linux-user +%endif %if "%{name}" == "qemu" @@ -1347,7 +1343,8 @@ make %{?_smp_mflags} -C %srcdir/roms slof make %{?_smp_mflags} -C %srcdir/roms opensbi64-generic CROSS_COMPILE= %endif -%endif # qemu +# above section is for qemu +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-testsuite" @@ -1382,7 +1379,7 @@ make %{?_smp_mflags} tests/qtest/qom-test V=1 # ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379) make %{?_smp_mflags} check-report.tap V=1 -%endif # qemu-testsuite +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-linux-user" @@ -1413,9 +1410,10 @@ make %{?_smp_mflags} V=1 %define qemu_arch s390x %endif -%endif # qemu-linux-user +%endif # ======================================================================== + %check cd %blddir %if "%{name}" == "qemu-testsuite" @@ -1426,7 +1424,7 @@ export QEMU_IO_PROG=%_bindir/qemu-io export QEMU_NBD_PROG=%_bindir/qemu-nbd make %{?_smp_mflags} check-block V=1 -%endif # qemu-testsuite +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-linux-user" @@ -1437,7 +1435,7 @@ make %{?_smp_mflags} check-block V=1 make %{?_smp_mflags} check-softfloat %endif -%endif # qemu-linux-user +%endif # ======================================================================== @@ -1448,7 +1446,7 @@ cd %blddir install -D -m 0644 check-report.tap %{buildroot}%_datadir/qemu/check-report.tap -%endif # qemu-testsuite +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-linux-user" @@ -1492,7 +1490,7 @@ ln -s qemu-binfmt %{buildroot}%_bindir/qemu-xtensa-binfmt ln -s qemu-binfmt %{buildroot}%_bindir/qemu-xtensaeb-binfmt %fdupes -s %{buildroot} -%endif # qemu-linux-user +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu" @@ -1646,9 +1644,11 @@ if [ ! -f %{_datadir}/%name/skiboot.lid.qemu ] ; then update-alternatives --remove skiboot.lid %{_datadir}/%name/skiboot.lid.qemu fi -%endif # qemu +# above section is for qemu +%endif # ======================================================================== + %files %defattr(-, root, root) %doc README.rst VERSION @@ -2191,7 +2191,8 @@ fi %defattr(-, root, root) %{_unitdir}/ksm.service -%endif # qemu +# above section is for qemu +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-linux-user" @@ -2232,12 +2233,12 @@ fi %_bindir/qemu-*-binfmt %_sbindir/qemu-binfmt-conf.sh -%endif # qemu-linux-user +%endif # ------------------------------------------------------------------------ %if "%{name}" == "qemu-testsuite" %_datadir/qemu/check-report.tap -%endif # qemu-testsuite +%endif %changelog diff --git a/spice-app-avoid-crash-when-core-spice-mo.patch b/spice-app-avoid-crash-when-core-spice-mo.patch index 14d8ec00..fdd1f4aa 100644 --- a/spice-app-avoid-crash-when-core-spice-mo.patch +++ b/spice-app-avoid-crash-when-core-spice-mo.patch @@ -1,6 +1,11 @@ From: Bruce Rogers -Date: Mon, 25 Jan 2021 21:05:05 -0700 +Date: Fri, 12 Feb 2021 20:23:18 -0700 Subject: spice-app: avoid crash when core spice module doesn't loaded +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +git-commit: 122e4ef6dea14a078a860ca253852e18ddebb8e2 When qemu is built with modules, but a given module doesn't load qemu should handle that gracefully. When ui-spice-core.so isn't @@ -10,6 +15,10 @@ check the pointer before dereferencing and error out in a normal way. Signed-off-by: Bruce Rogers +Reviewed-by: Marc-André Lureau +Reviewed-by: Philippe Mathieu-Daudé +Message-Id: <20210213032318.346093-1-brogers@suse.com> +Signed-off-by: Gerd Hoffmann --- ui/spice-app.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/update_git.sh b/update_git.sh index 56b2e90d..6ca9596f 100644 --- a/update_git.sh +++ b/update_git.sh @@ -32,6 +32,15 @@ set -e source ./config.sh +# TODO: Here we should validate the variables that should be set in config.sh + +# Zero based numbering, so we subtract 1 here: +if (( (REPO_COUNT * PATCH_RANGE) - 1 > 9999 )); then + FIVE_DIGIT_POTENTIAL=1 +else + FIVE_DIGIT_POTENTIAL=0 +fi + declare -A COMMIT_IDS_BY_SUBMODULE_PATH # Get version info from the packages' tarball - decode and do some checks @@ -596,7 +605,11 @@ rm -rf $CMP_DIR rm -rf checkdir osc service localrun format_spec_file +# First, make the results of the older format_spec_file look like what I believe is the intended output +# And then change the somewhat broken output of the new format_spec_file to what I believe is +# the intended output sed -i 's/^# spec file for package qemu$/# spec file for package qemu%{name_suffix}/g' qemu.spec +sed -i 's/^# spec file for package qemu-linux-user$/# spec file for package qemu%{name_suffix}/g' qemu.spec } #============================================================================== diff --git a/usb-Help-compiler-out-to-avoid-a-warning.patch b/usb-Help-compiler-out-to-avoid-a-warning.patch index bb8a4bde..ba433292 100644 --- a/usb-Help-compiler-out-to-avoid-a-warning.patch +++ b/usb-Help-compiler-out-to-avoid-a-warning.patch @@ -2,7 +2,7 @@ From: Bruce Rogers Date: Thu, 3 Dec 2020 16:48:13 -0700 Subject: usb: Help compiler out to avoid a warning on x86 compilation -Include-If: %ifarch %arm %ix86 +Include-If: %ifarch %arm %ix86 ppc There is an assert present which already should give the compiler enough information about the value of i as used in the snprintf,