]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
spec: Add support for libssh2 transport
authorPeter Krempa <pkrempa@redhat.com>
Fri, 12 Oct 2012 14:50:42 +0000 (16:50 +0200)
committerCole Robinson <crobinso@redhat.com>
Thu, 18 Oct 2012 17:32:04 +0000 (13:32 -0400)
Libssh2 transport support was enabled lately but the spec file wasn't
updated to take this into account. This caused libvirt to be built
without libssh2 support in Red Hat based OSes.
(cherry picked from commit 1e25c54f66b46223e8e31843cec9a825fd02c735)

libvirt.spec.in

index e3d0a2d48a63325dd04497729fa0777a4a93661b..f697b7214b20283ddc4f88e56329f34721377972 100644 (file)
 %define with_systemd       0%{!?_without_systemd:0}
 %define with_numad         0%{!?_without_numad:0}
 %define with_firewalld     0%{!?_without_firewalld:0}
+%define with_libssh2_transport 0%{!?_without_libssh2_transport:0}
 
 # Non-server/HV driver defaults which are always enabled
 %define with_python        0%{!?_without_python:1}
 %endif
 %endif
 
+# Enable libssh2 transport for new enough distros
+%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
+%define with_libssh2_transport 0%{!?_without_libssh2_transport:1}
+%endif
+
 # Disable some drivers when building without libvirt daemon.
 # The logic is the same as in configure.ac
 %if ! %{with_libvirtd}
@@ -491,9 +497,13 @@ BuildRequires: numactl-devel
 %if %{with_capng}
 BuildRequires: libcap-ng-devel >= 0.5.0
 %endif
-%if %{with_phyp}
+%if %{with_phyp} || %{with_libssh2_transport}
+%if %{with_libssh2_transport}
+BuildRequires: libssh2-devel >= 1.3.0
+%else
 BuildRequires: libssh2-devel
 %endif
+%endif
 
 %if %{with_netcf}
 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7