On Thu, Sep 05, 2024 at 15:49:33 +0200, Ján Tomko wrote:
Ensure both are required during this series to make bisecting
smooth.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
libvirt.spec.in | 3 ++-
meson.build | 12 ++++++------
meson_options.txt | 6 +++---
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 2bc4aa98d4..63ac63cb45 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -362,6 +362,7 @@ BuildRequires: augeas
BuildRequires: systemd-devel >= 185
BuildRequires: libpciaccess-devel >= 0.10.9
BuildRequires: yajl-devel
+BuildRequires: json-c-devel
%if %{with_sanlock}
BuildRequires: sanlock-devel >= 2.4
%endif
@@ -1369,8 +1370,8 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y'
%{_specdir}/libvirt.spec)
-Dapparmor_profiles=disabled \
-Dsecdriver_apparmor=disabled \
-Dudev=enabled \
- -Djson_c=disabled \
-Dyajl=enabled \
+ -Djson_c=enabled \
%{?arg_sanlock} \
-Dlibpcap=enabled \
%{?arg_nbdkit} \
diff --git a/meson.build b/meson.build
index 855df79e62..e15514ea00 100644
--- a/meson.build
+++ b/meson.build
@@ -1622,10 +1622,10 @@ if not get_option('driver_ch').disabled() and
host_machine.system() == 'linux' a
endif
endif
- if not yajl_dep.found()
+ if not yajl_dep.found() or not json_c_dep.found()
use_ch = false
if get_option('driver_ch').enabled()
- error('YAJL 2 is required to build Cloud-Hypervisor driver')
+ error('json-c is required to build Cloud-Hypervisor driver')
endif
endif
@@ -1696,10 +1696,10 @@ endif
if not get_option('driver_qemu').disabled()
use_qemu = true
- if not yajl_dep.found()
+ if not yajl_dep.found() or not json_c_dep.found()
use_qemu = false
if get_option('driver_qemu').enabled()
- error('YAJL 2 is required to build QEMU driver')
+ error('json-c is required to build QEMU driver')
endif
endif
@@ -2029,9 +2029,9 @@ endif
if not get_option('nss').disabled()
use_nss = true
- if not yajl_dep.found()
+ if not yajl_dep.found() or not json_c_dep.found()
if get_option('nss').enabled()
- error('Can\'t build nss plugin without yajl')
+ error('Can\'t build nss plugin without json-c')
else
use_nss = false
endif
I'd prefer if the error messages spell out both libraries in the interim
with wording saying that you need both.
It could trip up somebody in the future bisecting into the past without
having yajl installed.
Since you'll be fixing the checks later on I thing the overhead of
changing the comments should be okay.
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>