From nobody Sun Apr 28 19:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522278612554785.7293963196124; Wed, 28 Mar 2018 16:10:12 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9172D67EDD; Wed, 28 Mar 2018 23:10:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0963600D2; Wed, 28 Mar 2018 23:10:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 826AF4CA9E; Wed, 28 Mar 2018 23:10:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SNA6KP023929 for ; Wed, 28 Mar 2018 19:10:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 79B6F7C33; Wed, 28 Mar 2018 23:10:06 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 212396353C for ; Wed, 28 Mar 2018 23:10:03 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 01:09:50 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/9] virmacmaptest: depend on yajl for 'empty' test X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 28 Mar 2018 23:10:11 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 While an empty array is formatted with two newlines with yajl, jansson does not put any newlines between the brackets. Signed-off-by: J=C3=A1n Tomko --- tests/virmacmaptest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/virmacmaptest.c b/tests/virmacmaptest.c index 6e3e9984d..e0cf8f91a 100644 --- a/tests/virmacmaptest.c +++ b/tests/virmacmaptest.c @@ -205,8 +205,11 @@ mymain(void) DO_TEST_BASIC("simple2", "f24", "aa:bb:cc:dd:ee:ff", "a1:b2:c3:d4:e5:f= 6"); DO_TEST_BASIC("simple2", "f25", "00:11:22:33:44:55", "aa:bb:cc:00:11:2= 2"); =20 +#if WITH_YAJL + /* other JSON libraries might format an empty array differently */ DO_TEST_FLUSH_PROLOGUE; DO_TEST_FLUSH_EPILOGUE("empty"); +#endif =20 DO_TEST_FLUSH_PROLOGUE; DO_TEST_FLUSH("f24", "aa:bb:cc:dd:ee:ff"); --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522278612710394.05878186809; Wed, 28 Mar 2018 16:10:12 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C4B5D28202; Wed, 28 Mar 2018 23:10:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8EA096A958; Wed, 28 Mar 2018 23:10:10 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id F2335181B9FF; Wed, 28 Mar 2018 23:10:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SNA7BI023936 for ; Wed, 28 Mar 2018 19:10:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1789E6353C; Wed, 28 Mar 2018 23:10:07 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2A2D84420 for ; Wed, 28 Mar 2018 23:10:06 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 01:09:51 +0200 Message-Id: <5a258371cfbdb5910ead7759ca0b25c6bc148b1d.1522278485.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/9] virjsontest: Use a more stable floating point number for testing X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 28 Mar 2018 23:10:11 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 We store all JSON numbers as strings. To allow using json libraries that store them in numeric types, use a more predictable and normalized value. Signed-off-by: J=C3=A1n Tomko --- tests/virjsontest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/virjsontest.c b/tests/virjsontest.c index 685df7276..22bfd028a 100644 --- a/tests/virjsontest.c +++ b/tests/virjsontest.c @@ -540,7 +540,7 @@ mymain(void) DO_TEST_PARSE("number without garbage", "[ 234545 ]", "[234545]"); DO_TEST_PARSE_FAIL("number with garbage", "[ 2345b45 ]"); =20 - DO_TEST_PARSE("float without garbage", "[ 0.0314159e+100 ]", "[0.03141= 59e+100]"); + DO_TEST_PARSE("float without garbage", "[ 1.024e19 ]", "[1.024e19]"); DO_TEST_PARSE_FAIL("float with garbage", "[ 0.0314159ee+100 ]"); =20 DO_TEST_PARSE("string", "[ \"The meaning of life\" ]", --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522278659034189.0537495454971; Wed, 28 Mar 2018 16:10:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5CE7E12E384; Wed, 28 Mar 2018 23:10:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C80E5D755; Wed, 28 Mar 2018 23:10:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EA7A6180BAD8; Wed, 28 Mar 2018 23:10:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SNA7Am023941 for ; Wed, 28 Mar 2018 19:10:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id A94117C33; Wed, 28 Mar 2018 23:10:07 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 500B98442B for ; Wed, 28 Mar 2018 23:10:07 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 01:09:52 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/9] configure: rename LIBVIRT_*_YAJL to LIBVIRT_*_JSON X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 28 Mar 2018 23:10:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Rename the top-level functions that deal with yajl to prepare for the possibility of a different JSON library. Introduce a separate JSON libraries section in the configure summary and rename the m4 file to virt-json.m4. Signed-off-by: J=C3=A1n Tomko --- configure.ac | 9 ++++++--- m4/{virt-yajl.m4 =3D> virt-json.m4} | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) rename m4/{virt-yajl.m4 =3D> virt-json.m4} (94%) diff --git a/configure.ac b/configure.ac index 115eb6088..bef10c0fb 100644 --- a/configure.ac +++ b/configure.ac @@ -253,6 +253,7 @@ LIBVIRT_ARG_FUSE LIBVIRT_ARG_GLUSTER LIBVIRT_ARG_GNUTLS LIBVIRT_ARG_HAL +LIBVIRT_ARG_JSON LIBVIRT_ARG_LIBPCAP LIBVIRT_ARG_LIBSSH LIBVIRT_ARG_LIBXML @@ -272,7 +273,6 @@ LIBVIRT_ARG_SSH2 LIBVIRT_ARG_UDEV LIBVIRT_ARG_VIRTUALPORT LIBVIRT_ARG_WIRESHARK -LIBVIRT_ARG_YAJL =20 LIBVIRT_CHECK_ACL LIBVIRT_CHECK_APPARMOR @@ -292,6 +292,7 @@ LIBVIRT_CHECK_FUSE LIBVIRT_CHECK_GLUSTER LIBVIRT_CHECK_GNUTLS LIBVIRT_CHECK_HAL +LIBVIRT_CHECK_JSON LIBVIRT_CHECK_LIBNL LIBVIRT_CHECK_LIBPARTED LIBVIRT_CHECK_LIBPCAP @@ -315,7 +316,6 @@ LIBVIRT_CHECK_UDEV LIBVIRT_CHECK_VIRTUALPORT LIBVIRT_CHECK_WIRESHARK LIBVIRT_CHECK_XDR -LIBVIRT_CHECK_YAJL =20 AC_CHECK_SIZEOF([long]) =20 @@ -1011,7 +1011,10 @@ LIBVIRT_RESULT_VIRTUALPORT LIBVIRT_RESULT_XDR LIBVIRT_RESULT_XEN LIBVIRT_RESULT_XENAPI -LIBVIRT_RESULT_YAJL +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([JSON libraries]) +AC_MSG_NOTICE([]) +LIBVIRT_RESULT_JSON AC_MSG_NOTICE([]) AC_MSG_NOTICE([Windows]) AC_MSG_NOTICE([]) diff --git a/m4/virt-yajl.m4 b/m4/virt-json.m4 similarity index 94% rename from m4/virt-yajl.m4 rename to m4/virt-json.m4 index c4ea0102a..1179ff5bb 100644 --- a/m4/virt-yajl.m4 +++ b/m4/virt-json.m4 @@ -1,4 +1,4 @@ -dnl The libyajl.so library +dnl The JSON libraries dnl dnl Copyright (C) 2012-2013 Red Hat, Inc. dnl @@ -17,11 +17,11 @@ dnl License along with this library. If not, see dnl . dnl =20 -AC_DEFUN([LIBVIRT_ARG_YAJL],[ +AC_DEFUN([LIBVIRT_ARG_JSON],[ LIBVIRT_ARG_WITH_FEATURE([YAJL], [yajl], [check]) ]) =20 -AC_DEFUN([LIBVIRT_CHECK_YAJL],[ +AC_DEFUN([LIBVIRT_CHECK_JSON],[ dnl YAJL JSON library http://lloyd.github.com/yajl/ if test "$with_qemu:$with_yajl" =3D yes:check; then dnl Some versions of qemu require the use of yajl; try to detect them @@ -50,6 +50,6 @@ AC_DEFUN([LIBVIRT_CHECK_YAJL],[ [yajl_tree_parse], [yajl/yajl_common.h]) ]) =20 -AC_DEFUN([LIBVIRT_RESULT_YAJL],[ +AC_DEFUN([LIBVIRT_RESULT_JSON],[ LIBVIRT_RESULT_LIB([YAJL]) ]) --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522278628691479.2098875927345; Wed, 28 Mar 2018 16:10:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5600680E4A; Wed, 28 Mar 2018 23:10:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2D1DF5F723; Wed, 28 Mar 2018 23:10:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EB85A180BAD9; Wed, 28 Mar 2018 23:10:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SNAACS023964 for ; Wed, 28 Mar 2018 19:10:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 44A547C33; Wed, 28 Mar 2018 23:10:10 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFBEA8442B for ; Wed, 28 Mar 2018 23:10:07 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 01:09:53 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/9] Introduce WITH_JSON X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 28 Mar 2018 23:10:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 A library-agnostic constant used by all the code that requires a working virjson implementation, but does not depent on yajl. The only remaining usage outside virjson.c is the empty array test in virmacmaptest.c. Signed-off-by: J=C3=A1n Tomko --- m4/virt-json.m4 | 7 +++++++ src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_driver.c | 4 ++-- tests/Makefile.am | 10 +++++----- tests/cputest.c | 16 ++++++++-------- tests/libxlxml2domconfigtest.c | 4 ++-- tests/qemuagenttest.c | 2 +- tests/qemucapabilitiestest.c | 2 +- tests/qemucaps2xmltest.c | 2 +- tests/qemucommandutiltest.c | 2 +- tests/qemuhelptest.c | 2 +- tests/qemuhotplugtest.c | 2 +- tests/qemumonitorjsontest.c | 2 +- tests/virmocklibxl.c | 4 ++-- tests/virnetdaemontest.c | 2 +- tests/virstoragetest.c | 4 ++-- 16 files changed, 37 insertions(+), 30 deletions(-) diff --git a/m4/virt-json.m4 b/m4/virt-json.m4 index 1179ff5bb..2f2125b56 100644 --- a/m4/virt-json.m4 +++ b/m4/virt-json.m4 @@ -48,6 +48,13 @@ AC_DEFUN([LIBVIRT_CHECK_JSON],[ [yajl_parse_complete], [yajl/yajl_common.h], [YAJL2], [yajl], [yajl_tree_parse], [yajl/yajl_common.h]) + + AM_CONDITIONAL([WITH_JSON], + [test "$with_yajl" =3D "yes"]) + if test "$with_yajl" =3D "yes"; then + AC_DEFINE([WITH_JSON], [1], [whether a JSON library is available]) + fi + ]) =20 AC_DEFUN([LIBVIRT_RESULT_JSON],[ diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e54dde69a..3d8b83a41 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1385,7 +1385,7 @@ virQEMUCapsComputeCmdFlags(const char *help, * incomplete to contemplate using. The 0.13.0 release * is good enough to use, even though it lacks one or * two features. */ -#if WITH_YAJL +#if WITH_JSON if (version >=3D 13000) virQEMUCapsSet(qemuCaps, QEMU_CAPS_MONITOR_JSON); #else diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7bcc4936d..ffda906f3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2122,7 +2122,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags) */ if ((!useAgent) || (ret < 0 && (acpiRequested || !flags))) { -#if WITH_YAJL +#if WITH_JSON if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MONITOR_JSON)) { if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_NO_SHUTDOWN)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -2134,7 +2134,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags) virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("ACPI reboot is not supported without the JSO= N monitor")); goto endjob; -#if WITH_YAJL +#if WITH_JSON } #endif qemuDomainSetFakeReboot(driver, vm, isReboot); diff --git a/tests/Makefile.am b/tests/Makefile.am index 289ef35bd..249c533dc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -333,9 +333,9 @@ if WITH_CIL test_programs +=3D objectlocking endif WITH_CIL =20 -if WITH_YAJL +if WITH_JSON test_programs +=3D virjsontest -endif WITH_YAJL +endif WITH_JSON =20 test_programs +=3D \ networkxml2xmltest \ @@ -1233,15 +1233,15 @@ virdeterministichashmock_la_LIBADD =3D $(MOCKLIBS_L= IBS) =20 test_libraries +=3D virdeterministichashmock.la =20 -if WITH_YAJL +if WITH_JSON virmacmaptest_SOURCES =3D \ virmacmaptest.c testutils.h testutils.c virmacmaptest_LDADD =3D $(LDADDS) =20 test_programs +=3D virmacmaptest -else ! WITH_YAJL +else ! WITH_JSON EXTRA_DIST +=3D virmacmaptest.c -endif ! WITH_YAJL +endif ! WITH_JSON =20 virnetdevtest_SOURCES =3D \ virnetdevtest.c testutils.h testutils.c diff --git a/tests/cputest.c b/tests/cputest.c index 1e79edbef..ab1054266 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -40,7 +40,7 @@ #include "cpu/cpu_map.h" #include "virstring.h" =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU && WITH_JSON # include "testutilsqemu.h" # include "qemumonitortestutils.h" # define __QEMU_CAPSPRIV_H_ALLOW__ @@ -67,7 +67,7 @@ struct data { int result; }; =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU && WITH_JSON static virQEMUDriver driver; #endif =20 @@ -479,7 +479,7 @@ typedef enum { JSON_MODELS_REQUIRED, } cpuTestCPUIDJson; =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU && WITH_JSON static virQEMUCapsPtr cpuTestMakeQEMUCaps(const struct data *data) { @@ -554,7 +554,7 @@ cpuTestGetCPUModels(const struct data *data, return 0; } =20 -#else /* if WITH_QEMU && WITH_YAJL */ +#else /* if WITH_QEMU && WITH_JSON */ =20 static int cpuTestGetCPUModels(const struct data *data, @@ -834,7 +834,7 @@ cpuTestUpdateLive(const void *arg) } =20 =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU && WITH_JSON static int cpuTestJSONCPUID(const void *arg) { @@ -911,7 +911,7 @@ mymain(void) virDomainCapsCPUModelsPtr ppc_models =3D NULL; int ret =3D 0; =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU && WITH_JSON if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; =20 @@ -1004,7 +1004,7 @@ mymain(void) host "/" cpu " (" #models ")", \ host, cpu, models, 0, result) =20 -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU && WITH_JSON # define DO_TEST_JSON(arch, host, json) \ do { \ if (json =3D=3D JSON_MODELS) { \ @@ -1204,7 +1204,7 @@ mymain(void) DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-X5460", JSON_NONE); =20 cleanup: -#if WITH_QEMU && WITH_YAJL +#if WITH_QEMU && WITH_JSON qemuTestDriverFree(&driver); #endif =20 diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c index 6eec4c752..cafdf8e02 100644 --- a/tests/libxlxml2domconfigtest.c +++ b/tests/libxlxml2domconfigtest.c @@ -33,7 +33,7 @@ =20 #include "testutils.h" =20 -#if defined(WITH_LIBXL) && defined(WITH_YAJL) && defined(HAVE_LIBXL_DOMAIN= _CONFIG_FROM_JSON) +#if defined(WITH_LIBXL) && defined(WITH_JSON) && defined(HAVE_LIBXL_DOMAIN= _CONFIG_FROM_JSON) =20 # include "internal.h" # include "viralloc.h" @@ -210,4 +210,4 @@ int main(void) return EXIT_AM_SKIP; } =20 -#endif /* WITH_LIBXL && WITH_YAJL && HAVE_LIBXL_DOMAIN_CONFIG_FROM_JSON */ +#endif /* WITH_LIBXL && WITH_JSON && HAVE_LIBXL_DOMAIN_CONFIG_FROM_JSON */ diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c index f214eb461..0af46bc0d 100644 --- a/tests/qemuagenttest.c +++ b/tests/qemuagenttest.c @@ -907,7 +907,7 @@ mymain(void) { int ret =3D 0; =20 -#if !WITH_YAJL +#if !WITH_JSON fputs("libvirt not compiled with yajl, skipping this test\n", stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index 0d136cc8b..7091d6093 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -139,7 +139,7 @@ mymain(void) virQEMUDriver driver; testQemuData data; =20 -#if !WITH_YAJL +#if !WITH_JSON fputs("libvirt not compiled with yajl, skipping this test\n", stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c index f4838f798..705b5c187 100644 --- a/tests/qemucaps2xmltest.c +++ b/tests/qemucaps2xmltest.c @@ -165,7 +165,7 @@ mymain(void) =20 testQemuData data; =20 -#if !WITH_YAJL +#if !WITH_JSON fputs("libvirt not compiled with yajl, skipping this test\n", stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemucommandutiltest.c b/tests/qemucommandutiltest.c index eb155e7e1..106f83969 100644 --- a/tests/qemucommandutiltest.c +++ b/tests/qemucommandutiltest.c @@ -76,7 +76,7 @@ mymain(void) int ret =3D 0; testQemuCommandBuildObjectFromJSONData data1; =20 -#if !WITH_YAJL +#if !WITH_JSON fputs("libvirt not compiled with yajl, skipping this test\n", stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index 1336eeef5..c21f24cec 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -67,7 +67,7 @@ static int testHelpStrParsing(const void *data) goto cleanup; } =20 -# ifndef WITH_YAJL +# ifndef WITH_JSON if (virQEMUCapsGet(info->flags, QEMU_CAPS_MONITOR_JSON)) virQEMUCapsSet(flags, QEMU_CAPS_MONITOR_JSON); # endif diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 85e53653e..18809adcb 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -588,7 +588,7 @@ mymain(void) struct qemuHotplugTestData data =3D {0}; struct testQemuHotplugCpuParams cpudata; =20 -#if !WITH_YAJL +#if !WITH_JSON fputs("libvirt not compiled with yajl, skipping this test\n", stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 0afdc8003..6829236b7 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2886,7 +2886,7 @@ mymain(void) struct testQAPISchemaData qapiData; char *metaschema =3D NULL; =20 -#if !WITH_YAJL +#if !WITH_JSON fputs("libvirt not compiled with yajl, skipping this test\n", stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/virmocklibxl.c b/tests/virmocklibxl.c index 973595659..8429cbb6b 100644 --- a/tests/virmocklibxl.c +++ b/tests/virmocklibxl.c @@ -22,7 +22,7 @@ =20 #include =20 -#if defined(WITH_LIBXL) && defined(WITH_YAJL) +#if defined(WITH_LIBXL) && defined(WITH_JSON) # include "virmock.h" # include # include @@ -104,4 +104,4 @@ VIR_MOCK_IMPL_RET_ARGS(stat, int, return real_stat(path, sb); } =20 -#endif /* WITH_LIBXL && WITH_YAJL */ +#endif /* WITH_LIBXL && WITH_JSON */ diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index ef869b16e..e42e349aa 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -26,7 +26,7 @@ =20 #define VIR_FROM_THIS VIR_FROM_RPC =20 -#if defined(HAVE_SOCKETPAIR) && defined(WITH_YAJL) +#if defined(HAVE_SOCKETPAIR) && defined(WITH_JSON) struct testClientPriv { int magic; }; diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index b032d8b93..99cf3bd25 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -1364,7 +1364,7 @@ mymain(void) " \n" "\n"); =20 -#ifdef WITH_YAJL +#ifdef WITH_JSON TEST_BACKING_PARSE("json:", NULL); TEST_BACKING_PARSE("json:asdgsdfg", NULL); TEST_BACKING_PARSE("json:{}", NULL); @@ -1628,7 +1628,7 @@ mymain(void) "\n" " \n" "\n"); -#endif /* WITH_YAJL */ +#endif /* WITH_JSON */ =20 cleanup: /* Final cleanup */ --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522278632748210.1363623913055; Wed, 28 Mar 2018 16:10:32 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6AB716810E; Wed, 28 Mar 2018 23:10:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3EC255D9D6; Wed, 28 Mar 2018 23:10:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 069AE4CAA2; Wed, 28 Mar 2018 23:10:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SNAA7h023969 for ; Wed, 28 Mar 2018 19:10:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id D6C906353C; Wed, 28 Mar 2018 23:10:10 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D86A84420 for ; Wed, 28 Mar 2018 23:10:10 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 01:09:54 +0200 Message-Id: <095adbcf35a8551db904dea3bdf9a3f42e150ca7.1522278485.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/9] Introduce JSON_CFLAGS and JSON_LIBS X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 28 Mar 2018 23:10:31 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Just copy YAJL_CFLAGS and YAJL_LIBS at this time. Signed-off-by: J=C3=A1n Tomko --- m4/virt-json.m4 | 2 ++ src/Makefile.am | 8 ++++---- src/util/Makefile.inc.am | 4 ++-- tests/Makefile.am | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/m4/virt-json.m4 b/m4/virt-json.m4 index 2f2125b56..9e026931e 100644 --- a/m4/virt-json.m4 +++ b/m4/virt-json.m4 @@ -54,6 +54,8 @@ AC_DEFUN([LIBVIRT_CHECK_JSON],[ if test "$with_yajl" =3D "yes"; then AC_DEFINE([WITH_JSON], [1], [whether a JSON library is available]) fi + AC_SUBST([JSON_CFLAGS], [$YAJL_CFLAGS]) + AC_SUBST([JSON_LIBS], [$YAJL_LIBS]) =20 ]) =20 diff --git a/src/Makefile.am b/src/Makefile.am index 8b1e4c8a4..fd09bfd17 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -545,7 +545,7 @@ libvirt_admin_la_CFLAGS =3D \ libvirt_admin_la_CFLAGS +=3D \ $(XDR_CFLAGS) \ $(CAPNG_CFLAGS) \ - $(YAJL_CFLAGS) \ + $(JSON_CFLAGS) \ $(SSH2_CFLAGS) \ $(SASL_CFLAGS) \ $(GNUTLS_CFLAGS) \ @@ -553,7 +553,7 @@ libvirt_admin_la_CFLAGS +=3D \ =20 libvirt_admin_la_LIBADD +=3D \ $(CAPNG_LIBS) \ - $(YAJL_LIBS) \ + $(JSON_LIBS) \ $(DEVMAPPER_LIBS) \ $(LIBXML_LIBS) \ $(SSH2_LIBS) \ @@ -993,14 +993,14 @@ libvirt_nss_la_SOURCES =3D \ libvirt_nss_la_CFLAGS =3D \ -DLIBVIRT_NSS \ $(AM_CFLAGS) \ - $(YAJL_CFLAGS) \ + $(JSON_CFLAGS) \ $(NULL) libvirt_nss_la_LDFLAGS =3D \ $(AM_LDFLAGS) \ $(NULL) =20 libvirt_nss_la_LIBADD =3D \ - $(YAJL_LIBS) \ + $(JSON_LIBS) \ $(NULL) endif WITH_NSS =20 diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index a3c3b711f..5adc24fee 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -245,7 +245,7 @@ libvirt_util_la_SOURCES =3D \ $(NULL) libvirt_util_la_CFLAGS =3D \ $(CAPNG_CFLAGS) \ - $(YAJL_CFLAGS) \ + $(JSON_CFLAGS) \ $(LIBNL_CFLAGS) \ $(AM_CFLAGS) \ $(AUDIT_CFLAGS) \ @@ -258,7 +258,7 @@ libvirt_util_la_CFLAGS =3D \ $(NULL) libvirt_util_la_LIBADD =3D \ $(CAPNG_LIBS) \ - $(YAJL_LIBS) \ + $(JSON_LIBS) \ $(LIBNL_LIBS) \ $(THREAD_LIBS) \ $(AUDIT_LIBS) \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 249c533dc..ed0cd60f4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -46,7 +46,7 @@ AM_CFLAGS =3D \ $(SASL_CFLAGS) \ $(SELINUX_CFLAGS) \ $(APPARMOR_CFLAGS) \ - $(YAJL_CFLAGS) \ + $(JSON_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(XDR_CFLAGS) \ $(WARN_CFLAGS) --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152227863212831.985603513413594; Wed, 28 Mar 2018 16:10:32 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0CDA6599B; Wed, 28 Mar 2018 23:10:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7022565AD7; Wed, 28 Mar 2018 23:10:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1146E4CA9E; Wed, 28 Mar 2018 23:10:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SNABsF023979 for ; Wed, 28 Mar 2018 19:10:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 745987C33; Wed, 28 Mar 2018 23:10:11 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B3FB8442B for ; Wed, 28 Mar 2018 23:10:10 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 01:09:55 +0200 Message-Id: <35471da28e7177c40f3529cd2e078ea381ec801e.1522278485.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/9] virt-json.m4: generalize yajl dependency X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 28 Mar 2018 23:10:31 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 The QEMU driver needs a JSON library, not necessarily yajl. Check for yajl first, then explicitly check if we found a JSON library, to allow use of a different one. Signed-off-by: J=C3=A1n Tomko --- m4/virt-json.m4 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/m4/virt-json.m4 b/m4/virt-json.m4 index 9e026931e..5e4bcc7c9 100644 --- a/m4/virt-json.m4 +++ b/m4/virt-json.m4 @@ -22,21 +22,21 @@ AC_DEFUN([LIBVIRT_ARG_JSON],[ ]) =20 AC_DEFUN([LIBVIRT_CHECK_JSON],[ - dnl YAJL JSON library http://lloyd.github.com/yajl/ + need_json=3Dno if test "$with_qemu:$with_yajl" =3D yes:check; then - dnl Some versions of qemu require the use of yajl; try to detect them + dnl Some versions of qemu require the use of JSON; try to detect them dnl here, although we do not require qemu to exist in order to compile. dnl This check mirrors src/qemu/qemu_capabilities.c AC_PATH_PROGS([QEMU], [qemu-kvm qemu kvm qemu-system-x86_64], [], [$PATH:/usr/bin:/usr/libexec]) if test -x "$QEMU"; then if $QEMU -help 2>/dev/null | grep -q libvirt; then - with_yajl=3Dyes + need_json=3Dyes else [qemu_version_sed=3D's/.*ersion \([0-9.,]*\).*/\1/'] qemu_version=3D`$QEMU -version | sed "$qemu_version_sed"` case $qemu_version in - [[1-9]].* | 0.15.* ) with_yajl=3Dyes ;; + [[1-9]].* | 0.15.* ) need_json=3Dyes ;; 0.* | '' ) ;; *) AC_MSG_ERROR([Unexpected qemu version string]) ;; esac @@ -44,6 +44,7 @@ AC_DEFUN([LIBVIRT_CHECK_JSON],[ fi fi =20 + dnl YAJL JSON library http://lloyd.github.com/yajl/ LIBVIRT_CHECK_LIB_ALT([YAJL], [yajl], [yajl_parse_complete], [yajl/yajl_common.h], [YAJL2], [yajl], @@ -53,6 +54,8 @@ AC_DEFUN([LIBVIRT_CHECK_JSON],[ [test "$with_yajl" =3D "yes"]) if test "$with_yajl" =3D "yes"; then AC_DEFINE([WITH_JSON], [1], [whether a JSON library is available]) + elif "$need_json" =3D "yes"; then + AC_MSG_ERROR([QEMU needs JSON but no library is available]) fi AC_SUBST([JSON_CFLAGS], [$YAJL_CFLAGS]) AC_SUBST([JSON_LIBS], [$YAJL_LIBS]) --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522278635141950.7899152803167; Wed, 28 Mar 2018 16:10:35 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0BA67FDCB; Wed, 28 Mar 2018 23:10:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A938E5D755; Wed, 28 Mar 2018 23:10:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 551AA4CAA6; Wed, 28 Mar 2018 23:10:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SNACUZ023985 for ; Wed, 28 Mar 2018 19:10:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 11C906353C; Wed, 28 Mar 2018 23:10:12 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD19A84420 for ; Wed, 28 Mar 2018 23:10:11 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 01:09:56 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 7/9] build: link setuid_rpc_client against JSON_LIBS X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 28 Mar 2018 23:10:34 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 I have no idea how it builds without and switching to Jansson exposes this. Signed-off-by: J=C3=A1n Tomko --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index fd09bfd17..2d2805818 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -743,6 +743,7 @@ libvirt_setuid_rpc_client_la_LDFLAGS =3D \ $(AM_LDFLAGS) \ $(LIBXML_LIBS) \ $(SECDRIVER_LIBS) \ + $(JSON_LIBS) \ $(NULL) libvirt_setuid_rpc_client_la_CFLAGS =3D \ -DLIBVIRT_SETUID_RPC_CLIENT \ --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522278635863854.9447830808512; Wed, 28 Mar 2018 16:10:35 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5498219CBE0; Wed, 28 Mar 2018 23:10:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B76B60BB6; Wed, 28 Mar 2018 23:10:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CA30B4CAA8; Wed, 28 Mar 2018 23:10:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SNACkj023992 for ; Wed, 28 Mar 2018 19:10:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id A3C2B6353C; Wed, 28 Mar 2018 23:10:12 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4AA3F7C33 for ; Wed, 28 Mar 2018 23:10:12 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 01:09:57 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 8/9] virjson: add support for Jansson X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 28 Mar 2018 23:10:34 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Check for the presence of Jansson library and prefer it to yajl if possible. The minimum required version is 2.7. Internally, virJSONValue still stores numbers as strings even though Jansson uses numeric variables for them. The configure script is particularly hideous, but will hopefully go away after we stop aiming to support compiling on CentOS 6. Signed-off-by: J=C3=A1n Tomko --- configure.ac | 1 + m4/virt-json.m4 | 55 +++++++++++--- src/util/virjson.c | 219 +++++++++++++++++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 264 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index bef10c0fb..fe93209d7 100644 --- a/configure.ac +++ b/configure.ac @@ -987,6 +987,7 @@ LIBVIRT_RESULT_FUSE LIBVIRT_RESULT_GLUSTER LIBVIRT_RESULT_GNUTLS LIBVIRT_RESULT_HAL +LIBVIRT_RESULT_JANSSON LIBVIRT_RESULT_LIBNL LIBVIRT_RESULT_LIBPCAP LIBVIRT_RESULT_LIBSSH diff --git a/m4/virt-json.m4 b/m4/virt-json.m4 index 5e4bcc7c9..a5ae3edcd 100644 --- a/m4/virt-json.m4 +++ b/m4/virt-json.m4 @@ -18,12 +18,24 @@ dnl . dnl =20 AC_DEFUN([LIBVIRT_ARG_JSON],[ + LIBVIRT_ARG_WITH_FEATURE([JANSSON], [jansson], [check]) LIBVIRT_ARG_WITH_FEATURE([YAJL], [yajl], [check]) ]) =20 AC_DEFUN([LIBVIRT_CHECK_JSON],[ + if test "$with_yajl:$with_jansson" =3D "yes:yes"; then + AC_MSG_ERROR("Compiling with both jansson and yajl is unsupported") + fi + + if test "$with_yajl" =3D "yes"; then + with_jansson=3Dno + elif test "$with_jansson" =3D "yes"; then + with_yajl=3Dno + fi + need_json=3Dno - if test "$with_qemu:$with_yajl" =3D yes:check; then + if test "$with_qemu:$with_yajl" =3D yes:check or + test "$with_qemu:$with_jansson" =3D yes:check; then dnl Some versions of qemu require the use of JSON; try to detect them dnl here, although we do not require qemu to exist in order to compile. dnl This check mirrors src/qemu/qemu_capabilities.c @@ -44,24 +56,45 @@ AC_DEFUN([LIBVIRT_CHECK_JSON],[ fi fi =20 - dnl YAJL JSON library http://lloyd.github.com/yajl/ - LIBVIRT_CHECK_LIB_ALT([YAJL], [yajl], - [yajl_parse_complete], [yajl/yajl_common.h], - [YAJL2], [yajl], - [yajl_tree_parse], [yajl/yajl_common.h]) + dnl Jansson http://www.digip.org/jansson/ + LIBVIRT_CHECK_PKG([JANSSON], [jansson], [2.7]) + + if test "$with_jansson" =3D "no"; then + dnl YAJL JSON library http://lloyd.github.com/yajl/ + LIBVIRT_CHECK_LIB_ALT([YAJL], [yajl], + [yajl_parse_complete], [yajl/yajl_common.h], + [YAJL2], [yajl], + [yajl_tree_parse], [yajl/yajl_common.h]) + else + AM_CONDITIONAL([WITH_YAJL], 0) + AM_CONDITIONAL([WITH_YAJL2], 0) + fi =20 AM_CONDITIONAL([WITH_JSON], - [test "$with_yajl" =3D "yes"]) - if test "$with_yajl" =3D "yes"; then + [test "$with_yajl" =3D "yes" || test "$with_jansson" =3D = "yes"]) + if test "$with_yajl" =3D "yes" || test "$with_jansson" =3D "yes"; then AC_DEFINE([WITH_JSON], [1], [whether a JSON library is available]) elif "$need_json" =3D "yes"; then AC_MSG_ERROR([QEMU needs JSON but no library is available]) fi - AC_SUBST([JSON_CFLAGS], [$YAJL_CFLAGS]) - AC_SUBST([JSON_LIBS], [$YAJL_LIBS]) + + if test "$with_jansson" =3D "yes"; then + AC_SUBST([JSON_CFLAGS], [$JANSSON_CFLAGS]) + AC_SUBST([JSON_LIBS], [$JANSSON_LIBS]) + else + AC_SUBST([JSON_CFLAGS], [$YAJL_CFLAGS]) + AC_SUBST([JSON_LIBS], [$YAJL_LIBS]) + fi =20 ]) =20 AC_DEFUN([LIBVIRT_RESULT_JSON],[ - LIBVIRT_RESULT_LIB([YAJL]) + if test "$with_jansson" =3D "yes"; then + msg =3D "Jansson" + elif test "$with_yajl" =3D "yes"; then + msg =3D "yajl" + else + msg =3D "none" + fi + LIBVIRT_RESULT([JSON library:], [$msg]) ]) diff --git a/src/util/virjson.c b/src/util/virjson.c index 6a02ddf0c..86cbd6eef 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -1951,6 +1951,225 @@ virJSONValueToString(virJSONValuePtr object, } =20 =20 +#elif WITH_JANSSON +# include + +static virJSONValuePtr +virJSONValueFromJansson(json_t *json) +{ + virJSONValuePtr ret =3D NULL; + const char *key; + json_t *cur; + size_t i; + + switch (json_typeof(json)) { + case JSON_OBJECT: + ret =3D virJSONValueNewObject(); + if (!ret) + goto error; + + json_object_foreach(json, key, cur) { + virJSONValuePtr val =3D virJSONValueFromJansson(cur); + if (!val) + goto error; + + if (virJSONValueObjectAppend(ret, key, val) < 0) + goto error; + } + + break; + + case JSON_ARRAY: + ret =3D virJSONValueNewArray(); + if (!ret) + goto error; + + json_array_foreach(json, i, cur) { + virJSONValuePtr val =3D virJSONValueFromJansson(cur); + if (!val) + goto error; + + if (virJSONValueArrayAppend(ret, val) < 0) + goto error; + } + break; + + case JSON_STRING: + ret =3D virJSONValueNewStringLen(json_string_value(json), + json_string_length(json)); + break; + + case JSON_INTEGER: + ret =3D virJSONValueNewNumberLong(json_integer_value(json)); + break; + + case JSON_REAL: + ret =3D virJSONValueNewNumberDouble(json_real_value(json)); + break; + + case JSON_TRUE: + case JSON_FALSE: + ret =3D virJSONValueNewBoolean(json_boolean_value(json)); + break; + + case JSON_NULL: + ret =3D virJSONValueNewNull(); + break; + } + + return ret; + + error: + virJSONValueFree(ret); + return NULL; +} + +virJSONValuePtr +virJSONValueFromString(const char *jsonstring) +{ + virJSONValuePtr ret =3D NULL; + json_t *json; + json_error_t error; + size_t flags =3D JSON_REJECT_DUPLICATES | + JSON_DECODE_ANY; + + if (!(json =3D json_loads(jsonstring, flags, &error))) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to parse JSON %d:%d: %s"), + error.line, error.column, error.text); + return NULL; + } + + ret =3D virJSONValueFromJansson(json); + json_decref(json); + return ret; +} + + +static json_t * +virJSONValueToJansson(virJSONValuePtr object) +{ + json_error_t error; + json_t *ret =3D NULL; + size_t i; + + switch (object->type) { + case VIR_JSON_TYPE_OBJECT: + ret =3D json_object(); + if (!ret) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to create JSON object: %s"), + error.text); + goto error; + } + for (i =3D 0; i < object->data.object.npairs; i++) { + virJSONObjectPairPtr cur =3D object->data.object.pairs + i; + json_t *val =3D virJSONValueToJansson(cur->value); + + if (!val) + goto error; + if (json_object_set_new(ret, cur->key, val) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to set JSON object: %s"), + error.text); + goto error; + } + } + break; + + case VIR_JSON_TYPE_ARRAY: + ret =3D json_array(); + if (!ret) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to create JSON array: %s"), + error.text); + goto error; + } + for (i =3D 0; i < object->data.array.nvalues; i++) { + virJSONValuePtr cur =3D object->data.array.values[i]; + json_t *val =3D virJSONValueToJansson(cur); + + if (!val) + goto error; + if (json_array_append_new(ret, val) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to append array value: %s"), + error.text); + goto error; + } + } + break; + + case VIR_JSON_TYPE_STRING: + ret =3D json_string(object->data.string); + break; + + case VIR_JSON_TYPE_NUMBER: { + long long ll_val; + double d_val; + if (virStrToLong_ll(object->data.number, NULL, 10, &ll_val) < 0) { + if (virStrToDouble(object->data.number, NULL, &d_val) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("that don't seem like no kind of number t= o me")); + return NULL; + } + ret =3D json_real(d_val); + } else { + ret =3D json_integer(ll_val); + } + } + break; + + case VIR_JSON_TYPE_BOOLEAN: + ret =3D json_boolean(object->data.boolean); + break; + + case VIR_JSON_TYPE_NULL: + ret =3D json_null(); + break; + } + if (!ret) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("error creating JSON value: %s"), + error.text); + } + return ret; + + error: + json_decref(ret); + return NULL; +} + + +char * +virJSONValueToString(virJSONValuePtr object, + bool pretty) +{ + size_t flags =3D JSON_ENCODE_ANY; + json_t *json; + json_error_t error; + char *str =3D NULL; + + if (pretty) + flags |=3D JSON_INDENT(2); + else + flags |=3D JSON_COMPACT; + + json =3D virJSONValueToJansson(object); + if (!json) + return NULL; + + str =3D json_dumps(json, flags); + if (!str) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to format JSON %d:%d: %s"), + error.line, error.column, error.text); + } + json_decref(json); + return str; +} + + #else virJSONValuePtr virJSONValueFromString(const char *jsonstring ATTRIBUTE_UNUSED) --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522278638990563.1040640049195; Wed, 28 Mar 2018 16:10:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1A4857D4F3; Wed, 28 Mar 2018 23:10:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C1EFF6313B; Wed, 28 Mar 2018 23:10:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 71048180BAD8; Wed, 28 Mar 2018 23:10:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SNADSZ023999 for ; Wed, 28 Mar 2018 19:10:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4221984420; Wed, 28 Mar 2018 23:10:13 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC5B47C33 for ; Wed, 28 Mar 2018 23:10:12 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Thu, 29 Mar 2018 01:09:58 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 9/9] virt-json.m4: simplify QEMU check X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 28 Mar 2018 23:10:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 If we build with QEMU, it very probably needs JSON. Signed-off-by: J=C3=A1n Tomko --- m4/virt-json.m4 | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/m4/virt-json.m4 b/m4/virt-json.m4 index a5ae3edcd..d87cf56eb 100644 --- a/m4/virt-json.m4 +++ b/m4/virt-json.m4 @@ -36,24 +36,10 @@ AC_DEFUN([LIBVIRT_CHECK_JSON],[ need_json=3Dno if test "$with_qemu:$with_yajl" =3D yes:check or test "$with_qemu:$with_jansson" =3D yes:check; then - dnl Some versions of qemu require the use of JSON; try to detect them - dnl here, although we do not require qemu to exist in order to compile. - dnl This check mirrors src/qemu/qemu_capabilities.c - AC_PATH_PROGS([QEMU], [qemu-kvm qemu kvm qemu-system-x86_64], - [], [$PATH:/usr/bin:/usr/libexec]) - if test -x "$QEMU"; then - if $QEMU -help 2>/dev/null | grep -q libvirt; then - need_json=3Dyes - else - [qemu_version_sed=3D's/.*ersion \([0-9.,]*\).*/\1/'] - qemu_version=3D`$QEMU -version | sed "$qemu_version_sed"` - case $qemu_version in - [[1-9]].* | 0.15.* ) need_json=3Dyes ;; - 0.* | '' ) ;; - *) AC_MSG_ERROR([Unexpected qemu version string]) ;; - esac - fi - fi + dnl Nearly all supported QEMU versions require JSON. + dnl Assume we need it by default, but still let the user + dnl shoot it the foot. + need_json=3Dyes fi =20 dnl Jansson http://www.digip.org/jansson/ --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list