+++ This bug was initially created as a clone of Bug #1722735 +++ Description of problem: Building libvirt in RHEL-8.1.0 after libssh was updated fails with rpc/virnetlibsshsession.c: In function 'virNetLibsshCheckHostKey': rpc/virnetlibsshsession.c:290:5: error: 'ssh_is_server_known' is deprecated [-Werror=deprecated-declarations] state = ssh_is_server_known(sess->session); ^~~~~ In file included from rpc/virnetlibsshsession.c:24: /usr/include/libssh/libssh.h:560:31: note: declared here SSH_DEPRECATED LIBSSH_API int ssh_is_server_known(ssh_session session); ^~~~~~~~~~~~~~~~~~~ rpc/virnetlibsshsession.c:384:13: error: 'ssh_write_knownhost' is deprecated [-Werror=deprecated-declarations] if (ssh_write_knownhost(sess->session) < 0) { ^~ In file included from rpc/virnetlibsshsession.c:24: /usr/include/libssh/libssh.h:558:31: note: declared here SSH_DEPRECATED LIBSSH_API int ssh_write_knownhost(ssh_session session); ^~~~~~~~~~~~~~~~~~~ Version-Release number of selected component (if applicable): libvirt-4.5.0-25.el8 How reproducible: 100% Steps to Reproduce: 1. build libvirt on RHEL 8.1.0 Actual results: Expected results: Additional info: --- Additional comment from Pavel Hrdina on 2019-06-21 09:51:09 CEST --- Upstream commit: commit e0ce339c317306711a17253f363c19ac134e9763 Author: Pavel Hrdina <phrdina> Date: Fri Jun 21 09:18:11 2019 +0200 rpc: virnetlibsshsession: update deprecated functions
Reproduced with libvirt-4.5.0-25.el8. Reproduced steps: Build libvirt-4.5.0-25 with libssh-0.9.0-1 #make rpm ... rpc/virnetlibsshsession.c: In function 'virNetLibsshCheckHostKey': rpc/virnetlibsshsession.c:290:5: error: 'ssh_is_server_known' is deprecated [-Werror=deprecated-declarations] state = ssh_is_server_known(sess->session); ^~~~~ In file included from rpc/virnetlibsshsession.c:24: /usr/include/libssh/libssh.h:560:31: note: declared here SSH_DEPRECATED LIBSSH_API int ssh_is_server_known(ssh_session session); ^~~~~~~~~~~~~~~~~~~ rpc/virnetlibsshsession.c:384:13: error: 'ssh_write_knownhost' is deprecated [-Werror=deprecated-declarations] if (ssh_write_knownhost(sess->session) < 0) { ^~ In file included from rpc/virnetlibsshsession.c:24: /usr/include/libssh/libssh.h:558:31: note: declared here SSH_DEPRECATED LIBSSH_API int ssh_write_knownhost(ssh_session session); ^~~~~~~~~~~~~~~~~~~ ... Verified with libvirt-5.5.0-1.el8. Test steps: Scenario 1: Build with libssh-0.9.0-1 1.Download libvirt-5.5.0-1.module+el8.1.0+3580+d7f6488d.src.rpm 2.Install the src.rpm: #rpm -ivh libvirt-5.5.0-1.module+el8.1.0+3580+d7f6488d.src.rpm 3.Apply patch libvirt-rpc-virnetlibsshsession-update-deprecated-functions.patch: #cd /root/rpmbuild/ && tar xvf libvirt-5.5.0.tar.xz #cd libvirt-5.5.0/ #./autogen.sh #make rpm Scenario 2: Build with libssh-0.8.91-0.1 Test steps and expected results are the same with scenario 1.
Move the bug to verified according to comment #2.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:3723