From 7000332fdb97e2d48d9afbbfd5b0700461a29c69b5df94392cbaaf7e767edfdd Mon Sep 17 00:00:00 2001
From: Li Zhang
Date: Mon, 17 Jan 2022 16:35:51 +0000
Subject: [PATCH] Accepting request 946953 from
home:lizhang:branches:Virtualization
- Building fixes from upstream
* Patches added:
meson-build-all-modules-by-default.patch
OBS-URL: https://build.opensuse.org/request/show/946953
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=685
---
bundles.tar.xz | 4 +-
meson-build-all-modules-by-default.patch | 54 ++++++++++++++++++++++++
qemu.changes | 6 +++
qemu.spec | 4 +-
4 files changed, 65 insertions(+), 3 deletions(-)
create mode 100644 meson-build-all-modules-by-default.patch
diff --git a/bundles.tar.xz b/bundles.tar.xz
index f7356d1e..bf819ccd 100644
--- a/bundles.tar.xz
+++ b/bundles.tar.xz
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:cb9fc886840aa39bdcc1ae5eea1f1363d08240531a99ac7b0bdda80b2db4bd41
-size 45468
+oid sha256:72f47f160a142dd8550c49fa2bf712da0ced6ca2dd1895ea6e960588fc733be1
+size 46412
diff --git a/meson-build-all-modules-by-default.patch b/meson-build-all-modules-by-default.patch
new file mode 100644
index 00000000..316853ba
--- /dev/null
+++ b/meson-build-all-modules-by-default.patch
@@ -0,0 +1,54 @@
+From: Paolo Bonzini
+Date: Fri, 7 Jan 2022 13:00:44 +0100
+Subject: meson: build all modules by default
+
+Git-commit: fb72176ba64057ce0ee5c1a0a443d9f72e270636
+
+With more recent versions of Meson, the build.ninja file is more selective
+as to what is built by default, and not building the modules results in test
+failures.
+
+Mark the modules as built-by-default and, to make the dependencies more
+precise, also require them to be up-to-date before running tests.
+
+Resolves: https://gitlab.com/qemu-project/qemu/-/issues/801
+Tested-by: Li Zhang
+Signed-off-by: Paolo Bonzini
+Signed-off-by: Li Zhang
+---
+ meson.build | 4 +++-
+ tests/qtest/meson.build | 3 +--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 612da7167f5c4aafcf77a0e1ce55..4997739df656a10fa1822116102a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -2818,8 +2818,10 @@ common_ss.add(hwcore)
+ # Targets #
+ ###########
+
++emulator_modules = []
+ foreach m : block_mods + softmmu_mods
+- shared_module(m.name(),
++ emulator_modules += shared_module(m.name(),
++ build_by_default: true,
+ name_prefix: '',
+ link_whole: m,
+ install: true,
+diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
+index c9d8458062ff6b88d1c28cb21e8f..6aff75bafa5761da141f27e6b1ee 100644
+--- a/tests/qtest/meson.build
++++ b/tests/qtest/meson.build
+@@ -299,10 +299,9 @@ foreach dir : target_dirs
+ test: executable(test, src, dependencies: deps)
+ }
+ endif
+- # FIXME: missing dependency on the emulator binary and qemu-img
+ test('qtest-@0@/@1@'.format(target_base, test),
+ qtest_executables[test],
+- depends: [test_deps, qtest_emulator],
++ depends: [test_deps, qtest_emulator, emulator_modules],
+ env: qtest_env,
+ args: ['--tap', '-k'],
+ protocol: 'tap',
diff --git a/qemu.changes b/qemu.changes
index 7230d384..99ca6a5b 100644
--- a/qemu.changes
+++ b/qemu.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Mon Jan 17 09:37:30 UTC 2022 - Li Zhang
+
+* Patches added:
+ meson-build-all-modules-by-default.patch
+
-------------------------------------------------------------------
Wed Jan 12 13:57:31 UTC 2022 - Dario Faggioli
diff --git a/qemu.spec b/qemu.spec
index 7bf4db56..6189b342 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -1,5 +1,5 @@
#
-# spec file
+# spec file for package qemu
#
# Copyright (c) 2022 SUSE LLC
#
@@ -179,6 +179,7 @@ Patch00043: qemu-binfmt-conf.sh-should-use-F-as-shor.patch
Patch00044: modules-quick-fix-a-fundamental-error-in.patch
Patch00045: qemu-binfmt-conf.sh-allow-overriding-SUS.patch
Patch00046: scsi-generic-replace-logical-block-count.patch
+Patch00047: meson-build-all-modules-by-default.patch
# Patches applied in roms/seabios/:
Patch01000: seabios-use-python2-explicitly-as-needed.patch
Patch01001: seabios-switch-to-python3-as-needed.patch
@@ -1125,6 +1126,7 @@ This package records qemu testsuite results and represents successful testing.
%patch00044 -p1
%patch00045 -p1
%patch00046 -p1
+%patch00047 -p1
%patch01000 -p1
%patch01001 -p1
%patch01002 -p1