qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/4] Trivial patches patches
@ 2019-06-26 20:02 Laurent Vivier
  2019-06-26 20:02 ` [Qemu-devel] [PULL 1/4] configure: set source_path only once and make its definition more robust Laurent Vivier
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Laurent Vivier @ 2019-06-26 20:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Laurent Vivier

The following changes since commit 474f3938d79ab36b9231c9ad3b5a9314c2aeacde:

  Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-jun-21-2019' into staging (2019-06-21 15:40:50 +0100)

are available in the Git repository at:

  git://github.com/vivier/qemu.git tags/trivial-patches-pull-request

for you to fetch changes up to b827891d73778eaf962b0536f955194cf4faa424:

  MAINTAINERS: Change maintership of Xen code under hw/9pfs (2019-06-26 18:30:03 +0200)

----------------------------------------------------------------
configure improvements and fixes
MAINTAINERS update

----------------------------------------------------------------

Antonio Ospite (2):
  configure: set source_path only once and make its definition more
    robust
  configure: disallow spaces and colons in source path and build path

Daniel P. Berrangé (1):
  configure: use valid args testing sem_timedwait

Greg Kurz (1):
  MAINTAINERS: Change maintership of Xen code under hw/9pfs

 MAINTAINERS |  3 ++-
 Makefile    |  4 ++++
 configure   | 13 +++++++++----
 3 files changed, 15 insertions(+), 5 deletions(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 1/4] configure: set source_path only once and make its definition more robust
  2019-06-26 20:02 [Qemu-devel] [PULL 0/4] Trivial patches patches Laurent Vivier
@ 2019-06-26 20:02 ` Laurent Vivier
  2019-06-26 20:02 ` [Qemu-devel] [PULL 2/4] configure: disallow spaces and colons in source path and build path Laurent Vivier
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2019-06-26 20:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Antonio Ospite, Michael Tokarev, Laurent Vivier

From: Antonio Ospite <antonio.ospite@collabora.com>

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 <eblake@redhat.com>
Signed-off-by: Antonio Ospite <antonio.ospite@collabora.com>
Message-Id: <20190526144747.30019-2-ao2@ao2.it>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index b091b82cb371..b6962d1381a5 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"
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 2/4] configure: disallow spaces and colons in source path and build path
  2019-06-26 20:02 [Qemu-devel] [PULL 0/4] Trivial patches patches Laurent Vivier
  2019-06-26 20:02 ` [Qemu-devel] [PULL 1/4] configure: set source_path only once and make its definition more robust Laurent Vivier
@ 2019-06-26 20:02 ` Laurent Vivier
  2019-06-26 20:02 ` [Qemu-devel] [PULL 3/4] configure: use valid args testing sem_timedwait Laurent Vivier
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2019-06-26 20:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Antonio Ospite, Michael Tokarev, Laurent Vivier

From: Antonio Ospite <antonio.ospite@collabora.com>

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 <eblake@redhat.com>
Signed-off-by: Antonio Ospite <antonio.ospite@collabora.com>
Message-Id: <20190526144747.30019-3-ao2@ao2.it>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 Makefile  | 4 ++++
 configure | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/Makefile b/Makefile
index cfb18f152544..c62594445d5f 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 b6962d1381a5..cf3d9d30bfce 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"
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 3/4] configure: use valid args testing sem_timedwait
  2019-06-26 20:02 [Qemu-devel] [PULL 0/4] Trivial patches patches Laurent Vivier
  2019-06-26 20:02 ` [Qemu-devel] [PULL 1/4] configure: set source_path only once and make its definition more robust Laurent Vivier
  2019-06-26 20:02 ` [Qemu-devel] [PULL 2/4] configure: disallow spaces and colons in source path and build path Laurent Vivier
@ 2019-06-26 20:02 ` Laurent Vivier
  2019-06-26 20:02 ` [Qemu-devel] [PULL 4/4] MAINTAINERS: Change maintership of Xen code under hw/9pfs Laurent Vivier
  2019-07-01 17:13 ` [Qemu-devel] [PULL 0/4] Trivial patches patches Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2019-06-26 20:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Daniel P. Berrangé, Michael Tokarev, Laurent Vivier

From: Daniel P. Berrangé <berrange@redhat.com>

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é <berrange@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20190617114114.24897-1-berrange@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index cf3d9d30bfce..f94633101094 100755
--- a/configure
+++ b/configure
@@ -5144,7 +5144,7 @@ fi
 sem_timedwait=no
 cat > $TMPC << EOF
 #include <semaphore.h>
-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
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 4/4] MAINTAINERS: Change maintership of Xen code under hw/9pfs
  2019-06-26 20:02 [Qemu-devel] [PULL 0/4] Trivial patches patches Laurent Vivier
                   ` (2 preceding siblings ...)
  2019-06-26 20:02 ` [Qemu-devel] [PULL 3/4] configure: use valid args testing sem_timedwait Laurent Vivier
@ 2019-06-26 20:02 ` Laurent Vivier
  2019-07-01 17:13 ` [Qemu-devel] [PULL 0/4] Trivial patches patches Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2019-06-26 20:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: Stefano Stabellini, qemu-trivial, Michael Tokarev,
	Laurent Vivier, Greg Kurz, Paul Durrant, Anthony PERARD,
	Philippe Mathieu-Daudé

From: Greg Kurz <groug@kaod.org>

Xen folks are the actual maintainers for this.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Message-Id: <155912548463.2019004.3515830305299809902.stgit@bahia.lan>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 MAINTAINERS | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index cad58b948791..8206fc51dbbc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -408,7 +408,7 @@ M: Paul Durrant <paul.durrant@citrix.com>
 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 <groug@kaod.org>
 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
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PULL 0/4] Trivial patches patches
  2019-06-26 20:02 [Qemu-devel] [PULL 0/4] Trivial patches patches Laurent Vivier
                   ` (3 preceding siblings ...)
  2019-06-26 20:02 ` [Qemu-devel] [PULL 4/4] MAINTAINERS: Change maintership of Xen code under hw/9pfs Laurent Vivier
@ 2019-07-01 17:13 ` Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2019-07-01 17:13 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: QEMU Trivial, Michael Tokarev, QEMU Developers

On Wed, 26 Jun 2019 at 21:09, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit 474f3938d79ab36b9231c9ad3b5a9314c2aeacde:
>
>   Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-jun-21-2019' into staging (2019-06-21 15:40:50 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/vivier/qemu.git tags/trivial-patches-pull-request
>
> for you to fetch changes up to b827891d73778eaf962b0536f955194cf4faa424:
>
>   MAINTAINERS: Change maintership of Xen code under hw/9pfs (2019-06-26 18:30:03 +0200)
>
> ----------------------------------------------------------------
> configure improvements and fixes
> MAINTAINERS update
>
> ----------------------------------------------------------------
>



Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-02  1:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 20:02 [Qemu-devel] [PULL 0/4] Trivial patches patches Laurent Vivier
2019-06-26 20:02 ` [Qemu-devel] [PULL 1/4] configure: set source_path only once and make its definition more robust Laurent Vivier
2019-06-26 20:02 ` [Qemu-devel] [PULL 2/4] configure: disallow spaces and colons in source path and build path Laurent Vivier
2019-06-26 20:02 ` [Qemu-devel] [PULL 3/4] configure: use valid args testing sem_timedwait Laurent Vivier
2019-06-26 20:02 ` [Qemu-devel] [PULL 4/4] MAINTAINERS: Change maintership of Xen code under hw/9pfs Laurent Vivier
2019-07-01 17:13 ` [Qemu-devel] [PULL 0/4] Trivial patches patches Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).