mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 15:11:19 +02:00
net-libs/libssh2: Sync with Gentoo
It's from Gentoo commit e34e106c9ff5de63b4823f2fe74474cb3d61da9e.
This commit is contained in:
parent
36765eece3
commit
d3e3ead762
@ -1 +1 @@
|
||||
DIST libssh2-1.10.0.tar.gz 965044 BLAKE2B 0e6f571cc723e0050bf7ba7492f361ef222547dcbc311019cb6762f01405b4906e0418207a7d484c5170bee5e6f666827a7ea0d0cf233f684f999f896ce0b415 SHA512 e064ee1089eb8e6cd5fa2617f4fd8ff56c2721c5476775a98bdb68c6c4ee4d05c706c3bb0eb479a27a8ec0b17a8a5ef43e1d028ad3f134519aa582d3981a3a30
|
||||
DIST libssh2-1.11.0.tar.xz 686796 BLAKE2B 36903798c72f7261d9e997254169c10a4e69166017445276de8b0066fff15cd4dae4119a8d6cbbab8859d765b2d7f34f2911bbaf83c8d6ac5d1feead6b5de64e SHA512 6d50c71b778ca0f769fcc9d2cc257ab669cd0b6c35e8b0e047b6b38aea10638974cc591ba27c25bb7dd523020b4a8a62e2c1ae368287d9dc254d5e24d4a7cee7
|
||||
|
@ -0,0 +1,10 @@
|
||||
--- a/tests/CMakeLists.txt
|
||||
+++ b/tests/CMakeLists.txt
|
||||
@@ -63,7 +63,6 @@ if(SH_EXECUTABLE)
|
||||
mark_as_advanced(SSHD_EXECUTABLE)
|
||||
endif()
|
||||
|
||||
- add_test(NAME mansyntax COMMAND ${SH_EXECUTABLE} -c "${CMAKE_CURRENT_SOURCE_DIR}/mansyntax.sh")
|
||||
endif()
|
||||
|
||||
add_library(runner STATIC ${librunner_la_SOURCES})
|
95
sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.11.0-size_t.patch
vendored
Normal file
95
sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.11.0-size_t.patch
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
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,41 +0,0 @@
|
||||
--- a/tests/mansyntax.sh
|
||||
+++ b/tests/mansyntax.sh
|
||||
@@ -1,37 +1,2 @@
|
||||
#!/bin/sh
|
||||
-set -e
|
||||
-
|
||||
-# Written by Mikhail Gusarov
|
||||
-#
|
||||
-# Run syntax checks for all manpages in the documentation tree.
|
||||
-#
|
||||
-
|
||||
-srcdir=${srcdir:-$PWD}
|
||||
-dstdir=${builddir:-$PWD}
|
||||
-mandir=${srcdir}/../docs
|
||||
-
|
||||
-#
|
||||
-# Only test if suitable man is available
|
||||
-#
|
||||
-if ! man --help | grep -q warnings; then
|
||||
- echo "man version not suitable, skipping tests"
|
||||
- exit 0
|
||||
-fi
|
||||
-
|
||||
-ec=0
|
||||
-
|
||||
-trap "rm -f $dstdir/man3" EXIT
|
||||
-
|
||||
-ln -sf "$mandir" "$dstdir/man3"
|
||||
-
|
||||
-for manpage in $mandir/libssh2_*.*; do
|
||||
- echo "$manpage"
|
||||
- warnings=$(LANG=en_US.UTF-8 MANWIDTH=80 man -M "$dstdir" --warnings \
|
||||
- -E UTF-8 -l "$manpage" 2>&1 >/dev/null)
|
||||
- if [ -n "$warnings" ]; then
|
||||
- echo "$warnings"
|
||||
- ec=1
|
||||
- fi
|
||||
-done
|
||||
-
|
||||
-exit $ec
|
||||
+:
|
@ -1,21 +1,20 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
CMAKE_ECLASS=cmake
|
||||
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.gz"
|
||||
SRC_URI="https://www.libssh2.org/download/${P}.tar.xz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
|
||||
IUSE="gcrypt mbedtls zlib"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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 )"
|
||||
# Tests try to set containers up using docker (and fail for some reason).
|
||||
RESTRICT="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
|
||||
@ -31,6 +30,10 @@ DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.11.0-mansyntax_sh.patch
|
||||
)
|
||||
|
||||
multilib_src_configure() {
|
||||
local crypto_backend=OpenSSL
|
||||
if use gcrypt; then
|
||||
@ -41,13 +44,22 @@ multilib_src_configure() {
|
||||
|
||||
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
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
}
|
66
sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.11.0-r2.ebuild
vendored
Normal file
66
sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.11.0-r2.ebuild
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# 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 ~ia64 ~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,9 +1,9 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
CMAKE_ECLASS=cmake
|
||||
inherit git-r3 cmake-multilib
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib git-r3
|
||||
|
||||
DESCRIPTION="Library implementing the SSH2 protocol"
|
||||
HOMEPAGE="https://www.libssh2.org"
|
||||
@ -12,9 +12,9 @@ EGIT_REPO_URI="https://github.com/libssh2/libssh2"
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE="gcrypt mbedtls zlib"
|
||||
IUSE="gcrypt mbedtls test zlib"
|
||||
REQUIRED_USE="?? ( gcrypt mbedtls )"
|
||||
RESTRICT="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
|
||||
@ -26,12 +26,10 @@ RDEPEND="
|
||||
)
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch
|
||||
"${FILESDIR}"/${PN}-1.11.0-mansyntax_sh.patch
|
||||
)
|
||||
|
||||
multilib_src_configure() {
|
||||
@ -44,13 +42,24 @@ multilib_src_configure() {
|
||||
|
||||
local mycmakeargs=(
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_TESTING=$(usex test)
|
||||
-DCRYPTO_BACKEND=${crypto_backend}
|
||||
-DENABLE_ZLIB_COMPRESSION=$(usex zlib)
|
||||
-DRUN_SSHD_TESTS=OFF
|
||||
-DRUN_DOCKER_TESTS=OFF
|
||||
)
|
||||
|
||||
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
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
}
|
||||
|
@ -1,15 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>netmon@gentoo.org</email>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>mgorny@gentoo.org</email>
|
||||
<name>Michał Górny</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> instead of <pkg>dev-libs/openssl</pkg></flag>
|
||||
<flag name="mbedtls">Use <pkg>net-libs/mbedtls</pkg> instead of <pkg>dev-libs/openssl</pkg></flag>
|
||||
</use>
|
||||
<maintainer type="project">
|
||||
<email>netmon@gentoo.org</email>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>mgorny@gentoo.org</email>
|
||||
<name>Michał Górny</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> instead of <pkg>dev-libs/openssl</pkg></flag>
|
||||
<flag name="mbedtls">Use <pkg>net-libs/mbedtls</pkg> instead of <pkg>dev-libs/openssl</pkg></flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">libssh2/libssh2</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
Loading…
x
Reference in New Issue
Block a user