From nobody Wed Nov 27 19:44:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697438023; cv=none; d=zohomail.com; s=zohoarc; b=JIJ7Ik5tO6Ed0aPHo6/eJ4vKusKSaOTC7Y7q6M+dgnJ+d6rq0B7N7Jw93vVZIIYCBdUXlt4sxN2zEUazmiso2QcLFa7XQAlXp9VEqGQ7dYTYaL0CSh1Ed5TlFjjutghjaIqkWtAfHOnLBYzHGn+BRrLl/9Ch9UI6ZbeLBRCbiI0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697438023; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=qwRXtVjXRc2oO6G7Ta8j3S56M6ZsrgKAu3P/PDdZ/0w=; b=TdSp2NBqXBzvzQ1D1Fo3FGqGW+uMH836lRfh0iGcCop0wzL2DVLlOnt/SV7ZOEclnacILFbZWAWvQWR6flZoflw99gSt5kqrFHhrDjA01MhNBryMAIueuR0nHBFVD4taqNq3S1XR3in2CvC2g4mL/2Q4m+V8JVq1PjfFUQKh01w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697438023579840.267968125011; Sun, 15 Oct 2023 23:33:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsH95-00042t-ER; Mon, 16 Oct 2023 02:32:07 -0400 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 1qsH94-00042a-0c for qemu-devel@nongnu.org; Mon, 16 Oct 2023 02:32:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsH92-0005U7-8z for qemu-devel@nongnu.org; Mon, 16 Oct 2023 02:32:05 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-530-vrOimNY7O-OzzBnNjQq9UQ-1; Mon, 16 Oct 2023 02:32:01 -0400 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-53e119e615aso4262580a12.0 for ; Sun, 15 Oct 2023 23:32:00 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:63a7:c72e:ea0e:6045]) by smtp.gmail.com with ESMTPSA id co25-20020a0564020c1900b0053e36dd75dfsm4540722edb.35.2023.10.15.23.31.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 23:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697437923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qwRXtVjXRc2oO6G7Ta8j3S56M6ZsrgKAu3P/PDdZ/0w=; b=Lr94U+o04qeI9TN4hl7C3/+5/v4127xcuLlWibTHWwDxjO/vDbxQajXQF/ij7WLHBuCgPL s1Ts5tvvDrW1frXLp2Rb0ejcNOKWGLd+ZcSkb6s+ubeFABXUEyeL9Ua/Ni3WqjBIUBrw97 eazRreD5Rm8DgekrKQR7UgHhR+mqSsM= X-MC-Unique: vrOimNY7O-OzzBnNjQq9UQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697437919; x=1698042719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qwRXtVjXRc2oO6G7Ta8j3S56M6ZsrgKAu3P/PDdZ/0w=; b=OEmHAyXCTw0aozdbWavnst0HjW/1F1dXyu13GCw6zu03n6a7JTxfiKd5ZokGLaozlz SmBodVWZToDibN2YOvgRioDJUy7wZCbjHDjTQoeX9wAjm71LK4RMhyzM9gphGSCJZVA8 HIeLv9qCbF4TydzLQNUNMGklHX3O2LlnQ6gslrli188GWEyFd7ehEYzxu+DnAjRCfrM/ Q/7xfMWIlELJke8TcVFlP8tFTDtDXdCwnQooFXDDy8JB7SA/O2Mn+m/4jDFFIxA5lTLn bnuS7mBK0eI6+2b7ahndw4/NJ3CCqqRJCnN+cFtmtK0ToA0e1jkxbcKvv0q8+2O85wAT UfRQ== X-Gm-Message-State: AOJu0YwTE+Q/gcaTL8SDbdKziKt1HAnlCZLOn/Hx8hcxPdbj+lQYOAnW uTYxh7aiZJFjtyFE6JIIOQvgIvRwIfiXPBFICBnhcxjJ4Tw4tTiCiRRvbLwux1e+nH3epWpg80h ac/iNzghU7rCJfyx8jj1DApaNLxMysgrwVcmFlUhNE2zF05gBZo3vDR6O/tGTanSuOy2+Jp0XxK M= X-Received: by 2002:a05:6402:35d4:b0:523:2e23:a0bf with SMTP id z20-20020a05640235d400b005232e23a0bfmr5668106edc.11.1697437919595; Sun, 15 Oct 2023 23:31:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHH/bHATqgK2GYIe6lhDDd9ce3KvthpjNRoynTWgRZffQfIvDqriC66Cd2+6ogp4Zi8K8PuZg== X-Received: by 2002:a05:6402:35d4:b0:523:2e23:a0bf with SMTP id z20-20020a05640235d400b005232e23a0bfmr5668092edc.11.1697437919261; Sun, 15 Oct 2023 23:31:59 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 15/17] configure, meson: use command line options to configure qemu-ga Date: Mon, 16 Oct 2023 08:31:25 +0200 Message-ID: <20231016063127.161204-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231016063127.161204-1-pbonzini@redhat.com> References: <20231016063127.161204-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697438025277100003 Content-Type: text/plain; charset="utf-8" Preserve the functionality of the environment variables, but allow using the command line instead. Signed-off-by: Paolo Bonzini --- configure | 16 +++++++++------- meson_options.txt | 7 +++++++ qga/meson.build | 9 ++++++--- scripts/meson-buildoptions.sh | 9 +++++++++ 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 18dcb0240ed..06b27dd46f4 100755 --- a/configure +++ b/configure @@ -1589,12 +1589,6 @@ echo >> $config_host_mak =20 echo all: >> $config_host_mak =20 -if test "$targetos" =3D "windows"; then - echo "QEMU_GA_MANUFACTURER=3D${QEMU_GA_MANUFACTURER-QEMU}" >> $config_ho= st_mak - echo "QEMU_GA_DISTRO=3D${QEMU_GA_DISTRO-Linux}" >> $config_host_mak - echo "QEMU_GA_VERSION=3D${QEMU_GA_VERSION-$(cat "$source_path"/VERSION)}= " >> $config_host_mak -fi - echo "SRC_PATH=3D$source_path" >> $config_host_mak echo "TARGET_DIRS=3D$target_list" >> $config_host_mak echo "GDB=3D$gdb_bin" >> $config_host_mak @@ -1721,6 +1715,15 @@ if test "$skip_meson" =3D no; then if test "$SMBD" !=3D ''; then echo "smbd =3D $(meson_quote "$SMBD")" >> $cross fi + if test "${QEMU_GA_MANUFACTURER}" !=3D ''; then + echo "qemu_ga_manufacturer =3D $(meson_quote "${QEMU_GA_MANUFACTURER}"= )" >> $cross + fi + if test "${QEMU_GA_DISTRO}" !=3D ''; then + echo "qemu_ga_distro =3D $(meson_quote "${QEMU_GA_DISTRO}")" >> $cross + fi + if test "${QEMU_GA_VERSION}" !=3D ''; then + echo "qemu_ga_version =3D $(meson_quote "${QEMU_GA_VERSION}")" >> $cro= ss + fi =20 echo >> $cross echo "[binaries]" >> $cross @@ -1772,7 +1775,6 @@ if test "$skip_meson" =3D no; then =20 rm -rf meson-private meson-info meson-logs =20 - # Built-in options test "$download" =3D "disabled" && meson_option_add "--wrap-mode=3Dnodow= nload" test "$default_feature" =3D no && meson_option_add -Dauto_features=3Ddis= abled test "$static" =3D yes && meson_option_add -Dprefer_static=3Dtrue diff --git a/meson_options.txt b/meson_options.txt index e237b268469..1b0c02b4a58 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -353,5 +353,12 @@ option('qom_cast_debug', type: 'boolean', value: true, option('slirp_smbd', type : 'feature', value : 'auto', description: 'use smbd (at path --smbd=3D*) in slirp networking') =20 +option('qemu_ga_manufacturer', type: 'string', value: 'QEMU', + description: '"manufacturer" name for qemu-ga registry entries') +option('qemu_ga_distro', type: 'string', value: 'Linux', + description: 'second path element in qemu-ga registry entries') +option('qemu_ga_version', type: 'string', value: '', + description: 'version number for qemu-ga installer') + option('hexagon_idef_parser', type : 'boolean', value : true, description: 'use idef-parser to automatically generate TCG code fo= r the Hexagon frontend') diff --git a/qga/meson.build b/qga/meson.build index 59cae0cc6ee..940a51d55db 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -145,6 +145,9 @@ if targetos =3D=3D 'windows' else libpcre =3D 'libpcre2' endif + qga_msi_version =3D get_option('qemu_ga_version') =3D=3D '' \ + ? project.version() \ + : get_option('qemu_ga_version') qga_msi =3D custom_target('QGA MSI', input: files('installer/qemu-ga.wxs'), output: 'qemu-ga-@0@.msi'.format(host_arch), @@ -155,9 +158,9 @@ if targetos =3D=3D 'windows' qemu_ga_msi_vss, '-D', 'BUILD_DIR=3D' + meson.project_build_r= oot(), '-D', 'BIN_DIR=3D' + glib_pc.get_variable('b= indir'), - '-D', 'QEMU_GA_VERSION=3D' + config_host['QE= MU_GA_VERSION'], - '-D', 'QEMU_GA_MANUFACTURER=3D' + config_hos= t['QEMU_GA_MANUFACTURER'], - '-D', 'QEMU_GA_DISTRO=3D' + config_host['QEM= U_GA_DISTRO'], + '-D', 'QEMU_GA_VERSION=3D' + qga_msi_version, + '-D', 'QEMU_GA_MANUFACTURER=3D' + get_option= ('qemu_ga_manufacturer'), + '-D', 'QEMU_GA_DISTRO=3D' + get_option('qemu= _ga_distro'), '-D', 'LIBPCRE=3D' + libpcre, ]) all_qga +=3D [qga_msi] diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index dec33820163..bda88993bd1 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -64,6 +64,12 @@ meson_options_help() { printf "%s\n" ' --localstatedir=3DVALUE Localstate data directory [/= var/local]' printf "%s\n" ' --mandir=3DVALUE Manual page directory [share= /man]' printf "%s\n" ' --prefix=3DVALUE Installation prefix [/usr/lo= cal]' + printf "%s\n" ' --qemu-ga-distro=3DVALUE second path element in qemu-= ga registry entries' + printf "%s\n" ' [Linux]' + printf "%s\n" ' --qemu-ga-manufacturer=3DVALUE' + printf "%s\n" ' "manufacturer" name for qemu-g= a registry entries' + printf "%s\n" ' [QEMU]' + printf "%s\n" ' --qemu-ga-version=3DVALUE version number for qemu-ga i= nstaller' printf "%s\n" ' --smbd=3DVALUE Path to smbd for slirp netwo= rking' printf "%s\n" ' --sysconfdir=3DVALUE Sysconf data directory [etc]' printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' @@ -422,6 +428,9 @@ _meson_option_parse() { --enable-qed) printf "%s" -Dqed=3Denabled ;; --disable-qed) printf "%s" -Dqed=3Ddisabled ;; --firmwarepath=3D*) quote_sh "-Dqemu_firmwarepath=3D$(meson_option_bui= ld_array $2)" ;; + --qemu-ga-distro=3D*) quote_sh "-Dqemu_ga_distro=3D$2" ;; + --qemu-ga-manufacturer=3D*) quote_sh "-Dqemu_ga_manufacturer=3D$2" ;; + --qemu-ga-version=3D*) quote_sh "-Dqemu_ga_version=3D$2" ;; --with-suffix=3D*) quote_sh "-Dqemu_suffix=3D$2" ;; --enable-qga-vss) printf "%s" -Dqga_vss=3Denabled ;; --disable-qga-vss) printf "%s" -Dqga_vss=3Ddisabled ;; --=20 2.41.0