[libvirt] [PATCH v3 0/2] rpc: fixing compilation error due to deprecated ssh_get_publickey().

Julio Faracco posted 2 patches 5 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180510203857.10664-1-jcfaracco@gmail.com
Test syntax-check passed
m4/virt-libssh.m4             | 13 +++++++++++++
src/rpc/virnetlibsshsession.c |  2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
[libvirt] [PATCH v3 0/2] rpc: fixing compilation error due to deprecated ssh_get_publickey().
Posted by Julio Faracco 5 years, 11 months ago
After 0.7.5 release, libssh deprecated ssh_get_publickey() method to
introduce ssh_get_server_publickey(). This commit check if
ssh_get_server_publickey() is available to use. If it is not, it creates
an alias to ssh_get_publickey() during the configuration.
See the error:

make[3]: Entering directory '/home/julio/Desktop/virt/libvirt/src'
  CC       rpc/libvirt_net_rpc_la-virnetlibsshsession.lo
rpc/virnetlibsshsession.c:217:9: error: 'ssh_get_publickey' is deprecated [-Werror,-Wdeprecated-declarations]
    if (ssh_get_publickey(sess->session, &key) != SSH_OK) {
        ^
/usr/include/libssh/libssh.h:489:1: note: 'ssh_get_publickey' has been explicitly marked deprecated here
SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_key *key);
^
/usr/include/libssh/libssh.h:99:40: note: expanded from macro 'SSH_DEPRECATED'
                                       ^
1 error generated.
Makefile:8604: recipe for target 'rpc/libvirt_net_rpc_la-virnetlibsshsession.lo' failed

Julio Faracco (2):
  m4: checking if ssh_get_server_publickey() exists.
  rpc: replacing ssh_get_publickey() by ssh_get_server_publickey().

 m4/virt-libssh.m4             | 13 +++++++++++++
 src/rpc/virnetlibsshsession.c |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

-- 
2.17.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 0/2] rpc: fixing compilation error due to deprecated ssh_get_publickey().
Posted by Andrea Bolognani 5 years, 11 months ago
On Thu, 2018-05-10 at 17:38 -0300, Julio Faracco wrote:
> After 0.7.5 release, libssh deprecated ssh_get_publickey() method to
> introduce ssh_get_server_publickey(). This commit check if
> ssh_get_server_publickey() is available to use. If it is not, it creates
> an alias to ssh_get_publickey() during the configuration.
> See the error:
> 
> make[3]: Entering directory '/home/julio/Desktop/virt/libvirt/src'
>   CC       rpc/libvirt_net_rpc_la-virnetlibsshsession.lo
> rpc/virnetlibsshsession.c:217:9: error: 'ssh_get_publickey' is deprecated [-Werror,-Wdeprecated-declarations]
>     if (ssh_get_publickey(sess->session, &key) != SSH_OK) {
>         ^
> /usr/include/libssh/libssh.h:489:1: note: 'ssh_get_publickey' has been explicitly marked deprecated here
> SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_key *key);
> ^
> /usr/include/libssh/libssh.h:99:40: note: expanded from macro 'SSH_DEPRECATED'
>                                        ^
> 1 error generated.
> Makefile:8604: recipe for target 'rpc/libvirt_net_rpc_la-virnetlibsshsession.lo' failed
> 
> Julio Faracco (2):
>   m4: checking if ssh_get_server_publickey() exists.
>   rpc: replacing ssh_get_publickey() by ssh_get_server_publickey().
> 
>  m4/virt-libssh.m4             | 13 +++++++++++++
>  src/rpc/virnetlibsshsession.c |  2 +-
>  2 files changed, 14 insertions(+), 1 deletion(-)

Interesting approach in patch 1/2. Not the way I would have done
it, but it works and stays out of the way, so nothing to complain
about really :)

For the series

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

and pushed.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list