rhel-8 lacks 'pidfd_open()' support and thus nbdkit can't be enabled
there.
mingw builds explicitly disable nbdkit support, but use
'--auto-features=enabled' thus omitting setting of
'nbdkit_config_default' results in meson thinking we want to enable it:
../meson.build:1018:2: ERROR: Problem encountered: nbdkit_config_default requires nbdkit
to be enabled
Disable it explicitly. The meson logic might need to be fixed eventually
when switching it on by default.
Fixes: 9eabf14afbd429af1be195723fdeab5ccdd0b2cd
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
libvirt.spec.in | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 2f2d713732..8413e3c19a 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -179,13 +179,19 @@
# default if the OS ships a SELinux policy that allows libvirt to launch it.
# Right now that's not the case anywhere, but things should be fine by the time
# Fedora 40 is released.
-#
-# TODO: add RHEL 9 once a minor release that contains the necessary SELinux
-# bits exists (we only support the most recent minor release)
%if %{with_qemu}
- %define with_nbdkit 0%{!?_without_nbdkit:1}
- %if 0%{?fedora} >= 40
- %define with_nbdkit_config_default 0%{!?_without_nbdkit_config_default:1}
+ # rhel-8 lacks pidfd_open
+ %if 0%{?fedora} || 0%{?rhel} >= 9
+ %define with_nbdkit 0%{!?_without_nbdkit:1}
+
+ # setting 'with_nbdkit_config_default' must be done only when compiling
+ # in nbdkit support
+ #
+ # TODO: add RHEL 9 once a minor release that contains the necessary SELinux
+ # bits exists (we only support the most recent minor release)
+ %if 0%{?fedora} >= 40
+ %define with_nbdkit_config_default 0%{!?_without_nbdkit_config_default:1}
+ %endif
%endif
%endif
@@ -1397,6 +1403,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y'
%{_specdir}/libvirt.spec)
-Dhost_validate=disabled \
-Dlibiscsi=disabled \
-Dnbdkit=disabled \
+ -Dnbdkit_config_default=disabled \
-Dlibnl=disabled \
-Dlibpcap=disabled \
-Dlibssh2=disabled \
--
2.43.0