Bug 1724678 - Fix build with current libssh
Summary: Fix build with current libssh
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 8.0
Assignee: Pavel Hrdina
QA Contact: yafu
URL:
Whiteboard:
Depends On: 1722735
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-27 14:08 UTC by Pavel Hrdina
Modified: 2020-11-14 07:14 UTC (History)
7 users (show)

Fixed In Version: libvirt-5.4.0-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1722735
Environment:
Last Closed: 2019-11-06 07:17:15 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3723 0 None None None 2019-11-06 07:18:01 UTC

Description Pavel Hrdina 2019-06-27 14:08:41 UTC
+++ 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

Comment 2 yafu 2019-07-04 09:50:01 UTC
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.

Comment 3 yafu 2019-08-05 06:44:57 UTC
Move the bug to verified according to comment #2.

Comment 5 errata-xmlrpc 2019-11-06 07:17:15 UTC
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


Note You need to log in before you can comment on or make changes to this bug.