pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
libssh: start update to 0.12.1 and note blocker
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Mon Jul 27 17:45:57 2026 +0200
Changeset: 027d392620b5866faabfc85e6e7a87e8ab978bb9
Modified Files:
Makefile
Added Files:
libssh/DESCR
libssh/Makefile
libssh/PLIST
libssh/TODO
libssh/buildlink3.mk
libssh/distinfo
libssh/options.mk
libssh/patches/patch-CompilerChecks.cmake
libssh/patches/patch-examples_sshd__direct-tcpip.c
libssh/patches/patch-tests_CMakeLists.txt
libssh/patches/patch-tests_torture.c
Log Message:
libssh: start update to 0.12.1 and note blocker
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=027d392620b5866faabfc85e6e7a87e8ab978bb9
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
libssh/DESCR | 4 +++
libssh/Makefile | 34 ++++++++++++++++++++++
libssh/PLIST | 17 +++++++++++
libssh/TODO | 22 ++++++++++++++
libssh/buildlink3.mk | 26 +++++++++++++++++
libssh/distinfo | 9 ++++++
libssh/options.mk | 33 +++++++++++++++++++++
libssh/patches/patch-CompilerChecks.cmake | 15 ++++++++++
libssh/patches/patch-examples_sshd__direct-tcpip.c | 17 +++++++++++
libssh/patches/patch-tests_CMakeLists.txt | 18 ++++++++++++
libssh/patches/patch-tests_torture.c | 14 +++++++++
12 files changed, 210 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index e74e38fa9b..67df04dd55 100644
--- a/Makefile
+++ b/Makefile
@@ -2200,6 +2200,7 @@ SUBDIR+= libsml
SUBDIR+= libsocialweb
SUBDIR+= libspnav
SUBDIR+= libspt
+SUBDIR+= libssh
SUBDIR+= libstacktrace
SUBDIR+= libstrophe
SUBDIR+= libsysinfo
diff --git a/libssh/DESCR b/libssh/DESCR
new file mode 100644
index 0000000000..b88105b2d0
--- /dev/null
+++ b/libssh/DESCR
@@ -0,0 +1,4 @@
+libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol
+on client and server side. With libssh, you can remotely execute programs,
+transfer files, use a secure and transparent tunnel for
+your remote applications.
diff --git a/libssh/Makefile b/libssh/Makefile
new file mode 100644
index 0000000000..3cc8fdb04c
--- /dev/null
+++ b/libssh/Makefile
@@ -0,0 +1,34 @@
+# $NetBSD: Makefile,v 1.59 2026/07/23 09:25:55 wiz Exp $
+
+DISTNAME= libssh-0.12.1
+CATEGORIES= security
+MASTER_SITES= https://www.libssh.org/files/${PKGVERSION_NOREV:R}/
+EXTRACT_SUFX= .tar.xz
+
+MAINTAINER= is%NetBSD.org@localhost
+HOMEPAGE= https://www.libssh.org/
+COMMENT= SSHv2+v1 protocol library
+LICENSE= 2-clause-bsd
+
+USE_LANGUAGES= c c++
+PKGCONFIG_OVERRIDE+= libssh.pc.cmake
+TEST_TARGET= test
+
+CMAKE_CONFIGURE_ARGS+= -DWITH_EXAMPLES=OFF
+
+CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS
+LDFLAGS.SunOS+= -lnsl -lsocket
+
+BUILDLINK_TRANSFORM+= rm:-Werror=strict-overflow
+
+.include "options.mk"
+
+.include "../../devel/cmake/build.mk"
+# for examples only
+BUILDLINK_DEPMETHOD.argp= build
+.include "../../devel/argp/buildlink3.mk"
+# for testing only
+BUILDLINK_DEPMETHOD.cmocka= build
+.include "../../devel/cmocka/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/libssh/PLIST b/libssh/PLIST
new file mode 100644
index 0000000000..37cb611448
--- /dev/null
+++ b/libssh/PLIST
@@ -0,0 +1,17 @@
+@comment $NetBSD: PLIST,v 1.24 2026/07/23 09:25:55 wiz Exp $
+include/libssh/callbacks.h
+include/libssh/legacy.h
+include/libssh/libssh.h
+include/libssh/libssh_version.h
+include/libssh/libsshpp.hpp
+include/libssh/server.h
+include/libssh/sftp.h
+include/libssh/sftpserver.h
+include/libssh/ssh2.h
+lib/cmake/libssh/libssh-config-noconfig.cmake
+lib/cmake/libssh/libssh-config-version.cmake
+lib/cmake/libssh/libssh-config.cmake
+lib/libssh.so
+lib/libssh.so.4
+lib/libssh.so.4.10.5
+lib/pkgconfig/libssh.pc
diff --git a/libssh/TODO b/libssh/TODO
new file mode 100644
index 0000000000..0e53afbe16
--- /dev/null
+++ b/libssh/TODO
@@ -0,0 +1,22 @@
+Doesn't build on NetBSD-11 and -current:
+
+===> Building for libssh-0.12.1
+[1/3] Building C object src/CMakeFiles/ssh.dir/mlkem_crypto.c.o
+FAILED: [code=1] src/CMakeFiles/ssh.dir/mlkem_crypto.c.o
+/tmp/security/libssh/work/.cwrapper/bin/gcc -DLIBSSH_EXPORTS -I/tmp/security/libssh/work/libssh-0.12.1/cmake-pkgsrc-build/src -I/tmp/security/libssh/work/libssh-0.12.1/src -I/tmp/security/libssh/work/libssh-0.12.1/includ
+e -I/tmp/security/libssh/work/libssh-0.12.1/cmake-pkgsrc-build/include -I/tmp/security/libssh/work/libssh-0.12.1/cmake-pkgsrc-build -O2 -g -fstack-clash-protection -I/usr/include/krb5 -I/usr/include -I/usr/pkg/include -s
+td=gnu99 -fPIC -fvisibility=hidden -Wpedantic -Wall -Wshadow -Wmissing-prototypes -Wcast-align -Werror=address -Wstrict-prototypes -Werror=strict-prototypes -Wwrite-strings -Werror=write-strings -Werror-implicit-function
+-declaration -Wpointer-arith -Werror=pointer-arith -Wdeclaration-after-statement -Werror=declaration-after-statement -Wreturn-type -Werror=return-type -Wuninitialized -Werror=uninitialized -Wimplicit-fallthrough -Werror=
+strict-overflow -Wstrict-overflow=2 -Wno-format-zero-length -Wmissing-field-initializers -Wsign-compare -Wold-style-definition -Werror=old-style-definition -Wimplicit-int -Werror=implicit-int -Wint-conversion -Werror=int
+-conversion -Wformat -Wformat-security -Werror=format-security -fno-common -fstack-protector-strong -fstack-clash-protection -MD -MT src/CMakeFiles/ssh.dir/mlkem_crypto.c.o -MF src/CMakeFiles/ssh.dir/mlkem_crypto.c.o.d -
+o src/CMakeFiles/ssh.dir/mlkem_crypto.c.o -c /tmp/security/libssh/work/libssh-0.12.1/src/mlkem_crypto.c
+/tmp/security/libssh/work/libssh-0.12.1/src/mlkem_crypto.c:31:10: fatal error: openssl/ml_kem.h: No such file or directory
+ 31 | #include <openssl/ml_kem.h>
+ | ^~~~~~~~~~~~~~~~~~
+compilation terminated.
+ninja: build stopped: subcommand failed.
+*** Error code 1
+
+because of
+
+https://gnats.netbsd.org/60511
diff --git a/libssh/buildlink3.mk b/libssh/buildlink3.mk
new file mode 100644
index 0000000000..348cde8cf8
--- /dev/null
+++ b/libssh/buildlink3.mk
@@ -0,0 +1,26 @@
+# $NetBSD: buildlink3.mk,v 1.28 2026/07/23 09:26:52 wiz Exp $
+
+BUILDLINK_TREE+= libssh
+
+.if !defined(LIBSSH_BUILDLINK3_MK)
+LIBSSH_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libssh+= libssh>=0.11.5<0.100
+BUILDLINK_ABI_DEPENDS.libssh?= libssh>=0.11.5
+BUILDLINK_PKGSRCDIR.libssh?= ../../wip/libssh
+
+pkgbase := libssh
+.include "../../mk/pkg-build-options.mk"
+
+.if ${PKG_BUILD_OPTIONS.libssh:Mgssapi}
+.include "../../mk/krb5.buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.libssh:Mopenssl}
+.include "../../security/openssl/buildlink3.mk"
+.endif
+
+.include "../../devel/zlib/buildlink3.mk"
+.endif # LIBSSH_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -libssh
diff --git a/libssh/distinfo b/libssh/distinfo
new file mode 100644
index 0000000000..0ea0359c44
--- /dev/null
+++ b/libssh/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.36 2026/07/23 09:25:55 wiz Exp $
+
+BLAKE2s (libssh-0.12.1.tar.xz) = fa92a959e4afe5bac582c4599810724c7173ef08d679128c6a5507bef10fc7d5
+SHA512 (libssh-0.12.1.tar.xz) = 4702930a1005d08f171281eab8e1246661410c1f0d94ec5a370115ad72995ab31780e28c372913fb46ec7d8e2590d9176ee1a3c777c173135a82f74718a62694
+Size (libssh-0.12.1.tar.xz) = 756384 bytes
+SHA1 (patch-CompilerChecks.cmake) = 8a650be5b69e956a0a54f54b71c4927ce685b8ca
+SHA1 (patch-examples_sshd__direct-tcpip.c) = 62de8625d58dbc03c38b0eb23f6e7f20a46e91de
+SHA1 (patch-tests_CMakeLists.txt) = b5baa8db2161d3f1c7aab317b2919de5dbca6e6a
+SHA1 (patch-tests_torture.c) = 6db2304741af946d1acad2d37a1ebbf23afba0c0
diff --git a/libssh/options.mk b/libssh/options.mk
new file mode 100644
index 0000000000..5fbb1bda59
--- /dev/null
+++ b/libssh/options.mk
@@ -0,0 +1,33 @@
+# $NetBSD: options.mk,v 1.8 2025/09/29 21:24:22 nia Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.libssh
+PKG_SUPPORTED_OPTIONS= gssapi tests
+PKG_OPTIONS_REQUIRED_GROUPS= crypto
+PKG_OPTIONS_GROUP.crypto= openssl libgcrypt
+PKG_SUGGESTED_OPTIONS= gssapi openssl
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mgssapi)
+CMAKE_CONFIGURE_ARGS+= -DWITH_GSSAPI:BOOL=ON
+.include "../../mk/krb5.buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+= -DWITH_GSSAPI:BOOL=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mopenssl)
+CMAKE_CONFIGURE_ARGS+= -DWITH_GCRYPT:BOOL=OFF
+.include "../../security/openssl/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mlibgcrypt)
+BUILDLINK_API_DEPENDS.libgcrypt+= libgcrypt>=1.4
+CMAKE_CONFIGURE_ARGS+= -DWITH_GCRYPT:BOOL=ON
+.include "../../security/libgcrypt/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mtests)
+CMAKE_CONFIGURE_ARGS+= -DUNIT_TESTING=ON
+.else
+CMAKE_CONFIGURE_ARGS+= -DUNIT_TESTING=OFF
+.endif
diff --git a/libssh/patches/patch-CompilerChecks.cmake b/libssh/patches/patch-CompilerChecks.cmake
new file mode 100644
index 0000000000..6b008f1095
--- /dev/null
+++ b/libssh/patches/patch-CompilerChecks.cmake
@@ -0,0 +1,15 @@
+$NetBSD: patch-CompilerChecks.cmake,v 1.4 2025/01/07 05:56:17 pho Exp $
+
+Fix build with option libgcrypt: src/libgcrypt/libgcrypt.c fails to compile
+with -Werror=unused-variable.
+
+--- CompilerChecks.cmake.orig 2025-01-07 05:51:07.479870562 +0000
++++ CompilerChecks.cmake
+@@ -48,7 +48,6 @@ if (UNIX)
+ add_c_compiler_flag("-Werror=implicit-int" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Wint-conversion" SUPPORTED_COMPILER_FLAGS)
+ add_c_compiler_flag("-Werror=int-conversion" SUPPORTED_COMPILER_FLAGS)
+- add_c_compiler_flag("-Werror=unused-variable" SUPPORTED_COMPILER_FLAGS)
+
+ check_c_compiler_flag("-Wformat" REQUIRED_FLAGS_WFORMAT)
+ if (REQUIRED_FLAGS_WFORMAT)
diff --git a/libssh/patches/patch-examples_sshd__direct-tcpip.c b/libssh/patches/patch-examples_sshd__direct-tcpip.c
new file mode 100644
index 0000000000..ffa93b7b59
--- /dev/null
+++ b/libssh/patches/patch-examples_sshd__direct-tcpip.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-examples_sshd__direct-tcpip.c,v 1.1 2020/07/20 15:56:24 micha Exp $
+
+Build fix:
+Include header files with declarations for struct sockaddr_in and send().
+
+--- examples/sshd_direct-tcpip.c.orig 2020-01-27 15:45:32.000000000 +0000
++++ examples/sshd_direct-tcpip.c
+@@ -20,6 +20,9 @@ clients must be made or how a client sho
+
+ #include "config.h"
+
++#include <netinet/in.h> /* For struct sockaddr_in */
++#include <sys/socket.h> /* For send() */
++
+ #include <libssh/libssh.h>
+ #include <libssh/server.h>
+ #include <libssh/callbacks.h>
diff --git a/libssh/patches/patch-tests_CMakeLists.txt b/libssh/patches/patch-tests_CMakeLists.txt
new file mode 100644
index 0000000000..8945d34970
--- /dev/null
+++ b/libssh/patches/patch-tests_CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD: patch-tests_CMakeLists.txt,v 1.3 2026/03/17 19:33:33 bsiegert Exp $
+
+* OpenSSH 10 support
+* Search for sshd also in /usr/lib/ssh where it is located
+ in SunOS/SmartOS.
+
+--- tests/CMakeLists.txt.orig 2026-02-10 09:47:00.000000000 +0000
++++ tests/CMakeLists.txt
+@@ -192,7 +192,8 @@ find_program(SSHD_EXECUTABLE
+ PATHS
+ /sbin
+ /usr/sbin
+- /usr/local/sbin)
++ /usr/local/sbin
++ /usr/lib/ssh)
+
+ if (WITH_PKCS11_URI)
+ find_package(softhsm)
diff --git a/libssh/patches/patch-tests_torture.c b/libssh/patches/patch-tests_torture.c
new file mode 100644
index 0000000000..101d1c5c49
--- /dev/null
+++ b/libssh/patches/patch-tests_torture.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-tests_torture.c,v 1.1 2020/01/06 12:04:13 pho Exp $
+
+Fix build on NetBSD 8.1: Don't try to use PATH_MAX without #include <limits.h>
+
+--- tests/torture.c.orig 2026-07-16 10:48:05.000000000 +0000
++++ tests/torture.c
+@@ -24,6 +24,7 @@
+ #include "config.h"
+ #include "tests_config.h"
+ #include <fcntl.h>
++#include <limits.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
Home |
Main Index |
Thread Index |
Old Index