* [PATCH] meson.build: Make keyutils independent from keyring
@ 2023-08-24 9:42 Thomas Huth
2023-09-07 19:57 ` Michael Tokarev
2023-09-08 8:10 ` Daniel P. Berrangé
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Huth @ 2023-08-24 9:42 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrangé
Cc: qemu-stable, Paolo Bonzini, Marc-André Lureau,
Philippe Mathieu-Daudé, antischmock
Commit 0db0fbb5cf ("Add conditional dependency for libkeyutils")
tried to provide a possibility for the user to disable keyutils
if not required by makeing it depend on the keyring feature. This
looked reasonable at a first glance (the unit test in tests/unit/
needs both), but the condition in meson.build fails if the feature
is meant to be detected automatically, and there is also another
spot in backends/meson.build where keyutils is used independently
from keyring. So let's remove the dependency on keyring again and
introduce a proper meson build option instead.
Cc: qemu-stable@nongnu.org
Fixes: 0db0fbb5cf ("Add conditional dependency for libkeyutils")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1842
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
meson.build | 6 ++++--
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 3 +++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 98e68ef0b1..5756148576 100644
--- a/meson.build
+++ b/meson.build
@@ -1771,8 +1771,9 @@ if gnutls.found()
method: 'pkg-config')
endif
keyutils = not_found
-if get_option('keyring').enabled()
- keyutils = dependency('libkeyutils', required: false, method: 'pkg-config')
+if not get_option('libkeyutils').auto() or have_block
+ keyutils = dependency('libkeyutils', required: get_option('libkeyutils'),
+ method: 'pkg-config')
endif
has_gettid = cc.has_function('gettid')
@@ -4211,6 +4212,7 @@ endif
summary_info += {'AF_ALG support': have_afalg}
summary_info += {'rng-none': get_option('rng_none')}
summary_info += {'Linux keyring': have_keyring}
+summary_info += {'Linux keyutils': keyutils}
summary(summary_info, bool_yn: true, section: 'Crypto')
# UI
diff --git a/meson_options.txt b/meson_options.txt
index aaea5ddd77..ae6d8f469d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -119,6 +119,8 @@ option('avx512bw', type: 'feature', value: 'auto',
description: 'AVX512BW optimizations')
option('keyring', type: 'feature', value: 'auto',
description: 'Linux keyring support')
+option('libkeyutils', type: 'feature', value: 'auto',
+ description: 'Linux keyutils support')
option('attr', type : 'feature', value : 'auto',
description: 'attr/xattr support')
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 9da3fe299b..d7020af175 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -120,6 +120,7 @@ meson_options_help() {
printf "%s\n" ' libdaxctl libdaxctl support'
printf "%s\n" ' libdw debuginfo support'
printf "%s\n" ' libiscsi libiscsi userspace initiator'
+ printf "%s\n" ' libkeyutils Linux keyutils support'
printf "%s\n" ' libnfs libnfs block device driver'
printf "%s\n" ' libpmem libpmem support'
printf "%s\n" ' libssh ssh block device support'
@@ -341,6 +342,8 @@ _meson_option_parse() {
--libexecdir=*) quote_sh "-Dlibexecdir=$2" ;;
--enable-libiscsi) printf "%s" -Dlibiscsi=enabled ;;
--disable-libiscsi) printf "%s" -Dlibiscsi=disabled ;;
+ --enable-libkeyutils) printf "%s" -Dlibkeyutils=enabled ;;
+ --disable-libkeyutils) printf "%s" -Dlibkeyutils=disabled ;;
--enable-libnfs) printf "%s" -Dlibnfs=enabled ;;
--disable-libnfs) printf "%s" -Dlibnfs=disabled ;;
--enable-libpmem) printf "%s" -Dlibpmem=enabled ;;
--
2.39.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] meson.build: Make keyutils independent from keyring
2023-08-24 9:42 [PATCH] meson.build: Make keyutils independent from keyring Thomas Huth
@ 2023-09-07 19:57 ` Michael Tokarev
2023-09-22 16:53 ` Thomas Huth
2023-09-08 8:10 ` Daniel P. Berrangé
1 sibling, 1 reply; 4+ messages in thread
From: Michael Tokarev @ 2023-09-07 19:57 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Daniel P. Berrangé
Cc: qemu-stable, Paolo Bonzini, Marc-André Lureau,
Philippe Mathieu-Daudé, antischmock
24.08.2023 12:42, Thomas Huth wrote:
> Commit 0db0fbb5cf ("Add conditional dependency for libkeyutils")
> tried to provide a possibility for the user to disable keyutils
> if not required by makeing it depend on the keyring feature. This
> looked reasonable at a first glance (the unit test in tests/unit/
> needs both), but the condition in meson.build fails if the feature
> is meant to be detected automatically, and there is also another
> spot in backends/meson.build where keyutils is used independently
> from keyring. So let's remove the dependency on keyring again and
> introduce a proper meson build option instead.
>
> Cc: qemu-stable@nongnu.org
> Fixes: 0db0fbb5cf ("Add conditional dependency for libkeyutils")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1842
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Ping? Has this been forgotten?
Thanks,
/mjt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] meson.build: Make keyutils independent from keyring
2023-09-07 19:57 ` Michael Tokarev
@ 2023-09-22 16:53 ` Thomas Huth
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2023-09-22 16:53 UTC (permalink / raw)
To: Michael Tokarev, qemu-devel, Daniel P. Berrangé
Cc: qemu-stable, Paolo Bonzini, Marc-André Lureau,
Philippe Mathieu-Daudé, antischmock
On 07/09/2023 21.57, Michael Tokarev wrote:
> 24.08.2023 12:42, Thomas Huth wrote:
>> Commit 0db0fbb5cf ("Add conditional dependency for libkeyutils")
>> tried to provide a possibility for the user to disable keyutils
>> if not required by makeing it depend on the keyring feature. This
>> looked reasonable at a first glance (the unit test in tests/unit/
>> needs both), but the condition in meson.build fails if the feature
>> is meant to be detected automatically, and there is also another
>> spot in backends/meson.build where keyutils is used independently
>> from keyring. So let's remove the dependency on keyring again and
>> introduce a proper meson build option instead.
>>
>> Cc: qemu-stable@nongnu.org
>> Fixes: 0db0fbb5cf ("Add conditional dependency for libkeyutils")
>> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1842
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>
> Ping? Has this been forgotten?
I'll add it to my next pull request.
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] meson.build: Make keyutils independent from keyring
2023-08-24 9:42 [PATCH] meson.build: Make keyutils independent from keyring Thomas Huth
2023-09-07 19:57 ` Michael Tokarev
@ 2023-09-08 8:10 ` Daniel P. Berrangé
1 sibling, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2023-09-08 8:10 UTC (permalink / raw)
To: Thomas Huth
Cc: qemu-devel, qemu-stable, Paolo Bonzini, Marc-André Lureau,
Philippe Mathieu-Daudé, antischmock
On Thu, Aug 24, 2023 at 11:42:08AM +0200, Thomas Huth wrote:
> Commit 0db0fbb5cf ("Add conditional dependency for libkeyutils")
> tried to provide a possibility for the user to disable keyutils
> if not required by makeing it depend on the keyring feature. This
> looked reasonable at a first glance (the unit test in tests/unit/
> needs both), but the condition in meson.build fails if the feature
> is meant to be detected automatically, and there is also another
> spot in backends/meson.build where keyutils is used independently
> from keyring. So let's remove the dependency on keyring again and
> introduce a proper meson build option instead.
>
> Cc: qemu-stable@nongnu.org
> Fixes: 0db0fbb5cf ("Add conditional dependency for libkeyutils")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1842
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> meson.build | 6 ++++--
> meson_options.txt | 2 ++
> scripts/meson-buildoptions.sh | 3 +++
> 3 files changed, 9 insertions(+), 2 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-22 16:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 9:42 [PATCH] meson.build: Make keyutils independent from keyring Thomas Huth
2023-09-07 19:57 ` Michael Tokarev
2023-09-22 16:53 ` Thomas Huth
2023-09-08 8:10 ` Daniel P. Berrangé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).