qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5
@ 2015-11-17 23:06 Michael Roth
  2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 1/3] qga: fix for default env processing for guest-exec Michael Roth
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Michael Roth @ 2015-11-17 23:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

The following changes since commit c27e9014d56fa4880e7d741275d887c3a5949997:

  Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20151116-1' into staging (2015-11-17 12:34:07 +0000)

are available in the git repository at:


  git://github.com/mdroth/qemu.git tags/qga-pull-2015-11-13-v2-tag

for you to fetch changes up to ab59e3ecb2c12fafa89f7bedca7d329a078f3870:

  makefile: fix w32 install target for qemu-ga (2015-11-17 16:32:27 -0600)

----------------------------------------------------------------
qemu-ga patch queue for 2.5

* fixes for guest-exec gspawn() usage:
  - inherit default lookup path by default instead of
    explicitly defining it as being empty.
  - don't inherit default PATH when PATH/ENV are explicit

v2:

* added fix for w32 'make install' target
* added version check for new g_spawn() flag

----------------------------------------------------------------
Michael Roth (1):
      makefile: fix w32 install target for qemu-ga

Yuri Pudgorodskiy (2):
      qga: fix for default env processing for guest-exec
      qga: allow to lookup in PATH from the passed envp for guest-exec

 Makefile       | 5 ++++-
 qga/commands.c | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

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

* [Qemu-devel] [PULL for-2.5 1/3] qga: fix for default env processing for guest-exec
  2015-11-17 23:06 [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5 Michael Roth
@ 2015-11-17 23:06 ` Michael Roth
  2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 2/3] qga: allow to lookup in PATH from the passed envp " Michael Roth
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Roth @ 2015-11-17 23:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Yuri Pudgorodskiy, Michael Roth, Denis V. Lunev

From: Yuri Pudgorodskiy <yur@virtuozzo.com>

envp == NULL must be passed inside gspawn() if it was not passed with
the command line. Original code inherits environment from the QGA,
which is wrong.

Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/commands.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qga/commands.c b/qga/commands.c
index 0f80ce6..7644ca0 100644
--- a/qga/commands.c
+++ b/qga/commands.c
@@ -398,7 +398,7 @@ GuestExec *qmp_guest_exec(const char *path,
     arglist.next = has_arg ? arg : NULL;
 
     argv = guest_exec_get_args(&arglist, true);
-    envp = guest_exec_get_args(has_env ? env : NULL, false);
+    envp = has_env ? guest_exec_get_args(env, false) : NULL;
 
     flags = G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD;
     if (!has_output) {
-- 
1.9.1

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

* [Qemu-devel] [PULL for-2.5 2/3] qga: allow to lookup in PATH from the passed envp for guest-exec
  2015-11-17 23:06 [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5 Michael Roth
  2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 1/3] qga: fix for default env processing for guest-exec Michael Roth
@ 2015-11-17 23:06 ` Michael Roth
  2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 3/3] makefile: fix w32 install target for qemu-ga Michael Roth
  2015-11-18 13:15 ` [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5 Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Roth @ 2015-11-17 23:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Yuri Pudgorodskiy, Michael Roth, Denis V. Lunev

From: Yuri Pudgorodskiy <yur@virtuozzo.com>

This was original behaviour before GLIB gspawn() rework and we rely on
this behaviour.

Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
* add version check (2.33.2) for G_SPAWN_SEARCH_PATH_FROM_ENVP
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qga/commands.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/qga/commands.c b/qga/commands.c
index 7644ca0..bb73e7d 100644
--- a/qga/commands.c
+++ b/qga/commands.c
@@ -401,6 +401,9 @@ GuestExec *qmp_guest_exec(const char *path,
     envp = has_env ? guest_exec_get_args(env, false) : NULL;
 
     flags = G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD;
+#if GLIB_CHECK_VERSION(2, 33, 2)
+    flags |= G_SPAWN_SEARCH_PATH_FROM_ENVP;
+#endif
     if (!has_output) {
         flags |= G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL;
     }
-- 
1.9.1

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

* [Qemu-devel] [PULL for-2.5 3/3] makefile: fix w32 install target for qemu-ga
  2015-11-17 23:06 [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5 Michael Roth
  2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 1/3] qga: fix for default env processing for guest-exec Michael Roth
  2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 2/3] qga: allow to lookup in PATH from the passed envp " Michael Roth
@ 2015-11-17 23:06 ` Michael Roth
  2015-11-18 13:15 ` [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5 Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Roth @ 2015-11-17 23:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Michael Roth, Paolo Bonzini

fafcaf1 added a 'qemu-ga' install target on w32, which can be used
in place of the existing qemu-ga.exe target to also handle dealing
with other components such as DLLs for VSS/fsfreeze and generating
an MSI package if appropriate configure options are present.

As part of that, qemu-ga$(EXESUF) was removed from $TOOLS in favor
of this new qemu-ga target.

The install rule however relies on a direct mapping of the $TOOLS
entry to the actual resulting binary. In the case of w32, qemu-ga
is not identical to qemu-ga$(EXESUF), and the install recipe fails
to find the 'qemu-ga' binary.

Fix this by essentially remapping 'qemu-ga' back to 'qemu-ga.exe'
in the install recipe.

This raises the question of whether or not qemu-ga should continue
to live in TOOLS as opposed to its own special target, but as a
late fix for a regression in 2.5 this commit should be safer, since
we rely on qemu-ga's presence in $TOOLS in several places throughout
Makefile.

Reported-by: Stefan Weil <sw@weilnetz.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index fc1f8bb..c7fa427 100644
--- a/Makefile
+++ b/Makefile
@@ -440,7 +440,10 @@ endif
 install: all $(if $(BUILD_DOCS),install-doc) \
 install-datadir install-localstatedir
 ifneq ($(TOOLS),)
-	$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
+	$(call install-prog,$(filter-out qemu-ga,$(TOOLS)),$(DESTDIR)$(bindir))
+ifneq (,$(findstring qemu-ga,$(TOOLS)))
+	$(call install-prog,qemu-ga$(EXESUF),$(DESTDIR)$(bindir))
+endif
 endif
 ifneq ($(CONFIG_MODULES),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)"
-- 
1.9.1

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

* Re: [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5
  2015-11-17 23:06 [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5 Michael Roth
                   ` (2 preceding siblings ...)
  2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 3/3] makefile: fix w32 install target for qemu-ga Michael Roth
@ 2015-11-18 13:15 ` Peter Maydell
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2015-11-18 13:15 UTC (permalink / raw)
  To: Michael Roth; +Cc: QEMU Developers

On 17 November 2015 at 23:06, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> The following changes since commit c27e9014d56fa4880e7d741275d887c3a5949997:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20151116-1' into staging (2015-11-17 12:34:07 +0000)
>
> are available in the git repository at:
>
>
>   git://github.com/mdroth/qemu.git tags/qga-pull-2015-11-13-v2-tag
>
> for you to fetch changes up to ab59e3ecb2c12fafa89f7bedca7d329a078f3870:
>
>   makefile: fix w32 install target for qemu-ga (2015-11-17 16:32:27 -0600)
>
> ----------------------------------------------------------------
> qemu-ga patch queue for 2.5
>
> * fixes for guest-exec gspawn() usage:
>   - inherit default lookup path by default instead of
>     explicitly defining it as being empty.
>   - don't inherit default PATH when PATH/ENV are explicit
>
> v2:
>
> * added fix for w32 'make install' target
> * added version check for new g_spawn() flag
>
> ----------------------------------------------------------------
> Michael Roth (1):
>       makefile: fix w32 install target for qemu-ga
>
> Yuri Pudgorodskiy (2):
>       qga: fix for default env processing for guest-exec
>       qga: allow to lookup in PATH from the passed envp for guest-exec
>
>  Makefile       | 5 ++++-
>  qga/commands.c | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
>

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2015-11-18 13:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 23:06 [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5 Michael Roth
2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 1/3] qga: fix for default env processing for guest-exec Michael Roth
2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 2/3] qga: allow to lookup in PATH from the passed envp " Michael Roth
2015-11-17 23:06 ` [Qemu-devel] [PULL for-2.5 3/3] makefile: fix w32 install target for qemu-ga Michael Roth
2015-11-18 13:15 ` [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5 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).