[libvirt] [PATCH 2.5/3] spec: require device-mapper-devel for storage-disk

Eric Blake eblake at redhat.com
Tue Feb 25 19:33:04 UTC 2014


On Fedora 20, with the following in my ~/.rpmmacros:

%_without_udev 1
%_without_storage_mpath 1

and with device-mapper-devel uninstalled, 'make rpm' fails with:

checking for libdevmapper.h... no
configure: error: You must install device-mapper-devel/libdevmapper >= 1.0.0 to compile libvirt
error: Bad exit status from /var/tmp/rpm-tmp.Wo9pOG (%build)

The fix is to match the logic in configure.ac on when devmapper
is required (for both mpath and storage).  While at it, rbd
storage is not dependent on mpath.

* libvirt.spec.in (BuildRequires): Fix build when mpath is
disabled.

Signed-off-by: Eric Blake <eblake at redhat.com>
---

This has been latent and got in the way of me trying to fix
the systemd_daemon issue.

 libvirt.spec.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 1e1e5cc..dd3906d 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -559,7 +559,7 @@ BuildRequires: parted-devel
 BuildRequires: e2fsprogs-devel
     %endif
 %endif
-%if %{with_storage_mpath}
+%if %{with_storage_mpath} || %{with_storage_disk}
 # For Multipath support
     %if 0%{?rhel} == 5
 # Broken RHEL-5 packaging has header files in main RPM :-(
@@ -567,9 +567,9 @@ BuildRequires: device-mapper
     %else
 BuildRequires: device-mapper-devel
     %endif
-    %if %{with_storage_rbd}
+%endif
+%if %{with_storage_rbd}
 BuildRequires: ceph-devel
-    %endif
 %endif
 %if %{with_storage_gluster}
 BuildRequires: glusterfs-api-devel >= 3.4.1
-- 
1.8.5.3




More information about the libvir-list mailing list