From nobody Thu Apr 25 12:58:54 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 1534161335835169.6611819783427; Mon, 13 Aug 2018 04:55:35 -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 85ABA30820CB; Mon, 13 Aug 2018 11:55:33 +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 086F0608F6; Mon, 13 Aug 2018 11:55: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 92A8418037EF; Mon, 13 Aug 2018 11:55:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtT61026106 for ; Mon, 13 Aug 2018 07:55:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id DC4FF2166BA8; Mon, 13 Aug 2018 11:55:29 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A87E2166BA0 for ; Mon, 13 Aug 2018 11:55:29 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:11 +0200 Message-Id: <51ae1334b48e66da5a2de56f9a71b17b883f6339.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/16] Revert "src: Move DLOPEN_LIBS to libraries introducing the 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 13 Aug 2018 11:55:34 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 5d40272ea67c74049600e120095d1b42287ed2d2. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- src/Makefile.am | 2 -- src/util/Makefile.inc.am | 1 - tools/Makefile.am | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 61876cf382..a4f213480e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -752,7 +752,6 @@ libvirt_setuid_rpc_client_la_CFLAGS =3D \ $(AM_CFLAGS) \ $(SECDRIVER_CFLAGS) \ $(XDR_CFLAGS) \ - $(DLOPEN_LIBS) \ $(NULL) endif WITH_SETUID_RPC_CLIENT =20 @@ -1001,7 +1000,6 @@ libvirt_nss_la_CFLAGS =3D \ $(NULL) libvirt_nss_la_LDFLAGS =3D \ $(AM_LDFLAGS) \ - $(DLOPEN_LIBS) \ $(NULL) endif WITH_NSS =20 diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index c5c50f1844..8ef9ee1dfa 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -278,7 +278,6 @@ libvirt_util_la_LIBADD =3D \ $(NUMACTL_LIBS) \ $(ACL_LIBS) \ $(GNUTLS_LIBS) \ - $(DLOPEN_LIBS) \ $(NULL) =20 =20 diff --git a/tools/Makefile.am b/tools/Makefile.am index 3e129c04c4..26c887649e 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -528,7 +528,7 @@ nss_libnss_libvirt_impl_la_CFLAGS =3D \ nss_libnss_libvirt_impl_la_LIBADD =3D \ ../gnulib/lib/libgnu.la \ ../src/libvirt-nss.la \ - $(NULL) + $(DLOPEN_LIBS) =20 nss_libnss_libvirt_la_SOURCES =3D nss_libnss_libvirt_la_LDFLAGS =3D \ @@ -556,7 +556,7 @@ nss_libnss_libvirt_guest_impl_la_CFLAGS =3D \ nss_libnss_libvirt_guest_impl_la_LIBADD =3D \ ../gnulib/lib/libgnu.la \ ../src/libvirt-nss.la \ - $(NULL) + $(DLOPEN_LIBS) =20 nss_libnss_libvirt_guest_la_SOURCES =3D nss_libnss_libvirt_guest_la_LDFLAGS =3D \ --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161357019257.91904291113804; Mon, 13 Aug 2018 04:55:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E76D93002707; Mon, 13 Aug 2018 11:55:54 +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 7692B70A06; Mon, 13 Aug 2018 11:55:54 +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 0845B18037F1; Mon, 13 Aug 2018 11:55:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtUfR026115 for ; Mon, 13 Aug 2018 07:55:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8EECE2166BA8; Mon, 13 Aug 2018 11:55:30 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B33E2166BA0 for ; Mon, 13 Aug 2018 11:55:30 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:12 +0200 Message-Id: <50d6d257f874fbb5842c49971af03a915f98b8ba.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/16] Revert "Fix link errors in tools/nss and tests" 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 13 Aug 2018 11:55:55 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit b3d9b08ef797e569b14cfa42d3dceba23c2a5b14. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- tools/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index 26c887649e..1452d984a0 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -527,8 +527,7 @@ nss_libnss_libvirt_impl_la_CFLAGS =3D \ =20 nss_libnss_libvirt_impl_la_LIBADD =3D \ ../gnulib/lib/libgnu.la \ - ../src/libvirt-nss.la \ - $(DLOPEN_LIBS) + ../src/libvirt-nss.la =20 nss_libnss_libvirt_la_SOURCES =3D nss_libnss_libvirt_la_LDFLAGS =3D \ @@ -555,8 +554,7 @@ nss_libnss_libvirt_guest_impl_la_CFLAGS =3D \ =20 nss_libnss_libvirt_guest_impl_la_LIBADD =3D \ ../gnulib/lib/libgnu.la \ - ../src/libvirt-nss.la \ - $(DLOPEN_LIBS) + ../src/libvirt-nss.la =20 nss_libnss_libvirt_guest_la_SOURCES =3D nss_libnss_libvirt_guest_la_LDFLAGS =3D \ --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161336334458.06878637756563; Mon, 13 Aug 2018 04:55:36 -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 48E5785545; Mon, 13 Aug 2018 11:55: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 C38AB18F13; Mon, 13 Aug 2018 11:55: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 7486F4A460; Mon, 13 Aug 2018 11:55:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtVmh026122 for ; Mon, 13 Aug 2018 07:55:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4A2DF2166BA8; Mon, 13 Aug 2018 11:55:31 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DAA1A2166BA0 for ; Mon, 13 Aug 2018 11:55:30 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:13 +0200 Message-Id: <76b524c3b8d7ef667b55321642057845662bf070.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/16] Revert "remote: daemon: Make sure that JSON symbols are properly loaded at startup" 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.28]); Mon, 13 Aug 2018 11:55:34 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 3251fc9c9b9639c3fec3181530599415523d671a. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- src/libvirt_private.syms | 4 ---- src/remote/remote_daemon.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index ee0dca6129..496de11168 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2133,10 +2133,6 @@ virJSONValueObjectStealObject; virJSONValueToString; =20 =20 -# util/virjsoncompat.h -virJSONInitialize; - - # util/virkeycode.h virKeycodeSetTypeFromString; virKeycodeSetTypeToString; diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index 8bbc3818bb..9f3a5f38ad 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -59,7 +59,6 @@ #include "virutil.h" #include "virgettext.h" #include "util/virnetdevopenvswitch.h" -#include "virjsoncompat.h" =20 #include "driver.h" =20 @@ -1184,9 +1183,6 @@ int main(int argc, char **argv) { exit(EXIT_FAILURE); } =20 - if (virJSONInitialize() < 0) - exit(EXIT_FAILURE); - daemonSetupNetDevOpenvswitch(config); =20 if (daemonSetupAccessManager(config) < 0) { --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161356531562.3035256403354; Mon, 13 Aug 2018 04:55:56 -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 5E2FA8F901; Mon, 13 Aug 2018 11:55:54 +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 23FAD18670; Mon, 13 Aug 2018 11:55:54 +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 D185418037F0; Mon, 13 Aug 2018 11:55:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtWY4026131 for ; Mon, 13 Aug 2018 07:55:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1BDD72166BA8; Mon, 13 Aug 2018 11:55:32 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB9DD2166BA0 for ; Mon, 13 Aug 2018 11:55:31 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:14 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/16] Revert "util: jsoncompat: Stub out virJSONInitialize when compiling without 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 13 Aug 2018 11:55:55 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 9e44c2db8ad94d3c20acc1d081538c280af198b4. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- src/util/virjsoncompat.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/util/virjsoncompat.c b/src/util/virjsoncompat.c index ffbeb5488c..6c853e9bb5 100644 --- a/src/util/virjsoncompat.c +++ b/src/util/virjsoncompat.c @@ -271,15 +271,4 @@ json_true_impl(void) return json_true_ptr(); } =20 - -#else /* !WITH_JANSSON */ - - -int -virJSONInitialize(void) -{ - return 0; -} - - -#endif /* !WITH_JANSSON */ +#endif /* WITH_JANSSON */ --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161356777134.30618565348936; Mon, 13 Aug 2018 04:55:56 -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 68B86155E4; Mon, 13 Aug 2018 11:55:54 +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 2965D18234; Mon, 13 Aug 2018 11:55:54 +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 D641E4A46E; Mon, 13 Aug 2018 11:55:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtWAu026141 for ; Mon, 13 Aug 2018 07:55:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id CC1DC2166BA8; Mon, 13 Aug 2018 11:55:32 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 676FD2166BA0 for ; Mon, 13 Aug 2018 11:55:32 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:15 +0200 Message-Id: <34a0d22719837d12dacb1f567defd4f583c0b044.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 05/16] Revert "tests: qemucapsprobe: Fix output after switching to 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 13 Aug 2018 11:55:54 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 397447f80588438545994a86883792a5999cad15. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- tests/qemucapsprobemock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/qemucapsprobemock.c b/tests/qemucapsprobemock.c index 049b16273a..5936975505 100644 --- a/tests/qemucapsprobemock.c +++ b/tests/qemucapsprobemock.c @@ -76,7 +76,6 @@ qemuMonitorSend(qemuMonitorPtr mon, printLineSkipEmpty("\n", stdout); =20 printLineSkipEmpty(reformatted, stdout); - printLineSkipEmpty("\n", stdout); VIR_FREE(reformatted); =20 return realQemuMonitorSend(mon, msg); @@ -117,7 +116,6 @@ qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon, printLineSkipEmpty("\n", stdout); =20 printLineSkipEmpty(json, stdout); - printLineSkipEmpty("\n", stdout); } =20 cleanup: --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161366556683.8633192879055; Mon, 13 Aug 2018 04:56:06 -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 824073078AA3; Mon, 13 Aug 2018 11:56:04 +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 40A18608F6; Mon, 13 Aug 2018 11:56:04 +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 BECE818037F6; Mon, 13 Aug 2018 11:56:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtXZq026153 for ; Mon, 13 Aug 2018 07:55:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7AF4D2166BA8; Mon, 13 Aug 2018 11:55:33 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 173122166BA0 for ; Mon, 13 Aug 2018 11:55:32 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:16 +0200 Message-Id: <04352faf1847c7a11a2c060b81573385da7d74ae.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/16] Revert "util: avoid symbol clash between json libraries" 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.48]); Mon, 13 Aug 2018 11:56:05 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit ce3c6ef6843f98d81be5423ece11fad79eaab920. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- libvirt.spec.in | 2 - src/Makefile.am | 8 +- src/util/Makefile.inc.am | 3 +- src/util/virjson.c | 9 +- src/util/virjsoncompat.c | 274 -------------------------------------------= ---- src/util/virjsoncompat.h | 88 --------------- 6 files changed, 7 insertions(+), 377 deletions(-) delete mode 100644 src/util/virjsoncompat.c delete mode 100644 src/util/virjsoncompat.h diff --git a/libvirt.spec.in b/libvirt.spec.in index 3edb60d2d2..51f3feef8a 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -898,8 +898,6 @@ Requires: ncurses Requires: gettext # Needed by virt-pki-validate script. Requires: gnutls-utils -# We dlopen(libjansson.so.4), so need an explicit dep -Requires: jansson %if %{with_bash_completion} Requires: %{name}-bash-completion =3D %{version}-%{release} %endif diff --git a/src/Makefile.am b/src/Makefile.am index a4f213480e..83263e69e5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -552,6 +552,7 @@ libvirt_admin_la_CFLAGS +=3D \ =20 libvirt_admin_la_LIBADD +=3D \ $(CAPNG_LIBS) \ + $(JANSSON_LIBS) \ $(DEVMAPPER_LIBS) \ $(LIBXML_LIBS) \ $(SSH2_LIBS) \ @@ -689,7 +690,6 @@ libvirt_setuid_rpc_client_la_SOURCES =3D \ util/virhashcode.c \ util/virhostcpu.c \ util/virjson.c \ - util/virjsoncompat.c \ util/virlog.c \ util/virobject.c \ util/virpidfile.c \ @@ -961,8 +961,6 @@ libvirt_nss_la_SOURCES =3D \ util/virhashcode.h \ util/virjson.c \ util/virjson.h \ - util/virjsoncompat.c \ - util/virjsoncompat.h \ util/virkmod.c \ util/virkmod.h \ util/virlease.c \ @@ -1001,6 +999,10 @@ libvirt_nss_la_CFLAGS =3D \ libvirt_nss_la_LDFLAGS =3D \ $(AM_LDFLAGS) \ $(NULL) + +libvirt_nss_la_LIBADD =3D \ + $(JANSSON_LIBS) \ + $(NULL) endif WITH_NSS =20 =20 diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index 8ef9ee1dfa..71b2b93c2d 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -86,8 +86,6 @@ UTIL_SOURCES =3D \ util/viriscsi.h \ util/virjson.c \ util/virjson.h \ - util/virjsoncompat.c \ - util/virjsoncompat.h \ util/virkeycode.c \ util/virkeycode.h \ util/virkeyfile.c \ @@ -266,6 +264,7 @@ libvirt_util_la_CFLAGS =3D \ $(NULL) libvirt_util_la_LIBADD =3D \ $(CAPNG_LIBS) \ + $(JANSSON_LIBS) \ $(LIBNL_LIBS) \ $(THREAD_LIBS) \ $(AUDIT_LIBS) \ diff --git a/src/util/virjson.c b/src/util/virjson.c index 5bab662cd3..01a387b2f7 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -1437,8 +1437,7 @@ virJSONValueCopy(const virJSONValue *in) =20 =20 #if WITH_JANSSON - -# include "virjsoncompat.h" +# include =20 static virJSONValuePtr virJSONValueFromJansson(json_t *json) @@ -1525,9 +1524,6 @@ virJSONValueFromString(const char *jsonstring) size_t flags =3D JSON_REJECT_DUPLICATES | JSON_DECODE_ANY; =20 - if (virJSONInitialize() < 0) - return NULL; - if (!(json =3D json_loads(jsonstring, flags, &error))) { virReportError(VIR_ERR_INTERNAL_ERROR, _("failed to parse JSON %d:%d: %s"), @@ -1634,9 +1630,6 @@ virJSONValueToString(virJSONValuePtr object, json_t *json; char *str =3D NULL; =20 - if (virJSONInitialize() < 0) - return NULL; - if (pretty) flags |=3D JSON_INDENT(2); else diff --git a/src/util/virjsoncompat.c b/src/util/virjsoncompat.c deleted file mode 100644 index 6c853e9bb5..0000000000 --- a/src/util/virjsoncompat.c +++ /dev/null @@ -1,274 +0,0 @@ -/* - * virjsoncompat.c: JSON object parsing/formatting - * - * Copyright (C) 2018 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - * - */ - -#include - -#include "virthread.h" -#include "virerror.h" -#define VIR_JSON_COMPAT_IMPL -#include "virjsoncompat.h" - -#define VIR_FROM_THIS VIR_FROM_NONE - -#if WITH_JANSSON - -# include - -json_t *(*json_array_ptr)(void); -int (*json_array_append_new_ptr)(json_t *array, json_t *value); -json_t *(*json_array_get_ptr)(const json_t *array, size_t index); -size_t (*json_array_size_ptr)(const json_t *array); -void (*json_delete_ptr)(json_t *json); -char *(*json_dumps_ptr)(const json_t *json, size_t flags); -json_t *(*json_false_ptr)(void); -json_t *(*json_integer_ptr)(json_int_t value); -json_int_t (*json_integer_value_ptr)(const json_t *integer); -json_t *(*json_loads_ptr)(const char *input, size_t flags, json_error_t *e= rror); -json_t *(*json_null_ptr)(void); -json_t *(*json_object_ptr)(void); -void *(*json_object_iter_ptr)(json_t *object); -const char *(*json_object_iter_key_ptr)(void *iter); -void *(*json_object_iter_next_ptr)(json_t *object, void *iter); -json_t *(*json_object_iter_value_ptr)(void *iter); -void *(*json_object_key_to_iter_ptr)(const char *key); -int (*json_object_set_new_ptr)(json_t *object, const char *key, json_t *va= lue); -json_t *(*json_real_ptr)(double value); -double (*json_real_value_ptr)(const json_t *real); -json_t *(*json_string_ptr)(const char *value); -const char *(*json_string_value_ptr)(const json_t *string); -json_t *(*json_true_ptr)(void); - - -static int -virJSONJanssonOnceInit(void) -{ - void *handle =3D dlopen("libjansson.so.4", RTLD_LAZY|RTLD_LOCAL|RTLD_N= ODELETE); - if (!handle) { - virReportError(VIR_ERR_NO_SUPPORT, - _("libjansson.so.4 JSON library not available: %s")= , dlerror()); - return -1; - } - -# define LOAD(name) \ - do { \ - if (!(name ## _ptr =3D dlsym(handle, #name))) { \ - virReportError(VIR_ERR_NO_SUPPORT, \ - _("missing symbol '%s' in libjansson.so.4: %s")= , #name, dlerror()); \ - return -1; \ - } \ - } while (0) - - LOAD(json_array); - LOAD(json_array_append_new); - LOAD(json_array_get); - LOAD(json_array_size); - LOAD(json_delete); - LOAD(json_dumps); - LOAD(json_false); - LOAD(json_integer); - LOAD(json_integer_value); - LOAD(json_loads); - LOAD(json_null); - LOAD(json_object); - LOAD(json_object_iter); - LOAD(json_object_iter_key); - LOAD(json_object_iter_next); - LOAD(json_object_iter_value); - LOAD(json_object_key_to_iter); - LOAD(json_object_set_new); - LOAD(json_real); - LOAD(json_real_value); - LOAD(json_string); - LOAD(json_string_value); - LOAD(json_true); - - return 0; -} - -VIR_ONCE_GLOBAL_INIT(virJSONJansson); - -int -virJSONInitialize(void) -{ - return virJSONJanssonInitialize(); -} - -json_t * -json_array_impl(void) -{ - return json_array_ptr(); -} - - -int -json_array_append_new_impl(json_t *array, json_t *value) -{ - return json_array_append_new_ptr(array, value); -} - - -json_t * -json_array_get_impl(const json_t *array, size_t index) -{ - return json_array_get_ptr(array, index); -} - - -size_t -json_array_size_impl(const json_t *array) -{ - return json_array_size_ptr(array); -} - - -void -json_delete_impl(json_t *json) -{ - return json_delete_ptr(json); -} - - -char * -json_dumps_impl(const json_t *json, size_t flags) -{ - return json_dumps_ptr(json, flags); -} - - -json_t * -json_false_impl(void) -{ - return json_false_ptr(); -} - - -json_t * -json_integer_impl(json_int_t value) -{ - return json_integer_ptr(value); -} - - -json_int_t -json_integer_value_impl(const json_t *integer) -{ - return json_integer_value_ptr(integer); -} - - -json_t * -json_loads_impl(const char *input, size_t flags, json_error_t *error) -{ - return json_loads_ptr(input, flags, error); -} - - -json_t * -json_null_impl(void) -{ - return json_null_ptr(); -} - - -json_t * -json_object_impl(void) -{ - return json_object_ptr(); -} - - -void * -json_object_iter_impl(json_t *object) -{ - return json_object_iter_ptr(object); -} - - -const char * -json_object_iter_key_impl(void *iter) -{ - return json_object_iter_key_ptr(iter); -} - - -void * -json_object_iter_next_impl(json_t *object, void *iter) -{ - return json_object_iter_next_ptr(object, iter); -} - - -json_t * -json_object_iter_value_impl(void *iter) -{ - return json_object_iter_value_ptr(iter); -} - - -void * -json_object_key_to_iter_impl(const char *key) -{ - return json_object_key_to_iter_ptr(key); -} - - -int -json_object_set_new_impl(json_t *object, const char *key, json_t *value) -{ - return json_object_set_new_ptr(object, key, value); -} - - -json_t * -json_real_impl(double value) -{ - return json_real_ptr(value); -} - - -double -json_real_value_impl(const json_t *real) -{ - return json_real_value_ptr(real); -} - - -json_t * -json_string_impl(const char *value) -{ - return json_string_ptr(value); -} - - -const char * -json_string_value_impl(const json_t *string) -{ - return json_string_value_ptr(string); -} - - -json_t * -json_true_impl(void) -{ - return json_true_ptr(); -} - -#endif /* WITH_JANSSON */ diff --git a/src/util/virjsoncompat.h b/src/util/virjsoncompat.h deleted file mode 100644 index d9b7765a37..0000000000 --- a/src/util/virjsoncompat.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * virjsoncompat.h: JSON object parsing/formatting - * - * Copyright (C) 2018 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - * - */ - - -#ifndef __VIR_JSON_COMPAT_H_ -# define __VIR_JSON_COMPAT_H_ - -# if WITH_JANSSON -# ifndef VIR_JSON_COMPAT_IMPL - -# define json_array json_array_impl -# define json_array_append_new json_array_append_new_impl -# define json_array_get json_array_get_impl -# define json_array_size json_array_size_impl -# define json_delete json_delete_impl -# define json_dumps json_dumps_impl -# define json_false json_false_impl -# define json_integer json_integer_impl -# define json_integer_value json_integer_value_impl -# define json_loads json_loads_impl -# define json_null json_null_impl -# define json_object json_object_impl -# define json_object_iter json_object_iter_impl -# define json_object_iter_key json_object_iter_key_impl -# define json_object_iter_next json_object_iter_next_impl -# define json_object_iter_value json_object_iter_value_impl -# define json_object_key_to_iter json_object_key_to_iter_impl -# define json_object_set_new json_object_set_new_impl -# define json_real json_real_impl -# define json_real_value json_real_value_impl -# define json_string json_string_impl -# define json_string_value json_string_value_impl -# define json_true json_true_impl - -# endif /* ! VIR_JSON_COMPAT_IMPL */ - -# include - -# ifdef VIR_JSON_COMPAT_IMPL - -json_t *json_array_impl(void); -int json_array_append_new_impl(json_t *array, json_t *value); -json_t *json_array_get_impl(const json_t *array, size_t index); -size_t json_array_size_impl(const json_t *array); -void json_delete_impl(json_t *json); -char *json_dumps_impl(const json_t *json, size_t flags); -json_t *json_false_impl(void); -json_t *json_integer_impl(json_int_t value); -json_int_t json_integer_value_impl(const json_t *integer); -json_t *json_loads_impl(const char *input, size_t flags, json_error_t *err= or); -json_t *json_null_impl(void); -json_t *json_object_impl(void); -void *json_object_iter_impl(json_t *object); -const char *json_object_iter_key_impl(void *iter); -void *json_object_iter_next_impl(json_t *object, void *iter); -json_t *json_object_iter_value_impl(void *iter); -void *json_object_key_to_iter_impl(const char *key); -int json_object_set_new_impl(json_t *object, const char *key, json_t *valu= e); -json_t *json_real_impl(double value); -double json_real_value_impl(const json_t *real); -json_t *json_string_impl(const char *value); -const char *json_string_value_impl(const json_t *string); -json_t *json_true_impl(void); - -# endif /* VIR_JSON_COMPAT_IMPL */ -# endif /* WITH_JANSSON */ - -int virJSONInitialize(void); - -#endif /* __VIR_JSON_COMPAT_H_ */ --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 153416136078553.59358143108136; Mon, 13 Aug 2018 04:56:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B86223084043; Mon, 13 Aug 2018 11:55:58 +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 7EE58A98B8; Mon, 13 Aug 2018 11:55:58 +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 2417318037F5; Mon, 13 Aug 2018 11:55:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtYVR026166 for ; Mon, 13 Aug 2018 07:55:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3D2F12166BA8; Mon, 13 Aug 2018 11:55:34 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CBF942166BA0 for ; Mon, 13 Aug 2018 11:55:33 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:17 +0200 Message-Id: <93fdb498bc96b4980d5dae4596c64c7f16211c8b.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/16] Revert "tests: also skip qemuagenttest with old 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.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 13 Aug 2018 11:55:59 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit c31146685f5c8558ff88d52d03a68533c9220feb. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- tests/qemuagenttest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c index b3d737d8a8..232b34f9cd 100644 --- a/tests/qemuagenttest.c +++ b/tests/qemuagenttest.c @@ -907,8 +907,8 @@ mymain(void) { int ret =3D 0; =20 -#if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); +#if !WITH_JANSSON + fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; #endif =20 --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161365004265.5865772316554; Mon, 13 Aug 2018 04:56:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 101AB307D862; Mon, 13 Aug 2018 11:56:03 +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 C6FCEA98B3; Mon, 13 Aug 2018 11:56:02 +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 6132D3F7FA; Mon, 13 Aug 2018 11:56:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtZer026181 for ; Mon, 13 Aug 2018 07:55:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id E2A412166BA8; Mon, 13 Aug 2018 11:55:34 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7ED882166BA0 for ; Mon, 13 Aug 2018 11:55:34 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:18 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 08/16] Revert "m4: Introduce STABLE_ORDERING_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.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 13 Aug 2018 11:56:03 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 4dd60540007042bfc0087a67f57f3e9f3311a84a. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- m4/virt-jansson.m4 | 3 --- tests/qemublocktest.c | 5 ----- tests/qemucapabilitiestest.c | 5 ----- tests/qemucommandutiltest.c | 5 ----- tests/qemuhotplugtest.c | 5 ----- tests/qemumigparamstest.c | 5 ----- tests/qemumonitorjsontest.c | 5 ----- tests/virjsontest.c | 5 ----- tests/virmacmaptest.c | 5 ----- tests/virnetdaemontest.c | 5 ----- 10 files changed, 48 deletions(-) diff --git a/m4/virt-jansson.m4 b/m4/virt-jansson.m4 index ab4c020f62..206d6a5ced 100644 --- a/m4/virt-jansson.m4 +++ b/m4/virt-jansson.m4 @@ -22,9 +22,6 @@ AC_DEFUN([LIBVIRT_ARG_JANSSON],[ AC_DEFUN([LIBVIRT_CHECK_JANSSON],[ dnl Jansson http://www.digip.org/jansson/ LIBVIRT_CHECK_PKG([JANSSON], [jansson], [2.5]) - dnl Older versions of Jansson did not preserve the order of object keys - dnl use this check to guard the tests that are sensitive to this - LIBVIRT_CHECK_PKG([STABLE_ORDERING_JANSSON], [jansson], [2.8], [true]) ]) =20 AC_DEFUN([LIBVIRT_RESULT_JANSSON],[ diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index d22b4b754e..9a387cf063 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -337,11 +337,6 @@ mymain(void) char *capslatest_x86_64 =3D NULL; virQEMUCapsPtr caps_x86_64 =3D NULL; =20 -#if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); - return EXIT_AM_SKIP; -#endif - if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; =20 diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index 28f903a88c..641ec4f597 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -141,11 +141,6 @@ mymain(void) int ret =3D 0; testQemuData data; =20 -#if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); - return EXIT_AM_SKIP; -#endif - #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/qemucommandutiltest.c b/tests/qemucommandutiltest.c index 9b13dde63f..8e57a1b79d 100644 --- a/tests/qemucommandutiltest.c +++ b/tests/qemucommandutiltest.c @@ -76,11 +76,6 @@ mymain(void) int ret =3D 0; testQemuCommandBuildObjectFromJSONData data1; =20 -#if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); - return EXIT_AM_SKIP; -#endif - #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 3c0eecb079..2fb96c6158 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -593,11 +593,6 @@ mymain(void) struct qemuHotplugTestData data =3D {0}; struct testQemuHotplugCpuParams cpudata; =20 -#if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); - return EXIT_AM_SKIP; -#endif - #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/qemumigparamstest.c b/tests/qemumigparamstest.c index 5e12430991..b8af68211b 100644 --- a/tests/qemumigparamstest.c +++ b/tests/qemumigparamstest.c @@ -203,11 +203,6 @@ mymain(void) virQEMUDriver driver; int ret =3D 0; =20 -#if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); - return EXIT_AM_SKIP; -#endif - #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 1826c4f297..c11615f7ac 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2863,11 +2863,6 @@ mymain(void) virJSONValuePtr metaschema =3D NULL; char *metaschemastr =3D NULL; =20 -#if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); - return EXIT_AM_SKIP; -#endif - #if !WITH_JANSSON fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; diff --git a/tests/virjsontest.c b/tests/virjsontest.c index d352d370fd..d42413d11d 100644 --- a/tests/virjsontest.c +++ b/tests/virjsontest.c @@ -479,11 +479,6 @@ mymain(void) { int ret =3D 0; =20 -#if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); - return EXIT_AM_SKIP; -#endif - #define DO_TEST_FULL(name, cmd, doc, expect, pass) \ do { \ struct testInfo info =3D { doc, expect, pass }; \ diff --git a/tests/virmacmaptest.c b/tests/virmacmaptest.c index 420531dcdb..6e3e9984d1 100644 --- a/tests/virmacmaptest.c +++ b/tests/virmacmaptest.c @@ -157,11 +157,6 @@ mymain(void) int ret =3D 0; virMacMapPtr mgr =3D NULL; =20 -#if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); - return EXIT_AM_SKIP; -#endif - #define DO_TEST_BASIC(f, d, ...) \ do { \ const char * const m[] =3D {__VA_ARGS__, NULL }; \ diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index 277fb06385..cbc961dbaf 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -375,11 +375,6 @@ mymain(void) int ret =3D 0; const char *server_names[] =3D { "testServer0", "testServer1" }; =20 -# if !WITH_STABLE_ORDERING_JANSSON - fputs("libvirt not compiled with recent enough Jansson, skipping this = test\n", stderr); - return EXIT_AM_SKIP; -# endif - if (virInitialize() < 0 || virEventRegisterDefaultImpl() < 0) { virDispatchError(NULL); --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161370913198.0227814757684; Mon, 13 Aug 2018 04:56:10 -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 E06953084040; Mon, 13 Aug 2018 11:56:08 +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 A651418766; Mon, 13 Aug 2018 11:56:08 +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 5BE0A3D3BE; Mon, 13 Aug 2018 11:56:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtZPp026196 for ; Mon, 13 Aug 2018 07:55:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id B60CC2166BA8; Mon, 13 Aug 2018 11:55:35 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 51CC42166BA0 for ; Mon, 13 Aug 2018 11:55:35 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:19 +0200 Message-Id: <5cfcae30f463734287955a540ec141bd64ef72f6.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/16] Revert "build: require Jansson if QEMU driver is enabled" 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.40]); Mon, 13 Aug 2018 11:56:09 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 01ce04375c3348fd683475e5aa5231149ef6a78a. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- m4/virt-driver-qemu.m4 | 3 --- 1 file changed, 3 deletions(-) diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4 index 2d9992d0dc..ddb2834705 100644 --- a/m4/virt-driver-qemu.m4 +++ b/m4/virt-driver-qemu.m4 @@ -27,9 +27,6 @@ AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [ =20 AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [ AC_REQUIRE([LIBVIRT_CHECK_JANSSON]) - if test "$with_qemu:$with_jansson" =3D "yes:no"; then - AC_MSG_ERROR([Jansson >=3D 2.5 is required to build QEMU driver]) - fi if test "$with_qemu" =3D "check"; then with_qemu=3D$with_jansson fi --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161375165235.42147496477673; Mon, 13 Aug 2018 04:56:15 -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 36E30155DB; Mon, 13 Aug 2018 11:56:13 +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 F1C1618F13; Mon, 13 Aug 2018 11:56:12 +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 A31EF18037F9; Mon, 13 Aug 2018 11:56:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtaOB026203 for ; Mon, 13 Aug 2018 07:55:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9C7BE2166BA8; Mon, 13 Aug 2018 11:55:36 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 39BA72166BA0 for ; Mon, 13 Aug 2018 11:55:35 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:20 +0200 Message-Id: <2f2acf71ec5efd30bcde5efdd230e2c0515c2af7.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 10/16] Revert "build: switch --with-qemu default from yes to 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 13 Aug 2018 11:56:13 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit c5ae8e0c2b4b6bb3c667cfadaf65a66c3f4f3d85. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- m4/virt-driver-qemu.m4 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4 index ddb2834705..80e1d3ad46 100644 --- a/m4/virt-driver-qemu.m4 +++ b/m4/virt-driver-qemu.m4 @@ -18,7 +18,7 @@ dnl . dnl =20 AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [ - LIBVIRT_ARG_WITH_FEATURE([QEMU], [QEMU/KVM], [check]) + LIBVIRT_ARG_WITH_FEATURE([QEMU], [QEMU/KVM], [yes]) LIBVIRT_ARG_WITH([QEMU_USER], [username to run QEMU system instance as], ['platform dependent']) LIBVIRT_ARG_WITH([QEMU_GROUP], [groupname to run QEMU system instance as= ], @@ -26,10 +26,6 @@ AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [ ]) =20 AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [ - AC_REQUIRE([LIBVIRT_CHECK_JANSSON]) - if test "$with_qemu" =3D "check"; then - with_qemu=3D$with_jansson - fi if test "$with_qemu" =3D "yes" ; then AC_DEFINE_UNQUOTED([WITH_QEMU], 1, [whether QEMU driver is enabled]) fi --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161370767635.7913421012292; Mon, 13 Aug 2018 04:56:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B853B3078AA5; Mon, 13 Aug 2018 11:56:08 +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 7B621A98B9; Mon, 13 Aug 2018 11:56:08 +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 345BE3D3C9; Mon, 13 Aug 2018 11:56:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtb5X026211 for ; Mon, 13 Aug 2018 07:55:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8440C2166BA8; Mon, 13 Aug 2018 11:55:37 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21EFD2166BA0 for ; Mon, 13 Aug 2018 11:55:36 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:21 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/16] Revert "Remove virJSONValueNewStringLen" 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.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 13 Aug 2018 11:56:09 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 8f802c6d8659beb9eb3cab96ba2553e251728337. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- src/libvirt_private.syms | 1 + src/util/virjson.c | 22 ++++++++++++++++++++++ src/util/virjson.h | 1 + 3 files changed, 24 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 496de11168..f555b1d5b1 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2096,6 +2096,7 @@ virJSONValueNewNumberUint; virJSONValueNewNumberUlong; virJSONValueNewObject; virJSONValueNewString; +virJSONValueNewStringLen; virJSONValueObjectAdd; virJSONValueObjectAddVArgs; virJSONValueObjectAppend; diff --git a/src/util/virjson.c b/src/util/virjson.c index 01a387b2f7..80274bc6c5 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -420,6 +420,28 @@ virJSONValueNewString(const char *data) } =20 =20 +virJSONValuePtr +virJSONValueNewStringLen(const char *data, + size_t length) +{ + virJSONValuePtr val; + + if (!data) + return virJSONValueNewNull(); + + if (VIR_ALLOC(val) < 0) + return NULL; + + val->type =3D VIR_JSON_TYPE_STRING; + if (VIR_STRNDUP(val->data.string, data, length) < 0) { + VIR_FREE(val); + return NULL; + } + + return val; +} + + static virJSONValuePtr virJSONValueNewNumber(const char *data) { diff --git a/src/util/virjson.h b/src/util/virjson.h index 0d5a7ef753..75f7f17b44 100644 --- a/src/util/virjson.h +++ b/src/util/virjson.h @@ -59,6 +59,7 @@ int virJSONValueObjectAddVArgs(virJSONValuePtr obj, va_li= st args) =20 =20 virJSONValuePtr virJSONValueNewString(const char *data); +virJSONValuePtr virJSONValueNewStringLen(const char *data, size_t length); virJSONValuePtr virJSONValueNewNumberInt(int data); virJSONValuePtr virJSONValueNewNumberUint(unsigned int data); virJSONValuePtr virJSONValueNewNumberLong(long long data); --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 153416137562629.475628435563408; Mon, 13 Aug 2018 04:56:15 -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 36C1B3082A4D; Mon, 13 Aug 2018 11:56:13 +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 ED5E618234; Mon, 13 Aug 2018 11:56:12 +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 999E524F62; Mon, 13 Aug 2018 11:56:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtcqU026223 for ; Mon, 13 Aug 2018 07:55:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 355832166BA8; Mon, 13 Aug 2018 11:55:38 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6CAF2166BA0 for ; Mon, 13 Aug 2018 11:55:37 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:22 +0200 Message-Id: <30be0d8420edb2d5554cccf7deac35a834e88be8.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 12/16] Revert "build: remove references to WITH_YAJL for SETUID_RPC_CLIENT" 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.45]); Mon, 13 Aug 2018 11:56:13 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 1caf8441604b58e4a89aa2c09975b8346928c52a. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- config-post.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config-post.h b/config-post.h index 05672121f0..24117bbbd4 100644 --- a/config-post.h +++ b/config-post.h @@ -44,6 +44,8 @@ # undef WITH_SSH2 # undef WITH_SYSTEMD_DAEMON # undef WITH_VIRTUALPORT +# undef WITH_YAJL +# undef WITH_YAJL2 #endif =20 /* --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161372562388.70687697477297; Mon, 13 Aug 2018 04:56:12 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A11816C1E; Mon, 13 Aug 2018 11:56: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 5F3E826E6F; Mon, 13 Aug 2018 11:56: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 1071F264FB; Mon, 13 Aug 2018 11:56:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtcVQ026236 for ; Mon, 13 Aug 2018 07:55:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id D9C4C2166BA8; Mon, 13 Aug 2018 11:55:38 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7714A2166BA0 for ; Mon, 13 Aug 2018 11:55:38 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:23 +0200 Message-Id: <7a769089adee16f683b63e82dbd440bee1a9bcf9.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 13/16] Revert "Remove functions using yajl" 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 13 Aug 2018 11:56:11 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit bf114decb34f21cd225ead6dc4d929d35a8c5fe5. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- src/util/virjson.c | 529 +++++++++++++++++++++++++++++++++++++++++++++++++= +++- 1 file changed, 528 insertions(+), 1 deletion(-) diff --git a/src/util/virjson.c b/src/util/virjson.c index 80274bc6c5..608ba85d67 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -29,6 +29,22 @@ #include "virstring.h" #include "virutil.h" =20 +#if WITH_YAJL +# include +# include + +# ifdef WITH_YAJL2 +# define yajl_size_t size_t +# define VIR_YAJL_STATUS_OK(status) ((status) =3D=3D yajl_status_ok) +# else +# define yajl_size_t unsigned int +# define yajl_complete_parse yajl_parse_complete +# define VIR_YAJL_STATUS_OK(status) \ + ((status) =3D=3D yajl_status_ok || (status) =3D=3D yajl_status_insuffi= cient_data) +# endif + +#endif + /* XXX fixme */ #define VIR_FROM_THIS VIR_FROM_NONE =20 @@ -72,6 +88,23 @@ struct _virJSONValue { }; =20 =20 +typedef struct _virJSONParserState virJSONParserState; +typedef virJSONParserState *virJSONParserStatePtr; +struct _virJSONParserState { + virJSONValuePtr value; + char *key; +}; + +typedef struct _virJSONParser virJSONParser; +typedef virJSONParser *virJSONParserPtr; +struct _virJSONParser { + virJSONValuePtr head; + virJSONParserStatePtr state; + size_t nstate; + int wrap; +}; + + virJSONType virJSONValueGetType(const virJSONValue *value) { @@ -1458,7 +1491,501 @@ virJSONValueCopy(const virJSONValue *in) } =20 =20 -#if WITH_JANSSON +#if WITH_YAJL +static int +virJSONParserInsertValue(virJSONParserPtr parser, + virJSONValuePtr value) +{ + if (!parser->head) { + parser->head =3D value; + } else { + virJSONParserStatePtr state; + if (!parser->nstate) { + VIR_DEBUG("got a value to insert without a container"); + return -1; + } + + state =3D &parser->state[parser->nstate-1]; + + switch (state->value->type) { + case VIR_JSON_TYPE_OBJECT: { + if (!state->key) { + VIR_DEBUG("missing key when inserting object value"); + return -1; + } + + if (virJSONValueObjectAppend(state->value, + state->key, + value) < 0) + return -1; + + VIR_FREE(state->key); + } break; + + case VIR_JSON_TYPE_ARRAY: { + if (state->key) { + VIR_DEBUG("unexpected key when inserting array value"); + return -1; + } + + if (virJSONValueArrayAppend(state->value, + value) < 0) + return -1; + } break; + + default: + VIR_DEBUG("unexpected value type, not a container"); + return -1; + } + } + + return 0; +} + + +static int +virJSONParserHandleNull(void *ctx) +{ + virJSONParserPtr parser =3D ctx; + virJSONValuePtr value =3D virJSONValueNewNull(); + + VIR_DEBUG("parser=3D%p", parser); + + if (!value) + return 0; + + if (virJSONParserInsertValue(parser, value) < 0) { + virJSONValueFree(value); + return 0; + } + + return 1; +} + + +static int +virJSONParserHandleBoolean(void *ctx, + int boolean_) +{ + virJSONParserPtr parser =3D ctx; + virJSONValuePtr value =3D virJSONValueNewBoolean(boolean_); + + VIR_DEBUG("parser=3D%p boolean=3D%d", parser, boolean_); + + if (!value) + return 0; + + if (virJSONParserInsertValue(parser, value) < 0) { + virJSONValueFree(value); + return 0; + } + + return 1; +} + + +static int +virJSONParserHandleNumber(void *ctx, + const char *s, + yajl_size_t l) +{ + virJSONParserPtr parser =3D ctx; + char *str; + virJSONValuePtr value; + + if (VIR_STRNDUP(str, s, l) < 0) + return -1; + value =3D virJSONValueNewNumber(str); + VIR_FREE(str); + + VIR_DEBUG("parser=3D%p str=3D%s", parser, str); + + if (!value) + return 0; + + if (virJSONParserInsertValue(parser, value) < 0) { + virJSONValueFree(value); + return 0; + } + + return 1; +} + + +static int +virJSONParserHandleString(void *ctx, + const unsigned char *stringVal, + yajl_size_t stringLen) +{ + virJSONParserPtr parser =3D ctx; + virJSONValuePtr value =3D virJSONValueNewStringLen((const char *)strin= gVal, + stringLen); + + VIR_DEBUG("parser=3D%p str=3D%p", parser, (const char *)stringVal); + + if (!value) + return 0; + + if (virJSONParserInsertValue(parser, value) < 0) { + virJSONValueFree(value); + return 0; + } + + return 1; +} + + +static int +virJSONParserHandleMapKey(void *ctx, + const unsigned char *stringVal, + yajl_size_t stringLen) +{ + virJSONParserPtr parser =3D ctx; + virJSONParserStatePtr state; + + VIR_DEBUG("parser=3D%p key=3D%p", parser, (const char *)stringVal); + + if (!parser->nstate) + return 0; + + state =3D &parser->state[parser->nstate-1]; + if (state->key) + return 0; + if (VIR_STRNDUP(state->key, (const char *)stringVal, stringLen) < 0) + return 0; + return 1; +} + + +static int +virJSONParserHandleStartMap(void *ctx) +{ + virJSONParserPtr parser =3D ctx; + virJSONValuePtr value =3D virJSONValueNewObject(); + + VIR_DEBUG("parser=3D%p", parser); + + if (!value) + return 0; + + if (virJSONParserInsertValue(parser, value) < 0) { + virJSONValueFree(value); + return 0; + } + + if (VIR_REALLOC_N(parser->state, + parser->nstate + 1) < 0) { + return 0; + } + + parser->state[parser->nstate].value =3D value; + parser->state[parser->nstate].key =3D NULL; + parser->nstate++; + + return 1; +} + + +static int +virJSONParserHandleEndMap(void *ctx) +{ + virJSONParserPtr parser =3D ctx; + virJSONParserStatePtr state; + + VIR_DEBUG("parser=3D%p", parser); + + if (!parser->nstate) + return 0; + + state =3D &(parser->state[parser->nstate-1]); + if (state->key) { + VIR_FREE(state->key); + return 0; + } + + VIR_DELETE_ELEMENT(parser->state, parser->nstate - 1, parser->nstate); + + return 1; +} + + +static int +virJSONParserHandleStartArray(void *ctx) +{ + virJSONParserPtr parser =3D ctx; + virJSONValuePtr value =3D virJSONValueNewArray(); + + VIR_DEBUG("parser=3D%p", parser); + + if (!value) + return 0; + + if (virJSONParserInsertValue(parser, value) < 0) { + virJSONValueFree(value); + return 0; + } + + if (VIR_REALLOC_N(parser->state, + parser->nstate + 1) < 0) + return 0; + + parser->state[parser->nstate].value =3D value; + parser->state[parser->nstate].key =3D NULL; + parser->nstate++; + + return 1; +} + + +static int +virJSONParserHandleEndArray(void *ctx) +{ + virJSONParserPtr parser =3D ctx; + virJSONParserStatePtr state; + + VIR_DEBUG("parser=3D%p", parser); + + if (!(parser->nstate - parser->wrap)) + return 0; + + state =3D &(parser->state[parser->nstate-1]); + if (state->key) { + VIR_FREE(state->key); + return 0; + } + + VIR_DELETE_ELEMENT(parser->state, parser->nstate - 1, parser->nstate); + + return 1; +} + + +static const yajl_callbacks parserCallbacks =3D { + virJSONParserHandleNull, + virJSONParserHandleBoolean, + NULL, + NULL, + virJSONParserHandleNumber, + virJSONParserHandleString, + virJSONParserHandleStartMap, + virJSONParserHandleMapKey, + virJSONParserHandleEndMap, + virJSONParserHandleStartArray, + virJSONParserHandleEndArray +}; + + +/* XXX add an incremental streaming parser - yajl trivially supports it */ +virJSONValuePtr +virJSONValueFromString(const char *jsonstring) +{ + yajl_handle hand; + virJSONParser parser =3D { NULL, NULL, 0, 0 }; + virJSONValuePtr ret =3D NULL; + int rc; + size_t len =3D strlen(jsonstring); +# ifndef WITH_YAJL2 + yajl_parser_config cfg =3D { 0, 1 }; /* Match yajl 2 default behavior = */ + VIR_AUTOPTR(virJSONValue) tmp =3D NULL; +# endif + + VIR_DEBUG("string=3D%s", jsonstring); + +# ifdef WITH_YAJL2 + hand =3D yajl_alloc(&parserCallbacks, NULL, &parser); +# else + hand =3D yajl_alloc(&parserCallbacks, &cfg, NULL, &parser); +# endif + if (!hand) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Unable to create JSON parser")); + goto cleanup; + } + + /* Yajl 2 is nice enough to default to rejecting trailing garbage. + * Yajl 1.0.12 has yajl_get_bytes_consumed to make that detection + * simpler. But we're stuck with yajl 1.0.7 on RHEL 6, which + * happily quits parsing at the end of a valid JSON construct, + * with no visibility into how much more input remains. Wrapping + * things in an array forces yajl to confess the truth. */ +# ifdef WITH_YAJL2 + rc =3D yajl_parse(hand, (const unsigned char *)jsonstring, len); +# else + rc =3D yajl_parse(hand, (const unsigned char *)"[", 1); + parser.wrap =3D 1; + if (VIR_YAJL_STATUS_OK(rc)) + rc =3D yajl_parse(hand, (const unsigned char *)jsonstring, len); + parser.wrap =3D 0; + if (VIR_YAJL_STATUS_OK(rc)) + rc =3D yajl_parse(hand, (const unsigned char *)"]", 1); +# endif + if (!VIR_YAJL_STATUS_OK(rc) || + yajl_complete_parse(hand) !=3D yajl_status_ok) { + unsigned char *errstr =3D yajl_get_error(hand, 1, + (const unsigned char*)jsons= tring, + strlen(jsonstring)); + + virReportError(VIR_ERR_INTERNAL_ERROR, + _("cannot parse json %s: %s"), + jsonstring, (const char*) errstr); + yajl_free_error(hand, errstr); + virJSONValueFree(parser.head); + goto cleanup; + } + + if (parser.nstate !=3D 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("cannot parse json %s: unterminated string/map/ar= ray"), + jsonstring); + virJSONValueFree(parser.head); + } else { + ret =3D parser.head; +# ifndef WITH_YAJL2 + /* Undo the array wrapping above */ + tmp =3D ret; + ret =3D NULL; + if (virJSONValueArraySize(tmp) > 1) + virReportError(VIR_ERR_INTERNAL_ERROR, + _("cannot parse json %s: too many items present= "), + jsonstring); + else + ret =3D virJSONValueArraySteal(tmp, 0); +# endif + } + + cleanup: + yajl_free(hand); + + if (parser.nstate) { + size_t i; + for (i =3D 0; i < parser.nstate; i++) + VIR_FREE(parser.state[i].key); + VIR_FREE(parser.state); + } + + VIR_DEBUG("result=3D%p", ret); + + return ret; +} + + +static int +virJSONValueToStringOne(virJSONValuePtr object, + yajl_gen g) +{ + size_t i; + + VIR_DEBUG("object=3D%p type=3D%d gen=3D%p", object, object->type, g); + + switch (object->type) { + case VIR_JSON_TYPE_OBJECT: + if (yajl_gen_map_open(g) !=3D yajl_gen_status_ok) + return -1; + for (i =3D 0; i < object->data.object.npairs; i++) { + if (yajl_gen_string(g, + (unsigned char *)object->data.object.pairs= [i].key, + strlen(object->data.object.pairs[i].key)) + !=3D yajl_gen_status_ok) + return -1; + if (virJSONValueToStringOne(object->data.object.pairs[i].value= , g) < 0) + return -1; + } + if (yajl_gen_map_close(g) !=3D yajl_gen_status_ok) + return -1; + break; + case VIR_JSON_TYPE_ARRAY: + if (yajl_gen_array_open(g) !=3D yajl_gen_status_ok) + return -1; + for (i =3D 0; i < object->data.array.nvalues; i++) { + if (virJSONValueToStringOne(object->data.array.values[i], g) <= 0) + return -1; + } + if (yajl_gen_array_close(g) !=3D yajl_gen_status_ok) + return -1; + break; + + case VIR_JSON_TYPE_STRING: + if (yajl_gen_string(g, (unsigned char *)object->data.string, + strlen(object->data.string)) !=3D yajl_gen_sta= tus_ok) + return -1; + break; + + case VIR_JSON_TYPE_NUMBER: + if (yajl_gen_number(g, object->data.number, + strlen(object->data.number)) !=3D yajl_gen_sta= tus_ok) + return -1; + break; + + case VIR_JSON_TYPE_BOOLEAN: + if (yajl_gen_bool(g, object->data.boolean) !=3D yajl_gen_status_ok) + return -1; + break; + + case VIR_JSON_TYPE_NULL: + if (yajl_gen_null(g) !=3D yajl_gen_status_ok) + return -1; + break; + + default: + return -1; + } + + return 0; +} + + +char * +virJSONValueToString(virJSONValuePtr object, + bool pretty) +{ + yajl_gen g; + const unsigned char *str; + char *ret =3D NULL; + yajl_size_t len; +# ifndef WITH_YAJL2 + yajl_gen_config conf =3D { pretty ? 1 : 0, pretty ? " " : " "}; +# endif + + VIR_DEBUG("object=3D%p", object); + +# ifdef WITH_YAJL2 + g =3D yajl_gen_alloc(NULL); + if (g) { + yajl_gen_config(g, yajl_gen_beautify, pretty ? 1 : 0); + yajl_gen_config(g, yajl_gen_indent_string, pretty ? " " : " "); + yajl_gen_config(g, yajl_gen_validate_utf8, 1); + } +# else + g =3D yajl_gen_alloc(&conf, NULL); +# endif + if (!g) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Unable to create JSON formatter")); + goto cleanup; + } + + if (virJSONValueToStringOne(object, g) < 0) { + virReportOOMError(); + goto cleanup; + } + + if (yajl_gen_get_buf(g, &str, &len) !=3D yajl_gen_status_ok) { + virReportOOMError(); + goto cleanup; + } + + ignore_value(VIR_STRDUP(ret, (const char *)str)); + + cleanup: + yajl_gen_free(g); + + VIR_DEBUG("result=3D%s", NULLSTR(ret)); + + return ret; +} + + +#elif WITH_JANSSON # include =20 static virJSONValuePtr --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161381124723.3850321741556; Mon, 13 Aug 2018 04:56:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C67E308FBA7; Mon, 13 Aug 2018 11:56:18 +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 3BB1C3001A51; Mon, 13 Aug 2018 11:56:18 +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 E0E5818037FD; Mon, 13 Aug 2018 11:56:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtdiE026246 for ; Mon, 13 Aug 2018 07:55:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id B452B2166BA8; Mon, 13 Aug 2018 11:55:39 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30CC42166BA0 for ; Mon, 13 Aug 2018 11:55:39 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:24 +0200 Message-Id: <4fea849f332ba263aa97592836f16a9688ee377f.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 14/16] Revert "Switch from yajl to 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.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 13 Aug 2018 11:56:19 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 9cf38263d05ca7f27dbbd9b1a0b48d338d9280e2. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- libvirt.spec.in | 4 +- m4/virt-nss.m4 | 4 +- m4/virt-yajl.m4 | 27 +++- src/Makefile.am | 8 +- src/qemu/qemu_driver.c | 2 +- src/util/Makefile.inc.am | 4 +- src/util/virjson.c | 211 ---------------------------= ---- tests/Makefile.am | 12 +- tests/cputest.c | 16 +-- tests/libxlxml2domconfigtest.c | 4 +- tests/qemuagenttest.c | 2 +- tests/qemublocktest.c | 1 - tests/qemucapabilitiestest.c | 2 +- tests/qemucaps2xmltest.c | 2 +- tests/qemucommandutiltest.c | 2 +- tests/qemuhotplugtest.c | 2 +- tests/qemumigparamsdata/empty.json | 4 +- tests/qemumigparamsdata/unsupported.json | 4 +- tests/qemumigparamstest.c | 2 +- tests/qemumonitorjsontest.c | 2 +- tests/virmacmaptestdata/empty.json | 4 +- tests/virmocklibxl.c | 4 +- tests/virnetdaemontest.c | 2 +- tests/virstoragetest.c | 4 +- 24 files changed, 72 insertions(+), 257 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 51f3feef8a..2ef844f69a 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -292,7 +292,7 @@ BuildRequires: libblkid-devel >=3D 2.17 BuildRequires: augeas BuildRequires: systemd-devel >=3D 185 BuildRequires: libpciaccess-devel >=3D 0.10.9 -BuildRequires: jansson-devel +BuildRequires: yajl-devel %if %{with_sanlock} BuildRequires: sanlock-devel >=3D 2.4 %endif @@ -1190,7 +1190,7 @@ rm -f po/stamp-po --without-apparmor \ --without-hal \ --with-udev \ - --with-jansson \ + --with-yajl \ %{?arg_sanlock} \ --with-libpcap \ --with-macvtap \ diff --git a/m4/virt-nss.m4 b/m4/virt-nss.m4 index 082b7b14f6..951a74e835 100644 --- a/m4/virt-nss.m4 +++ b/m4/virt-nss.m4 @@ -27,9 +27,9 @@ AC_DEFUN([LIBVIRT_CHECK_NSS],[ bsd_nss=3Dno fail=3D0 if test "x$with_nss_plugin" !=3D "xno" ; then - if test "x$with_jansson" !=3D "xyes" ; then + if test "x$with_yajl" !=3D "xyes" ; then if test "x$with_nss_plugin" =3D "xyes" ; then - AC_MSG_ERROR([Can't build nss plugin without JSON support]) + AC_MSG_ERROR([Can't build nss plugin without yajl]) else with_nss_plugin=3Dno fi diff --git a/m4/virt-yajl.m4 b/m4/virt-yajl.m4 index 8d4c43a6b2..c4ea0102a3 100644 --- a/m4/virt-yajl.m4 +++ b/m4/virt-yajl.m4 @@ -23,10 +23,31 @@ AC_DEFUN([LIBVIRT_ARG_YAJL],[ =20 AC_DEFUN([LIBVIRT_CHECK_YAJL],[ dnl YAJL JSON library http://lloyd.github.com/yajl/ - if test "$with_yajl" =3D yes; then - AC_MSG_ERROR([Compilation with YAJL is no longer supported]) + 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 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 + 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 ;; + 0.* | '' ) ;; + *) AC_MSG_ERROR([Unexpected qemu version string]) ;; + esac + fi + fi fi - with_yajl=3Dno + + LIBVIRT_CHECK_LIB_ALT([YAJL], [yajl], + [yajl_parse_complete], [yajl/yajl_common.h], + [YAJL2], [yajl], + [yajl_tree_parse], [yajl/yajl_common.h]) ]) =20 AC_DEFUN([LIBVIRT_RESULT_YAJL],[ diff --git a/src/Makefile.am b/src/Makefile.am index 83263e69e5..db8c8ebd1a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -544,7 +544,7 @@ libvirt_admin_la_CFLAGS =3D \ libvirt_admin_la_CFLAGS +=3D \ $(XDR_CFLAGS) \ $(CAPNG_CFLAGS) \ - $(JANSSON_CFLAGS) \ + $(YAJL_CFLAGS) \ $(SSH2_CFLAGS) \ $(SASL_CFLAGS) \ $(GNUTLS_CFLAGS) \ @@ -552,7 +552,7 @@ libvirt_admin_la_CFLAGS +=3D \ =20 libvirt_admin_la_LIBADD +=3D \ $(CAPNG_LIBS) \ - $(JANSSON_LIBS) \ + $(YAJL_LIBS) \ $(DEVMAPPER_LIBS) \ $(LIBXML_LIBS) \ $(SSH2_LIBS) \ @@ -994,14 +994,14 @@ libvirt_nss_la_SOURCES =3D \ libvirt_nss_la_CFLAGS =3D \ -DLIBVIRT_NSS \ $(AM_CFLAGS) \ - $(JANSSON_CFLAGS) \ + $(YAJL_CFLAGS) \ $(NULL) libvirt_nss_la_LDFLAGS =3D \ $(AM_LDFLAGS) \ $(NULL) =20 libvirt_nss_la_LIBADD =3D \ - $(JANSSON_LIBS) \ + $(YAJL_LIBS) \ $(NULL) endif WITH_NSS =20 diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index fb0d4a8c7a..d4a2379e48 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2092,7 +2092,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags) */ if ((!useAgent) || (ret < 0 && (acpiRequested || !flags))) { -#if !WITH_JANSSON +#if !WITH_YAJL virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("ACPI reboot is not supported without the JSON mo= nitor")); goto endjob; diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index 71b2b93c2d..a22265606c 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -251,7 +251,7 @@ libvirt_util_la_SOURCES =3D \ $(NULL) libvirt_util_la_CFLAGS =3D \ $(CAPNG_CFLAGS) \ - $(JANSSON_CFLAGS) \ + $(YAJL_CFLAGS) \ $(LIBNL_CFLAGS) \ $(AM_CFLAGS) \ $(AUDIT_CFLAGS) \ @@ -264,7 +264,7 @@ libvirt_util_la_CFLAGS =3D \ $(NULL) libvirt_util_la_LIBADD =3D \ $(CAPNG_LIBS) \ - $(JANSSON_LIBS) \ + $(YAJL_LIBS) \ $(LIBNL_LIBS) \ $(THREAD_LIBS) \ $(AUDIT_LIBS) \ diff --git a/src/util/virjson.c b/src/util/virjson.c index 608ba85d67..29530dcb15 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -1985,217 +1985,6 @@ 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) { - virJSONValueFree(val); - 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) { - virJSONValueFree(val); - goto error; - } - } - break; - - case JSON_STRING: - ret =3D virJSONValueNewString(json_string_value(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: - ret =3D virJSONValueNewBoolean(true); - break; - - case JSON_FALSE: - ret =3D virJSONValueNewBoolean(false); - 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_t *ret =3D NULL; - size_t i; - - switch ((virJSONType)object->type) { - case VIR_JSON_TYPE_OBJECT: - ret =3D json_object(); - if (!ret) - goto no_memory; - 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) { - json_decref(val); - goto no_memory; - } - } - break; - - case VIR_JSON_TYPE_ARRAY: - ret =3D json_array(); - if (!ret) - goto no_memory; - 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) { - json_decref(val); - goto no_memory; - } - } - 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", - _("JSON value is not a number")); - 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; - - default: - virReportEnumRangeError(virJSONType, object->type); - goto error; - } - if (!ret) - goto no_memory; - return ret; - - no_memory: - virReportOOMError(); - error: - json_decref(ret); - return NULL; -} - - -char * -virJSONValueToString(virJSONValuePtr object, - bool pretty) -{ - size_t flags =3D JSON_ENCODE_ANY; - json_t *json; - 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) - virReportOOMError(); - json_decref(json); - return str; -} - - #else virJSONValuePtr virJSONValueFromString(const char *jsonstring ATTRIBUTE_UNUSED) diff --git a/tests/Makefile.am b/tests/Makefile.am index 302b50e1cd..21a6c823d9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -46,7 +46,7 @@ AM_CFLAGS =3D \ $(SASL_CFLAGS) \ $(SELINUX_CFLAGS) \ $(APPARMOR_CFLAGS) \ - $(JANSSON_CFLAGS) \ + $(YAJL_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(XDR_CFLAGS) \ $(WARN_CFLAGS) @@ -331,9 +331,9 @@ if WITH_CIL test_programs +=3D objectlocking endif WITH_CIL =20 -if WITH_JANSSON +if WITH_YAJL test_programs +=3D virjsontest -endif WITH_JANSSON +endif WITH_YAJL =20 test_programs +=3D \ networkxml2xmltest \ @@ -1219,15 +1219,15 @@ virdeterministichashmock_la_LIBADD =3D $(MOCKLIBS_L= IBS) =20 test_libraries +=3D virdeterministichashmock.la =20 -if WITH_JANSSON +if WITH_YAJL virmacmaptest_SOURCES =3D \ virmacmaptest.c testutils.h testutils.c virmacmaptest_LDADD =3D $(LDADDS) =20 test_programs +=3D virmacmaptest -else ! WITH_JANSSON +else ! WITH_YAJL EXTRA_DIST +=3D virmacmaptest.c -endif ! WITH_JANSSON +endif ! WITH_YAJL =20 virnetdevtest_SOURCES =3D \ virnetdevtest.c testutils.h testutils.c diff --git a/tests/cputest.c b/tests/cputest.c index 9cc361d125..baf2b3c648 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_JANSSON +#if WITH_QEMU && WITH_YAJL # include "testutilsqemu.h" # include "qemumonitortestutils.h" # define __QEMU_CAPSPRIV_H_ALLOW__ @@ -67,7 +67,7 @@ struct data { int result; }; =20 -#if WITH_QEMU && WITH_JANSSON +#if WITH_QEMU && WITH_YAJL static virQEMUDriver driver; #endif =20 @@ -479,7 +479,7 @@ typedef enum { JSON_MODELS_REQUIRED, } cpuTestCPUIDJson; =20 -#if WITH_QEMU && WITH_JANSSON +#if WITH_QEMU && WITH_YAJL static virQEMUCapsPtr cpuTestMakeQEMUCaps(const struct data *data) { @@ -554,7 +554,7 @@ cpuTestGetCPUModels(const struct data *data, return 0; } =20 -#else /* if WITH_QEMU && WITH_JANSSON */ +#else /* if WITH_QEMU && WITH_YAJL */ =20 static int cpuTestGetCPUModels(const struct data *data, @@ -834,7 +834,7 @@ cpuTestUpdateLive(const void *arg) } =20 =20 -#if WITH_QEMU && WITH_JANSSON +#if WITH_QEMU && WITH_YAJL 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_JANSSON +#if WITH_QEMU && WITH_YAJL 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_JANSSON +#if WITH_QEMU && WITH_YAJL # define DO_TEST_JSON(arch, host, json) \ do { \ if (json =3D=3D JSON_MODELS) { \ @@ -1205,7 +1205,7 @@ mymain(void) DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-X5460", JSON_NONE); =20 cleanup: -#if WITH_QEMU && WITH_JANSSON +#if WITH_QEMU && WITH_YAJL qemuTestDriverFree(&driver); #endif =20 diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c index a9758c40cb..b814461acc 100644 --- a/tests/libxlxml2domconfigtest.c +++ b/tests/libxlxml2domconfigtest.c @@ -33,7 +33,7 @@ =20 #include "testutils.h" =20 -#if defined(WITH_LIBXL) && defined(WITH_JANSSON) && defined(HAVE_LIBXL_DOM= AIN_CONFIG_FROM_JSON) +#if defined(WITH_LIBXL) && defined(WITH_YAJL) && defined(HAVE_LIBXL_DOMAIN= _CONFIG_FROM_JSON) =20 # include "internal.h" # include "viralloc.h" @@ -228,4 +228,4 @@ int main(void) return EXIT_AM_SKIP; } =20 -#endif /* WITH_LIBXL && WITH_JANSSON && HAVE_LIBXL_DOMAIN_CONFIG_FROM_JSON= */ +#endif /* WITH_LIBXL && WITH_YAJL && HAVE_LIBXL_DOMAIN_CONFIG_FROM_JSON */ diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c index 232b34f9cd..2f79986207 100644 --- a/tests/qemuagenttest.c +++ b/tests/qemuagenttest.c @@ -907,7 +907,7 @@ mymain(void) { int ret =3D 0; =20 -#if !WITH_JANSSON +#if !WITH_YAJL fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 9a387cf063..0c335abc5b 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -309,7 +309,6 @@ testQemuDiskXMLToPropsValidateFile(const void *opaque) goto cleanup; =20 virBufferAdd(&buf, jsonstr, -1); - virBufferAddLit(&buf, "\n"); VIR_FREE(jsonstr); } =20 diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index 641ec4f597..4aec175968 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -141,7 +141,7 @@ mymain(void) int ret =3D 0; testQemuData data; =20 -#if !WITH_JANSSON +#if !WITH_YAJL fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c index e3b7b97925..5b9152b04d 100644 --- a/tests/qemucaps2xmltest.c +++ b/tests/qemucaps2xmltest.c @@ -165,7 +165,7 @@ mymain(void) =20 testQemuData data; =20 -#if !WITH_JANSSON +#if !WITH_YAJL fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemucommandutiltest.c b/tests/qemucommandutiltest.c index 8e57a1b79d..f0921e3b93 100644 --- a/tests/qemucommandutiltest.c +++ b/tests/qemucommandutiltest.c @@ -76,7 +76,7 @@ mymain(void) int ret =3D 0; testQemuCommandBuildObjectFromJSONData data1; =20 -#if !WITH_JANSSON +#if !WITH_YAJL fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 2fb96c6158..5b1e0db104 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -593,7 +593,7 @@ mymain(void) struct qemuHotplugTestData data =3D {0}; struct testQemuHotplugCpuParams cpudata; =20 -#if !WITH_JANSSON +#if !WITH_YAJL fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemumigparamsdata/empty.json b/tests/qemumigparamsdata/e= mpty.json index 0967ef424b..0db3279e44 100644 --- a/tests/qemumigparamsdata/empty.json +++ b/tests/qemumigparamsdata/empty.json @@ -1 +1,3 @@ -{} +{ + +} diff --git a/tests/qemumigparamsdata/unsupported.json b/tests/qemumigparams= data/unsupported.json index 0967ef424b..0db3279e44 100644 --- a/tests/qemumigparamsdata/unsupported.json +++ b/tests/qemumigparamsdata/unsupported.json @@ -1 +1,3 @@ -{} +{ + +} diff --git a/tests/qemumigparamstest.c b/tests/qemumigparamstest.c index b8af68211b..0532053722 100644 --- a/tests/qemumigparamstest.c +++ b/tests/qemumigparamstest.c @@ -203,7 +203,7 @@ mymain(void) virQEMUDriver driver; int ret =3D 0; =20 -#if !WITH_JANSSON +#if !WITH_YAJL fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index c11615f7ac..e9b2632655 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2863,7 +2863,7 @@ mymain(void) virJSONValuePtr metaschema =3D NULL; char *metaschemastr =3D NULL; =20 -#if !WITH_JANSSON +#if !WITH_YAJL fputs("libvirt not compiled with JSON support, skipping this test\n", = stderr); return EXIT_AM_SKIP; #endif diff --git a/tests/virmacmaptestdata/empty.json b/tests/virmacmaptestdata/e= mpty.json index fe51488c70..41b42e677b 100644 --- a/tests/virmacmaptestdata/empty.json +++ b/tests/virmacmaptestdata/empty.json @@ -1 +1,3 @@ -[] +[ + +] diff --git a/tests/virmocklibxl.c b/tests/virmocklibxl.c index 0a047c239f..546c6d6a43 100644 --- a/tests/virmocklibxl.c +++ b/tests/virmocklibxl.c @@ -22,7 +22,7 @@ =20 #include =20 -#if defined(WITH_LIBXL) && defined(WITH_JANSSON) +#if defined(WITH_LIBXL) && defined(WITH_YAJL) # include "virmock.h" # include # include @@ -136,4 +136,4 @@ VIR_MOCK_IMPL_RET_ARGS(stat, int, return real_stat(path, sb); } =20 -#endif /* WITH_LIBXL && WITH_JANSSON */ +#endif /* WITH_LIBXL && WITH_YAJL */ diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index cbc961dbaf..6f4957fc4c 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_JANSSON) +#if defined(HAVE_SOCKETPAIR) && defined(WITH_YAJL) struct testClientPriv { int magic; }; diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index b20b5a8744..68d0307d5c 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -1317,7 +1317,7 @@ mymain(void) " \n" "\n"); =20 -#ifdef WITH_JANSSON +#ifdef WITH_YAJL TEST_BACKING_PARSE("json:", NULL); TEST_BACKING_PARSE("json:asdgsdfg", NULL); TEST_BACKING_PARSE("json:{}", NULL); @@ -1581,7 +1581,7 @@ mymain(void) "\n" " \n" "\n"); -#endif /* WITH_JANSSON */ +#endif /* WITH_YAJL */ =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 Thu Apr 25 12:58:54 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 1534161385700594.7073922834173; Mon, 13 Aug 2018 04:56:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36B42C057FA2; Mon, 13 Aug 2018 11:56:23 +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 E285B70A06; Mon, 13 Aug 2018 11:56:22 +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 69A1A18033D1; Mon, 13 Aug 2018 11:56:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBte7E026261 for ; Mon, 13 Aug 2018 07:55:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 660AD2166BA8; Mon, 13 Aug 2018 11:55:40 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 031202166BA0 for ; Mon, 13 Aug 2018 11:55:39 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:25 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 15/16] Revert "build: undef WITH_JANSSON for SETUID_RPC_CLIENT" 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 13 Aug 2018 11:56:24 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 93fdc9e0b0cbb2eec32745a868ac4633f0912ad5. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Signed-off-by: J=C3=A1n Tomko --- config-post.h | 1 - 1 file changed, 1 deletion(-) diff --git a/config-post.h b/config-post.h index 24117bbbd4..063e30fa37 100644 --- a/config-post.h +++ b/config-post.h @@ -36,7 +36,6 @@ # undef WITH_DEVMAPPER # undef WITH_DTRACE_PROBES # undef WITH_GNUTLS -# undef WITH_JANSSON # undef WITH_LIBSSH # undef WITH_MACVTAP # undef WITH_NUMACTL --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 12:58:54 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 1534161390788121.72529957886866; Mon, 13 Aug 2018 04:56:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 70BFFA203E; Mon, 13 Aug 2018 11:56:28 +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 25F1B10694C5; Mon, 13 Aug 2018 11:56:28 +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 AAA5A24F65; Mon, 13 Aug 2018 11:56:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7DBtflI026268 for ; Mon, 13 Aug 2018 07:55:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 173312166BA8; Mon, 13 Aug 2018 11:55:41 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8C162166BA0 for ; Mon, 13 Aug 2018 11:55:40 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 13 Aug 2018 13:55:26 +0200 Message-Id: <9bcfe306dbba67c9382b96126c984e2b6848ed58.1534161029.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 16/16] Revert "build: add --with-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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 13 Aug 2018 11:56:29 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 This reverts commit 12b34f094e2f1c7f414f4bb8f880a9d65c8fcd85. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=3D1614569 Conflicts: configure.ac: Commit 8aa85e0b introduced LIBVIRT_*_LIBISCSI macros. Signed-off-by: J=C3=A1n Tomko --- configure.ac | 3 --- m4/virt-jansson.m4 | 29 ----------------------------- 2 files changed, 32 deletions(-) delete mode 100644 m4/virt-jansson.m4 diff --git a/configure.ac b/configure.ac index 5e49b8483f..da940e34df 100644 --- a/configure.ac +++ b/configure.ac @@ -250,7 +250,6 @@ LIBVIRT_ARG_FIREWALLD LIBVIRT_ARG_FUSE LIBVIRT_ARG_GLUSTER LIBVIRT_ARG_HAL -LIBVIRT_ARG_JANSSON LIBVIRT_ARG_LIBISCSI LIBVIRT_ARG_LIBPCAP LIBVIRT_ARG_LIBSSH @@ -292,7 +291,6 @@ LIBVIRT_CHECK_FUSE LIBVIRT_CHECK_GLUSTER LIBVIRT_CHECK_GNUTLS LIBVIRT_CHECK_HAL -LIBVIRT_CHECK_JANSSON LIBVIRT_CHECK_LIBISCSI LIBVIRT_CHECK_LIBNL LIBVIRT_CHECK_LIBPARTED @@ -978,7 +976,6 @@ LIBVIRT_RESULT_FUSE LIBVIRT_RESULT_GLUSTER LIBVIRT_RESULT_GNUTLS LIBVIRT_RESULT_HAL -LIBVIRT_RESULT_JANSSON LIBVIRT_RESULT_LIBISCSI LIBVIRT_RESULT_LIBNL LIBVIRT_RESULT_LIBPCAP diff --git a/m4/virt-jansson.m4 b/m4/virt-jansson.m4 deleted file mode 100644 index 206d6a5ced..0000000000 --- a/m4/virt-jansson.m4 +++ /dev/null @@ -1,29 +0,0 @@ -dnl The jansson library -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library. If not, see -dnl . -dnl - -AC_DEFUN([LIBVIRT_ARG_JANSSON],[ - LIBVIRT_ARG_WITH_FEATURE([JANSSON], [jansson], [check]) -]) - -AC_DEFUN([LIBVIRT_CHECK_JANSSON],[ - dnl Jansson http://www.digip.org/jansson/ - LIBVIRT_CHECK_PKG([JANSSON], [jansson], [2.5]) -]) - -AC_DEFUN([LIBVIRT_RESULT_JANSSON],[ - LIBVIRT_RESULT_LIB([JANSSON]) -]) --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list