Skip to contentSkip to conversation

qemu-ga patch queue for 2.5

GIT PULL Michael Roth 2 participants 6 messages Nov 13, 2015 – Nov 16, 2015

lore
Share & tools
lore
#0 lore raw

The following changes since commit 8337c6cbc37c6b2184f41bab3eaff47d5e68012a:

Update version for v2.5.0-rc0 release (2015-11-13 17:10:36 +0000)

are available in the git repository at:

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

for you to fetch changes up to 8144e432d8c8e801a906c126afc1333985fad0ce:

qga: allow to lookup in PATH from the passed envp for guest-exec (2015-11-13 16:31:32 -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

----------------------------------------------------------------
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

 qga/commands.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
#1 lore raw

[Qemu-devel] [PULL for-2.5 2/2] qga: allow to lookup in PATH from the passed envp for guest-exec

From: Yuri Pudgorodskiy <[email protected]>

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

---
 qga/commands.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
qga/commands.c +2 -1
index 7644ca0..559f18f 100644
@@ -400,7 +400,8 @@ GuestExec *qmp_guest_exec(const char *path,
     argv = guest_exec_get_args(&arglist, true);
     envp = has_env ? guest_exec_get_args(env, false) : NULL;
 
-    flags = G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD;
+    flags = G_SPAWN_SEARCH_PATH | G_SPAWN_SEARCH_PATH_FROM_ENVP |
+        G_SPAWN_DO_NOT_REAP_CHILD;
     if (!has_output) {
         flags |= G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL;
     }
Signature · 1 line
1.9.1
#3 lore raw

[Qemu-devel] [PULL for-2.5 1/2] qga: fix for default env processing for guest-exec

In reply to Michael Roth

From: Yuri Pudgorodskiy <[email protected]>

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.

---
 qga/commands.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qga/commands.c +1 -1
index 0f80ce6..7644ca0 100644
@@ -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) {
Signature · 1 line
1.9.1
#2 lore raw

Re: [Qemu-devel] [PULL for-2.5 2/2] qga: allow to lookup in PATH from the passed envp for guest-exec

In reply to Michael Roth

Quoting Michael Roth (2015-11-13 16:40:04)

Quoted 18 lines

From: Yuri Pudgorodskiy <[email protected]>

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

---
 qga/commands.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
qga/commands.c +0 -0
index 7644ca0..559f18f 100644

qga/commands.c GuestExec *qmp_guest_exec(const char *path, · line 403

Quoted 5 lines
qga/commands.c +1 -1
@@ -400,7 +400,8 @@ GuestExec *qmp_guest_exec(const char *path,
     argv = guest_exec_get_args(&arglist, true);
     envp = has_env ? guest_exec_get_args(env, false) : NULL;
 
-    flags = G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD;
+    flags = G_SPAWN_SEARCH_PATH | G_SPAWN_SEARCH_PATH_FROM_ENVP |

Sorry, just noticed this was only added around 2.33. I'll send updated PULL that adds a version check.

Quoted 7 lines
qga/commands.c +1 -0
+        G_SPAWN_DO_NOT_REAP_CHILD;
     if (!has_output) {
         flags |= G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL;
     }
Signature · 1 line
1.9.1
#4 lore raw
In reply to Michael Roth
Quoted 15 lines · Michael Roth

The following changes since commit 8337c6cbc37c6b2184f41bab3eaff47d5e68012a:

Update version for v2.5.0-rc0 release (2015-11-13 17:10:36 +0000)

are available in the git repository at:

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

for you to fetch changes up to 8144e432d8c8e801a906c126afc1333985fad0ce:

qga: allow to lookup in PATH from the passed envp for guest-exec (2015-11-13 16:31:32 -0600)

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

Quoted 6 lines

* 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

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

Hi. I'm afraid this doesn't build against our minimum supported glib version:

/Users/pm215/src/qemu-for-merges/qga/commands.c:403:35: error: use of undeclared identifier 'G_SPAWN_SEARCH_PATH_FROM_ENVP'

Looks like that feature was only added in glib 2.34 or thereabouts.

thanks
-- PMM

#5 lore raw

Quoting Peter Maydell (2015-11-16 06:09:17)

Quoted 23 lines · Michael Roth
Quoted 15 lines

The following changes since commit 8337c6cbc37c6b2184f41bab3eaff47d5e68012a:

Update version for v2.5.0-rc0 release (2015-11-13 17:10:36 +0000)

are available in the git repository at:

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

for you to fetch changes up to 8144e432d8c8e801a906c126afc1333985fad0ce:

qga: allow to lookup in PATH from the passed envp for guest-exec (2015-11-13 16:31:32 -0600)

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

Quoted 6 lines

* 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

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

Quoted 7 lines

Hi. I'm afraid this doesn't build against our minimum supported glib version:

/Users/pm215/src/qemu-for-merges/qga/commands.c:403:35: error: use of undeclared identifier 'G_SPAWN_SEARCH_PATH_FROM_ENVP'

Looks like that feature was only added in glib 2.34 or thereabouts.

Sorry, I noticed this after submitting. I commented on it in response to patch 2, but probably should've posted a top-level reply.

I've added a version check (it appears to be 2.33.2) in v2, but I'm trying to get 1 more qga fix ("makefile: fix w32 install target for qemu-ga") in before resubmitting.

Quoted 4 lines

thanks
-- PMM