From nobody Wed Apr 16 12:36:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516637182343530.3244905137101; Mon, 22 Jan 2018 08:06:22 -0800 (PST) Received: from localhost ([::1]:49975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edec1-0001JN-Lu for importer@patchew.org; Mon, 22 Jan 2018 11:06:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edeXg-0006bW-MP for qemu-devel@nongnu.org; Mon, 22 Jan 2018 11:01:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edeXa-0002nR-I2 for qemu-devel@nongnu.org; Mon, 22 Jan 2018 11:01:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53254) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edeXa-0002le-A5 for qemu-devel@nongnu.org; Mon, 22 Jan 2018 11:01:46 -0500 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 607E64DD7F; Mon, 22 Jan 2018 16:01:45 +0000 (UTC) Received: from localhost (ovpn-116-230.ams2.redhat.com [10.36.116.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9FC09CBC; Mon, 22 Jan 2018 16:01:39 +0000 (UTC) From: Stefan Hajnoczi To: Date: Mon, 22 Jan 2018 16:00:45 +0000 Message-Id: <20180122160048.29571-4-stefanha@redhat.com> In-Reply-To: <20180122160048.29571-1-stefanha@redhat.com> References: <20180122160048.29571-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 22 Jan 2018 16:01:45 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL v2 3/6] configure: add dependency X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Vladimir Sementsov-Ogievskiy , Klim Kireev , Stefan Hajnoczi , "Denis V . Lunev" , Edgar Kaziakhmedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Klim Kireev This dependency is required for adequate Parallels images support. Typically the disk consists of several images which are glued by XML disk descriptor. Also XML hides inside several important parameters which are not available in the image header. The patch also adds clause to checkpatch.pl to understand libxml2 types. Signed-off-by: Denis V. Lunev Signed-off-by: Klim Kireev Signed-off-by: Edgar Kaziakhmedov Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20180112090122.1702-3-klim.kireev@virtuozzo.com CC: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- configure | 27 +++++++++++++++++++++++++++ block/Makefile.objs | 2 ++ scripts/checkpatch.pl | 1 + 3 files changed, 30 insertions(+) diff --git a/configure b/configure index 6d8c996c62..044c6fafe2 100755 --- a/configure +++ b/configure @@ -435,6 +435,7 @@ tcmalloc=3D"no" jemalloc=3D"no" replication=3D"yes" vxhs=3D"" +libxml2=3D"" =20 supported_cpu=3D"no" supported_os=3D"no" @@ -1298,6 +1299,10 @@ for opt do ;; --enable-numa) numa=3D"yes" ;; + --disable-libxml2) libxml2=3D"no" + ;; + --enable-libxml2) libxml2=3D"yes" + ;; --disable-tcmalloc) tcmalloc=3D"no" ;; --enable-tcmalloc) tcmalloc=3D"yes" @@ -1573,6 +1578,7 @@ disabled with --disable-FEATURE, default is enabled i= f available: tpm TPM support libssh2 ssh block device support numa libnuma support + libxml2 for Parallels image format tcmalloc tcmalloc support jemalloc jemalloc support replication replication support @@ -3748,6 +3754,20 @@ EOF fi fi =20 +########################################## +# libxml2 probe +if test "$libxml2" !=3D "no" ; then + if $pkg_config --exists libxml-2.0; then + libxml2=3D"yes" + libxml2_cflags=3D$($pkg_config --cflags libxml-2.0) + libxml2_libs=3D$($pkg_config --libs libxml-2.0) + else + if test "$libxml2" =3D "yes"; then + feature_not_found "libxml2" "Install libxml2 devel" + fi + libxml2=3D"no" + fi +fi =20 ########################################## # glusterfs probe @@ -5630,6 +5650,7 @@ echo "lzo support $lzo" echo "snappy support $snappy" echo "bzip2 support $bzip2" echo "NUMA host support $numa" +echo "libxml2 $libxml2" echo "tcmalloc support $tcmalloc" echo "jemalloc support $jemalloc" echo "avx2 optimization $avx2_opt" @@ -6299,6 +6320,12 @@ if test "$have_rtnetlink" =3D "yes" ; then echo "CONFIG_RTNETLINK=3Dy" >> $config_host_mak fi =20 +if test "$libxml2" =3D "yes" ; then + echo "CONFIG_LIBXML2=3Dy" >> $config_host_mak + echo "LIBXML2_CFLAGS=3D$libxml2_cflags" >> $config_host_mak + echo "LIBXML2_LIBS=3D$libxml2_libs" >> $config_host_mak +fi + if test "$replication" =3D "yes" ; then echo "CONFIG_REPLICATION=3Dy" >> $config_host_mak fi diff --git a/block/Makefile.objs b/block/Makefile.objs index 6eaf78a046..a73387f1bf 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -47,3 +47,5 @@ block-obj-$(if $(CONFIG_BZIP2),m,n) +=3D dmg-bz2.o dmg-bz2.o-libs :=3D $(BZIP2_LIBS) qcow.o-libs :=3D -lz linux-aio.o-libs :=3D -laio +parallels.o-cflags :=3D $(LIBXML2_CFLAGS) +parallels.o-libs :=3D $(LIBXML2_LIBS) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index accba24a31..1b4b812e28 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -265,6 +265,7 @@ our @typeList =3D ( qr{${Ident}_handler_fn}, qr{target_(?:u)?long}, qr{hwaddr}, + qr{xml${Ident}}, ); =20 # This can be modified by sub possible. Since it can be empty, be careful --=20 2.14.3