From f2839fea71ecc8dbe7e38c0ec09e3e9ef6edb831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 4 Sep 2020 10:49:53 +0100 Subject: [PATCH] Provide explicit kernel path to QEMU sanity check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In a mock build root the kernel probably won't exist in /boot and the QEMU sanity check script won't search /lib/modules. So we must find the vmlinuz file and pass it explicitly. Signed-off-by: Daniel P. Berrangé --- qemu.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qemu.spec b/qemu.spec index 2aa30f8..0eb999d 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1415,7 +1415,9 @@ if [ -x "$b" ]; then "$b" -help; fi %if %{qemu_sanity_check} # Sanity-check current kernel can boot on this qemu. # The results are advisory only. -qemu-sanity-check --qemu=%{?hostqemu} ||: +KERNEL=`find /lib/modules -name vmlinuz | head -1` +echo "Trying to boot kernel $KERNEL with %{?hostqemu}" +qemu-sanity-check --qemu=%{?hostqemu} --kernel=$KERNEL ||: %endif %endif @@ -1903,6 +1905,7 @@ getent passwd qemu >/dev/null || \ - Re-enable kernel BR for QEMU sanity check - Fix conditionals for enabling QEMU sanity check - Check whether emulator works before doing sanity check +- Provide explicit kernel path for QEMU sanity check * Thu Sep 3 2020 Daniel P. Berrangé - 5.1.0-4 - Add btrfs ioctls to linux-user (rhbz #1872918)