mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
net-libs/libssh2: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,2 +1 @@
|
||||
DIST libssh2-1.11.0.tar.xz 686796 BLAKE2B 36903798c72f7261d9e997254169c10a4e69166017445276de8b0066fff15cd4dae4119a8d6cbbab8859d765b2d7f34f2911bbaf83c8d6ac5d1feead6b5de64e SHA512 6d50c71b778ca0f769fcc9d2cc257ab669cd0b6c35e8b0e047b6b38aea10638974cc591ba27c25bb7dd523020b4a8a62e2c1ae368287d9dc254d5e24d4a7cee7
|
||||
DIST libssh2-1.11.1.tar.xz 721700 BLAKE2B 8ab227556f8e7f094b2b8dc77e311d6935580690dd7d46f8766654a30078fb0be4182f43136896a04b5a2d15175397fab76607472d5f3cd31c8837a86e0c3c83 SHA512 8322b54a522b0cbbb07916d29ec045c08f8ed94bd8abb5e524038640e90a317667a25be46d95b62b101ed726ade0a51a90fb246cf34c045c38f927f4e439e431
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
From 9a769054fc03f02db75355f0850360a26fae7324 Mon Sep 17 00:00:00 2001
|
||||
From: Eli Schwartz <eschwartz@gentoo.org>
|
||||
Date: Thu, 5 Sep 2024 23:18:47 -0400
|
||||
Subject: [PATCH] cmake: always run the tests even when static libs are
|
||||
disabled
|
||||
|
||||
The BUILD_STATIC_LIBS option is intended for the use case where users do
|
||||
not wish to build and install a static lib because it is not one of the
|
||||
artifacts they are interested in. The option should not be used to
|
||||
disable running the testsuite.
|
||||
|
||||
Instead, when tests are enabled, define the target. Just don't export or
|
||||
install it. Build systems build lots of things that aren't deliverable
|
||||
artifacts, and this becomes just one more of them.
|
||||
|
||||
(cherry-picked from PR https://github.com/libssh2/libssh2/pull/1450)
|
||||
|
||||
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
|
||||
---
|
||||
src/CMakeLists.txt | 6 ++++--
|
||||
tests/CMakeLists.txt | 8 ++------
|
||||
2 files changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 5bbed5e5..eb2fb7c2 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -97,8 +97,10 @@ if(WIN32 AND BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS AND
|
||||
endif()
|
||||
|
||||
# we want it to be called libssh2 on all platforms
|
||||
-if(BUILD_STATIC_LIBS)
|
||||
- list(APPEND libssh2_export ${LIB_STATIC})
|
||||
+if(BUILD_STATIC_LIBS OR BUILD_TESTING)
|
||||
+ if(BUILD_STATIC_LIBS)
|
||||
+ list(APPEND libssh2_export ${LIB_STATIC})
|
||||
+ endif()
|
||||
add_library(${LIB_STATIC} STATIC ${SOURCES})
|
||||
target_compile_definitions(${LIB_STATIC} PRIVATE ${PRIVATE_COMPILE_DEFINITIONS} ${libssh2_DEFINITIONS})
|
||||
target_link_libraries(${LIB_STATIC} PRIVATE ${LIBRARIES})
|
||||
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
||||
index 76eb78ef..a61ea5a3 100644
|
||||
--- a/tests/CMakeLists.txt
|
||||
+++ b/tests/CMakeLists.txt
|
||||
@@ -73,16 +73,12 @@ target_include_directories(runner PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../src" .
|
||||
foreach(test ${DOCKER_TESTS} ${STANDALONE_TESTS} ${SSHD_TESTS})
|
||||
if(NOT ";${TESTS_WITH_LIB_STATIC};" MATCHES ";${test};")
|
||||
set(LIB_FOR_TESTS ${LIB_SELECTED})
|
||||
- elseif(TARGET ${LIB_STATIC})
|
||||
- set(LIB_FOR_TESTS ${LIB_STATIC})
|
||||
else()
|
||||
- unset(LIB_FOR_TESTS)
|
||||
- message(STATUS "Skip test requiring static libssh2 lib: ${test}")
|
||||
+ set(LIB_FOR_TESTS ${LIB_STATIC})
|
||||
endif()
|
||||
|
||||
# We support the same target as both Docker and SSHD test. Build those just once.
|
||||
- # Skip building tests that require the static lib when the static lib is disabled.
|
||||
- if(NOT TARGET ${test} AND LIB_FOR_TESTS)
|
||||
+ if(NOT TARGET ${test})
|
||||
add_executable(${test} ${test}.c)
|
||||
target_compile_definitions(${test} PRIVATE "${CRYPTO_BACKEND_DEFINE}")
|
||||
target_include_directories(${test} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../src" ../src ../include "${CRYPTO_BACKEND_INCLUDE_DIR}")
|
||||
--
|
||||
2.44.2
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
https://bugs.gentoo.org/911279
|
||||
Upstream: https://github.com/libssh2/libssh2/issues/1053
|
||||
Commit: https://github.com/libssh2/libssh2/commit/1153ebdeba563ac657b525edd6bf6da68b1fe5e2
|
||||
From: Viktor Szakats <commit@vsz.me>
|
||||
Date: Tue, 30 May 2023 17:28:03 +0000
|
||||
Subject: [PATCH] mbedtls: use more `size_t` to sync up with `crypto.h`
|
||||
|
||||
Ref: 5a96f494ee0b00282afb2db2e091246fc5e1774a #846 #879
|
||||
|
||||
Fixes #1053
|
||||
Closes #1054
|
||||
--- a/src/mbedtls.c
|
||||
+++ b/src/mbedtls.c
|
||||
@@ -186,7 +186,7 @@ _libssh2_mbedtls_cipher_dtor(_libssh2_cipher_ctx *ctx)
|
||||
int
|
||||
_libssh2_mbedtls_hash_init(mbedtls_md_context_t *ctx,
|
||||
mbedtls_md_type_t mdtype,
|
||||
- const unsigned char *key, unsigned long keylen)
|
||||
+ const unsigned char *key, size_t keylen)
|
||||
{
|
||||
const mbedtls_md_info_t *md_info;
|
||||
int ret, hmac;
|
||||
@@ -221,7 +221,7 @@ _libssh2_mbedtls_hash_final(mbedtls_md_context_t *ctx, unsigned char *hash)
|
||||
}
|
||||
|
||||
int
|
||||
-_libssh2_mbedtls_hash(const unsigned char *data, unsigned long datalen,
|
||||
+_libssh2_mbedtls_hash(const unsigned char *data, size_t datalen,
|
||||
mbedtls_md_type_t mdtype, unsigned char *hash)
|
||||
{
|
||||
const mbedtls_md_info_t *md_info;
|
||||
@@ -497,8 +497,9 @@ int
|
||||
_libssh2_mbedtls_rsa_sha2_verify(libssh2_rsa_ctx * rsactx,
|
||||
size_t hash_len,
|
||||
const unsigned char *sig,
|
||||
- unsigned long sig_len,
|
||||
- const unsigned char *m, unsigned long m_len)
|
||||
+ size_t sig_len,
|
||||
+ const unsigned char *m,
|
||||
+ size_t m_len)
|
||||
{
|
||||
int ret;
|
||||
int md_type;
|
||||
@@ -548,8 +549,9 @@ _libssh2_mbedtls_rsa_sha2_verify(libssh2_rsa_ctx * rsactx,
|
||||
int
|
||||
_libssh2_mbedtls_rsa_sha1_verify(libssh2_rsa_ctx * rsactx,
|
||||
const unsigned char *sig,
|
||||
- unsigned long sig_len,
|
||||
- const unsigned char *m, unsigned long m_len)
|
||||
+ size_t sig_len,
|
||||
+ const unsigned char *m,
|
||||
+ size_t m_len)
|
||||
{
|
||||
return _libssh2_mbedtls_rsa_sha2_verify(rsactx, SHA_DIGEST_LENGTH,
|
||||
sig, sig_len, m, m_len);
|
||||
--- a/src/mbedtls.h
|
||||
+++ b/src/mbedtls.h
|
||||
@@ -478,12 +478,12 @@ _libssh2_mbedtls_cipher_dtor(_libssh2_cipher_ctx *ctx);
|
||||
int
|
||||
_libssh2_mbedtls_hash_init(mbedtls_md_context_t *ctx,
|
||||
mbedtls_md_type_t mdtype,
|
||||
- const unsigned char *key, unsigned long keylen);
|
||||
+ const unsigned char *key, size_t keylen);
|
||||
|
||||
int
|
||||
_libssh2_mbedtls_hash_final(mbedtls_md_context_t *ctx, unsigned char *hash);
|
||||
int
|
||||
-_libssh2_mbedtls_hash(const unsigned char *data, unsigned long datalen,
|
||||
+_libssh2_mbedtls_hash(const unsigned char *data, size_t datalen,
|
||||
mbedtls_md_type_t mdtype, unsigned char *hash);
|
||||
|
||||
_libssh2_bn *
|
||||
@@ -526,9 +526,8 @@ _libssh2_mbedtls_rsa_new_private_frommemory(libssh2_rsa_ctx **rsa,
|
||||
int
|
||||
_libssh2_mbedtls_rsa_sha1_verify(libssh2_rsa_ctx *rsa,
|
||||
const unsigned char *sig,
|
||||
- unsigned long sig_len,
|
||||
- const unsigned char *m,
|
||||
- unsigned long m_len);
|
||||
+ size_t sig_len,
|
||||
+ const unsigned char *m, size_t m_len);
|
||||
int
|
||||
_libssh2_mbedtls_rsa_sha1_sign(LIBSSH2_SESSION *session,
|
||||
libssh2_rsa_ctx *rsa,
|
||||
@@ -540,8 +539,8 @@ int
|
||||
_libssh2_mbedtls_rsa_sha2_verify(libssh2_rsa_ctx * rsactx,
|
||||
size_t hash_len,
|
||||
const unsigned char *sig,
|
||||
- unsigned long sig_len,
|
||||
- const unsigned char *m, unsigned long m_len);
|
||||
+ size_t sig_len,
|
||||
+ const unsigned char *m, size_t m_len);
|
||||
int
|
||||
_libssh2_mbedtls_rsa_sha2_sign(LIBSSH2_SESSION *session,
|
||||
libssh2_rsa_ctx *rsa,
|
||||
@@ -1,66 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib
|
||||
|
||||
DESCRIPTION="Library implementing the SSH2 protocol"
|
||||
HOMEPAGE="https://www.libssh2.org"
|
||||
SRC_URI="https://www.libssh2.org/download/${P}.tar.xz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
IUSE="gcrypt mbedtls test zlib"
|
||||
REQUIRED_USE="?? ( gcrypt mbedtls )"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
|
||||
!gcrypt? (
|
||||
mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] )
|
||||
!mbedtls? (
|
||||
>=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
)
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.11.0-mansyntax_sh.patch
|
||||
"${FILESDIR}"/${PN}-1.11.0-size_t.patch
|
||||
)
|
||||
|
||||
multilib_src_configure() {
|
||||
local crypto_backend=OpenSSL
|
||||
if use gcrypt; then
|
||||
crypto_backend=Libgcrypt
|
||||
elif use mbedtls; then
|
||||
crypto_backend=mbedTLS
|
||||
fi
|
||||
|
||||
local mycmakeargs=(
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_TESTING=$(usex test)
|
||||
-DCRYPTO_BACKEND=${crypto_backend}
|
||||
-DENABLE_ZLIB_COMPRESSION=$(usex zlib)
|
||||
)
|
||||
|
||||
if use test ; then
|
||||
# Pass separately to avoid unused var warnings w/ USE=-test
|
||||
mycmakeargs+=(
|
||||
-DRUN_SSHD_TESTS=OFF
|
||||
-DRUN_DOCKER_TESTS=OFF
|
||||
)
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib
|
||||
|
||||
DESCRIPTION="Library implementing the SSH2 protocol"
|
||||
HOMEPAGE="https://libssh2.org"
|
||||
SRC_URI="https://libssh2.org/download/${P}.tar.xz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
IUSE="gcrypt mbedtls test zlib"
|
||||
REQUIRED_USE="?? ( gcrypt mbedtls )"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
|
||||
!gcrypt? (
|
||||
mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] )
|
||||
!mbedtls? (
|
||||
>=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
)
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.11.0-mansyntax_sh.patch
|
||||
"${FILESDIR}"/${PN}-1.11.0-size_t.patch
|
||||
# https://github.com/libssh2/libssh2/pull/1450
|
||||
"${FILESDIR}"/0001-cmake-always-run-the-tests-even-when-static-libs-are.patch
|
||||
)
|
||||
|
||||
multilib_src_configure() {
|
||||
local crypto_backend=OpenSSL
|
||||
if use gcrypt; then
|
||||
crypto_backend=Libgcrypt
|
||||
elif use mbedtls; then
|
||||
crypto_backend=mbedTLS
|
||||
fi
|
||||
|
||||
local mycmakeargs=(
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_STATIC_LIBS=OFF
|
||||
-DBUILD_TESTING=$(usex test)
|
||||
-DCRYPTO_BACKEND=${crypto_backend}
|
||||
-DENABLE_ZLIB_COMPRESSION=$(usex zlib)
|
||||
)
|
||||
|
||||
if use test ; then
|
||||
# Pass separately to avoid unused var warnings w/ USE=-test
|
||||
mycmakeargs+=(
|
||||
-DRUN_SSHD_TESTS=OFF
|
||||
-DRUN_DOCKER_TESTS=OFF
|
||||
)
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
}
|
||||
Reference in New Issue
Block a user