From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: [PULL 1/7] meson.build: Make keyutils independent from keyring
Date: Mon, 25 Sep 2023 11:00:54 +0200 [thread overview]
Message-ID: <20230925090100.45632-2-thuth@redhat.com> (raw)
In-Reply-To: <20230925090100.45632-1-thuth@redhat.com>
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
Message-ID: <20230824094208.255279-1-thuth@redhat.com>
Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com>
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 f426861d90..5139db2ff7 100644
--- a/meson.build
+++ b/meson.build
@@ -1763,8 +1763,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')
@@ -4229,6 +4230,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 2ca40f22e9..57e265c871 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -121,6 +121,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('af_xdp', type : 'feature', value : 'auto',
description: 'AF_XDP network backend support')
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 230119346a..e4b46d5715 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -122,6 +122,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'
@@ -345,6 +346,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.41.0
next prev parent reply other threads:[~2023-09-25 9:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 9:00 [PULL 0/7] qtest and misc patches Thomas Huth
2023-09-25 9:00 ` Thomas Huth [this message]
2023-09-25 9:00 ` [PULL 2/7] tests/qtest/netdev-socket: Raise connection timeout to 120 seconds Thomas Huth
2023-09-25 9:00 ` [PULL 3/7] tests/qtest/m48t59-test: Silence compiler warning with -Wshadow Thomas Huth
2023-09-25 9:00 ` [PULL 4/7] tests/qtest/netdev-socket: Do not test multicast on Darwin Thomas Huth
2023-09-25 9:00 ` [PULL 5/7] hw/mips/jazz: Move the NIC init code into a separate function Thomas Huth
2023-09-25 9:00 ` [PULL 6/7] hw/mips/jazz: Simplify the NIC setup code Thomas Huth
2023-09-25 9:01 ` [PULL 7/7] tests/avocado: fix waiting for vm shutdown in replay_linux Thomas Huth
2023-09-25 15:36 ` [PULL 0/7] qtest and misc patches Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230925090100.45632-2-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.