import mingw-qemu-ga-win-104.0.2-1.el9
This commit is contained in:
parent
95f8a7579a
commit
24e9071d36
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
|||||||
SOURCES/VSSSDK72.tar.gz
|
SOURCES/qemu-7.0.0.tar.bz2
|
||||||
SOURCES/qemu-6.2.0.tar.bz2
|
|
||||||
|
@ -1,2 +1 @@
|
|||||||
7dd4cfd7ad43ececee10e113f9d92cefc66ef2a4 SOURCES/VSSSDK72.tar.gz
|
d56af4231110566e7eabe44ed16c41de58d6435b SOURCES/qemu-7.0.0.tar.bz2
|
||||||
f0d3a2e9b1565d5d7b0e25a73bf37d603a0d13fa SOURCES/qemu-6.2.0.tar.bz2
|
|
||||||
|
@ -13,7 +13,7 @@ index 91ff57278e..586de296f5 100644
|
|||||||
--- a/VERSION
|
--- a/VERSION
|
||||||
+++ b/VERSION
|
+++ b/VERSION
|
||||||
@@ -1 +1 @@
|
@@ -1 +1 @@
|
||||||
-6.2.0
|
-7.0.0
|
||||||
+103.0.0
|
+104.0.2
|
||||||
--
|
--
|
||||||
2.17.2
|
2.17.2
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
From e3583e102870f37f7abef4e501a718e83b5a75d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Yan Vugenfirer <yvugenfi@redhat.com>
|
|
||||||
Date: Mon, 27 Dec 2021 01:48:22 +0200
|
|
||||||
Subject: [PATCH] Remove redundant GUID definitions.
|
|
||||||
|
|
||||||
GUID_DEVINTERFACE_STORAGEPORT and GUID_DEVINTERFACE_DISK are already defined in glib2
|
|
||||||
|
|
||||||
Signed-off-by: Yan Vugenfirer <yvugenfi@redhat.com>
|
|
||||||
---
|
|
||||||
qga/commands-win32.c | 7 -------
|
|
||||||
1 file changed, 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
|
|
||||||
index 830a24a..fbc5dfd 100644
|
|
||||||
--- a/qga/commands-win32.c
|
|
||||||
+++ b/qga/commands-win32.c
|
|
||||||
@@ -505,13 +505,6 @@ static GuestDiskBusType find_bus_type(STORAGE_BUS_TYPE bus)
|
|
||||||
return win2qemu[(int)bus];
|
|
||||||
}
|
|
||||||
|
|
||||||
-DEFINE_GUID(GUID_DEVINTERFACE_DISK,
|
|
||||||
- 0x53f56307L, 0xb6bf, 0x11d0, 0x94, 0xf2,
|
|
||||||
- 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
|
||||||
-DEFINE_GUID(GUID_DEVINTERFACE_STORAGEPORT,
|
|
||||||
- 0x2accfe60L, 0xc130, 0x11d2, 0xb0, 0x82,
|
|
||||||
- 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
|
|
||||||
-
|
|
||||||
static GuestPCIAddress *get_pci_info(int number, Error **errp)
|
|
||||||
{
|
|
||||||
HDEVINFO dev_info = INVALID_HANDLE_VALUE;
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
46
SOURCES/0001-configure-Add-cross-prefix-for-widl-tool.patch
Normal file
46
SOURCES/0001-configure-Add-cross-prefix-for-widl-tool.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
From c0d0aa99062d0084c2c24ebd16fd59ce1819277b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Konstantin Kostiuk <kkostiuk@redhat.com>
|
||||||
|
Date: Thu, 28 Apr 2022 16:37:38 +0000
|
||||||
|
Subject: [PATCH 1/2] configure: Add cross prefix for widl tool
|
||||||
|
|
||||||
|
The mingw-w64-tool package in Fedora provides widl tool with a
|
||||||
|
cross prefix, so adds it automatically for cross builds.
|
||||||
|
|
||||||
|
WIDL env can be used to redefine the path to tool.
|
||||||
|
The same behavior as with windres.
|
||||||
|
|
||||||
|
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
|
||||||
|
---
|
||||||
|
configure | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index 59c43bea05..8b775492d0 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -415,6 +415,7 @@ ranlib="${RANLIB-${cross_prefix}ranlib}"
|
||||||
|
nm="${NM-${cross_prefix}nm}"
|
||||||
|
smbd="$SMBD"
|
||||||
|
strip="${STRIP-${cross_prefix}strip}"
|
||||||
|
+widl="${WIDL-${cross_prefix}widl}"
|
||||||
|
windres="${WINDRES-${cross_prefix}windres}"
|
||||||
|
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
|
||||||
|
query_pkg_config() {
|
||||||
|
@@ -2786,6 +2787,7 @@ if test "$skip_meson" = no; then
|
||||||
|
echo "sdl2-config = [$(meson_quote $sdl2_config)]" >> $cross
|
||||||
|
fi
|
||||||
|
echo "strip = [$(meson_quote $strip)]" >> $cross
|
||||||
|
+ echo "widl = [$(meson_quote $widl)]" >> $cross
|
||||||
|
echo "windres = [$(meson_quote $windres)]" >> $cross
|
||||||
|
if test "$cross_compile" = "yes"; then
|
||||||
|
cross_arg="--cross-file config-meson.cross"
|
||||||
|
@@ -2907,6 +2909,7 @@ preserve_env PYTHON
|
||||||
|
preserve_env SDL2_CONFIG
|
||||||
|
preserve_env SMBD
|
||||||
|
preserve_env STRIP
|
||||||
|
+preserve_env WIDL
|
||||||
|
preserve_env WINDRES
|
||||||
|
|
||||||
|
printf "exec" >>config.status
|
||||||
|
--
|
||||||
|
2.25.1
|
@ -1,73 +0,0 @@
|
|||||||
From 2ee0253554227bd0cd26a00467765187168dda87 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
|
||||||
Date: Wed, 2 Feb 2022 00:23:33 +0400
|
|
||||||
Subject: [PATCH] meson: do not make qga/vss-win32/meson.build conditional on
|
|
||||||
C++ presence
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
C++ presence is checked by the qga/ directory, so it can be assumed
|
|
||||||
when building VSS module.
|
|
||||||
|
|
||||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
||||||
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
|
|
||||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
||||||
---
|
|
||||||
qga/vss-win32/meson.build | 41 +++++++++++++++++++++++----------------
|
|
||||||
1 file changed, 24 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
|
|
||||||
index 90825edef3..5982a6c6d8 100644
|
|
||||||
--- a/qga/vss-win32/meson.build
|
|
||||||
+++ b/qga/vss-win32/meson.build
|
|
||||||
@@ -1,22 +1,29 @@
|
|
||||||
-if add_languages('cpp', required: false)
|
|
||||||
- glib_dynamic = dependency('glib-2.0', static: false)
|
|
||||||
- link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong',
|
|
||||||
- '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
|
|
||||||
+glib_dynamic = dependency('glib-2.0', static: false)
|
|
||||||
+link_args = cc.get_supported_link_arguments([
|
|
||||||
+ '-fstack-protector-all',
|
|
||||||
+ '-fstack-protector-strong',
|
|
||||||
+ '-Wl,--add-stdcall-alias',
|
|
||||||
+ '-Wl,--enable-stdcall-fixup'
|
|
||||||
+])
|
|
||||||
|
|
||||||
- qga_vss = shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'],
|
|
||||||
- name_prefix: '',
|
|
||||||
- cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
|
|
||||||
- link_args: link_args,
|
|
||||||
- vs_module_defs: 'qga-vss.def',
|
|
||||||
- dependencies: [glib_dynamic, socket,
|
|
||||||
- cc.find_library('ole32'),
|
|
||||||
- cc.find_library('oleaut32'),
|
|
||||||
- cc.find_library('shlwapi'),
|
|
||||||
- cc.find_library('uuid'),
|
|
||||||
- cc.find_library('intl')])
|
|
||||||
+qga_vss = shared_module(
|
|
||||||
+ 'qga-vss',
|
|
||||||
+ ['requester.cpp', 'provider.cpp', 'install.cpp'],
|
|
||||||
+ name_prefix: '',
|
|
||||||
+ cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
|
|
||||||
+ link_args: link_args,
|
|
||||||
+ vs_module_defs: 'qga-vss.def',
|
|
||||||
+ dependencies: [
|
|
||||||
+ glib_dynamic, socket,
|
|
||||||
+ cc.find_library('ole32'),
|
|
||||||
+ cc.find_library('oleaut32'),
|
|
||||||
+ cc.find_library('shlwapi'),
|
|
||||||
+ cc.find_library('uuid'),
|
|
||||||
+ cc.find_library('intl')
|
|
||||||
+ ]
|
|
||||||
+)
|
|
||||||
|
|
||||||
- all_qga += qga_vss
|
|
||||||
-endif
|
|
||||||
+all_qga += qga_vss
|
|
||||||
|
|
||||||
# rules to build qga-vss.tlb
|
|
||||||
# Currently, only native build is supported because building .tlb
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
From 0b188ab30b32fc16adbcb2da768edfa0ec1fc805 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Konstantin Kostiuk <kkostiuk@redhat.com>
|
||||||
|
Date: Thu, 12 May 2022 15:41:43 +0000
|
||||||
|
Subject: [PATCH] qga-vss: Add auto generated headers to dependencies
|
||||||
|
|
||||||
|
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
|
||||||
|
---
|
||||||
|
qga/vss-win32/meson.build | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
|
||||||
|
index 26c5dd6e0e..9483ccd3b8 100644
|
||||||
|
--- a/qga/vss-win32/meson.build
|
||||||
|
+++ b/qga/vss-win32/meson.build
|
||||||
|
@@ -7,7 +7,7 @@ link_args = cc.get_supported_link_arguments([
|
||||||
|
|
||||||
|
qga_vss = shared_module(
|
||||||
|
'qga-vss',
|
||||||
|
- ['requester.cpp', 'provider.cpp', 'install.cpp'],
|
||||||
|
+ ['requester.cpp', 'provider.cpp', 'install.cpp', genh],
|
||||||
|
name_prefix: '',
|
||||||
|
cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
|
||||||
|
link_args: link_args,
|
||||||
|
--
|
||||||
|
2.25.1
|
@ -0,0 +1,33 @@
|
|||||||
|
From 4ee7074cdf48e77886637e12f148e267329978d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Konstantin Kostiuk <kkostiuk@redhat.com>
|
||||||
|
Date: Thu, 12 May 2022 15:43:37 +0000
|
||||||
|
Subject: [PATCH] qga-vss: Use a proper function for free memory
|
||||||
|
|
||||||
|
volume_name_wchar is allocated by 'void* operator new [](long long unsigned int)
|
||||||
|
|
||||||
|
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
|
||||||
|
---
|
||||||
|
qga/vss-win32/requester.cpp | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
|
||||||
|
index 4513324dd2..b371affeab 100644
|
||||||
|
--- a/qga/vss-win32/requester.cpp
|
||||||
|
+++ b/qga/vss-win32/requester.cpp
|
||||||
|
@@ -354,12 +354,12 @@ void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
err_set(errset, hr, "failed to add %S to snapshot set",
|
||||||
|
volume_name_wchar);
|
||||||
|
- delete volume_name_wchar;
|
||||||
|
+ delete[] volume_name_wchar;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
num_mount_points++;
|
||||||
|
|
||||||
|
- delete volume_name_wchar;
|
||||||
|
+ delete[] volume_name_wchar;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (num_mount_points == 0) {
|
||||||
|
--
|
||||||
|
2.25.1
|
@ -1,70 +0,0 @@
|
|||||||
From 4eb0bed855a3f2001a3438a58933164046eefb88 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kostiantyn Kostiuk <konstantin@daynix.com>
|
|
||||||
Date: Tue, 14 Sep 2021 10:28:44 +0000
|
|
||||||
Subject: [PATCH 1/2] qga-win: Detect OS based on Windows 10 by first build
|
|
||||||
number
|
|
||||||
|
|
||||||
Windows Server 2016, 2019, 2022 are based on Windows 10 and
|
|
||||||
have the same major and minor versions. So, the only way to
|
|
||||||
detect the proper version is to use the build number.
|
|
||||||
|
|
||||||
Before this commit, the guest agent use the last build number
|
|
||||||
for each OS, but it causes problems when new OS releases.
|
|
||||||
There are few preview versions before release, and we
|
|
||||||
can't update this list.
|
|
||||||
|
|
||||||
After this commit, the guest agent will use the first build
|
|
||||||
number. For each new preview version or release version,
|
|
||||||
Microsoft increases the build number, so we can add the number
|
|
||||||
of the first preview build and this will work until the new
|
|
||||||
OS release.
|
|
||||||
|
|
||||||
Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
|
|
||||||
---
|
|
||||||
qga/commands-win32.c | 18 +++++++++++-------
|
|
||||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
|
|
||||||
index 4e84afd83b..a8e9d40b31 100644
|
|
||||||
--- a/qga/commands-win32.c
|
|
||||||
+++ b/qga/commands-win32.c
|
|
||||||
@@ -2179,7 +2179,7 @@ static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][8] = {
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct _ga_win_10_0_server_t {
|
|
||||||
- int final_build;
|
|
||||||
+ int first_build;
|
|
||||||
char const *version;
|
|
||||||
char const *version_id;
|
|
||||||
} ga_win_10_0_server_t;
|
|
||||||
@@ -2219,18 +2219,22 @@ static char *ga_get_win_name(OSVERSIONINFOEXW const *os_version, bool id)
|
|
||||||
int tbl_idx = (os_version->wProductType != VER_NT_WORKSTATION);
|
|
||||||
ga_matrix_lookup_t const *table = WIN_VERSION_MATRIX[tbl_idx];
|
|
||||||
ga_win_10_0_server_t const *win_10_0_table = WIN_10_0_SERVER_VERSION_MATRIX;
|
|
||||||
+ ga_win_10_0_server_t const *win_10_0_version = NULL;
|
|
||||||
while (table->version != NULL) {
|
|
||||||
if (major == 10 && minor == 0 && tbl_idx) {
|
|
||||||
while (win_10_0_table->version != NULL) {
|
|
||||||
- if (build <= win_10_0_table->final_build) {
|
|
||||||
- if (id) {
|
|
||||||
- return g_strdup(win_10_0_table->version_id);
|
|
||||||
- } else {
|
|
||||||
- return g_strdup(win_10_0_table->version);
|
|
||||||
- }
|
|
||||||
+ if (build >= win_10_0_table->first_build) {
|
|
||||||
+ win_10_0_version = win_10_0_table;
|
|
||||||
}
|
|
||||||
win_10_0_table++;
|
|
||||||
}
|
|
||||||
+ if (win_10_0_table) {
|
|
||||||
+ if (id) {
|
|
||||||
+ return g_strdup(win_10_0_version->version_id);
|
|
||||||
+ } else {
|
|
||||||
+ return g_strdup(win_10_0_version->version);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
} else if (major == table->major && minor == table->minor) {
|
|
||||||
if (id) {
|
|
||||||
return g_strdup(table->version_id);
|
|
||||||
--
|
|
||||||
2.33.0
|
|
@ -1,75 +0,0 @@
|
|||||||
From a956c1a2ab36a221c0a5dc7cd474ac86f4033983 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kostiantyn Kostiuk <konstantin@daynix.com>
|
|
||||||
Date: Tue, 20 Jul 2021 17:22:18 +0000
|
|
||||||
Subject: [PATCH 2/2] qga: get_pci_info leak fix
|
|
||||||
|
|
||||||
Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
|
|
||||||
---
|
|
||||||
qga/commands-win32.c | 25 +++++++++++++++++++++----
|
|
||||||
1 file changed, 21 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
|
|
||||||
index 300b87c859..cf6d46361a 100644
|
|
||||||
--- a/qga/commands-win32.c
|
|
||||||
+++ b/qga/commands-win32.c
|
|
||||||
@@ -514,7 +514,10 @@ DEFINE_GUID(GUID_DEVINTERFACE_STORAGEPORT,
|
|
||||||
|
|
||||||
static GuestPCIAddress *get_pci_info(int number, Error **errp)
|
|
||||||
{
|
|
||||||
- HDEVINFO dev_info;
|
|
||||||
+ HDEVINFO dev_info = INVALID_HANDLE_VALUE;
|
|
||||||
+ HDEVINFO parent_dev_info = INVALID_HANDLE_VALUE;
|
|
||||||
+ char *parent_dev_id = NULL;
|
|
||||||
+
|
|
||||||
SP_DEVINFO_DATA dev_info_data;
|
|
||||||
SP_DEVICE_INTERFACE_DATA dev_iface_data;
|
|
||||||
HANDLE dev_file;
|
|
||||||
@@ -541,8 +544,6 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
|
|
||||||
for (i = 0; SetupDiEnumDeviceInfo(dev_info, i, &dev_info_data); i++) {
|
|
||||||
PSP_DEVICE_INTERFACE_DETAIL_DATA pdev_iface_detail_data = NULL;
|
|
||||||
STORAGE_DEVICE_NUMBER sdn;
|
|
||||||
- char *parent_dev_id = NULL;
|
|
||||||
- HDEVINFO parent_dev_info;
|
|
||||||
SP_DEVINFO_DATA parent_dev_info_data;
|
|
||||||
DWORD j;
|
|
||||||
DWORD size = 0;
|
|
||||||
@@ -657,6 +658,7 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
|
|
||||||
SetupDiGetClassDevs(&GUID_DEVINTERFACE_STORAGEPORT, parent_dev_id,
|
|
||||||
NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
|
|
||||||
g_free(parent_dev_id);
|
|
||||||
+ parent_dev_id = NULL;
|
|
||||||
|
|
||||||
if (parent_dev_info == INVALID_HANDLE_VALUE) {
|
|
||||||
error_setg_win32(errp, GetLastError(),
|
|
||||||
@@ -745,12 +747,27 @@ static GuestPCIAddress *get_pci_info(int number, Error **errp)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SetupDiDestroyDeviceInfoList(parent_dev_info);
|
|
||||||
+ parent_dev_info = INVALID_HANDLE_VALUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
free_dev_info:
|
|
||||||
- SetupDiDestroyDeviceInfoList(dev_info);
|
|
||||||
out:
|
|
||||||
+ if (parent_dev_id != NULL) {
|
|
||||||
+ g_debug("get_pci_info: parent_dev_id pointer present");
|
|
||||||
+ g_free(parent_dev_id);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (dev_info != INVALID_HANDLE_VALUE) {
|
|
||||||
+ g_debug("get_pci_info: dev_info handle present");
|
|
||||||
+ SetupDiDestroyDeviceInfoList(dev_info);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (parent_dev_info != INVALID_HANDLE_VALUE) {
|
|
||||||
+ g_debug("get_pci_info: parent_dev_info handle present");
|
|
||||||
+ SetupDiDestroyDeviceInfoList(parent_dev_info);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return pci;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 338883766e88555287c3685c55a909eac5ab0f64 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Konstantin Kostiuk <kkostiuk@redhat.com>
|
||||||
|
Date: Thu, 28 Apr 2022 16:41:13 +0000
|
||||||
|
Subject: [PATCH 2/2] qga-vss: always build qga-vss.tlb when qga-vss.dll is
|
||||||
|
built
|
||||||
|
|
||||||
|
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
|
||||||
|
---
|
||||||
|
qga/vss-win32/meson.build | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
|
||||||
|
index 71c50d0866..26c5dd6e0e 100644
|
||||||
|
--- a/qga/vss-win32/meson.build
|
||||||
|
+++ b/qga/vss-win32/meson.build
|
||||||
|
@@ -23,8 +23,6 @@ qga_vss = shared_module(
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
-all_qga += qga_vss
|
||||||
|
-
|
||||||
|
if midl.found()
|
||||||
|
gen_tlb = custom_target('gen-tlb',
|
||||||
|
input: 'qga-vss.idl',
|
||||||
|
@@ -36,3 +34,5 @@ else
|
||||||
|
output: 'qga-vss.tlb',
|
||||||
|
command: [widl, '-t', '@INPUT@', '-o', '@OUTPUT@'])
|
||||||
|
endif
|
||||||
|
+
|
||||||
|
+all_qga += [ qga_vss, gen_tlb ]
|
||||||
|
--
|
||||||
|
2.25.1
|
@ -1,92 +0,0 @@
|
|||||||
From e84e2d323069501ea21e780b99c99f24370fa79f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kostiantyn Kostiuk <konstantin@daynix.com>
|
|
||||||
Date: Tue, 14 Sep 2021 10:58:13 +0000
|
|
||||||
Subject: [PATCH 2/2] qga-win: Detect Windows 11 by build number
|
|
||||||
|
|
||||||
Windows 10 and 11 have the same major and minor versions.
|
|
||||||
So, the only way to determine the correct version is to
|
|
||||||
use the build number.
|
|
||||||
|
|
||||||
After this commit, the guest agent will return the proper
|
|
||||||
"version" and "version-id" for Windows 11. The "pretty-name"
|
|
||||||
is read from the registry and will be incorrect until the
|
|
||||||
MS updates the registry. We only can create some workaround
|
|
||||||
and replace 10 to 11.
|
|
||||||
|
|
||||||
Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
|
|
||||||
---
|
|
||||||
qga/commands-win32.c | 23 ++++++++++++++---------
|
|
||||||
1 file changed, 14 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
|
|
||||||
index a8e9d40b31..f9ac1c31f5 100644
|
|
||||||
--- a/qga/commands-win32.c
|
|
||||||
+++ b/qga/commands-win32.c
|
|
||||||
@@ -2154,7 +2154,7 @@ typedef struct _ga_matrix_lookup_t {
|
|
||||||
char const *version_id;
|
|
||||||
} ga_matrix_lookup_t;
|
|
||||||
|
|
||||||
-static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][8] = {
|
|
||||||
+static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][7] = {
|
|
||||||
{
|
|
||||||
/* Desktop editions */
|
|
||||||
{ 5, 0, "Microsoft Windows 2000", "2000"},
|
|
||||||
@@ -2163,7 +2163,6 @@ static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][8] = {
|
|
||||||
{ 6, 1, "Microsoft Windows 7" "7"},
|
|
||||||
{ 6, 2, "Microsoft Windows 8", "8"},
|
|
||||||
{ 6, 3, "Microsoft Windows 8.1", "8.1"},
|
|
||||||
- {10, 0, "Microsoft Windows 10", "10"},
|
|
||||||
{ 0, 0, 0}
|
|
||||||
},{
|
|
||||||
/* Server editions */
|
|
||||||
@@ -2173,24 +2172,29 @@ static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][8] = {
|
|
||||||
{ 6, 2, "Microsoft Windows Server 2012", "2012"},
|
|
||||||
{ 6, 3, "Microsoft Windows Server 2012 R2", "2012r2"},
|
|
||||||
{ 0, 0, 0},
|
|
||||||
- { 0, 0, 0},
|
|
||||||
{ 0, 0, 0}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
-typedef struct _ga_win_10_0_server_t {
|
|
||||||
+typedef struct _ga_win_10_0_t {
|
|
||||||
int first_build;
|
|
||||||
char const *version;
|
|
||||||
char const *version_id;
|
|
||||||
-} ga_win_10_0_server_t;
|
|
||||||
+} ga_win_10_0_t;
|
|
||||||
|
|
||||||
-static ga_win_10_0_server_t const WIN_10_0_SERVER_VERSION_MATRIX[4] = {
|
|
||||||
+static ga_win_10_0_t const WIN_10_0_SERVER_VERSION_MATRIX[4] = {
|
|
||||||
{14393, "Microsoft Windows Server 2016", "2016"},
|
|
||||||
{17763, "Microsoft Windows Server 2019", "2019"},
|
|
||||||
{20344, "Microsoft Windows Server 2022", "2022"},
|
|
||||||
{0, 0}
|
|
||||||
};
|
|
||||||
|
|
||||||
+static ga_win_10_0_t const WIN_10_0_CLIENT_VERSION_MATRIX[3] = {
|
|
||||||
+ {10240, "Microsoft Windows 10", "10"},
|
|
||||||
+ {22000, "Microsoft Windows 11", "11"},
|
|
||||||
+ {0, 0}
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
static void ga_get_win_version(RTL_OSVERSIONINFOEXW *info, Error **errp)
|
|
||||||
{
|
|
||||||
typedef NTSTATUS(WINAPI *rtl_get_version_t)(
|
|
||||||
@@ -2218,10 +2222,11 @@ static char *ga_get_win_name(OSVERSIONINFOEXW const *os_version, bool id)
|
|
||||||
DWORD build = os_version->dwBuildNumber;
|
|
||||||
int tbl_idx = (os_version->wProductType != VER_NT_WORKSTATION);
|
|
||||||
ga_matrix_lookup_t const *table = WIN_VERSION_MATRIX[tbl_idx];
|
|
||||||
- ga_win_10_0_server_t const *win_10_0_table = WIN_10_0_SERVER_VERSION_MATRIX;
|
|
||||||
- ga_win_10_0_server_t const *win_10_0_version = NULL;
|
|
||||||
+ ga_win_10_0_t const *win_10_0_table = tbl_idx ?
|
|
||||||
+ WIN_10_0_SERVER_VERSION_MATRIX : WIN_10_0_CLIENT_VERSION_MATRIX;
|
|
||||||
+ ga_win_10_0_t const *win_10_0_version = NULL;
|
|
||||||
while (table->version != NULL) {
|
|
||||||
- if (major == 10 && minor == 0 && tbl_idx) {
|
|
||||||
+ if (major == 10 && minor == 0) {
|
|
||||||
while (win_10_0_table->version != NULL) {
|
|
||||||
if (build >= win_10_0_table->first_build) {
|
|
||||||
win_10_0_version = win_10_0_table;
|
|
||||||
--
|
|
||||||
2.25.1
|
|
@ -1,5 +0,0 @@
|
|||||||
QEMU_GA_MANUFACTURER="RedHat" QEMU_GA_DISTRO="RHEL" QEMU_GA_VERSION="103.0.0" ./configure \
|
|
||||||
--disable-docs \
|
|
||||||
--enable-guest-agent \
|
|
||||||
--disable-zlib-test \
|
|
||||||
"$@"
|
|
@ -1,10 +1,12 @@
|
|||||||
%{?mingw_package_header}
|
%{?mingw_package_header}
|
||||||
|
|
||||||
%define with_vss 1
|
%define with_vss 1
|
||||||
%define qemu_version 6.2.0
|
%define qemu_version 7.0.0
|
||||||
|
%define ga_manufacturer "RedHat"
|
||||||
|
%define ga_distro "RHEL"
|
||||||
|
|
||||||
Name: mingw-qemu-ga-win
|
Name: mingw-qemu-ga-win
|
||||||
Version: 103.0.0
|
Version: 104.0.2
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Qemus Guest agent for Windows
|
Summary: Qemus Guest agent for Windows
|
||||||
|
|
||||||
@ -15,19 +17,13 @@ Requires(post): system-units
|
|||||||
Requires(preun): systemd-units
|
Requires(preun): systemd-units
|
||||||
Requires(postun): systemd-units
|
Requires(postun): systemd-units
|
||||||
Source0: http://wiki.qemu.org/download/qemu-%{qemu_version}.tar.bz2
|
Source0: http://wiki.qemu.org/download/qemu-%{qemu_version}.tar.bz2
|
||||||
Source1: build_configure.sh
|
|
||||||
%if %{with_vss}
|
|
||||||
Source2: VSSSDK72.tar.gz
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Patch0001: 0001-Change-Version.patch
|
Patch0001: 0001-Change-Version.patch
|
||||||
Patch0002: 0001-qga-Log-version-on-start.patch
|
Patch0002: 0001-qga-Log-version-on-start.patch
|
||||||
Patch0003: 0002-qga-get_pci_info-leak-fix.patch
|
Patch0003: 0001-configure-Add-cross-prefix-for-widl-tool.patch
|
||||||
Patch0004: 0001-qga-win-Detect-OS-based-on-Windows-10-by-first-build.patch
|
Patch0004: 0002-qga-vss-always-build-qga-vss.tlb-when-qga-vss.dll-is.patch
|
||||||
Patch0005: 0002-qga-win-Detect-Windows-11-by-build-number.patch
|
Patch0005: 0001-qga-vss-Add-auto-generated-headers-to-dependencies.patch
|
||||||
Patch0006: 0001-Remove-redundant-GUID-definitions.patch
|
Patch0006: 0001-qga-vss-Use-a-proper-function-for-free-memory.patch
|
||||||
Patch0007: 0001-meson-do-not-make-qga-vss-win32-meson.build-conditio.patch
|
|
||||||
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -43,8 +39,9 @@ BuildRequires: mingw32-gcc >= 7.4.0
|
|||||||
BuildRequires: mingw64-gcc >= 7.4.0
|
BuildRequires: mingw64-gcc >= 7.4.0
|
||||||
BuildRequires: mingw32-glib2
|
BuildRequires: mingw32-glib2
|
||||||
BuildRequires: mingw64-glib2
|
BuildRequires: mingw64-glib2
|
||||||
BuildRequires: mingw64-headers
|
BuildRequires: mingw64-headers >= 10.0.0
|
||||||
BuildRequires: mingw32-headers
|
BuildRequires: mingw32-headers >= 10.0.0
|
||||||
|
BuildRequires: mingw-w64-tools >= 10.0.0
|
||||||
BuildRequires: msitools >= 0.93.93
|
BuildRequires: msitools >= 0.93.93
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: ninja-build
|
BuildRequires: ninja-build
|
||||||
@ -72,59 +69,53 @@ Qemu Guest Agent for Windows
|
|||||||
%patch0004 -p1
|
%patch0004 -p1
|
||||||
%patch0005 -p1
|
%patch0005 -p1
|
||||||
%patch0006 -p1
|
%patch0006 -p1
|
||||||
%patch0007 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
cp %{SOURCE1} build_configure.sh
|
rm -rf $RPM_BUILD_ROOT
|
||||||
%if %{with_vss}
|
|
||||||
pwd
|
|
||||||
tar -zxvf %{SOURCE2}
|
|
||||||
ls VSSSDK72
|
|
||||||
%endif
|
|
||||||
#Build for Win32
|
|
||||||
|
|
||||||
|
export QEMU_GA_MANUFACTURER="%{ga_manufacturer}"
|
||||||
|
export QEMU_GA_DISTRO="%{ga_distro}"
|
||||||
|
export QEMU_GA_VERSION="%{version}"
|
||||||
|
|
||||||
|
#Build for Win32
|
||||||
%{mingw32_env}
|
%{mingw32_env}
|
||||||
./build_configure.sh \
|
./configure \
|
||||||
|
--disable-docs \
|
||||||
|
--disable-zlib-test \
|
||||||
--target-list=x86_64-softmmu \
|
--target-list=x86_64-softmmu \
|
||||||
--cross-prefix=i686-w64-mingw32- \
|
--cross-prefix=i686-w64-mingw32- \
|
||||||
--enable-guest-agent-msi \
|
--enable-guest-agent-msi \
|
||||||
%if %{with_vss}
|
%if %{with_vss}
|
||||||
--with-vss-sdk=%{_builddir}/qemu-%{qemu_version}/VSSSDK72 \
|
--enable-qga-vss \
|
||||||
%endif
|
%endif
|
||||||
|| cat %{_builddir}/qemu-%{qemu_version}/build/config.log
|
|| cat %{_builddir}/qemu-%{qemu_version}/build/config.log
|
||||||
|
|
||||||
make qemu-ga
|
make -j$(nproc) qemu-ga
|
||||||
|
|
||||||
mkdir ../build_win32
|
mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir}
|
||||||
#cp build/qga/qemu-ga.exe ../build_win32
|
# cp build/qga/qemu-ga.exe $RPM_BUILD_ROOT%{mingw32_bindir}
|
||||||
cp build/qga/qemu-ga-i386.msi ../build_win32
|
cp build/qga/qemu-ga-i386.msi $RPM_BUILD_ROOT%{mingw32_bindir}
|
||||||
|
|
||||||
#Build for Win64
|
#Build for Win64
|
||||||
|
|
||||||
%{mingw64_env}
|
%{mingw64_env}
|
||||||
./build_configure.sh \
|
./configure \
|
||||||
|
--disable-docs \
|
||||||
|
--disable-zlib-test \
|
||||||
--target-list=x86_64-softmmu \
|
--target-list=x86_64-softmmu \
|
||||||
--cross-prefix=x86_64-w64-mingw32- \
|
--cross-prefix=x86_64-w64-mingw32- \
|
||||||
--enable-guest-agent-msi \
|
--enable-guest-agent-msi \
|
||||||
%if %{with_vss}
|
%if %{with_vss}
|
||||||
--with-vss-sdk=%{_builddir}/qemu-%{qemu_version}/VSSSDK72 \
|
--enable-qga-vss \
|
||||||
%endif
|
%endif
|
||||||
|| cat %{_builddir}/qemu-%{qemu_version}/build/config.log
|
|| cat %{_builddir}/qemu-%{qemu_version}/build/config.log
|
||||||
|
|
||||||
make qemu-ga
|
make -j$(nproc) qemu-ga
|
||||||
|
|
||||||
mkdir ../build_win64
|
|
||||||
#cp build/qga/qemu-ga.exe ../build_win64
|
|
||||||
cp build/qga/qemu-ga-x86_64.msi ../build_win64
|
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir}
|
|
||||||
cp "../build_win32$MINGW_BUILDDIR_SUFFIX"/qemu-ga* $RPM_BUILD_ROOT%{mingw32_bindir}
|
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{mingw64_bindir}
|
mkdir -p $RPM_BUILD_ROOT%{mingw64_bindir}
|
||||||
cp "../build_win64$MINGW_BUILDDIR_SUFFIX"/qemu-ga* $RPM_BUILD_ROOT%{mingw64_bindir}
|
# cp build/qga/qemu-ga.exe $RPM_BUILD_ROOT%{mingw64_bindir}
|
||||||
|
cp build/qga/qemu-ga-x86_64.msi $RPM_BUILD_ROOT%{mingw64_bindir}
|
||||||
|
|
||||||
|
|
||||||
%files -n qemu-ga-win
|
%files -n qemu-ga-win
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -132,6 +123,20 @@ cp "../build_win64$MINGW_BUILDDIR_SUFFIX"/qemu-ga* $RPM_BUILD_ROOT%{mingw64_bind
|
|||||||
%{mingw64_bindir}/qemu-ga*
|
%{mingw64_bindir}/qemu-ga*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 17 2022 Konstantin Kostiuk <kkostiuk@redhat.com> 104.0.2
|
||||||
|
- Set version to 104.0.2
|
||||||
|
- BZ#2084608 - Fix mismatched allocation function
|
||||||
|
- BZ#2084613 - qga-win: race condition in build
|
||||||
|
|
||||||
|
* Thu May 12 2022 Konstantin Kostiuk <kkostiuk@redhat.com> 104.0.1
|
||||||
|
- Set version to 104.0.1
|
||||||
|
- BZ#2084493 - qemu-ga can't be installed
|
||||||
|
|
||||||
|
* Mon Apr 25 2022 Konstantin Kostiuk <kkostiuk@redhat.com> 104.0.0
|
||||||
|
- Set version to 104.0.0
|
||||||
|
- BZ#2078384 - Rebase QEMU Guest Agent Windows to 7.0.0
|
||||||
|
- Rebase to qemu-7.0.0
|
||||||
|
|
||||||
* Mon Jan 24 2022 Konstantin Kostiuk <kkostiuk@redhat.com> 103.0.0
|
* Mon Jan 24 2022 Konstantin Kostiuk <kkostiuk@redhat.com> 103.0.0
|
||||||
- Set version to 103.0.0
|
- Set version to 103.0.0
|
||||||
- BZ#1992643 - Add mingw-qemu-ga-win package to CentOS stream
|
- BZ#1992643 - Add mingw-qemu-ga-win package to CentOS stream
|
||||||
|
Loading…
Reference in New Issue
Block a user