All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meson: fix logic for gnutls check
@ 2021-08-06 14:49 Alyssa Ross
  2021-08-06 15:39 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Alyssa Ross @ 2021-08-06 14:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Daniel P . Berrangé, Richard Henderson

The logic before was

	if not get_option('gnutls').auto() or have_system

Which is equivalent to

	if get_option('gnutls').enabled() or get_option('gnutls').disabled() or have_system

This means that the check for gnutls is performed even if gnutls is
disabled, which means that the build system will insist on having
libtasn1 if gnutls is found, even if gnutls support is disabled.

When gnutls is disabled, the check for gnutls shouldn't be performed,
to ensure that further build system logic (like the check for
libtasn1) doesn't make decisions based on the presence of gnutls,
rather than the gnutls option.

After making this change, I can successfully ./configure --disable-gnutls
on my system with gnutls installed, but not libtasn1.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index af9bbb83db..b3e7ec0e92 100644
--- a/meson.build
+++ b/meson.build
@@ -824,7 +824,7 @@ endif
 
 gnutls = not_found
 gnutls_crypto = not_found
-if not get_option('gnutls').auto() or have_system
+if get_option('gnutls').enabled() or (get_option('gnutls').auto() and have_system)
   # For general TLS support our min gnutls matches
   # that implied by our platform support matrix
   #
-- 
2.32.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] meson: fix logic for gnutls check
  2021-08-06 14:49 [PATCH] meson: fix logic for gnutls check Alyssa Ross
@ 2021-08-06 15:39 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2021-08-06 15:39 UTC (permalink / raw)
  To: Alyssa Ross, qemu-devel; +Cc: Daniel P . Berrangé, Richard Henderson

On 06/08/21 16:49, Alyssa Ross wrote:
> The logic before was
> 
> 	if not get_option('gnutls').auto() or have_system
> 
> Which is equivalent to
> 
> 	if get_option('gnutls').enabled() or get_option('gnutls').disabled() or have_system
> 
> This means that the check for gnutls is performed even if gnutls is
> disabled, which means that the build system will insist on having
> libtasn1 if gnutls is found, even if gnutls support is disabled.
> 
> When gnutls is disabled, the check for gnutls shouldn't be performed,
> to ensure that further build system logic (like the check for
> libtasn1) doesn't make decisions based on the presence of gnutls,
> rather than the gnutls option.
> 
> After making this change, I can successfully ./configure --disable-gnutls
> on my system with gnutls installed, but not libtasn1.
> 
> Signed-off-by: Alyssa Ross <hi@alyssa.is>
> ---
>   meson.build | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index af9bbb83db..b3e7ec0e92 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -824,7 +824,7 @@ endif
>   
>   gnutls = not_found
>   gnutls_crypto = not_found
> -if not get_option('gnutls').auto() or have_system
> +if get_option('gnutls').enabled() or (get_option('gnutls').auto() and have_system)
>     # For general TLS support our min gnutls matches
>     # that implied by our platform support matrix
>     #
> 

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

Right now I am not planning to send another pull request for -rc3, but 
the patch certainly has to be included.

Thanks,

Paolo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-06 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 14:49 [PATCH] meson: fix logic for gnutls check Alyssa Ross
2021-08-06 15:39 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.