From nobody Wed Nov 27 22:47:19 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 1534250276872658.483583151322; Tue, 14 Aug 2018 05:37:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5281C30832C2; Tue, 14 Aug 2018 12:37: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 76CD52010CA4; Tue, 14 Aug 2018 12:37:53 +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 16F1B6B580; Tue, 14 Aug 2018 12:37:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7ECbo0e024774 for ; Tue, 14 Aug 2018 08:37:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2216051DC; Tue, 14 Aug 2018 12:37:50 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B494E1C72C for ; Tue, 14 Aug 2018 12:37:47 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 14 Aug 2018 14:37:44 +0200 Message-Id: <20180814123744.25981-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] spec: Enable the iscsi-direct storage driver conditionally 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: , MIME-Version: 1.0 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.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 14 Aug 2018 12:37:55 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Most distributions we build RPMs on don't ship a recent enough version of libiscsi, so we can't enable the driver unconditionally. Add an explicit dependency on the runtime package while at it. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- libvirt.spec.in | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 63834767dd..883c8a49e7 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -71,6 +71,13 @@ %define with_storage_zfs 0 %endif =20 +# We need a recent enough libiscsi (>=3D 1.18.0) +%if 0%{?fedora} >=3D 28 || 0%{?rhel} > 7 + %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1} +%else + %define with_storage_iscsi_direct 0 +%endif + # A few optional bits off by default, we enable later %define with_fuse 0%{!?_without_fuse:0} %define with_sanlock 0%{!?_without_sanlock:0} @@ -319,8 +326,10 @@ BuildRequires: /usr/bin/qemu-img BuildRequires: lvm2 # For pool type=3Discsi BuildRequires: iscsi-initiator-utils +%if %{with_storage_iscsi_direct} # For pool type=3Discsi-direct BuildRequires: libiscsi-devel +%endif # For disk driver BuildRequires: parted-devel # For Multipath support @@ -593,14 +602,17 @@ The storage driver backend adding implementation of t= he storage APIs for iscsi volumes using the host iscsi stack. =20 =20 +%if %{with_storage_iscsi_direct} %package daemon-driver-storage-iscsi-direct Summary: Storage driver plugin for iscsi-direct Requires: libvirt-daemon-driver-storage-core =3D %{version}-%{release} Requires: libvirt-libs =3D %{version}-%{release} +Requires: libiscsi =20 %description daemon-driver-storage-iscsi-direct The storage driver backend adding implementation of the storage APIs for i= scsi volumes using libiscsi direct connection. +%endif =20 =20 %package daemon-driver-storage-mpath @@ -679,8 +691,10 @@ Requires: libvirt-daemon-driver-storage-disk =3D %{ver= sion}-%{release} Requires: libvirt-daemon-driver-storage-logical =3D %{version}-%{release} Requires: libvirt-daemon-driver-storage-scsi =3D %{version}-%{release} Requires: libvirt-daemon-driver-storage-iscsi =3D %{version}-%{release} -Requires: libvirt-daemon-driver-storage-iscsi-direct =3D %{version}-%{rele= ase} Requires: libvirt-daemon-driver-storage-mpath =3D %{version}-%{release} +%if %{with_storage_iscsi_direct} +Requires: libvirt-daemon-driver-storage-iscsi-direct =3D %{version}-%{rele= ase} +%endif %if %{with_storage_gluster} Requires: libvirt-daemon-driver-storage-gluster =3D %{version}-%{release} %endif @@ -1134,6 +1148,12 @@ exit 1 %define arg_wireshark --without-wireshark-dissector %endif =20 +%if %{with_storage_iscsi_direct} + %define arg_storage_iscsi_direct --with-storage-iscsi-direct +%else + %define arg_storage_iscsi_direct --without-storage-iscsi-direct +%endif + %define when %(date +"%%F-%%T") %define where %(hostname) %define who %{?packager}%{!?packager:Unknown} @@ -1185,7 +1205,7 @@ rm -f po/stamp-po --with-storage-fs \ --with-storage-lvm \ --with-storage-iscsi \ - --with-storage-iscsi-direct \ + %{?arg_storage_iscsi_direct} \ --with-storage-scsi \ --with-storage-disk \ --with-storage-mpath \ @@ -1651,8 +1671,10 @@ exit 0 %files daemon-driver-storage-iscsi %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi.so =20 +%if %{with_storage_iscsi_direct} %files daemon-driver-storage-iscsi-direct %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi-direct.so +%endif =20 %files daemon-driver-storage-mpath %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_mpath.so --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list