提交 7cac3afa 编写于 作者: E Eric Blake

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: NEric Blake <eblake@redhat.com>
上级 fa293998
...@@ -566,7 +566,7 @@ BuildRequires: parted-devel ...@@ -566,7 +566,7 @@ BuildRequires: parted-devel
BuildRequires: e2fsprogs-devel BuildRequires: e2fsprogs-devel
%endif %endif
%endif %endif
%if %{with_storage_mpath} %if %{with_storage_mpath} || %{with_storage_disk}
# For Multipath support # For Multipath support
%if 0%{?rhel} == 5 %if 0%{?rhel} == 5
# Broken RHEL-5 packaging has header files in main RPM :-( # Broken RHEL-5 packaging has header files in main RPM :-(
...@@ -574,9 +574,9 @@ BuildRequires: device-mapper ...@@ -574,9 +574,9 @@ BuildRequires: device-mapper
%else %else
BuildRequires: device-mapper-devel BuildRequires: device-mapper-devel
%endif %endif
%if %{with_storage_rbd} %endif
%if %{with_storage_rbd}
BuildRequires: ceph-devel BuildRequires: ceph-devel
%endif
%endif %endif
%if %{with_storage_gluster} %if %{with_storage_gluster}
%if 0%{?rhel} >= 6 %if 0%{?rhel} >= 6
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册