From: Alexander Kanavin Date: Thu, 13 May 2021 20:56:22 +0000 (+0200) Subject: qemu: backport a patch to fix meson 0.58 builds X-Git-Tag: uninative-3.2~68 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=fe6889ed05edf2f1e4ac7b06debd4cc43ebb9607;p=openembedded-core.git qemu: backport a patch to fix meson 0.58 builds Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 82d1cb5566..74c53c6309 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -57,6 +57,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2020-27821.patch \ file://CVE-2021-20263.patch \ file://CVE-2021-3392.patch \ + file://0001-configure-fix-detection-of-gdbus-codegen.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P\d+(\.\d+)+)\.tar" diff --git a/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch b/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch new file mode 100644 index 0000000000..1f20077883 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch @@ -0,0 +1,53 @@ +From 464cfc64201b21386030b8f353fe9724a3413a85 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Wed, 5 May 2021 10:15:34 -0400 +Subject: [PATCH] configure: fix detection of gdbus-codegen + +"pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen", +and it does not pass test -x (which does not walk the path). + +Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1 +assignment in tests/qtest/meson.build uses an empty string as the +command, and fails very eloquently: + +../tests/qtest/meson.build:92:2: ERROR: No program name specified. + +Use the "has" function instead of test -x, and fix the generation +of config-host.mak since meson.build expects that GDBUS_CODEGEN +is absent, rather than empty, if the tool is unavailable. + +Reported-by: Sebastian Mitterle +Fixes: #178 +Signed-off-by: Paolo Bonzini +Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commitdiff;h=5ecfb76ccc056eb6127e44268e475827ae73b9e0] +(not in 6.0.0, should be kept when upgrading) +Signed-off-by: Alexander Kanavin +--- + configure | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index 18c26e0389..4c36e221d3 100755 +--- a/configure ++++ b/configure +@@ -3496,7 +3496,7 @@ if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then + gio_cflags=$($pkg_config --cflags gio-2.0) + gio_libs=$($pkg_config --libs gio-2.0) + gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0) +- if [ ! -x "$gdbus_codegen" ]; then ++ if ! has "$gdbus_codegen"; then + gdbus_codegen= + fi + # Check that the libraries actually work -- Ubuntu 18.04 ships +@@ -6172,6 +6172,8 @@ if test "$gio" = "yes" ; then + echo "CONFIG_GIO=y" >> $config_host_mak + echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak + echo "GIO_LIBS=$gio_libs" >> $config_host_mak ++fi ++if test "$gdbus_codegen" != "" ; then + echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak + fi + echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak +-- +2.24.0 +