summary refs log tree commit diff stats
path: root/scripts
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2023-08-24 11:42:08 +0200
committerThomas Huth <thuth@redhat.com>2023-09-25 07:53:40 +0200
commitc64023b0ba677cfa6b878e82ea8e18507a597396 (patch)
treee9e7f41c10878173656d81587dc201b05895d81b /scripts
parentb55e4b9c0525560577384adfc6d30eb0daa8d7be (diff)
downloadfocaccia-qemu-c64023b0ba677cfa6b878e82ea8e18507a597396.tar.gz
focaccia-qemu-c64023b0ba677cfa6b878e82ea8e18507a597396.zip
meson.build: Make keyutils independent from keyring
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/meson-buildoptions.sh3
1 files changed, 3 insertions, 0 deletions
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 ;;