forked from pool/libssh
OBS-URL: https://build.opensuse.org/request/show/1272585 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libssh?expand=0&rev=77
48 lines
2.4 KiB
Diff
48 lines
2.4 KiB
Diff
From af10857aa3216f40c5c2e5d7116803fb03c166f9 Mon Sep 17 00:00:00 2001
|
|
From: Norbert Pocs <norbertpocs0@gmail.com>
|
|
Date: Fri, 11 Apr 2025 09:04:40 +0200
|
|
Subject: [PATCH] CmakeLists: Fix multiple digit major version for OpenSSH
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Norbert Pocs <norbertpocs0@gmail.com>
|
|
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
|
|
Signed-off-by: Lucas Mülling <lucas.mulling@suse.com>
|
|
---
|
|
tests/CMakeLists.txt | 13 +++----------
|
|
1 file changed, 3 insertions(+), 10 deletions(-)
|
|
|
|
Index: libssh-0.11.1/tests/CMakeLists.txt
|
|
===================================================================
|
|
--- libssh-0.11.1.orig/tests/CMakeLists.txt
|
|
+++ libssh-0.11.1/tests/CMakeLists.txt
|
|
@@ -100,9 +100,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")
|
|
@@ -209,14 +210,6 @@ if (CLIENT_TESTING OR SERVER_TESTING)
|
|
endif (WITH_PKCS11_PROVIDER)
|
|
endif (WITH_PKCS11_URI)
|
|
|
|
- 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)
|