commit: f4a38a6b89cc12ed110c48cdd74e50dd28e56c10 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Apr 15 03:22:55 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Apr 15 03:22:55 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4a38a6b
net-libs/libssh: fix tests with >=net-misc/openssh-10.0_p1 Signed-off-by: Sam James <sam <AT> gentoo.org> .../libssh/files/libssh-0.11.1-openssh-10.patch | 48 ++++++++++++++++++++++ net-libs/libssh/libssh-0.11.1-r1.ebuild | 4 ++ 2 files changed, 52 insertions(+) diff --git a/net-libs/libssh/files/libssh-0.11.1-openssh-10.patch b/net-libs/libssh/files/libssh-0.11.1-openssh-10.patch new file mode 100644 index 000000000000..e8c9d64872d5 --- /dev/null +++ b/net-libs/libssh/files/libssh-0.11.1-openssh-10.patch @@ -0,0 +1,48 @@ +https://gitlab.com/libssh/libssh-mirror/-/issues/298 +https://gitlab.com/libssh/libssh-mirror/-/commit/af10857aa3216f40c5c2e5d7116803fb03c166f9 + +From af10857aa3216f40c5c2e5d7116803fb03c166f9 Mon Sep 17 00:00:00 2001 +From: Norbert Pocs <[email protected]> +Date: Fri, 11 Apr 2025 09:04:40 +0200 +Subject: [PATCH] CmakeLists: Fix multiple digit major version for OpenSSH + +Signed-off-by: Norbert Pocs <[email protected]> +Reviewed-by: Jakub Jelen <[email protected]> +--- + tests/CMakeLists.txt | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 8d4e94b69..e8b196b83 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -104,9 +104,10 @@ add_subdirectory(unittests) + find_program(SSH_EXECUTABLE NAMES ssh) + if (SSH_EXECUTABLE) + execute_process(COMMAND ${SSH_EXECUTABLE} -V ERROR_VARIABLE OPENSSH_VERSION_STR) +- string(REGEX REPLACE "^.*OpenSSH_([0-9]).[0-9].*$" "\\1" OPENSSH_VERSION_MAJOR "${OPENSSH_VERSION_STR}") +- string(REGEX REPLACE "^.*OpenSSH_[0-9].([0-9]).*$" "\\1" OPENSSH_VERSION_MINOR "${OPENSSH_VERSION_STR}") ++ string(REGEX REPLACE "^.*OpenSSH_([0-9]+).[0-9].*$" "\\1" OPENSSH_VERSION_MAJOR "${OPENSSH_VERSION_STR}") ++ string(REGEX REPLACE "^.*OpenSSH_[0-9]+.([0-9]).*$" "\\1" OPENSSH_VERSION_MINOR "${OPENSSH_VERSION_STR}") + set(OPENSSH_VERSION "${OPENSSH_VERSION_MAJOR}.${OPENSSH_VERSION_MINOR}") ++ add_definitions(-DOPENSSH_VERSION_MAJOR=${OPENSSH_VERSION_MAJOR} -DOPENSSH_VERSION_MINOR=${OPENSSH_VERSION_MINOR}) + if("${OPENSSH_VERSION}" VERSION_LESS "6.3") + # ssh - Q was introduced in 6.3 + message("Version less than 6.3, hardcoding cipher list") +@@ -207,14 +208,6 @@ if (CLIENT_TESTING OR SERVER_TESTING) + /usr/bin + /usr/local/bin) + +- find_program(SSH_EXECUTABLE NAMES ssh) +- if (SSH_EXECUTABLE) +- execute_process(COMMAND ${SSH_EXECUTABLE} -V ERROR_VARIABLE OPENSSH_VERSION_STR) +- string(REGEX REPLACE "^.*OpenSSH_([0-9]).[0-9].*$" "\\1" OPENSSH_VERSION_MAJOR "${OPENSSH_VERSION_STR}") +- string(REGEX REPLACE "^.*OpenSSH_[0-9].([0-9]).*$" "\\1" OPENSSH_VERSION_MINOR "${OPENSSH_VERSION_STR}") +- add_definitions(-DOPENSSH_VERSION_MAJOR=${OPENSSH_VERSION_MAJOR} -DOPENSSH_VERSION_MINOR=${OPENSSH_VERSION_MINOR}) +- endif() +- + set(LOCAL_USER "nobody") + set(LOCAL_UID "65533") + find_program(ID_EXECUTABLE NAMES id) +-- +GitLab diff --git a/net-libs/libssh/libssh-0.11.1-r1.ebuild b/net-libs/libssh/libssh-0.11.1-r1.ebuild index ff8dea4ce6d1..4badd5848619 100644 --- a/net-libs/libssh/libssh-0.11.1-r1.ebuild +++ b/net-libs/libssh/libssh-0.11.1-r1.ebuild @@ -39,6 +39,10 @@ BDEPEND="doc? ( app-text/doxygen[dot] )" DOCS=( AUTHORS CHANGELOG README ) +PATCHES=( + "${FILESDIR}"/${PN}-0.11.1-openssh-10.patch +) + src_prepare() { cmake_src_prepare
