]> xenbits.xensource.com Git - libvirt.git/commitdiff
meson: switch checks to depend on json-c as well as yajl
authorJán Tomko <jtomko@redhat.com>
Wed, 14 Aug 2024 19:44:58 +0000 (21:44 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 24 Sep 2024 06:24:00 +0000 (08:24 +0200)
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>
libvirt.spec.in
meson.build
meson_options.txt
src/meson.build
src/util/meson.build
tests/meson.build
tools/nss/meson.build

index 0636f2229bf58f3ca5d759efbccce6a7e2dfd96d..a1d942a996f3206ef98270f5046c7656f7240eea 100644 (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} \
index 1f43b99c2daea216ba8ece48a756d0c49c2a592d..8693f487671159d7279a60f20364bc65f91a8227 100644 (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
index 9b1610fcfecd615a314a4b35c033f5f8888ec91d..122cda03508f795c1a30eb6406ab345a336e0abf 100644 (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')
index 8cce42c7ad92e352b8d186bc0f42476cb14c1c6e..b9652785dd8cdf4357e6df5671005aae2bfcbbf9 100644 (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,
index 54db542957d14a218537d7700d9cc5d31b74e421..f8f7e736a628947c983d491ad929998f994e13b5 100644 (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,
index 700a5d40493071f5b2fb3ecfe6ef85914cb3de96..e8fd9bac0cdbcfa9a048a0920a9b2c913490ad83 100644 (file)
@@ -10,6 +10,7 @@ tests_dep = declare_dependency(
     dlopen_dep,
     glib_dep,
     gnutls_dep,
+    json_c_dep,
     libnl_dep,
     libxml_dep,
     rpc_dep,
index 85e2838fb7feec014a1ca15eda8bd95d608ba2bc..1cae93ac674ada9ffa62c44e35db6981d183f41c 100644 (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,
   ],