From nobody Thu Apr 25 08:41:11 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 1552492254316195.39178179629664; Wed, 13 Mar 2019 08:50:54 -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 77B33753DC; Wed, 13 Mar 2019 15:50:52 +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 E21EF5C231; Wed, 13 Mar 2019 15:50:51 +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 6BB46181A136; Wed, 13 Mar 2019 15:50:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2DFolxb001211 for ; Wed, 13 Mar 2019 11:50:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9CFA960CD1; Wed, 13 Mar 2019 15:50:47 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F06160BE6 for ; Wed, 13 Mar 2019 15:50:46 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 13 Mar 2019 16:50:37 +0100 Message-Id: <9c5edf231818ddfc03ff9cbcb0342b8238f2f37f.1552492158.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] virt-yajl.m4: Drop useless check for qemu 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-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.39]); Wed, 13 Mar 2019 15:50:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Firstly, this code is lacking AC_REQUIRE() therefore it may happen that this code is executed before LIBVIRT_DRIVER_CHECK_QEMU is evaluated. Secondly, the code tries to detect installed version of qemu to learn if it uses HMP or QMP and enable YAJL based on that. Well, we support only QMP and also minimal required version of qemu is 1.5.0 so the check would have enabled yajl anyway. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- m4/virt-yajl.m4 | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/m4/virt-yajl.m4 b/m4/virt-yajl.m4 index c4ea0102a3..7e905c2f77 100644 --- a/m4/virt-yajl.m4 +++ b/m4/virt-yajl.m4 @@ -23,26 +23,6 @@ AC_DEFUN([LIBVIRT_ARG_YAJL],[ =20 AC_DEFUN([LIBVIRT_CHECK_YAJL],[ dnl YAJL JSON library http://lloyd.github.com/yajl/ - if test "$with_qemu:$with_yajl" =3D yes:check; then - dnl Some versions of qemu require the use of yajl; try to detect them - 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 =20 LIBVIRT_CHECK_LIB_ALT([YAJL], [yajl], [yajl_parse_complete], [yajl/yajl_common.h], --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 08:41:11 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 155249227313124.334669641425194; Wed, 13 Mar 2019 08:51:13 -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 3CBA63D95D; Wed, 13 Mar 2019 15:51:11 +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 114C060BE6; Wed, 13 Mar 2019 15:51:11 +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 BAB79181A138; Wed, 13 Mar 2019 15:51:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2DFooK5001230 for ; Wed, 13 Mar 2019 11:50:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4241B60BE6; Wed, 13 Mar 2019 15:50:50 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA1F160CD1 for ; Wed, 13 Mar 2019 15:50:47 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 13 Mar 2019 16:50:38 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] virt-driver-qemu.m4: Require 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-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.30]); Wed, 13 Mar 2019 15:51:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" There is not way that qemu driver can work without being able to format/parse JSON. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- m4/virt-driver-qemu.m4 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4 index 80e1d3ad46..af8edaae0d 100644 --- a/m4/virt-driver-qemu.m4 +++ b/m4/virt-driver-qemu.m4 @@ -26,6 +26,15 @@ AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [ ]) =20 AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [ + dnl There is no way qemu driver will work without JSON support + AC_REQUIRE([LIBVIRT_CHECK_YAJL]) + if test "$with_qemu:$with_yajl" =3D "yes:no"; then + AC_MSG_ERROR([YAJL or YAJL2 is required to build QEMU driver]) + fi + if test "$with_qemu" =3D "check"; then + with_qemu=3D$with_yajl + fi + if test "$with_qemu" =3D "yes" ; then AC_DEFINE_UNQUOTED([WITH_QEMU], 1, [whether QEMU driver is enabled]) fi --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 08:41:11 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 1552567001402657.2508831203238; Thu, 14 Mar 2019 05:36:41 -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 BB0E7C062EC2; Thu, 14 Mar 2019 12:36:38 +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 6A7365F9D2; Thu, 14 Mar 2019 12:36:38 +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 0FF2E1819AFE; Thu, 14 Mar 2019 12:36:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2ECaarN032255 for ; Thu, 14 Mar 2019 08:36:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6272A5F9D2; Thu, 14 Mar 2019 12:36:36 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEA265C231 for ; Thu, 14 Mar 2019 12:36:33 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 14 Mar 2019 13:36:26 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1.5/2] virt-driver-qemu.m4: Make qemu driver optional 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-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.31]); Thu, 14 Mar 2019 12:36:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The basic idea of our configure script is to probe for things rather than have them enabled by default. This is even more visible in the next commit where configure fails if qemu driver is enabled but no yajl is found. Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- m4/virt-driver-qemu.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4 index 80e1d3ad46..2912b3c462 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], [yes]) + LIBVIRT_ARG_WITH_FEATURE([QEMU], [QEMU/KVM], [check]) 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= ], --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list