Compare commits

..

4 Commits

Author SHA1 Message Date
8c1439a742 import CS mingw-qemu-ga-win-108.0.2-1.el9 2024-09-30 16:07:33 +00:00
03f0512fa3 import CS mingw-qemu-ga-win-107.0.1-1.el9 2024-03-28 11:09:42 +00:00
eabdullin
379fc43bca import CS mingw-qemu-ga-win-106.0.0-1.el9 2023-09-21 19:32:55 +00:00
CentOS Sources
311fdd6e40 import mingw-qemu-ga-win-104.0.2-1.el9 2022-09-28 20:52:11 +00:00
11 changed files with 143 additions and 457 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/VSSSDK72.tar.gz SOURCES/qemu-9.0.0.tar.bz2
SOURCES/qemu-6.2.0.tar.bz2

View File

@ -1,2 +1 @@
7dd4cfd7ad43ececee10e113f9d92cefc66ef2a4 SOURCES/VSSSDK72.tar.gz ea9c805cb76f242d866624dc7fef063ec631405c SOURCES/qemu-9.0.0.tar.bz2
f0d3a2e9b1565d5d7b0e25a73bf37d603a0d13fa SOURCES/qemu-6.2.0.tar.bz2

View File

@ -13,7 +13,7 @@ index 91ff57278e..586de296f5 100644
--- a/VERSION --- a/VERSION
+++ b/VERSION +++ b/VERSION
@@ -1 +1 @@ @@ -1 +1 @@
-6.2.0 -9.0.0
+103.0.0 +108.0.2
-- --
2.17.2 2.17.2

View File

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

View File

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

View File

@ -1,25 +0,0 @@
From 66fc295c9a2e29d04fafe729a384e321a347eca3 Mon Sep 17 00:00:00 2001
From: Kostiantyn Kostiuk <konstantin@daynix.com>
Date: Tue, 20 Jul 2021 17:19:34 +0000
Subject: [PATCH 1/2] qga: Log version on start
Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
---
qga/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/qga/main.c b/qga/main.c
index dea6a3aa64..bce93dfdd0 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -1538,6 +1538,7 @@ int main(int argc, char **argv)
goto end;
}
+ slog("Guest agent version %s started", QEMU_VERSION);
#ifdef _WIN32
if (config->daemonize) {
SERVICE_TABLE_ENTRY service_table[] = {
--
2.25.1

View File

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

View File

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

View File

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

View File

@ -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 \
"$@"

View File

@ -1,55 +1,60 @@
%{?mingw_package_header} %{?mingw_package_header}
%define with_vss 1 %define with_vss 1
%define qemu_version 6.2.0 %define qemu_version 9.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: 108.0.2
Release: 1%{?dist} Release: 1%{?dist}
Summary: Qemus Guest agent for Windows Summary: Qemus Guest agent for Windows
Group: System Environment/Daemons Group: System Environment/Daemons
License: GPLv2+ and LGPLv2+ and BSD License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND FSFAP AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND MIT AND LicenseRef-Fedora-Public-Domain AND CC-BY-3.0
URL: http://www.qemu.org/ URL: http://www.qemu.org/
Requires(post): system-units Requires(post): systemd-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
Patch0003: 0002-qga-get_pci_info-leak-fix.patch
Patch0004: 0001-qga-win-Detect-OS-based-on-Windows-10-by-first-build.patch
Patch0005: 0002-qga-win-Detect-Windows-11-by-build-number.patch
Patch0006: 0001-Remove-redundant-GUID-definitions.patch
Patch0007: 0001-meson-do-not-make-qga-vss-win32-meson.build-conditio.patch
BuildArch: noarch BuildArch: noarch
Provides: bundled(mingw-gcc)
Provides: bundled(mingw-gcc-c++)
Provides: bundled(mingw-gettext)
Provides: bundled(mingw-glib2)
Provides: bundled(mingw-pcre)
Provides: qemu-ga-win = %{version}
Obsoletes: qemu-ga-win < 105.0.0
# based on https://gitlab.com/qemu-project/qemu/-/blob/v7.1.0/qga/installer/qemu-ga.wxs
BuildRequires: libtool BuildRequires: libtool
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: glib2-devel BuildRequires: glib2-devel
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: gettext BuildRequires: gettext
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: mingw32-pixman BuildRequires: mingw32-pixman >= 0.42.2
BuildRequires: mingw64-pixman BuildRequires: mingw64-pixman >= 0.42.2
BuildRequires: mingw32-gcc >= 7.4.0 BuildRequires: mingw32-gcc >= 7.4.0
BuildRequires: mingw32-gcc-c++ >= 7.4.0
BuildRequires: mingw64-gcc >= 7.4.0 BuildRequires: mingw64-gcc >= 7.4.0
BuildRequires: mingw32-glib2 BuildRequires: mingw64-gcc-c++ >= 7.4.0
BuildRequires: mingw64-glib2 BuildRequires: mingw32-glib2 >= 2.78.0
BuildRequires: mingw64-headers BuildRequires: mingw64-glib2 >= 2.78.0
BuildRequires: mingw32-headers BuildRequires: mingw64-headers >= 10.0.0
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
%description %description
Qemu Guest Agent for Windows.
qemu-kvm is an open source virtualizer that provides hardware emulation for qemu-kvm is an open source virtualizer that provides hardware emulation for
the KVM hypervisor. the KVM hypervisor.
@ -58,80 +63,136 @@ with the host over a virtio-serial channel named "org.qemu.guest_agent.0"
This package does not need to be installed on the host OS. This package does not need to be installed on the host OS.
%package -n qemu-ga-win
Summary: %{summary}
%description -n qemu-ga-win
Qemu Guest Agent for Windows
%prep %prep
%setup -q -n qemu-%{qemu_version} %setup -q -n qemu-%{qemu_version}
%patch0001 -p1 %patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%build %build
cp %{SOURCE1} build_configure.sh
%if %{with_vss}
pwd
tar -zxvf %{SOURCE2}
ls VSSSDK72
%endif
#Build for Win32
%{mingw32_env}
./build_configure.sh \
--target-list=x86_64-softmmu \
--cross-prefix=i686-w64-mingw32- \
--enable-guest-agent-msi \
%if %{with_vss}
--with-vss-sdk=%{_builddir}/qemu-%{qemu_version}/VSSSDK72 \
%endif
|| cat %{_builddir}/qemu-%{qemu_version}/build/config.log
make qemu-ga
mkdir ../build_win32
#cp build/qga/qemu-ga.exe ../build_win32
cp build/qga/qemu-ga-i386.msi ../build_win32
#Build for Win64
%{mingw64_env}
./build_configure.sh \
--target-list=x86_64-softmmu \
--cross-prefix=x86_64-w64-mingw32- \
--enable-guest-agent-msi \
%if %{with_vss}
--with-vss-sdk=%{_builddir}/qemu-%{qemu_version}/VSSSDK72 \
%endif
|| cat %{_builddir}/qemu-%{qemu_version}/build/config.log
make 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 rm -rf $RPM_BUILD_ROOT
export QEMU_GA_MANUFACTURER="%{ga_manufacturer}"
export QEMU_GA_DISTRO="%{ga_distro}"
export QEMU_GA_VERSION="%{version}"
#Build for Win32
%{mingw32_env}
./configure \
--disable-docs \
--disable-system \
--disable-user \
--cross-prefix=i686-w64-mingw32- \
--enable-guest-agent \
--enable-guest-agent-msi \
%if %{with_vss}
--enable-qga-vss \
%endif
|| cat %{_builddir}/qemu-%{qemu_version}/build/config.log
make -j$(nproc) qemu-ga
mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir} mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir}
cp "../build_win32$MINGW_BUILDDIR_SUFFIX"/qemu-ga* $RPM_BUILD_ROOT%{mingw32_bindir} #cp build/qga/qemu-ga.exe $RPM_BUILD_ROOT%{mingw32_bindir}
cp build/qga/qemu-ga-i386.msi $RPM_BUILD_ROOT%{mingw32_bindir}
#Build for Win64
%{mingw64_env}
./configure \
--disable-docs \
--disable-system \
--disable-user \
--cross-prefix=x86_64-w64-mingw32- \
--enable-guest-agent \
--enable-guest-agent-msi \
%if %{with_vss}
--enable-qga-vss \
%endif
|| cat %{_builddir}/qemu-%{qemu_version}/build/config.log
make -j$(nproc) qemu-ga
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
%defattr(-,root,root) %defattr(-,root,root)
%{mingw32_bindir}/qemu-ga* %{mingw32_bindir}/qemu-ga*
%{mingw64_bindir}/qemu-ga* %{mingw64_bindir}/qemu-ga*
%changelog %changelog
* Mon Jul 1 2024 Konstantin Kostiuk <kkostiuk@redhat.com> 108.0.2
- RHEL-45598 - Set version to 108.0.2
* Tue Apr 30 2024 Konstantin Kostiuk <kkostiuk@redhat.com> 108.0.1
- Set version to 108.0.1
- RHEL-34770 - Gatting rpminspect SPDX license expressions validate failed
* Wed Apr 24 2024 Konstantin Kostiuk <kkostiuk@redhat.com> 108.0.0
- Set version to 108.0.0
- RHEL-23026 - Rebase qemu-ga to 9.0.0
* Mon Apr 1 2024 Dehan Meng <demeng@redhat.com> 107.0.2
- Set version to 107.0.2
- RHEL-26205 - [QGA] Add Windows Server 2025 to guest-osinfo command
* Mon Jan 15 2024 Konstantin Kostiuk <kkostiuk@redhat.com> 107.0.1
- Set version to 107.0.1
- RHEL-21655 - Fix mingw-qemu-ga-win licenses
* Mon Jan 15 2024 Konstantin Kostiuk <kkostiuk@redhat.com> 107.0.0
- Set version to 107.0.0
- RHEL-15491 - Rebase qemu-ga to 8.2.0
* Mon Jul 10 2023 Konstantin Kostiuk <kkostiuk@redhat.com> 106.0.1
- Set version to 106.0.1
- RHELPLAN-147763 - [mingw-qemu-ga-win] VSS DLL: Add logging mechanism
- RHEL-581 - Use the SPDX vocabulary to specify the license
* Sun Apr 23 2023 Konstantin Kostiuk <kkostiuk@redhat.com> 106.0.0
- Set version to 106.0.0
- RHEL-408 - Add provides, obsoletes for mingw-qemu-ga-win
- RHEL-385 - Rebase mingw-qemu-ga-win to QEMU 8.0
* Wed Feb 15 2023 Konstantin Kostiuk <kkostiuk@redhat.com> 105.0.4
- Set version to 105.0.4
- BZ#2167436
* Mon Dec 26 2022 Konstantin Kostiuk <kkostiuk@redhat.com> 105.0.3
- Set version to 105.0.3
- BZ#2090250 - mingw-qemu-ga-win: Add Provides: bundled() to rpm packages [rhel-9]
* Tue Dec 6 2022 Konstantin Kostiuk <kkostiuk@redhat.com> 105.0.2
- Set version to 105.0.2
- Fix wrong requires
- Fix missing patch0002
- Remove extra Summary
- BZ#2090333 - [mingw-qemu-ga-win] qga command 'guest-get-fsinfo' can't query bus-type of USB
* Tue Dec 6 2022 Konstantin Kostiuk <kkostiuk@redhat.com> 105.0.1
- Set version to 105.0.1
- Remove redundant package
- BZ#2090333 - [mingw-qemu-ga-win] qga command 'guest-get-fsinfo' can't query bus-type of USB
* Mon Oct 24 2022 Konstantin Kostiuk <kkostiuk@redhat.com> 105.0.0
- Set version to 105.0.0
- BZ#2137262 - qemu-ga-win: Rebase qemu-ga to 7.1.0
* 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