According to
repology.org:
RHEL-8: 0.9.4
RHEL-9: 0.9.6
Debian 11: 0.9.5
openSUSE Leap 15.3: 0.8.7
Ubuntu 20.04: 0.9.3
And the rest of distros has something newer anyways. Requiring
0.8.0 or newer allows us to drop the terrible hack where we
rename functions at meson level using #define. Note, 0.8.0 is
the version of libssh where the rename happened.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
libvirt.spec.in | 2 +-
meson.build | 15 +--------------
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index b199c624b8..a46389c78f 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -378,7 +378,7 @@ BuildRequires: wireshark-devel
%endif
%if %{with_libssh}
-BuildRequires: libssh-devel >= 0.7.0
+BuildRequires: libssh-devel >= 0.8.0
%endif
BuildRequires: rpcgen
diff --git a/meson.build b/meson.build
index ed9f4b3f70..11490b8980 100644
--- a/meson.build
+++ b/meson.build
@@ -1025,24 +1025,11 @@ else
libpcap_dep = dependency('', required: false)
endif
-libssh_version = '0.7'
+libssh_version = '0.8.0'
if conf.has('WITH_REMOTE')
libssh_dep = dependency('libssh', version: '>=' + libssh_version,
required: get_option('libssh'))
if libssh_dep.found()
conf.set('WITH_LIBSSH', 1)
-
- # Check if new functions exists, if not redefine them with old deprecated ones.
- # List of [ new_function, deprecated_function ].
- functions = [
- [ 'ssh_get_server_publickey', 'ssh_get_publickey' ],
- [ 'ssh_session_is_known_server', 'ssh_is_server_known' ],
- [ 'ssh_session_update_known_hosts', 'ssh_write_knownhost' ],
- ]
- foreach name : functions
- if not cc.has_function(name[0], dependencies: libssh_dep)
- conf.set(name[0], name[1])
- endif
- endforeach
endif
else
libssh_dep = dependency('', required: false)
--
2.35.1