qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] fafcaf: build: qemu-ga: add 'qemu-ga' build t


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] fafcaf: build: qemu-ga: add 'qemu-ga' build target for w32
Date: Tue, 20 Oct 2015 03:00:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: fafcaf1d7434bd3a44a5cd6a98594b3ec12d83de
      
https://github.com/qemu/qemu/commit/fafcaf1d7434bd3a44a5cd6a98594b3ec12d83de
  Author: Michael Roth <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M Makefile
    M configure

  Log Message:
  -----------
  build: qemu-ga: add 'qemu-ga' build target for w32

Currently POSIX builds rely on 'qemu-ga' target to do qga-only
distributable build. On w32, as with most standalone binary targets,
we rely on 'qemu-ga.exe' target.

Unlike with POSIX, qemu-ga for w32 has a number of related targets
such as VSS DLL and MSI package. We can do the full distributable
qga-only build on w32 with:

  make qemu-ga.exe

or:

  make msi

To make that work, we tie VSS dependencies onto qemu-ga.exe.
However, in reality the DLL isn't part of the binary, so we use a
filter to pull them out of the LINK recipe, which attempts to link
against prereqs for binary targets. Additionally, it could be argued
that VSS is a separate distributable, and shouldn't be implied by
qemu-ga.exe binary target.

To avoid this, we can tie the VSS dependencies only to the 'msi'
target, but that would make it impossible to do a qga-only build of
the w32 distributable without building the 'msi' package, which was
supported in the past.

An alternative approach is to add a new target to build the whole
distributable. w32 allows us to use the same build target we use
on POSIX, 'qemu-ga', since the current binary-only target on w32
is 'qemu-ga.exe'.

To further simplify the build, we also make 'qemu-ga' build the MSI
package if the appropriate ./configure options are set, making the
full qga-only build the same on both POSIX and w32: `make qemu-ga`

Cc: Paolo Bonzini <address@hidden>
Cc: Marc-André Lureau <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: f3a06403b82c7f036564e4caf18b52ce6885fcfb
      
https://github.com/qemu/qemu/commit/f3a06403b82c7f036564e4caf18b52ce6885fcfb
  Author: Markus Armbruster <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/channel-posix.c
    M qga/channel-win32.c
    M qga/commands-posix.c
    M qga/commands-win32.c
    M qga/commands.c
    M qga/guest-agent-command-state.c

  Log Message:
  -----------
  qga: Use g_new() & friends where that makes obvious sense

g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
for two reasons.  One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.

This commit only touches allocations with size arguments of the form
sizeof(T).  Same Coccinelle semantic patch as in commit b45c03f.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: 8e34bf364ae518503642d28bdd43661090ae21bd
      
https://github.com/qemu/qemu/commit/8e34bf364ae518503642d28bdd43661090ae21bd
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/main.c

  Log Message:
  -----------
  qga: add QGA_CONF environment variable

Having a environment variable allows to override default configuration
path, useful for testing. Note that this can't easily be an argument,
since loading config is done before parsing the arguments.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: 6eaeae37a5fdd0a1ef88ed9ab4b807669ffc0e2d
      
https://github.com/qemu/qemu/commit/6eaeae37a5fdd0a1ef88ed9ab4b807669ffc0e2d
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/main.c

  Log Message:
  -----------
  qga: do not override configuration verbosity

Move the default verbosity settings before loading the configuration
file, or it will overwrite it. Found thanks to writing qga tests :)

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: dc47995e525c386f893b6e023da6b819f9975ece
      
https://github.com/qemu/qemu/commit/dc47995e525c386f893b6e023da6b819f9975ece
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M tests/libqtest.c
    M tests/libqtest.h

  Log Message:
  -----------
  qtest: add a few fd-level qmp helpers

Add a few functions to interact with qmp via a simple fd.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: 8a0b5421a09ab9b9567300c554d3e169f28fc09d
      
https://github.com/qemu/qemu/commit/8a0b5421a09ab9b9567300c554d3e169f28fc09d
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M include/glib-compat.h

  Log Message:
  -----------
  glib-compat: add 2.38/2.40/2.46 asserts

Those are mostly useful for writing tests.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: f693fe6ef402bdcf89b3979bf004c4c5bf646724
      
https://github.com/qemu/qemu/commit/f693fe6ef402bdcf89b3979bf004c4c5bf646724
  Author: Michael Roth <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/commands-posix.c

  Log Message:
  -----------
  qga: guest-get-memory-blocks shouldn't fail for unexposed memory blocks

Some guests don't expose memory blocks via sysfs at all. This
shouldn't be a failure, instead just return an empty list. For
other access failures we still report an error.

Signed-off-by: Michael Roth <address@hidden>


  Commit: 62c39b307b3a946f9df4f11396bfeced120c040f
      
https://github.com/qemu/qemu/commit/62c39b307b3a946f9df4f11396bfeced120c040f
  Author: Marc-André Lureau <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M tests/Makefile
    A tests/test-qga.c

  Log Message:
  -----------
  tests: add a local test for guest agent

Add some local guest agent tests, as it is better than nothing, only
when CONFIG_POSIX (using unix sockets).

With the QGA_TEST_SIDE_EFFECTING environment variable, it will include
tests with side effects, such as freezing/thawing the FS or changing the
time.

(a better test would involve a managed VM (or container), but it might
be better to leave that off to autotest/avocado)

Signed-off-by: Marc-André Lureau <address@hidden>
* use mkdtemp() in placeof g_mkdtemp() for glib 2.22 compat
* drop redundant/conflicting compat defines for
  g_assert_{true,false}, since glib-compat has them now.
* build fixes for OSX: use PRId64 instead of glib formats, drop
  g_spawn_default usage for glib compat
* assert connect_qga() doesn't fail
* only enable test-qga for linux hosts
* allow get-memory-block-info* to fail
Signed-off-by: Michael Roth <address@hidden>


  Commit: b4fe97c8230c34ebd407a9f23894b9c614807540
      
https://github.com/qemu/qemu/commit/b4fe97c8230c34ebd407a9f23894b9c614807540
  Author: Denis V. Lunev <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/commands-posix.c
    M qga/commands-win32.c

  Log Message:
  -----------
  qga: drop guest_file_init helper and replace it with static initializers

This just makes code shorter and better.

Signed-off-by: Denis V. Lunev <address@hidden>
Signed-off-by: Yuri Pudgorodskiy <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: d697e30cfff29a6a72e3197a218294ba52e7f0c6
      
https://github.com/qemu/qemu/commit/d697e30cfff29a6a72e3197a218294ba52e7f0c6
  Author: Yuri Pudgorodskiy <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/commands.c
    M qga/qapi-schema.json

  Log Message:
  -----------
  qga: guest exec functionality

Guest-exec rewritten in platform-independent style with glib spawn.

Child process is spawn asynchronously and exit status can later
be picked up by guest-exec-status command.

stdin/stdout/stderr of the child now is redirected to /dev/null
Later we will add ability to specify stdin in guest-exec command
and to get collected stdout/stderr with guest-exec-status.

Signed-off-by: Yuri Pudgorodskiy <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
CC: Michael Roth <address@hidden>
* use g_new0 in place of g_malloc for GuestExec struct
* commit msg spelling fixes
* s/inp-data/input-data
* document capture-input mode as false by default
* use GetProcessId() for pids on w32 instead of casting HANDLE
Signed-off-by: Michael Roth <address@hidden>


  Commit: 4005b4732e40d3d583510db89ee204b834022d20
      
https://github.com/qemu/qemu/commit/4005b4732e40d3d583510db89ee204b834022d20
  Author: Denis V. Lunev <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/commands.c
    M qga/main.c

  Log Message:
  -----------
  qga: handle possible SIGPIPE in guest-file-write

qemu-ga should not exit on guest-file-write to pipe without read end
but proper error code should be returned. The behavior of the
spawned process should be default thus SIGPIPE processing should be
reset to default after fork() but before exec().

Signed-off-by: Denis V. Lunev <address@hidden>
Signed-off-by: Yuri Pudgorodskiy <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: f74df9bfce6d133fc64d6b878327849ed2b89b4b
      
https://github.com/qemu/qemu/commit/f74df9bfce6d133fc64d6b878327849ed2b89b4b
  Author: Yuri Pudgorodskiy <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/channel-posix.c

  Log Message:
  -----------
  qga: handle G_IO_STATUS_AGAIN in ga_channel_write_all()

glib may return G_IO_STATUS_AGAIN which is actually not an error.
Also fixed a bug when on incomplete write buf pointer was not adjusted.

Signed-off-by: Yuri Pudgorodskiy <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Signed-off-by: Michael Roth <address@hidden>


  Commit: a1853dca74362551ec1434b2e15acfcdd53caa99
      
https://github.com/qemu/qemu/commit/a1853dca74362551ec1434b2e15acfcdd53caa99
  Author: Yuri Pudgorodskiy <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/commands.c
    M qga/qapi-schema.json

  Log Message:
  -----------
  qga: guest-exec simple stdin/stdout/stderr redirection

Implemented with base64-encoded strings in qga json protocol.
Glib portable GIOChannel is used for data I/O.

Optinal stdin parameter of guest-exec command is now used as
stdin content for spawned subprocess.

If capture-output bool flag is specified, guest-exec redirects out/err
file descriptiors internally to pipes and collects subprocess
output.

Guest-exe-status is modified to return this collected data to requestor
in base64 encoding.

Signed-off-by: Yuri Pudgorodskiy <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
* switch from 'struct GuestIOExecData' to 'GuestIOExecData'
* s/TRUE/true/g, s/FALSE/false/g for gboolean return values
* s/inp_data/input_data/
Signed-off-by: Michael Roth <address@hidden>


  Commit: e853ea1cc68716c3d9c22d04578020c6dd743306
      
https://github.com/qemu/qemu/commit/e853ea1cc68716c3d9c22d04578020c6dd743306
  Author: Michael Roth <address@hidden>
  Date:   2015-10-19 (Mon, 19 Oct 2015)

  Changed paths:
    M qga/channel-win32.c

  Log Message:
  -----------
  qga: fix uninitialized value warning for win32

Signed-off-by: Michael Roth <address@hidden>


  Commit: f52dd72dc1a679529e13e51a7b57e787455f92f0
      
https://github.com/qemu/qemu/commit/f52dd72dc1a679529e13e51a7b57e787455f92f0
  Author: Peter Maydell <address@hidden>
  Date:   2015-10-20 (Tue, 20 Oct 2015)

  Changed paths:
    M Makefile
    M configure
    M include/glib-compat.h
    M qga/channel-posix.c
    M qga/channel-win32.c
    M qga/commands-posix.c
    M qga/commands-win32.c
    M qga/commands.c
    M qga/guest-agent-command-state.c
    M qga/main.c
    M qga/qapi-schema.json
    M tests/Makefile
    M tests/libqtest.c
    M tests/libqtest.h
    A tests/test-qga.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-10-14-v4-tag' 
into staging

qemu-ga patch queue

* add unit tests for qemu-ga
* add guest-exec support for posix/w32 guests
* added 'qemu-ga' target for w32. this allows us to do full MSI build,
  without overloading 'qemu-ga.exe' target with uneeded dependencies.
* number of s/g_new/g_malloc/ conversions for qga

v2:
* commit message and qapi documentation spelling fixes
* rename 'inp-data' guest-exec param to 'input-data'

v3:
* fix OSX build errors for test-qga by using PRId64
  format in place of glib's, and dropping use of G_SPAWN_DEFAULT
  macro for glib 2.22 compat
* fix win32 build warnings for 32-bit builds by avoid int casts
  of process HANDLEs

v4:
* assert connect_qga() doesn't fail
* only enable test-qga for linux hosts
* allow get-memory-block-info* to fail if memory blocks aren't exposed in
  sysfs

# gpg: Signature made Tue 20 Oct 2015 00:33:43 BST using RSA key ID F108B584
# gpg: Good signature from "Michael Roth <address@hidden>"
# gpg:                 aka "Michael Roth <address@hidden>"
# gpg:                 aka "Michael Roth <address@hidden>"

* remotes/mdroth/tags/qga-pull-2015-10-14-v4-tag:
  qga: fix uninitialized value warning for win32
  qga: guest-exec simple stdin/stdout/stderr redirection
  qga: handle G_IO_STATUS_AGAIN in ga_channel_write_all()
  qga: handle possible SIGPIPE in guest-file-write
  qga: guest exec functionality
  qga: drop guest_file_init helper and replace it with static initializers
  tests: add a local test for guest agent
  qga: guest-get-memory-blocks shouldn't fail for unexposed memory blocks
  glib-compat: add 2.38/2.40/2.46 asserts
  qtest: add a few fd-level qmp helpers
  qga: do not override configuration verbosity
  qga: add QGA_CONF environment variable
  qga: Use g_new() & friends where that makes obvious sense
  build: qemu-ga: add 'qemu-ga' build target for w32

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/26c7be842637...f52dd72dc1a6

reply via email to

[Prev in Thread] Current Thread [Next in Thread]