From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76B72C3DA79 for ; Mon, 26 Dec 2022 14:02:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9o3q-0006t5-Mn; Mon, 26 Dec 2022 09:02:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9o3m-0006qx-HB for qemu-devel@nongnu.org; Mon, 26 Dec 2022 09:02:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9o3j-0007Q9-Ua for qemu-devel@nongnu.org; Mon, 26 Dec 2022 09:02:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672063350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B/UO1YTQIsQZfs9+37Ab8KH3k61CDlWj56JLHb1YTWM=; b=Bwvz+mWipWXrQHJW5ASqxsuzWVSBIF+DuI6+C0LAlSeQxB/KPCGUzS+FSfpgBRL9ArWlcf OHagTGQpcDHZYJxWlV4+Hc3wWi+R3cPu2yZfL3icl9cBSEpprxboJFtaGtxR0p1tQkBTAq oLvzlhnnf+05N842V0iqzk0/7hdE+tY= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-135-UQP9JmSUOC6OJXtfoNSj3Q-1; Mon, 26 Dec 2022 09:02:26 -0500 X-MC-Unique: UQP9JmSUOC6OJXtfoNSj3Q-1 Received: by mail-ua1-f70.google.com with SMTP id 89-20020a9f26e2000000b004183c5c5b7aso4278921uay.10 for ; Mon, 26 Dec 2022 06:02:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B/UO1YTQIsQZfs9+37Ab8KH3k61CDlWj56JLHb1YTWM=; b=gZ8zieueuGtc/lSlK9pMti+U9LSCose7CG/i287tKgtqKtEwrfMJntkrIKUN4EcYI8 BWQdC9VVtOJ1Ndv5zDKuAmsyVo41NgfY1yJZ1Uco2QW7on88XPmkHcteQNm8KWaSnG9h /oXEgLYVQGnM1m/lVqbcKmQ1Sthk4NN3iHO3FlQ4pJfc4UFC5ATPx8boBDr/w/u7xLUs RRBxkp69p4Tmn35lKTRAeh3wEDZT7CGxQ+FhR0+JG0Fm53WIVW674xXF3x49EbjrtrZy y7405VtHBxnDiWcoYMneFCMrqJssTzo5cLdightPLNRCA791q69ZCoc1JaWkruaU5chP 65kQ== X-Gm-Message-State: AFqh2kqJR+nuTko5/U/GtBB8O9DeyG+i3Aw9H3tU1uvRXQjtrAGv8bVf Tvt9plsHF9gcHG99BUzcjsP5E3v9Zx68AJn11oVBiY84jKdILMj6U1KUQj0Ih5Pk9iTIRsxdhW6 pC08j+p5z6z3avl/rLPmXVdbn94ZK920= X-Received: by 2002:a05:6102:5792:b0:3b5:3f84:287 with SMTP id dh18-20020a056102579200b003b53f840287mr2271023vsb.66.1672063345896; Mon, 26 Dec 2022 06:02:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXv736eAgejVzb0ZNM8YSktx2+RfZfsULGWVXmNB8n99mgtbP+iP0onpGbdQXDDJcTue5g8IQh6U57lD68RYV54= X-Received: by 2002:a05:6102:5792:b0:3b5:3f84:287 with SMTP id dh18-20020a056102579200b003b53f840287mr2271022vsb.66.1672063345487; Mon, 26 Dec 2022 06:02:25 -0800 (PST) MIME-Version: 1.0 References: <20221213151343.90235-1-andrey.drobyshev@virtuozzo.com> In-Reply-To: From: Konstantin Kostiuk Date: Mon, 26 Dec 2022 16:02:14 +0200 Message-ID: Subject: Re: [PATCH v2] qga-win: choose the right libpcre version to include in MSI package To: Andrey Drobyshev Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, den@virtuozzo.com, sw@weilnetz.de Content-Type: multipart/alternative; boundary="000000000000c008c405f0bb95ee" Received-SPF: pass client-ip=170.10.129.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org --000000000000c008c405f0bb95ee Content-Type: text/plain; charset="UTF-8" the series was merged Best Regards, Konstantin Kostiuk. On Tue, Dec 13, 2022 at 9:20 PM Konstantin Kostiuk wrote: > Reviewed-by: Konstantin Kostiuk > Tested-by: Konstantin Kostiuk > > On Tue, Dec 13, 2022 at 5:13 PM Andrey Drobyshev < > andrey.drobyshev@virtuozzo.com> wrote: > >> 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 >> --- >> 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..9f0bacae81 100644 >> --- a/qga/installer/qemu-ga.wxs >> +++ b/qga/installer/qemu-ga.wxs >> @@ -101,9 +101,15 @@ >> > Guid="{6C117C78-0F47-4B07-8F34-6BEE11643829}"> >> > Source="$(var.BIN_DIR)/libwinpthread-1.dll" KeyPath="yes" DiskId="1"/> >> >> - > Guid="{7A86B45E-A009-489A-A849-CE3BACF03CD0}"> >> - > Source="$(var.BIN_DIR)/libpcre-1.dll" KeyPath="yes" DiskId="1"/> >> - >> + >> + > Guid="{7A86B45E-A009-489A-A849-CE3BACF03CD0}"> >> + > Source="$(var.BIN_DIR)/libpcre-1.dll" KeyPath="yes" DiskId="1"/> >> + >> + >> + > Guid="{F92A3804-B59C-419D-8F29-99A30352C156}"> >> + > Source="$(var.BIN_DIR)/libpcre2-8-0.dll" KeyPath="yes" DiskId="1"/> >> + >> + >> > Guid="{D075D109-51CA-11E3-9F8B-000C29858960}"> >> > >> 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.34.3 >> >> --000000000000c008c405f0bb95ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
the series was merged

<= div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature= ">
Best Regards,
Konstantin Kostiuk.


On Tue, Dec 13, 2022 at 9:20 PM Konstantin Kostiu= k <kkostiuk@redhat.com> wr= ote:
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Tested-b= y: Konstantin Kostiuk <kkostiuk@redhat.com>

On Tue, Dec 13, 2022 at 5:13 PM An= drey Drobyshev <andrey.drobyshev@virtuozzo.com> wrote:
According to GLib changelog [1], = since version 2.73.2 GLib is using
libpcre2 instead of libpcre.=C2=A0 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/-/rel= eases#2.73.2

Previous version:
https://lists.nongnu.org/arc= hive/html/qemu-trivial/2022-11/msg00237.html

Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
---
=C2=A0qga/installer/qemu-ga.wxs | 12 +++++++++---
=C2=A0qga/meson.build=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 6 +++= +++
=C2=A02 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
index e344c38e74..9f0bacae81 100644
--- a/qga/installer/qemu-ga.wxs
+++ b/qga/installer/qemu-ga.wxs
@@ -101,9 +101,15 @@
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<Component Id=3D"libwinpth= read" Guid=3D"{6C117C78-0F47-4B07-8F34-6BEE11643829}"> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<File Id=3D"libwinp= thread_1.dll" Name=3D"libwinpthread-1.dll" Source=3D"$(= var.BIN_DIR)/libwinpthread-1.dll" KeyPath=3D"yes" DiskId=3D&= quot;1"/>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</Component>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <Component Id=3D"libpcre" = Guid=3D"{7A86B45E-A009-489A-A849-CE3BACF03CD0}">
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <File Id=3D"libpcre_1.dl= l" Name=3D"libpcre-1.dll" Source=3D"$(var.BIN_DIR)/libp= cre-1.dll" KeyPath=3D"yes" DiskId=3D"1"/>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </Component>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <?if $(var.LIBPCRE) =3D "libpcr= e1"?>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <Component Id=3D"libpcre= " Guid=3D"{7A86B45E-A009-489A-A849-CE3BACF03CD0}">
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <File Id=3D"libpc= re_1.dll" Name=3D"libpcre-1.dll" Source=3D"$(var.BIN_DI= R)/libpcre-1.dll" KeyPath=3D"yes" DiskId=3D"1"/>= ;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </Component>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <?else?>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <Component Id=3D"libpcre= " Guid=3D"{F92A3804-B59C-419D-8F29-99A30352C156}">
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <File Id=3D"libpc= re2_8_0.dll" Name=3D"libpcre2-8-0.dll" Source=3D"$(var.= BIN_DIR)/libpcre2-8-0.dll" KeyPath=3D"yes" DiskId=3D"1&= quot;/>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </Component>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <?endif?>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<Component Id=3D"registry_= entries" Guid=3D"{D075D109-51CA-11E3-9F8B-000C29858960}">=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<RegistryKey Root=3D&quo= t;HKLM"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 Key=3D"Software\$(var.QEMU_GA_MANUFACTURER)\$(var.QE= MU_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 =3D=3D 'windows'
=C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_ga_msi_vss =3D ['-D', 'InstallV= ss']
=C2=A0 =C2=A0 =C2=A0 =C2=A0deps +=3D qga_vss
=C2=A0 =C2=A0 =C2=A0endif
+=C2=A0 =C2=A0 if glib.version() < '2.73.2'
+=C2=A0 =C2=A0 =C2=A0 libpcre =3D 'libpcre1'
+=C2=A0 =C2=A0 else
+=C2=A0 =C2=A0 =C2=A0 libpcre =3D 'libpcre2'
+=C2=A0 =C2=A0 endif
=C2=A0 =C2=A0 =C2=A0qga_msi =3D custom_target('QGA MSI',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0input: files('installer/qemu-ga.wxs'= ),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0output: 'qemu-ga-@0@.msi'.format(hos= t_arch),
@@ -153,6 +158,7 @@ if targetos =3D=3D 'windows'
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'-D', 'QEMU_GA_VERSION=3D= ' + config_host['QEMU_GA_VERSION'],
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'-D', 'QEMU_GA_MANUFACTUR= ER=3D' + config_host['QEMU_GA_MANUFACTURER'],
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'-D', 'QEMU_GA_DISTRO=3D&= #39; + config_host['QEMU_GA_DISTRO'],
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-D', 'LIBPCRE=3D' + libpcr= e,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0])
=C2=A0 =C2=A0 =C2=A0all_qga +=3D [qga_msi]
=C2=A0 =C2=A0 =C2=A0alias_target('msi', qga_msi)
--
2.34.3

--000000000000c008c405f0bb95ee--