[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.1.2 21/45] meson.build: Make keyutils independent from keyring
From: |
Michael Tokarev |
Subject: |
[Stable-8.1.2 21/45] meson.build: Make keyutils independent from keyring |
Date: |
Wed, 4 Oct 2023 11:01:42 +0300 |
From: Thomas Huth <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>
(cherry picked from commit c64023b0ba677cfa6b878e82ea8e18507a597396)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/meson.build b/meson.build
index 912c7e7847..a9c4f28247 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.2
- [Stable-8.1.2 15/45] file-posix: Fix zone update in I/O error path, (continued)
- [Stable-8.1.2 15/45] file-posix: Fix zone update in I/O error path, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 14/45] file-posix: Check bs->bl.zoned for zone info, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 12/45] hw/cxl: Fix out of bound array access, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 09/45] linux-user/hppa: clear the PSW 'N' bit when delivering signals, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 05/45] target/ppc: Sign-extend large decrementer to 64-bits, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 06/45] hw/ppc: Always store the decrementer value, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 24/45] ui/vnc: fix debug output for invalid audio message, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 27/45] migration: Fix possible race when setting rp_state.error, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 19/45] hw/arm/boot: Set SCR_EL3.FGTEn when booting kernel, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 20/45] target/arm: Don't skip MTE checks for LDRT/STRT at EL0, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 21/45] meson.build: Make keyutils independent from keyring,
Michael Tokarev <=
- [Stable-8.1.2 23/45] hw/scsi/scsi-disk: Disallow block sizes smaller than 512 [CVE-2023-42467], Michael Tokarev, 2023/10/04
- [Stable-8.1.2 18/45] include/exec: Widen tlb_hit/tlb_hit_page(), Michael Tokarev, 2023/10/04
- [Stable-8.1.2 25/45] ui/vnc: fix handling of VNC_FEATURE_XVP, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 26/45] migration: Fix race that dest preempt thread close too early, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 17/45] tests/file-io-error: New test, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 22/45] accel/tcg: mttcg remove false-negative halted assertion, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 29/45] migration: Fix possible race when shutting down to_dst_file, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 30/45] migration: Remove redundant cleanup of postcopy_qemufile_src, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 28/45] migration: Fix possible races when shutting down the return path, Michael Tokarev, 2023/10/04
- [Stable-8.1.2 31/45] migration: Consolidate return path closing code, Michael Tokarev, 2023/10/04