meson: switch checks to depend on json-c as well as yajl

Ensure both are required during this series to make bisecting smooth.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Ján Tomko 2024-08-14 21:44:58 +02:00
parent 1873b54512
commit 28c9872639
7 changed files with 16 additions and 10 deletions

View File

@ -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
@ -1367,8 +1368,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} \

View File

@ -1627,10 +1627,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('YAJL 2 *AND* json-c is required to build Cloud-Hypervisor driver')
endif
endif
@ -1701,10 +1701,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('YAJL 2 *AND* json-c is required to build QEMU driver')
endif
endif
@ -2027,9 +2027,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 YAJL 2 *AND* json-c')
else
use_nss = false
endif

View File

@ -68,14 +68,14 @@ option('driver_libvirtd', type: 'feature', value: 'auto', description: 'libvirtd
option('driver_libxl', type: 'feature', value: 'auto', description: 'libxenlight driver')
# dep:driver_remote dep:driver_libvirtd
option('driver_lxc', type: 'feature', value: 'auto', description: 'Linux Container driver')
# dep:curl dep:yajl dep:driver_remote dep:driver_libvirtd
# dep:curl dep:json_c dep:driver_remote dep:driver_libvirtd
option('driver_ch', type: 'feature', value: 'auto', description: 'Cloud-Hypervisor driver')
option('ch_user', type: 'string', value: '', description: 'username to run Cloud-Hypervisor system instance as')
option('ch_group', type: 'string', value: '', description: 'groupname to run Cloud-Hypervisor system instance as')
# dep:driver_remote dep:driver_libvirtd
option('driver_network', type: 'feature', value: 'auto', description: 'virtual network driver')
option('driver_openvz', type: 'feature', value: 'auto', description: 'OpenVZ driver')
# dep:yajl dep:driver_remote dep:driver_libvirtd
# dep:json_c dep:driver_remote dep:driver_libvirtd
option('driver_qemu', type: 'feature', value: 'auto', description: 'QEMU/KVM driver')
option('qemu_user', type: 'string', value: '', description: 'username to run QEMU system instance as')
option('qemu_group', type: 'string', value: '', description: 'groupname to run QEMU system instance as')
@ -123,7 +123,7 @@ option('host_validate', type: 'feature', value: 'auto', description: 'build virt
option('init_script', type: 'combo', choices: ['systemd', 'openrc', 'check', 'none'], value: 'check', description: 'Style of init script to install')
option('loader_nvram', type: 'string', value: '', description: 'Pass list of pairs of <loader>:<nvram> paths. Both pairs and list items are separated by a colon.')
option('login_shell', type: 'feature', value: 'auto', description: 'build virt-login-shell')
# dep:yajl dep:driver_network dep:libvirtd
# dep:json_c dep:driver_network dep:libvirtd
option('nss', type: 'feature', value: 'auto', description: 'enable Name Service Switch plugin for resolving guest IP addresses')
# dep:numactl
option('numad', type: 'feature', value: 'auto', description: 'use numad to manage CPU placement dynamically')

View File

@ -552,6 +552,7 @@ if conf.has('WITH_REMOTE')
capng_dep,
devmapper_dep,
gnutls_dep,
json_c_dep,
libssh2_dep,
libssh_dep,
sasl_dep,

View File

@ -193,6 +193,7 @@ virt_util_lib = static_library(
capng_dep,
devmapper_dep,
gnutls_dep,
json_c_dep,
intl_dep,
libbsd_dep,
libm_dep,

View File

@ -10,6 +10,7 @@ tests_dep = declare_dependency(
dlopen_dep,
glib_dep,
gnutls_dep,
json_c_dep,
libnl_dep,
libxml_dep,
rpc_dep,

View File

@ -28,6 +28,7 @@ nss_libvirt_impl = static_library(
'-DLIBVIRT_NSS'
],
dependencies: [
json_c_dep,
tools_dep,
yajl_dep,
],
@ -44,6 +45,7 @@ nss_libvirt_guest_impl = static_library(
'-DLIBVIRT_NSS_GUEST',
],
dependencies: [
json_c_dep,
tools_dep,
yajl_dep,
],