On Mon, Mar 30, 2020 at 05:19:33PM +0200, Jeremie Courreges-Anglas wrote: > Looks good overall: the SHARED_LIBS bump looks correct, the header > changes don't show incompatible changes. But a few decls have been > marked deprecated, and this might cause trouble at build time so you > might want to test-build consumers (SUBDIRLIST can help here as pointed > out by sthen@). I've successfully built the following consumers on amd64:
misc/mc net/bird/2 net/nmap,-main net/p5-Net-SSH2 sysutils/libvirt www/aria2 x11/x2goclient I'd leave the rest to a bulk and good luck, I cannot build all dependent ports on my amd64 workstation at the moment. > I think it would be good to keep the unit tests, so here's an updated > diff that addresses the clash between libssh priv.h and potentially all > headers that use attribute((__unused__)). I can try to push that fix > upstream, where the problem has already been reported. Thanks a lot! > make test is happy on amd64 and sparc64. Same here: 100% tests passed, 0 tests failed out of 33 Remi, I simply removed you as MAINTAINER. OK? Index: Makefile =================================================================== RCS file: /cvs/ports/security/libssh/Makefile,v retrieving revision 1.20 diff -u -p -r1.20 Makefile --- Makefile 12 Jul 2019 20:49:05 -0000 1.20 +++ Makefile 30 Mar 2020 17:30:39 -0000 @@ -1,17 +1,16 @@ # $OpenBSD: Makefile,v 1.20 2019/07/12 20:49:05 sthen Exp $ COMMENT = C library implementing server and client side -DISTNAME = libssh-0.8.7 +V = 0.9.3 +DISTNAME = libssh-${V} -SHARED_LIBS += ssh 4.0 # 4.7 +SHARED_LIBS += ssh 4.1 # 4.8 CATEGORIES = security devel HOMEPAGE = https://www.libssh.org/ -MASTER_SITES = https://www.libssh.org/files/0.8/ +MASTER_SITES = https://www.libssh.org/files/${V:R}/ EXTRACT_SUFX = .tar.xz - -MAINTAINER = Remi Pointel <rpoin...@openbsd.org> # LGPL v2.1 PERMIT_PACKAGE = Yes Index: distinfo =================================================================== RCS file: /cvs/ports/security/libssh/distinfo,v retrieving revision 1.14 diff -u -p -r1.14 distinfo --- distinfo 4 Mar 2019 08:29:59 -0000 1.14 +++ distinfo 30 Mar 2020 17:29:55 -0000 @@ -1,2 +1,2 @@ -SHA256 (libssh-0.8.7.tar.xz) = QzBMoi8LoLZU4UtXSjmBa8cCEv3qWFimY3zCbK3j1ZI= -SIZE (libssh-0.8.7.tar.xz) = 430104 +SHA256 (libssh-0.9.3.tar.xz) = LItfiU3O1Ys9Yp8W86+mViwgtL3IlGORY89leDNojww= +SIZE (libssh-0.9.3.tar.xz) = 500068 Index: patches/patch-ConfigureChecks_cmake =================================================================== RCS file: /cvs/ports/security/libssh/patches/patch-ConfigureChecks_cmake,v retrieving revision 1.3 diff -u -p -r1.3 patch-ConfigureChecks_cmake --- patches/patch-ConfigureChecks_cmake 23 Oct 2018 19:28:18 -0000 1.3 +++ patches/patch-ConfigureChecks_cmake 30 Mar 2020 17:29:55 -0000 @@ -1,9 +1,11 @@ $OpenBSD: patch-ConfigureChecks_cmake,v 1.3 2018/10/23 19:28:18 jasper Exp $ +Fix exit code. + Index: ConfigureChecks.cmake --- ConfigureChecks.cmake.orig +++ ConfigureChecks.cmake -@@ -259,7 +259,7 @@ check_c_source_compiles(" +@@ -302,7 +302,7 @@ check_c_source_compiles(" __thread int tls; int main(void) { Index: patches/patch-examples_sshd_direct-tcpip_c =================================================================== RCS file: patches/patch-examples_sshd_direct-tcpip_c diff -N patches/patch-examples_sshd_direct-tcpip_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-examples_sshd_direct-tcpip_c 30 Mar 2020 17:29:55 -0000 @@ -0,0 +1,30 @@ +$OpenBSD$ + +Fix macro collision with __attribute__ ((__unused__)) in system-wide headers. +Problem known upstream: https://bugs.libssh.org/T175 + +Index: examples/sshd_direct-tcpip.c +--- examples/sshd_direct-tcpip.c.orig ++++ examples/sshd_direct-tcpip.c +@@ -35,16 +35,16 @@ clients must be made or how a client should react. + + #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0) + +-#ifndef __unused__ ++#ifndef ssh__unused + # ifdef HAVE_UNUSED_ATTRIBUTE +-# define __unused__ __attribute__((unused)) ++# define ssh__unused __attribute__((unused)) + # else /* HAVE_UNUSED_ATTRIBUTE */ +-# define __unused__ ++# define ssh__unused + # endif /* HAVE_UNUSED_ATTRIBUTE */ +-#endif /* __unused__ */ ++#endif /* ssh__unused */ + + #ifndef UNUSED_PARAM +-#define UNUSED_PARAM(param) param __unused__ ++#define UNUSED_PARAM(param) param ssh__unused + #endif /* UNUSED_PARAM */ + + #ifndef KEYS_FOLDER Index: patches/patch-include_libssh_priv_h =================================================================== RCS file: patches/patch-include_libssh_priv_h diff -N patches/patch-include_libssh_priv_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-include_libssh_priv_h 30 Mar 2020 17:29:55 -0000 @@ -0,0 +1,35 @@ +$OpenBSD$ + +Fix macro collision with __attribute__ ((__unused__)) in system-wide headers. +Problem known upstream: https://bugs.libssh.org/T175 + +Index: include/libssh/priv.h +--- include/libssh/priv.h.orig ++++ include/libssh/priv.h +@@ -405,20 +405,20 @@ void explicit_bzero(void *s, size_t n); + # endif /* HAVE_FALLTHROUGH_ATTRIBUTE */ + #endif /* FALL_THROUGH */ + +-#ifndef __unused__ ++#ifndef ssh__unused + # ifdef HAVE_UNUSED_ATTRIBUTE +-# define __unused__ __attribute__((unused)) ++# define ssh__unused __attribute__((unused)) + # else /* HAVE_UNUSED_ATTRIBUTE */ +-# define __unused__ ++# define ssh__unused + # endif /* HAVE_UNUSED_ATTRIBUTE */ +-#endif /* __unused__ */ ++#endif /* ssh__unused */ + + #ifndef UNUSED_PARAM +-#define UNUSED_PARAM(param) param __unused__ ++#define UNUSED_PARAM(param) param ssh__unused + #endif /* UNUSED_PARAM */ + + #ifndef UNUSED_VAR +-#define UNUSED_VAR(var) __unused__ var ++#define UNUSED_VAR(var) ssh__unused var + #endif /* UNUSED_VAR */ + + void ssh_agent_state_free(void *data); Index: patches/patch-tests_torture_c =================================================================== RCS file: patches/patch-tests_torture_c diff -N patches/patch-tests_torture_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-tests_torture_c 30 Mar 2020 17:29:55 -0000 @@ -0,0 +1,15 @@ +$OpenBSD$ + +Missing include for PATH_MAX. + +Index: tests/torture.c +--- tests/torture.c.orig ++++ tests/torture.c +@@ -38,6 +38,7 @@ + + #ifdef HAVE_UNISTD_H + #include <unistd.h> ++#include <limits.h> + #elif (defined _WIN32) || (defined _WIN64) + #include <direct.h> + #include <io.h> Index: patches/patch-tests_unittests_torture_misc_c =================================================================== RCS file: /cvs/ports/security/libssh/patches/patch-tests_unittests_torture_misc_c,v retrieving revision 1.4 diff -u -p -r1.4 patch-tests_unittests_torture_misc_c --- patches/patch-tests_unittests_torture_misc_c 23 Oct 2018 19:28:18 -0000 1.4 +++ patches/patch-tests_unittests_torture_misc_c 30 Mar 2020 17:29:55 -0000 @@ -1,8 +1,11 @@ $OpenBSD: patch-tests_unittests_torture_misc_c,v 1.4 2018/10/23 19:28:18 jasper Exp $ + +Disable unit test "torture_path_expand_tilde_unix": real user required. + Index: tests/unittests/torture_misc.c --- tests/unittests/torture_misc.c.orig +++ tests/unittests/torture_misc.c -@@ -361,7 +361,8 @@ int torture_run_tests(void) { +@@ -665,7 +665,8 @@ int torture_run_tests(void) { #ifdef _WIN32 cmocka_unit_test(torture_path_expand_tilde_win), #else Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/security/libssh/pkg/PLIST,v retrieving revision 1.7 diff -u -p -r1.7 PLIST --- pkg/PLIST 23 Oct 2018 19:28:18 -0000 1.7 +++ pkg/PLIST 30 Mar 2020 17:29:55 -0000 @@ -9,6 +9,7 @@ include/libssh/sftp.h include/libssh/ssh2.h lib/cmake/ lib/cmake/libssh/ +lib/cmake/libssh/libssh-config${MODCMAKE_BUILD_SUFFIX} lib/cmake/libssh/libssh-config-version.cmake lib/cmake/libssh/libssh-config.cmake @lib lib/libssh.so.${LIBssh_VERSION}