* [PULL v2 1/6] qga:/qga-win: adding a empty PCI address creation function
2022-12-17 9:07 [PULL v2 0/6] QEMU Guest Agent misc patches Konstantin Kostiuk
@ 2022-12-17 9:07 ` Konstantin Kostiuk
2022-12-17 9:07 ` [PULL v2 2/6] qga:/qga-win: skip getting pci info for USB disks Konstantin Kostiuk
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Konstantin Kostiuk @ 2022-12-17 9:07 UTC (permalink / raw)
To: qemu-devel, Peter Maydell, Daniel P . Berrangé
From: Kfir Manor <kfir@daynix.com>
Refactoring code to avoid duplication of creating an empty PCI address code.
Signed-off-by: Kfir Manor <kfir@daynix.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
qga/commands-win32.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 4df50ea710..bd0f3cccfe 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -596,6 +596,18 @@ static void get_pci_address_for_device(GuestPCIAddress *pci,
}
}
+static GuestPCIAddress *get_empty_pci_address(void)
+{
+ GuestPCIAddress *pci = NULL;
+
+ pci = g_malloc0(sizeof(*pci));
+ pci->domain = -1;
+ pci->slot = -1;
+ pci->function = -1;
+ pci->bus = -1;
+ return pci;
+}
+
static GuestPCIAddress *get_pci_info(int number, Error **errp)
{
HDEVINFO dev_info = INVALID_HANDLE_VALUE;
@@ -605,13 +617,7 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
SP_DEVICE_INTERFACE_DATA dev_iface_data;
HANDLE dev_file;
int i;
- GuestPCIAddress *pci = NULL;
-
- pci = g_malloc0(sizeof(*pci));
- pci->domain = -1;
- pci->slot = -1;
- pci->function = -1;
- pci->bus = -1;
+ GuestPCIAddress *pci = get_empty_pci_address();
dev_info = SetupDiGetClassDevs(&GUID_DEVINTERFACE_DISK, 0, 0,
DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL v2 2/6] qga:/qga-win: skip getting pci info for USB disks
2022-12-17 9:07 [PULL v2 0/6] QEMU Guest Agent misc patches Konstantin Kostiuk
2022-12-17 9:07 ` [PULL v2 1/6] qga:/qga-win: adding a empty PCI address creation function Konstantin Kostiuk
@ 2022-12-17 9:07 ` Konstantin Kostiuk
2022-12-17 9:07 ` [PULL v2 3/6] qga: Add initial OpenBSD and NetBSD support Konstantin Kostiuk
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Konstantin Kostiuk @ 2022-12-17 9:07 UTC (permalink / raw)
To: qemu-devel, Peter Maydell, Daniel P . Berrangé
From: Kfir Manor <kfir@daynix.com>
Skip getting PCI info from disks type USB and give them an empty PCI address instead.
Signed-off-by: Kfir Manor <kfir@daynix.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
qga/commands-win32.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index bd0f3cccfe..b5fee6a2cd 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -874,10 +874,14 @@ static void get_single_disk_info(int disk_number,
* if that doesn't hold since that suggests some other unexpected
* breakage
*/
- disk->pci_controller = get_pci_info(disk_number, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- goto err_close;
+ if (disk->bus_type == GUEST_DISK_BUS_TYPE_USB) {
+ disk->pci_controller = get_empty_pci_address();
+ } else {
+ disk->pci_controller = get_pci_info(disk_number, &local_err);
+ if (local_err) {
+ error_propagate(errp, local_err);
+ goto err_close;
+ }
}
if (disk->bus_type == GUEST_DISK_BUS_TYPE_SCSI
|| disk->bus_type == GUEST_DISK_BUS_TYPE_IDE
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL v2 3/6] qga: Add initial OpenBSD and NetBSD support
2022-12-17 9:07 [PULL v2 0/6] QEMU Guest Agent misc patches Konstantin Kostiuk
2022-12-17 9:07 ` [PULL v2 1/6] qga:/qga-win: adding a empty PCI address creation function Konstantin Kostiuk
2022-12-17 9:07 ` [PULL v2 2/6] qga:/qga-win: skip getting pci info for USB disks Konstantin Kostiuk
@ 2022-12-17 9:07 ` Konstantin Kostiuk
2022-12-17 9:07 ` [PULL v2 4/6] qga-win: add logging to Windows event log Konstantin Kostiuk
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Konstantin Kostiuk @ 2022-12-17 9:07 UTC (permalink / raw)
To: qemu-devel, Peter Maydell, Daniel P . Berrangé
From: Brad Smith <brad@comstyle.com>
qga: Add initial OpenBSD and NetBSD support
Signed-off-by: Brad Smith <brad@comstyle.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
meson.build | 2 +-
qga/commands-bsd.c | 5 +++++
qga/commands-posix.c | 9 +++++++--
qga/main.c | 6 +++---
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/meson.build b/meson.build
index 5c6b5a1c75..4c6f8a674a 100644
--- a/meson.build
+++ b/meson.build
@@ -75,7 +75,7 @@ have_tools = get_option('tools') \
.allowed()
have_ga = get_option('guest_agent') \
.disable_auto_if(not have_system and not have_tools) \
- .require(targetos in ['sunos', 'linux', 'windows', 'freebsd'],
+ .require(targetos in ['sunos', 'linux', 'windows', 'freebsd', 'netbsd', 'openbsd'],
error_message: 'unsupported OS for QEMU guest agent') \
.allowed()
have_block = have_system or have_tools
diff --git a/qga/commands-bsd.c b/qga/commands-bsd.c
index 15cade2d4c..17bddda1cf 100644
--- a/qga/commands-bsd.c
+++ b/qga/commands-bsd.c
@@ -21,7 +21,12 @@
#include <sys/ucred.h>
#include <sys/mount.h>
#include <net/if_dl.h>
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+#include <net/if_arp.h>
+#include <netinet/if_ether.h>
+#else
#include <net/ethernet.h>
+#endif
#include <paths.h>
#if defined(CONFIG_FSFREEZE) || defined(CONFIG_FSTRIM)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 1a28326ec7..b19b9c5d18 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -45,7 +45,12 @@
#include <arpa/inet.h>
#include <sys/socket.h>
#include <net/if.h>
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+#include <net/if_arp.h>
+#include <netinet/if_ether.h>
+#else
#include <net/ethernet.h>
+#endif
#include <sys/types.h>
#ifdef CONFIG_SOLARIS
#include <sys/sockio.h>
@@ -2872,7 +2877,7 @@ static int guest_get_network_stats(const char *name,
return -1;
}
-#ifndef __FreeBSD__
+#ifndef CONFIG_BSD
/*
* Fill "buf" with MAC address by ifaddrs. Pointer buf must point to a
* buffer with ETHER_ADDR_LEN length at least.
@@ -2921,7 +2926,7 @@ bool guest_get_hw_addr(struct ifaddrs *ifa, unsigned char *buf,
close(sock);
return true;
}
-#endif /* __FreeBSD__ */
+#endif /* CONFIG_BSD */
/*
* Build information about guest interfaces
diff --git a/qga/main.c b/qga/main.c
index b3580508fa..0865c992f0 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -40,11 +40,11 @@
#include "commands-common.h"
#ifndef _WIN32
-#ifdef __FreeBSD__
+#ifdef CONFIG_BSD
#define QGA_VIRTIO_PATH_DEFAULT "/dev/vtcon/org.qemu.guest_agent.0"
-#else /* __FreeBSD__ */
+#else /* CONFIG_BSD */
#define QGA_VIRTIO_PATH_DEFAULT "/dev/virtio-ports/org.qemu.guest_agent.0"
-#endif /* __FreeBSD__ */
+#endif /* CONFIG_BSD */
#define QGA_SERIAL_PATH_DEFAULT "/dev/ttyS0"
#define QGA_STATE_RELATIVE_DIR "run"
#else
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL v2 4/6] qga-win: add logging to Windows event log
2022-12-17 9:07 [PULL v2 0/6] QEMU Guest Agent misc patches Konstantin Kostiuk
` (2 preceding siblings ...)
2022-12-17 9:07 ` [PULL v2 3/6] qga: Add initial OpenBSD and NetBSD support Konstantin Kostiuk
@ 2022-12-17 9:07 ` Konstantin Kostiuk
2022-12-17 9:07 ` [PULL v2 5/6] qga: map GLib log levels to system levels Konstantin Kostiuk
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Konstantin Kostiuk @ 2022-12-17 9:07 UTC (permalink / raw)
To: qemu-devel, Peter Maydell, Daniel P . Berrangé
From: Andrey Drobyshev via <qemu-devel@nongnu.org>
This commit allows QGA to write to Windows event log using Win32 API's
ReportEvent() [1], much like syslog() under *nix guests.
In order to generate log message definitions we use a very basic message
text file [2], so that every QGA's message gets ID 1. The tools
"windmc" and "windres" respectively are used to generate ".rc" file and
COFF object file, and then the COFF file is linked into qemu-ga.exe.
[1] https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-reporteventa
[2] https://learn.microsoft.com/en-us/windows/win32/eventlog/message-text-files
Originally-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Tested-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
configure | 3 +++
qga/installer/qemu-ga.wxs | 5 +++++
qga/main.c | 16 +++++++++++++---
qga/meson.build | 19 ++++++++++++++++++-
qga/messages-win32.mc | 9 +++++++++
5 files changed, 48 insertions(+), 4 deletions(-)
create mode 100644 qga/messages-win32.mc
diff --git a/configure b/configure
index 26c7bc5154..789a4f6cc9 100755
--- a/configure
+++ b/configure
@@ -372,6 +372,7 @@ smbd="$SMBD"
strip="${STRIP-${cross_prefix}strip}"
widl="${WIDL-${cross_prefix}widl}"
windres="${WINDRES-${cross_prefix}windres}"
+windmc="${WINDMC-${cross_prefix}windmc}"
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
query_pkg_config() {
"${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@"
@@ -2561,6 +2562,7 @@ if test "$skip_meson" = no; then
echo "strip = [$(meson_quote $strip)]" >> $cross
echo "widl = [$(meson_quote $widl)]" >> $cross
echo "windres = [$(meson_quote $windres)]" >> $cross
+ echo "windmc = [$(meson_quote $windmc)]" >> $cross
if test "$cross_compile" = "yes"; then
cross_arg="--cross-file config-meson.cross"
echo "[host_machine]" >> $cross
@@ -2667,6 +2669,7 @@ preserve_env SMBD
preserve_env STRIP
preserve_env WIDL
preserve_env WINDRES
+preserve_env WINDMC
printf "exec" >>config.status
for i in "$0" "$@"; do
diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
index 813d1c6ca6..e344c38e74 100644
--- a/qga/installer/qemu-ga.wxs
+++ b/qga/installer/qemu-ga.wxs
@@ -110,6 +110,11 @@
<RegistryValue Type="string" Name="ProductID" Value="fb0a0d66-c7fb-4e2e-a16b-c4a3bfe8d13b" />
<RegistryValue Type="string" Name="Version" Value="$(var.QEMU_GA_VERSION)" />
</RegistryKey>
+ <RegistryKey Root="HKLM"
+ Key="System\CurrentControlSet\Services\EventLog\Application\qemu-ga">
+ <RegistryValue Type="integer" Name="TypesSupported" Value="7" />
+ <RegistryValue Type="string" Name="EventMessageFile" Value="[qemu_ga_directory]qemu-ga.exe" />
+ </RegistryKey>
</Component>
</Directory>
</Directory>
diff --git a/qga/main.c b/qga/main.c
index 0865c992f0..1463a1c170 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -83,6 +83,7 @@ struct GAState {
#ifdef _WIN32
GAService service;
HANDLE wakeup_event;
+ HANDLE event_log;
#endif
bool delimit_response;
bool frozen;
@@ -324,13 +325,14 @@ static void ga_log(const gchar *domain, GLogLevelFlags level,
}
level &= G_LOG_LEVEL_MASK;
-#ifndef _WIN32
if (g_strcmp0(domain, "syslog") == 0) {
+#ifndef _WIN32
syslog(LOG_INFO, "%s: %s", level_str, msg);
- } else if (level & s->log_level) {
#else
- if (level & s->log_level) {
+ ReportEvent(s->event_log, EVENTLOG_INFORMATION_TYPE,
+ 0, 1, NULL, 1, 0, &msg, NULL);
#endif
+ } else if (level & s->log_level) {
g_autoptr(GDateTime) now = g_date_time_new_now_utc();
g_autofree char *nowstr = g_date_time_format(now, "%s.%f");
fprintf(s->log_file, "%s: %s: %s\n", nowstr, level_str, msg);
@@ -1286,6 +1288,13 @@ static GAState *initialize_agent(GAConfig *config, int socket_activation)
g_debug("Guest agent version %s started", QEMU_FULL_VERSION);
#ifdef _WIN32
+ s->event_log = RegisterEventSource(NULL, "qemu-ga");
+ if (!s->event_log) {
+ g_autofree gchar *errmsg = g_win32_error_message(GetLastError());
+ g_critical("unable to register event source: %s", errmsg);
+ return NULL;
+ }
+
/* On win32 the state directory is application specific (be it the default
* or a user override). We got past the command line parsing; let's create
* the directory (with any intermediate directories). If we run into an
@@ -1377,6 +1386,7 @@ static void cleanup_agent(GAState *s)
{
#ifdef _WIN32
CloseHandle(s->wakeup_event);
+ CloseHandle(s->event_log);
#endif
if (s->command_state) {
ga_command_state_cleanup_all(s->command_state);
diff --git a/qga/meson.build b/qga/meson.build
index 3cfb9166e5..1ff159edc1 100644
--- a/qga/meson.build
+++ b/qga/meson.build
@@ -98,7 +98,24 @@ if targetos == 'windows'
endif
endif
-qga = executable('qemu-ga', qga_ss.sources(),
+qga_objs = []
+if targetos == 'windows'
+ windmc = find_program('windmc', required: true)
+ windres = find_program('windres', required: true)
+
+ msgrc = custom_target('messages-win32.rc',
+ input: 'messages-win32.mc',
+ output: ['messages-win32.rc', 'MSG00409.bin', 'messages-win32.h'],
+ command: [windmc, '-h', '@OUTDIR@', '-r', '@OUTDIR@', '@INPUT@'])
+ msgobj = custom_target('messages-win32.o',
+ input: msgrc[0],
+ output: 'messages-win32.o',
+ command: [windres, '-I', '@OUTDIR@', '-o', '@OUTPUT@', '@INPUT@'])
+
+ qga_objs = [msgobj]
+endif
+
+qga = executable('qemu-ga', qga_ss.sources() + qga_objs,
link_args: qga_libs,
dependencies: [qemuutil, libudev],
install: true)
diff --git a/qga/messages-win32.mc b/qga/messages-win32.mc
new file mode 100644
index 0000000000..e21019cebe
--- /dev/null
+++ b/qga/messages-win32.mc
@@ -0,0 +1,9 @@
+LanguageNames=(
+ English=0x409:MSG00409
+)
+
+MessageId=1
+SymbolicName=QEMU_GA_EVENTLOG_GENERAL
+Language=English
+%1
+.
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL v2 5/6] qga: map GLib log levels to system levels
2022-12-17 9:07 [PULL v2 0/6] QEMU Guest Agent misc patches Konstantin Kostiuk
` (3 preceding siblings ...)
2022-12-17 9:07 ` [PULL v2 4/6] qga-win: add logging to Windows event log Konstantin Kostiuk
@ 2022-12-17 9:07 ` Konstantin Kostiuk
2022-12-17 9:07 ` [PULL v2 6/6] qga-win: choose the right libpcre version to include in MSI package Konstantin Kostiuk
2022-12-17 21:20 ` [PULL v2 0/6] QEMU Guest Agent misc patches Peter Maydell
6 siblings, 0 replies; 10+ messages in thread
From: Konstantin Kostiuk @ 2022-12-17 9:07 UTC (permalink / raw)
To: qemu-devel, Peter Maydell, Daniel P . Berrangé
From: Andrey Drobyshev via <qemu-devel@nongnu.org>
This patch translates GLib-specific log levels to system ones, so that
they may be used by both *nix syslog() (as a "priority" argument) and
Windows ReportEvent() (as a "wType" argument).
Currently the only codepath to write to "syslog" domain is slog()
function. However, this patch allows the interface to be extended.
Note that since slog() is using G_LOG_LEVEL_INFO level, its behaviour
doesn't change.
Originally-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Tested-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
qga/main.c | 36 ++++++++++++++++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/qga/main.c b/qga/main.c
index 1463a1c170..85b7d6ced5 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -314,6 +314,38 @@ void ga_enable_logging(GAState *s)
s->logging_enabled = true;
}
+static int glib_log_level_to_system(int level)
+{
+ switch (level) {
+#ifndef _WIN32
+ case G_LOG_LEVEL_ERROR:
+ return LOG_ERR;
+ case G_LOG_LEVEL_CRITICAL:
+ return LOG_CRIT;
+ case G_LOG_LEVEL_WARNING:
+ return LOG_WARNING;
+ case G_LOG_LEVEL_MESSAGE:
+ return LOG_NOTICE;
+ case G_LOG_LEVEL_DEBUG:
+ return LOG_DEBUG;
+ case G_LOG_LEVEL_INFO:
+ default:
+ return LOG_INFO;
+#else
+ case G_LOG_LEVEL_ERROR:
+ case G_LOG_LEVEL_CRITICAL:
+ return EVENTLOG_ERROR_TYPE;
+ case G_LOG_LEVEL_WARNING:
+ return EVENTLOG_WARNING_TYPE;
+ case G_LOG_LEVEL_MESSAGE:
+ case G_LOG_LEVEL_INFO:
+ case G_LOG_LEVEL_DEBUG:
+ default:
+ return EVENTLOG_INFORMATION_TYPE;
+#endif
+ }
+}
+
static void ga_log(const gchar *domain, GLogLevelFlags level,
const gchar *msg, gpointer opaque)
{
@@ -327,9 +359,9 @@ static void ga_log(const gchar *domain, GLogLevelFlags level,
level &= G_LOG_LEVEL_MASK;
if (g_strcmp0(domain, "syslog") == 0) {
#ifndef _WIN32
- syslog(LOG_INFO, "%s: %s", level_str, msg);
+ syslog(glib_log_level_to_system(level), "%s: %s", level_str, msg);
#else
- ReportEvent(s->event_log, EVENTLOG_INFORMATION_TYPE,
+ ReportEvent(s->event_log, glib_log_level_to_system(level),
0, 1, NULL, 1, 0, &msg, NULL);
#endif
} else if (level & s->log_level) {
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL v2 6/6] qga-win: choose the right libpcre version to include in MSI package
2022-12-17 9:07 [PULL v2 0/6] QEMU Guest Agent misc patches Konstantin Kostiuk
` (4 preceding siblings ...)
2022-12-17 9:07 ` [PULL v2 5/6] qga: map GLib log levels to system levels Konstantin Kostiuk
@ 2022-12-17 9:07 ` Konstantin Kostiuk
2022-12-17 21:20 ` [PULL v2 0/6] QEMU Guest Agent misc patches Peter Maydell
6 siblings, 0 replies; 10+ messages in thread
From: Konstantin Kostiuk @ 2022-12-17 9:07 UTC (permalink / raw)
To: qemu-devel, Peter Maydell, Daniel P . Berrangé
From: Andrey Drobyshev via <qemu-devel@nongnu.org>
According to GLib changelog [1], since version 2.73.2 GLib is using
libpcre2 instead of libpcre. As a result, qemu-ga MSI installation
fails due to missing DLL when linked with the newer GLib.
This commit makes wixl to put the right libpcre version into the MSI
bundle: either libpcre-1.dll or libpcre2-8-0.dll, depending on the
present version of GLib.
[1] https://gitlab.gnome.org/GNOME/glib/-/releases#2.73.2
Previous version:
https://lists.nongnu.org/archive/html/qemu-trivial/2022-11/msg00237.html
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Tested-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
qga/installer/qemu-ga.wxs | 12 +++++++++---
qga/meson.build | 6 ++++++
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
index e344c38e74..51340f7ecc 100644
--- a/qga/installer/qemu-ga.wxs
+++ b/qga/installer/qemu-ga.wxs
@@ -101,9 +101,15 @@
<Component Id="libwinpthread" Guid="{6C117C78-0F47-4B07-8F34-6BEE11643829}">
<File Id="libwinpthread_1.dll" Name="libwinpthread-1.dll" Source="$(var.BIN_DIR)/libwinpthread-1.dll" KeyPath="yes" DiskId="1"/>
</Component>
- <Component Id="libpcre" Guid="{7A86B45E-A009-489A-A849-CE3BACF03CD0}">
- <File Id="libpcre_1.dll" Name="libpcre-1.dll" Source="$(var.BIN_DIR)/libpcre-1.dll" KeyPath="yes" DiskId="1"/>
- </Component>
+ <?if $(var.LIBPCRE) = "libpcre1"?>
+ <Component Id="libpcre" Guid="{7A86B45E-A009-489A-A849-CE3BACF03CD0}">
+ <File Id="libpcre_1.dll" Name="libpcre-1.dll" Source="$(var.BIN_DIR)/libpcre-1.dll" KeyPath="yes" DiskId="1"/>
+ </Component>
+ <?else?>
+ <Component Id="libpcre" Guid="{F92A3804-B59C-419D-8F29-99A30352C156}">
+ <File Id="libpcre2_8_0.dll" Name="libpcre2-8-0.dll" Source="$(var.BIN_DIR)/libpcre2-8-0.dll" KeyPath="yes" DiskId="1"/>
+ </Component>
+ <?endif?>
<Component Id="registry_entries" Guid="{D075D109-51CA-11E3-9F8B-000C29858960}">
<RegistryKey Root="HKLM"
Key="Software\$(var.QEMU_GA_MANUFACTURER)\$(var.QEMU_GA_DISTRO)\Tools\QemuGA">
diff --git a/qga/meson.build b/qga/meson.build
index 1ff159edc1..ad17dc7dca 100644
--- a/qga/meson.build
+++ b/qga/meson.build
@@ -140,6 +140,11 @@ if targetos == 'windows'
qemu_ga_msi_vss = ['-D', 'InstallVss']
deps += qga_vss
endif
+ if glib.version() < '2.73.2'
+ libpcre = 'libpcre1'
+ else
+ libpcre = 'libpcre2'
+ endif
qga_msi = custom_target('QGA MSI',
input: files('installer/qemu-ga.wxs'),
output: 'qemu-ga-@0@.msi'.format(host_arch),
@@ -153,6 +158,7 @@ if targetos == 'windows'
'-D', 'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
'-D', 'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
'-D', 'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
+ '-D', 'LIBPCRE=' + libpcre,
])
all_qga += [qga_msi]
alias_target('msi', qga_msi)
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PULL v2 0/6] QEMU Guest Agent misc patches
2022-12-17 9:07 [PULL v2 0/6] QEMU Guest Agent misc patches Konstantin Kostiuk
` (5 preceding siblings ...)
2022-12-17 9:07 ` [PULL v2 6/6] qga-win: choose the right libpcre version to include in MSI package Konstantin Kostiuk
@ 2022-12-17 21:20 ` Peter Maydell
2022-12-19 10:34 ` Konstantin Kostiuk
6 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2022-12-17 21:20 UTC (permalink / raw)
To: Konstantin Kostiuk; +Cc: qemu-devel, Daniel P . Berrangé
On Sat, 17 Dec 2022 at 09:07, Konstantin Kostiuk <kkostiuk@redhat.com> wrote:
>
> The following changes since commit d038d2645acabf6f52fd61baeaa021c3ebe97714:
>
> Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging (2022-12-16 13:26:09 +0000)
>
> are available in the Git repository at:
>
> git@github.com:kostyanf14/qemu.git tags/qga-pull-2022-12-17
>
> for you to fetch changes up to ea5ea85c5894ac220cdb52b3f07c6ad6e4544900:
>
> qga-win: choose the right libpcre version to include in MSI package (2022-12-17 10:53:38 +0200)
>
> ----------------------------------------------------------------
> qga-pull-2022-12-17
>
> v1 -> v2:
> removed 'qga: Add ZFS TRIM support for FreeBSD' series
> that failed to merge
>
> ----------------------------------------------------------------
> Andrey Drobyshev via (3):
> qga-win: add logging to Windows event log
> qga: map GLib log levels to system levels
> qga-win: choose the right libpcre version to include in MSI package
These commits all have an author tag with an email 'qemu-devel@nongnu.org';
you need to fix those up and resend, please. (checkpatch catches this,
if you want to detect this locally.)
thanks
-- PMM
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PULL v2 0/6] QEMU Guest Agent misc patches
2022-12-17 21:20 ` [PULL v2 0/6] QEMU Guest Agent misc patches Peter Maydell
@ 2022-12-19 10:34 ` Konstantin Kostiuk
2022-12-19 10:42 ` Peter Maydell
0 siblings, 1 reply; 10+ messages in thread
From: Konstantin Kostiuk @ 2022-12-19 10:34 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel, Daniel P . Berrangé
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]
On Sat, Dec 17, 2022 at 11:20 PM Peter Maydell <peter.maydell@linaro.org>
wrote:
> On Sat, 17 Dec 2022 at 09:07, Konstantin Kostiuk <kkostiuk@redhat.com>
> wrote:
> >
> > The following changes since commit
> d038d2645acabf6f52fd61baeaa021c3ebe97714:
> >
> > Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into
> staging (2022-12-16 13:26:09 +0000)
> >
> > are available in the Git repository at:
> >
> > git@github.com:kostyanf14/qemu.git tags/qga-pull-2022-12-17
> >
> > for you to fetch changes up to ea5ea85c5894ac220cdb52b3f07c6ad6e4544900:
> >
> > qga-win: choose the right libpcre version to include in MSI package
> (2022-12-17 10:53:38 +0200)
> >
> > ----------------------------------------------------------------
> > qga-pull-2022-12-17
> >
> > v1 -> v2:
> > removed 'qga: Add ZFS TRIM support for FreeBSD' series
> > that failed to merge
> >
> > ----------------------------------------------------------------
> > Andrey Drobyshev via (3):
> > qga-win: add logging to Windows event log
> > qga: map GLib log levels to system levels
> > qga-win: choose the right libpcre version to include in MSI package
>
> These commits all have an author tag with an email 'qemu-devel@nongnu.org
> ';
> you need to fix those up and resend, please. (checkpatch catches this,
> if you want to detect this locally.)
>
>
What is the proper way to fix this? Can I fix this by myself, push and
resend commits
or author should resend it?
Best Regards,
Konstantin Kostiuk.
> thanks
> -- PMM
>
>
[-- Attachment #2: Type: text/html, Size: 2565 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PULL v2 0/6] QEMU Guest Agent misc patches
2022-12-19 10:34 ` Konstantin Kostiuk
@ 2022-12-19 10:42 ` Peter Maydell
0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2022-12-19 10:42 UTC (permalink / raw)
To: Konstantin Kostiuk; +Cc: qemu-devel, Daniel P . Berrangé
On Mon, 19 Dec 2022 at 10:34, Konstantin Kostiuk <kkostiuk@redhat.com> wrote:
>
>
>
> On Sat, Dec 17, 2022 at 11:20 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> On Sat, 17 Dec 2022 at 09:07, Konstantin Kostiuk <kkostiuk@redhat.com> wrote:
>> > Andrey Drobyshev via (3):
>> > qga-win: add logging to Windows event log
>> > qga: map GLib log levels to system levels
>> > qga-win: choose the right libpcre version to include in MSI package
>>
>> These commits all have an author tag with an email 'qemu-devel@nongnu.org';
>> you need to fix those up and resend, please. (checkpatch catches this,
>> if you want to detect this locally.)
>>
>
> What is the proper way to fix this? Can I fix this by myself, push and resend commits
> or author should resend it?
You should fix up the commits locally and resend the pullreq.
Generally the author can't fix by resending, because the reason
the patches are attributed to the list is an unfortunate interaction
between the configuration of their mail system and the mailing list,
so any re-send would just have the same author as before.
-- PMM
^ permalink raw reply [flat|nested] 10+ messages in thread