qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 08/41] build-sys: simplify MSI's QEMU_GA_MANUFACTURER


From: Paolo Bonzini
Subject: Re: [PATCH 08/41] build-sys: simplify MSI's QEMU_GA_MANUFACTURER
Date: Wed, 20 Apr 2022 18:36:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/20/22 17:14, Daniel P. Berrangé wrote:
On Wed, Apr 20, 2022 at 04:48:54PM +0300, Konstantin Kostiuk wrote:
Hi Marc-André and Yan,

Currently, we use this for the mingw-qemu-ga-win package in CentOS Stream 9
and RHEL.
https://gitlab.com/redhat/centos-stream/rpms/mingw-qemu-ga-win/-/blob/c9s/build_configure.sh

Yan, do we need this feature or not?

IMHO the downstream customization makes sense, similar to how
with RPMs we set Red Hat as the vendor.

We neeed  proper meson_options.txt entries and configure --with-qga-...=....
options

Let's keep this one for a while more, I am going to add string option parsing to parse-buildoptions.py which simplifies things a bit.

Paolo

On Wed, Apr 20, 2022 at 4:27 PM <marcandre.lureau@redhat.com> wrote:

From: Marc-André Lureau <marcandre.lureau@redhat.com>

If there is any reason to allow customization of this variable, we
should provide a proper configure option.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
  configure                 |  4 ----
  qga/installer/qemu-ga.wxs | 10 ++++------
  qga/meson.build           |  1 -
  3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index 8cbe55ac82e8..5ac653b21351 100755
--- a/configure
+++ b/configure
@@ -2694,9 +2694,6 @@ fi

  # Guest agent Windows MSI package

-if test "$QEMU_GA_MANUFACTURER" = ""; then
-  QEMU_GA_MANUFACTURER=QEMU
-fi
  if test "$QEMU_GA_DISTRO" = ""; then
    QEMU_GA_DISTRO=Linux
  fi
@@ -2790,7 +2787,6 @@ if test "$debug_tcg" = "yes" ; then
  fi
  if test "$mingw32" = "yes" ; then
    echo "CONFIG_WIN32=y" >> $config_host_mak
-  echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER}" >> $config_host_mak
    echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO}" >> $config_host_mak
    echo "QEMU_GA_VERSION=${QEMU_GA_VERSION}" >> $config_host_mak
  else
diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
index 0950e8c6becc..53d836c06a96 100644
--- a/qga/installer/qemu-ga.wxs
+++ b/qga/installer/qemu-ga.wxs
@@ -8,9 +8,7 @@
      <?error Environment variable QEMU_GA_DISTRO undefined?>
    <?endif?>

-  <?ifndef env.QEMU_GA_MANUFACTURER ?>
-    <?error Environment variable QEMU_GA_MANUFACTURER undefined?>
-  <?endif?>
+  <?define QEMU_GA_MANUFACTURER = "QEMU" ?>

    <?ifndef var.Arch?>
      <?error Define Arch to 32 or 64?>
@@ -43,14 +41,14 @@
      Name="QEMU guest agent"
      Id="*"
      UpgradeCode="{EB6B8302-C06E-4BEC-ADAC-932C68A3A98D}"
-    Manufacturer="$(env.QEMU_GA_MANUFACTURER)"
+    Manufacturer="$(var.QEMU_GA_MANUFACTURER)"
      Version="$(env.QEMU_GA_VERSION)"
      Language="1033">
      <?if $(var.Arch) = 32 ?>
      <Condition Message="Error: 32-bit version of Qemu GA can not be
installed on 64-bit Windows.">NOT VersionNT64</Condition>
      <?endif?>
      <Package
-      Manufacturer="$(env.QEMU_GA_MANUFACTURER)"
+      Manufacturer="$(var.QEMU_GA_MANUFACTURER)"
        InstallerVersion="200"
        Languages="1033"
        Compressed="yes"
@@ -133,7 +131,7 @@
            </Component>
            <Component Id="registry_entries"
Guid="{D075D109-51CA-11E3-9F8B-000C29858960}">
              <RegistryKey Root="HKLM"
-
  Key="Software\$(env.QEMU_GA_MANUFACTURER)\$(env.QEMU_GA_DISTRO)\Tools\QemuGA">
+
  Key="Software\$(var.QEMU_GA_MANUFACTURER)\$(env.QEMU_GA_DISTRO)\Tools\QemuGA">
                <RegistryValue Type="string" Name="ProductID"
Value="fb0a0d66-c7fb-4e2e-a16b-c4a3bfe8d13b" />
                <RegistryValue Type="string" Name="Version"
Value="$(env.QEMU_GA_VERSION)" />
              </RegistryKey>
diff --git a/qga/meson.build b/qga/meson.build
index da5e5efb19e8..6e57de430d29 100644
--- a/qga/meson.build
+++ b/qga/meson.build
@@ -123,7 +123,6 @@ if targetos == 'windows'
                              command: [
                                find_program('env'),
                                'QEMU_GA_VERSION=' +
config_host['QEMU_GA_VERSION'],
-                              'QEMU_GA_MANUFACTURER=' +
config_host['QEMU_GA_MANUFACTURER'],
                                'QEMU_GA_DISTRO=' +
config_host['QEMU_GA_DISTRO'],
                                'BUILD_DIR=' + meson.build_root(),
                                wixl, '-o', '@OUTPUT0@', '@INPUT0@',
--
2.35.1.693.g805e0a68082a



With regards,
Daniel




reply via email to

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