]> git.ipfire.org Git - thirdparty/libvirt.git/commit
spec: require device-mapper-devel for storage-disk
authorEric Blake <eblake@redhat.com>
Tue, 25 Feb 2014 19:28:53 +0000 (12:28 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 26 Feb 2014 13:02:06 +0000 (06:02 -0700)
commit7cac3afa5091f5da7035b49db041114ee9ad33a6
tree07a9888715da7fa87ed7ff3af73b0c83a163ddb2
parentfa2939986dfb379608292ba93dca79ff09b20511
spec: require device-mapper-devel for storage-disk

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)

This is a rather late point to be issuing an error; better is
to flag missing packages up front.  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.
With this patch applied, I now get:

$ rpmbuild -ta libvirt-1.2.2.tar.gz
error: Failed build dependencies:
       device-mapper-devel is needed by libvirt-1.2.2-1.fc20.x86_64

until either installing the package or further modifying
~/.rpmmacros to add "%_without_storage_disk 1".

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

Signed-off-by: Eric Blake <eblake@redhat.com>
libvirt.spec.in