From 142118254b1613499b0f180c954b2ba316e086ad Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Sun, 26 May 2019 16:47:46 +0200 Subject: [PATCH 1/4] configure: set source_path only once and make its definition more robust Since commit 79d77bcd36 (configure: Remove --source-path option, 2019-04-29) source_path cannot be overridden anymore, move it out of the "default parameters" block since the word "default" may suggest that the value can change, while in fact it does not. While at it, only set source_path once and separate the positional argument of basename with "--" to more robustly cover the case of path names starting with a dash. Reviewed-by: Eric Blake Signed-off-by: Antonio Ospite Message-Id: <20190526144747.30019-2-ao2@ao2.it> Signed-off-by: Laurent Vivier --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index b091b82cb3..b6962d1381 100755 --- a/configure +++ b/configure @@ -276,10 +276,10 @@ ld_has() { $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1 } -# default parameters -source_path=$(dirname "$0") # make source path absolute -source_path=$(cd "$source_path"; pwd) +source_path=$(cd "$(dirname -- "$0")"; pwd) + +# default parameters cpu="" iasl="iasl" interp_prefix="/usr/gnemul/qemu-%M" From 4ace32e22713ffd79deb221ae0134652c7c15428 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Sun, 26 May 2019 16:47:47 +0200 Subject: [PATCH 2/4] configure: disallow spaces and colons in source path and build path The configure script breaks when the qemu source directory is in a path containing white spaces, in particular the list of targets is not correctly generated when calling "./configure --help" because of how the default_target_list variable is built. In addition to that, *building* qemu from a directory with spaces breaks some assumptions in the Makefiles, even if the original source path does not contain spaces like in the case of an out-of-tree build, or when symlinks are involved. To avoid these issues, refuse to run the configure script and the Makefile if there are spaces or colons in the source path or the build path, taking as inspiration what the kbuild system in linux does. Buglink: https://bugs.launchpad.net/qemu/+bug/1817345 Reviewed-by: Eric Blake Signed-off-by: Antonio Ospite Message-Id: <20190526144747.30019-3-ao2@ao2.it> Signed-off-by: Laurent Vivier --- Makefile | 4 ++++ configure | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index cfb18f1525..c62594445d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ # Makefile for QEMU. +ifneq ($(words $(subst :, ,$(CURDIR))), 1) + $(error main directory cannot contain spaces nor colons) +endif + # Always point to the root of the build tree (needs GNU make). BUILD_DIR=$(CURDIR) diff --git a/configure b/configure index b6962d1381..cf3d9d30bf 100755 --- a/configure +++ b/configure @@ -279,6 +279,11 @@ ld_has() { # make source path absolute source_path=$(cd "$(dirname -- "$0")"; pwd) +if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]"; +then + error_exit "main directory cannot contain spaces nor colons" +fi + # default parameters cpu="" iasl="iasl" From 811294b796ff8f807aff8dfa20f469a5199ff3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 17 Jun 2019 12:41:14 +0100 Subject: [PATCH 3/4] configure: use valid args testing sem_timedwait MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sem_timedwait function has been annotated as requiring non-null args in latest header files from GCC snapshot representing the future 2.30 release. This causes configure to fail when -Werror is used: config-temp/qemu-conf.c: In function ‘main’: config-temp/qemu-conf.c:2:25: error: null argument where non-null required (argument 1) [-Werror=nonnull] 2 | int main(void) { return sem_timedwait(0, 0); } | ^~~~~~~~~~~~~ config-temp/qemu-conf.c:2:25: error: null argument where non-null required (argument 2) [-Werror=nonnull] Signed-off-by: Daniel P. Berrangé Reviewed-by: Laurent Vivier Message-Id: <20190617114114.24897-1-berrange@redhat.com> Signed-off-by: Laurent Vivier --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index cf3d9d30bf..f946331010 100755 --- a/configure +++ b/configure @@ -5144,7 +5144,7 @@ fi sem_timedwait=no cat > $TMPC << EOF #include -int main(void) { return sem_timedwait(0, 0); } +int main(void) { sem_t s; struct timespec t = {0}; return sem_timedwait(&s, &t); } EOF if compile_prog "" "" ; then sem_timedwait=yes From b827891d73778eaf962b0536f955194cf4faa424 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Wed, 29 May 2019 12:24:44 +0200 Subject: [PATCH 4/4] MAINTAINERS: Change maintership of Xen code under hw/9pfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xen folks are the actual maintainers for this. Signed-off-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé Acked-by: Anthony PERARD Acked-by: Paul Durrant Acked-by: Stefano Stabellini Message-Id: <155912548463.2019004.3515830305299809902.stgit@bahia.lan> Signed-off-by: Laurent Vivier --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index cad58b9487..8206fc51db 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -408,7 +408,7 @@ M: Paul Durrant L: xen-devel@lists.xenproject.org S: Supported F: */xen* -F: hw/9pfs/xen-9p-backend.c +F: hw/9pfs/xen-9p* F: hw/char/xen_console.c F: hw/display/xenfb.c F: hw/net/xen_nic.c @@ -1498,6 +1498,7 @@ virtio-9p M: Greg Kurz S: Supported F: hw/9pfs/ +X: hw/9pfs/xen-9p* F: fsdev/ F: tests/virtio-9p-test.c T: git https://github.com/gkurz/qemu.git 9p-next