[libvirt] [PATCH] spec: Add support for libssh2 transport

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. --- I'm not sure how the {?rhel} >= 6 macro is evaluated: Is there a possibility to be more specific with the version? libvirt.spec.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 318fe92..75623eb 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -108,6 +108,7 @@ %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} @@ -229,6 +230,11 @@ %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 -- 1.7.12.3

On 10/12/2012 03:16 PM, Peter Krempa wrote:
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. --- I'm not sure how the {?rhel} >= 6 macro is evaluated: Is there a possibility to be more specific with the version?
You've done fine - remember that each RHEL release is frozen in time, so this commit will only affect any version of RHEL that rebases to libvrit 1.0.0 or newer, or which explicitly backports this patch. That is, the current RHEL 6.3 is unaffected, and depending on what the upcoming RHEL 6.4 picks as its rebase point, either this patch will already be included by the rebase, or it will be very easy to backport into the RHEL build.
libvirt.spec.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
ACK. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 10/12/12 23:26, Eric Blake wrote:
On 10/12/2012 03:16 PM, Peter Krempa wrote:
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. --- I'm not sure how the {?rhel} >= 6 macro is evaluated: Is there a possibility to be more specific with the version?
You've done fine - remember that each RHEL release is frozen in time, so this commit will only affect any version of RHEL that rebases to libvrit 1.0.0 or newer, or which explicitly backports this patch. That is, the current RHEL 6.3 is unaffected, and depending on what the upcoming RHEL 6.4 picks as its rebase point, either this patch will already be included by the rebase, or it will be very easy to backport into the RHEL build.
Ah, yeah, thanks for explaining. In this case I don't have to worry about this.
libvirt.spec.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
ACK.
Pushed. Thanks! Peter
participants (2)
-
Eric Blake
-
Peter Krempa