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 A2BEBC433EF for ; Wed, 20 Apr 2022 19:32:01 +0000 (UTC) Received: from localhost ([::1]:40376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhG3U-0007nQ-My for qemu-devel@archiver.kernel.org; Wed, 20 Apr 2022 15:32:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhF1C-0006J8-Oo for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:25:34 -0400 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]:33430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhF19-00047e-RD for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:25:34 -0400 Received: by mail-qv1-xf31.google.com with SMTP id n11so1993862qvl.0 for ; Wed, 20 Apr 2022 11:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=blflpx/NE1j96JOvEuNzcgf4XLLCntjR6YGGIQxRs6E=; b=Ut1cgl7Vm1LeZvH5HwY9oI22EXTezFFYvpZpn4IsxNVvMKeLpLl7umXY2XUNVpXVTw DLuKR/69CpvrgxJ1d2KaUiXiHG/KFj0xjgXRlkUzAmGkiSEQX6sA3L2AuZU4d9YC4t1f cqc83kbHgOm/HADlUjoWkjNYcC3aHcyjCQ5mENQqY4aCNtbQG4N/aJWWk8wGzPx4Qihc GYWSo+u0If+Kmt2kSBcbsgEdwfdch67XIr+uGI14D4K+gd+PspatXZQNzlDjyuNHS5zW BuMsFh56ezz9FIWaJmI8ZUlLRC5RoY0QlxIefxKk9cyseP94RmKaU5sj9XxYoMiTjuNB qvHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=blflpx/NE1j96JOvEuNzcgf4XLLCntjR6YGGIQxRs6E=; b=XR6ogLTzqRksvaKLqJtXsd8zEalMzfeVboBzB/5hWKsh4keilsUPGaI8QftsNW1+ra q4Vbjq9x6XtrDXmRNRizhc01W4tsonl9vRNS2xzeGO7at3T+eWZPMmBVWhLpxTCsG0ON RzD7+7bLQF0j1dAmUmxO+CgMf3csNkW0vnzRiS32MUhXhc+kNMJU8hyWNdr5F1tofsUK ViTlfTusWH9jTi0vfJFb1F0NTyaweKVEnUXK8aUxxhnpn5NSmz4J6mCQcKsUnhkS5Ocl 6pFMFVIrDjhkfsrT1xKP/Z5fI/ThZMKoUmePGnlzF/SV29ZSfbZqItbGwTowgHMPIWng cIJQ== X-Gm-Message-State: AOAM531p1L6gPUFuFo5AjLfRhAUe0wARK8dDmiyaYUU1jU00quRiGtix L0/IsvZVzEBooYqPGa3gRj9HMrCXROh0jaD237N++J+zqK6ldg== X-Google-Smtp-Source: ABdhPJzhx4uT4dFXfBjzde7LdKQKwJXHORRxpeOVimQN2XEsT565sSd6bCKC6yTGpsxBeoQBzVeo7kk11aBjYDig02w= X-Received: by 2002:a05:6214:262c:b0:446:3464:57cd with SMTP id gv12-20020a056214262c00b00446346457cdmr16524619qvb.89.1650479130896; Wed, 20 Apr 2022 11:25:30 -0700 (PDT) MIME-Version: 1.0 References: <20220420153407.73926-1-pbonzini@redhat.com> <20220420153407.73926-20-pbonzini@redhat.com> In-Reply-To: <20220420153407.73926-20-pbonzini@redhat.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Wed, 20 Apr 2022 22:25:19 +0400 Message-ID: Subject: Re: [PATCH 19/34] meson, configure: move --tls-priority to meson To: Paolo Bonzini Content-Type: multipart/alternative; boundary="0000000000004e6be305dd1a1e2d" Received-SPF: pass client-ip=2607:f8b0:4864:20::f31; envelope-from=marcandre.lureau@gmail.com; helo=mail-qv1-xf31.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: QEMU Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000004e6be305dd1a1e2d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 20, 2022 at 7:45 PM Paolo Bonzini wrote: > Use the new support for string option parsing. > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-Andr=C3=A9 Lureau > --- > configure | 5 ----- > meson.build | 3 ++- > meson_options.txt | 2 ++ > scripts/meson-buildoptions.sh | 3 +++ > 4 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/configure b/configure > index 8f34f2a061..3327a4887a 100755 > --- a/configure > +++ b/configure > @@ -311,7 +311,6 @@ bsd_user=3D"" > pkgversion=3D"" > pie=3D"" > coroutine=3D"" > -tls_priority=3D"NORMAL" > plugins=3D"$default_feature" > meson=3D"" > meson_args=3D"" > @@ -938,8 +937,6 @@ for opt do > --enable-uuid|--disable-uuid) > echo "$0: $opt is obsolete, UUID support is always built" >&2 > ;; > - --tls-priority=3D*) tls_priority=3D"$optarg" > - ;; > --disable-vhost-user) vhost_user=3D"no" > ;; > --enable-vhost-user) vhost_user=3D"yes" > @@ -1169,7 +1166,6 @@ Advanced options (experts only): > --with-coroutine=3DBACKEND coroutine backend. Supported options: > ucontext, sigaltstack, windows > --enable-gcov enable test coverage analysis with gcov > - --tls-priority default TLS protocol/cipher priority string > --enable-plugins > enable plugins via shared library loading > --disable-containers don't use containers for cross-building > @@ -2200,7 +2196,6 @@ if test "$modules" =3D "yes"; then > echo "CONFIG_STAMP=3D_$( (echo $qemu_version; echo $pkgversion; cat $0= ) | > $shacmd - | cut -f1 -d\ )" >> $config_host_mak > echo "CONFIG_MODULES=3Dy" >> $config_host_mak > fi > -echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak > > if test "$vhost_scsi" =3D "yes" ; then > echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak > diff --git a/meson.build b/meson.build > index ffca473fbc..8a7e4ab5c7 100644 > --- a/meson.build > +++ b/meson.build > @@ -1596,6 +1596,7 @@ foreach k : get_option('trace_backends') > config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) > endforeach > config_host_data.set_quoted('CONFIG_TRACE_FILE', get_option('trace_file'= )) > +config_host_data.set_quoted('CONFIG_TLS_PRIORITY', > get_option('tls_priority')) > if iasl.found() > config_host_data.set_quoted('CONFIG_IASL', iasl.full_path()) > endif > @@ -3806,7 +3807,7 @@ summary(summary_info, bool_yn: true, section: 'Bloc= k > layer support') > > # Crypto > summary_info =3D {} > -summary_info +=3D {'TLS priority': config_host['CONFIG_TLS_PRIORITY= ']} > +summary_info +=3D {'TLS priority': get_option('tls_priority')} > summary_info +=3D {'GNUTLS support': gnutls} > if gnutls.found() > summary_info +=3D {' GNUTLS crypto': gnutls_crypto.found()} > diff --git a/meson_options.txt b/meson_options.txt > index 415fcc448e..891c0ec130 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -14,6 +14,8 @@ option('sphinx_build', type : 'string', value : '', > description: 'Use specified sphinx-build for building document') > option('iasl', type : 'string', value : '', > description: 'Path to ACPI disassembler') > +option('tls_priority', type : 'string', value : 'NORMAL', > + description: 'Default TLS protocol/cipher priority string') > option('default_devices', type : 'boolean', value : true, > description: 'Include a default selection of devices in emulators= ') > option('audio_drv_list', type: 'array', value: ['default'], > diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.s= h > index 63f2f1abcf..0e0548aa87 100644 > --- a/scripts/meson-buildoptions.sh > +++ b/scripts/meson-buildoptions.sh > @@ -36,6 +36,8 @@ meson_options_help() { > printf "%s\n" ' > dtrace/ftrace/log/nop/simple/syslog/ust)' > printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' > printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build > for building document' > + printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/ciphe= r > priority string' > + printf "%s\n" ' [NORMAL]' > printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simp= le > backend [trace]' > printf "%s\n" '' > printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' > @@ -349,6 +351,7 @@ _meson_option_parse() { > --disable-tcg) printf "%s" -Dtcg=3Ddisabled ;; > --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dtrue ;; > --disable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dfalse ;; > + --tls-priority=3D*) quote_sh "-Dtls_priority=3D$2" ;; > --enable-tools) printf "%s" -Dtools=3Denabled ;; > --disable-tools) printf "%s" -Dtools=3Ddisabled ;; > --enable-tpm) printf "%s" -Dtpm=3Denabled ;; > -- > 2.35.1 > > > > --=20 Marc-Andr=C3=A9 Lureau --0000000000004e6be305dd1a1e2d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Apr 20, 2022 at 7:45 PM Paolo= Bonzini <pbonzini@redhat.com= > wrote:
Use = the new support for string option parsing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

<= div>
Reviewed-by: Marc-Andr=C3=A9 Lureau <marcandre.lureau@redhat.com>

=C2=A0
---
=C2=A0configure=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0| 5 -----
=C2=A0meson.build=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0| 3 ++-
=C2=A0meson_options.txt=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 2 = ++
=C2=A0scripts/meson-buildoptions.sh | 3 +++
=C2=A04 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 8f34f2a061..3327a4887a 100755
--- a/configure
+++ b/configure
@@ -311,7 +311,6 @@ bsd_user=3D""
=C2=A0pkgversion=3D""
=C2=A0pie=3D""
=C2=A0coroutine=3D""
-tls_priority=3D"NORMAL"
=C2=A0plugins=3D"$default_feature"
=C2=A0meson=3D""
=C2=A0meson_args=3D""
@@ -938,8 +937,6 @@ for opt do
=C2=A0 =C2=A0--enable-uuid|--disable-uuid)
=C2=A0 =C2=A0 =C2=A0 =C2=A0echo "$0: $opt is obsolete, UUID support is= always built" >&2
=C2=A0 =C2=A0;;
-=C2=A0 --tls-priority=3D*) tls_priority=3D"$optarg"
-=C2=A0 ;;
=C2=A0 =C2=A0--disable-vhost-user) vhost_user=3D"no"
=C2=A0 =C2=A0;;
=C2=A0 =C2=A0--enable-vhost-user) vhost_user=3D"yes"
@@ -1169,7 +1166,6 @@ Advanced options (experts only):
=C2=A0 =C2=A0--with-coroutine=3DBACKEND coroutine backend. Supported option= s:
=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 ucontext, sigaltstack, windows
=C2=A0 =C2=A0--enable-gcov=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 enable = test coverage analysis with gcov
-=C2=A0 --tls-priority=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0default TLS = protocol/cipher priority string
=C2=A0 =C2=A0--enable-plugins
=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 enable plugins via shared library loading
=C2=A0 =C2=A0--disable-containers=C2=A0 =C2=A0 =C2=A0don't use containe= rs for cross-building
@@ -2200,7 +2196,6 @@ if test "$modules" =3D "yes"; the= n
=C2=A0 =C2=A0echo "CONFIG_STAMP=3D_$( (echo $qemu_version; echo $pkgve= rsion; cat $0) | $shacmd - | cut -f1 -d\ )" >> $config_host_mak<= br> =C2=A0 =C2=A0echo "CONFIG_MODULES=3Dy" >> $config_host_mak<= br> =C2=A0fi
-echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >>= ; $config_host_mak

=C2=A0if test "$vhost_scsi" =3D "yes" ; then
=C2=A0 =C2=A0echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_m= ak
diff --git a/meson.build b/meson.build
index ffca473fbc..8a7e4ab5c7 100644
--- a/meson.build
+++ b/meson.build
@@ -1596,6 +1596,7 @@ foreach k : get_option('trace_backends')
=C2=A0 =C2=A0config_host_data.set('CONFIG_TRACE_' + k.to_upper(), t= rue)
=C2=A0endforeach
=C2=A0config_host_data.set_quoted('CONFIG_TRACE_FILE', get_option(&= #39;trace_file'))
+config_host_data.set_quoted('CONFIG_TLS_PRIORITY', get_option('= ;tls_priority'))
=C2=A0if iasl.found()
=C2=A0 =C2=A0config_host_data.set_quoted('CONFIG_IASL', iasl.full_p= ath())
=C2=A0endif
@@ -3806,7 +3807,7 @@ summary(summary_info, bool_yn: true, section: 'Bl= ock layer support')

=C2=A0# Crypto
=C2=A0summary_info =3D {}
-summary_info +=3D {'TLS priority':=C2=A0 =C2=A0 =C2=A0 config_host= ['CONFIG_TLS_PRIORITY']}
+summary_info +=3D {'TLS priority':=C2=A0 =C2=A0 =C2=A0 get_option(= 'tls_priority')}
=C2=A0summary_info +=3D {'GNUTLS support':=C2=A0 =C2=A0 gnutls}
=C2=A0if gnutls.found()
=C2=A0 =C2=A0summary_info +=3D {'=C2=A0 GNUTLS crypto':=C2=A0 =C2= =A0gnutls_crypto.found()}
diff --git a/meson_options.txt b/meson_options.txt
index 415fcc448e..891c0ec130 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -14,6 +14,8 @@ option('sphinx_build', type : 'string', v= alue : '',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 description: 'Use specified sphinx-build fo= r building document')
=C2=A0option('iasl', type : 'string', value : '', =C2=A0 =C2=A0 =C2=A0 =C2=A0 description: 'Path to ACPI disassembler'= ;)
+option('tls_priority', type : 'string', value : 'NORMA= L',
+=C2=A0 =C2=A0 =C2=A0 =C2=A0description: 'Default TLS protocol/cipher p= riority string')
=C2=A0option('default_devices', type : 'boolean', value : t= rue,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 description: 'Include a default selection o= f devices in emulators')
=C2=A0option('audio_drv_list', type: 'array', value: ['= default'],
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh<= br> index 63f2f1abcf..0e0548aa87 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -36,6 +36,8 @@ meson_options_help() {
=C2=A0 =C2=A0printf "%s\n" '=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=A0dtrace/ft= race/log/nop/simple/syslog/ust)'
=C2=A0 =C2=A0printf "%s\n" '=C2=A0 --iasl=3DVALUE=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Path to ACPI disassembler'
=C2=A0 =C2=A0printf "%s\n" '=C2=A0 --sphinx-build=3DVALUE=C2= =A0 =C2=A0 =C2=A0Use specified sphinx-build for building document'
+=C2=A0 printf "%s\n" '=C2=A0 --tls-priority=3DVALUE=C2=A0 = =C2=A0 =C2=A0Default TLS protocol/cipher priority string'
+=C2=A0 printf "%s\n" '=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[NORMAL]' =C2=A0 =C2=A0printf "%s\n" '=C2=A0 --with-trace-file=3DVALUE= =C2=A0 Trace file prefix for simple backend [trace]'
=C2=A0 =C2=A0printf "%s\n" ''
=C2=A0 =C2=A0printf "%s\n" 'Optional features, enabled with -= -enable-FEATURE and'
@@ -349,6 +351,7 @@ _meson_option_parse() {
=C2=A0 =C2=A0 =C2=A0--disable-tcg) printf "%s" -Dtcg=3Ddisabled ;= ;
=C2=A0 =C2=A0 =C2=A0--enable-tcg-interpreter) printf "%s" -Dtcg_i= nterpreter=3Dtrue ;;
=C2=A0 =C2=A0 =C2=A0--disable-tcg-interpreter) printf "%s" -Dtcg_= interpreter=3Dfalse ;;
+=C2=A0 =C2=A0 --tls-priority=3D*) quote_sh "-Dtls_priority=3D$2"= ;;
=C2=A0 =C2=A0 =C2=A0--enable-tools) printf "%s" -Dtools=3Denabled= ;;
=C2=A0 =C2=A0 =C2=A0--disable-tools) printf "%s" -Dtools=3Ddisabl= ed ;;
=C2=A0 =C2=A0 =C2=A0--enable-tpm) printf "%s" -Dtpm=3Denabled ;;<= br> --
2.35.1





--
Marc-Andr=C3=A9 Lureau
--0000000000004e6be305dd1a1e2d--