From cbf3dfbafd881b34be8874f80bb9f7c961379957 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 3 Mar 2022 15:59:32 +0100 Subject: [PATCH] net-libs/libssh2: Sync with gentoo It's from gentoo commit 071f81847bccf95001e3f3fd23f92c105c9532fe. --- .../portage-stable/net-libs/libssh2/Manifest | 3 +- .../libssh2-1.8.0-libgcrypt-prefix.patch | 30 -------- .../libssh2-1.8.0-openssl11-memleak.patch | 23 ------ .../files/libssh2-1.8.0-openssl11.patch | 70 ------------------- ...sh2-1.8.2.ebuild => libssh2-1.10.0.ebuild} | 28 +++----- .../net-libs/libssh2/libssh2-1.8.0-r1.ebuild | 46 ------------ .../net-libs/libssh2/libssh2-1.8.0-r2.ebuild | 61 ---------------- .../net-libs/libssh2/libssh2-9999.ebuild | 16 ++--- .../net-libs/libssh2/metadata.xml | 3 +- 9 files changed, 19 insertions(+), 261 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-libgcrypt-prefix.patch delete mode 100644 sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-openssl11-memleak.patch delete mode 100644 sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-openssl11.patch rename sdk_container/src/third_party/portage-stable/net-libs/libssh2/{libssh2-1.8.2.ebuild => libssh2-1.10.0.ebuild} (50%) delete mode 100644 sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.0-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.0-r2.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/Manifest b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/Manifest index f5809249d6..95b30d057e 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/Manifest @@ -1,2 +1 @@ -DIST libssh2-1.8.0.tar.gz 854916 BLAKE2B 618c4a19789f2e5eda85852760dffff5672d420d2fa50393b05b7398a1913f74e5f6695f078628050ac9851965d6e45cf410b7c4590a8f18d67c718c829ab352 SHA512 289aa45c4f99653bebf5f99565fe9c519abc204feb2084b47b7cc3badc8bf4ecdedd49ea6acdce8eb902b3c00995d5f92a3ca77b2508b92f04ae0e7de7287558 -DIST libssh2-1.8.2.tar.gz 859587 BLAKE2B 58e0854e83001c424a767ceb4ddfb535373320d8319aa632244dc14434276db7c8b7a77d4a5f22fe8e397f1050b33516d2fca1162658a9f414166f560bc1f358 SHA512 390ab4ad93bb738415ec11a6eb92806c9b9e9e5d8ee7c442d841a58b4292c1c447a9bc99e153ba464e2e11f9c0d1913469303598c3046722d1ae821991e8cb93 +DIST libssh2-1.10.0.tar.gz 965044 BLAKE2B 0e6f571cc723e0050bf7ba7492f361ef222547dcbc311019cb6762f01405b4906e0418207a7d484c5170bee5e6f666827a7ea0d0cf233f684f999f896ce0b415 SHA512 e064ee1089eb8e6cd5fa2617f4fd8ff56c2721c5476775a98bdb68c6c4ee4d05c706c3bb0eb479a27a8ec0b17a8a5ef43e1d028ad3f134519aa582d3981a3a30 diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-libgcrypt-prefix.patch b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-libgcrypt-prefix.patch deleted file mode 100644 index 10065626fe..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-libgcrypt-prefix.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -412,9 +412,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [ - - old_LDFLAGS=$LDFLAGS - old_CFLAGS=$CFLAGS -- if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then -- LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib" -- CFLAGS="$CFLAGS -I$use_libgcrypt/include" -+ if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then -+ LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib" -+ CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include" - fi - AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [ - #include ---- a/configure -+++ b/configure -@@ -14250,9 +14235,9 @@ - - old_LDFLAGS=$LDFLAGS - old_CFLAGS=$CFLAGS -- if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then -- LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib" -- CFLAGS="$CFLAGS -I$use_libgcrypt/include" -+ if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then -+ LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib" -+ CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include" - fi - - diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-openssl11-memleak.patch b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-openssl11-memleak.patch deleted file mode 100644 index d7d41f976c..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-openssl11-memleak.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 97518ca8bda91ce12c503197a98fa71690cb67f9 Mon Sep 17 00:00:00 2001 -From: Will Cosgrove -Date: Fri, 12 May 2017 16:34:26 -0700 -Subject: [PATCH] Fix memory leak of crypt_ctx->h using openSSL 1.1+ (#177) - -Need to use EVP_CIPHER_CTX_free instead of EVP_CIPHER_CTX_reset. ---- - src/openssl.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/openssl.h b/src/openssl.h -index 6aa12192..2bd80b96 100644 ---- a/src/openssl.h -+++ b/src/openssl.h -@@ -267,7 +267,7 @@ int _libssh2_md5_init(libssh2_md5_ctx *ctx); - #define _libssh2_cipher_3des EVP_des_ede3_cbc - - #ifdef HAVE_OPAQUE_STRUCTS --#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_reset(*(ctx)) -+#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_free(*(ctx)) - #else - #define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_cleanup(ctx) - #endif diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-openssl11.patch b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-openssl11.patch deleted file mode 100644 index 0824dd0617..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/files/libssh2-1.8.0-openssl11.patch +++ /dev/null @@ -1,70 +0,0 @@ -From c423b543ca45d6caca7b94763bf65ff79d07e811 Mon Sep 17 00:00:00 2001 -From: Marcel Raad -Date: Wed, 24 May 2017 19:21:22 +0200 -Subject: [PATCH] openssl: fix build with OpenSSL 1.1 API (#176) - -When building with OPENSSL_API_COMPAT=0x10100000L, OpenSSL_add_all_algorithms -and OpenSSL_add_all_ciphers don't exist. The corresponding functionality is -handled automatically with OpenSSL 1.1. ---- - src/openssl.c | 4 ++++ - src/openssl.h | 6 ++++++ - 2 files changed, 10 insertions(+) - -diff --git a/src/openssl.c b/src/openssl.c -index f10f2921..25cef082 100644 ---- a/src/openssl.c -+++ b/src/openssl.c -@@ -1056,6 +1056,7 @@ _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session, - "Unable to extract public key from private key " - "file: Unable to open private key file"); - } -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - if (!EVP_get_cipherbyname("des")) { - /* If this cipher isn't loaded it's a pretty good indication that none - * are. I have *NO DOUBT* that there's a better way to deal with this -@@ -1064,6 +1065,7 @@ _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session, - */ - OpenSSL_add_all_ciphers(); - } -+#endif - BIO_reset(bp); - pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase); - BIO_free(bp); -@@ -1132,6 +1134,7 @@ _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session, - if (!bp) { - return -1; - } -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - if (!EVP_get_cipherbyname("des")) { - /* If this cipher isn't loaded it's a pretty good indication that none - * are. I have *NO DOUBT* that there's a better way to deal with this -@@ -1140,6 +1143,7 @@ _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session, - */ - OpenSSL_add_all_ciphers(); - } -+#endif - BIO_reset(bp); - pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase); - BIO_free(bp); -diff --git a/src/openssl.h b/src/openssl.h -index 2bd80b96..d8874286 100644 ---- a/src/openssl.h -+++ b/src/openssl.h -@@ -226,10 +226,16 @@ int _libssh2_md5_init(libssh2_md5_ctx *ctx); - #define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx) - #endif - -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+#define libssh2_crypto_init() \ -+ ENGINE_load_builtin_engines(); \ -+ ENGINE_register_all_complete() -+#else - #define libssh2_crypto_init() \ - OpenSSL_add_all_algorithms(); \ - ENGINE_load_builtin_engines(); \ - ENGINE_register_all_complete() -+#endif - - #define libssh2_crypto_exit() - diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.2.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.10.0.ebuild similarity index 50% rename from sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.2.ebuild rename to sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.10.0.ebuild index 3e9d5fcb91..ff53c92346 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.10.0.ebuild @@ -1,27 +1,28 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 +CMAKE_ECLASS=cmake inherit cmake-multilib DESCRIPTION="Library implementing the SSH2 protocol" HOMEPAGE="https://www.libssh2.org" -SRC_URI="https://www.${PN}.org/download/${P}.tar.gz" +SRC_URI="https://www.libssh2.org/download/${P}.tar.gz" LICENSE="BSD" SLOT="0" -KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" -IUSE="gcrypt libressl mbedtls zlib" +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" REQUIRED_USE="?? ( gcrypt mbedtls )" +# Tests try to set containers up using docker (and fail for some reason). RESTRICT="test" RDEPEND=" gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) !gcrypt? ( - mbedtls? ( net-libs/mbedtls[${MULTILIB_USEDEP}] ) + mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] ) !mbedtls? ( - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) + >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) ) zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) @@ -30,13 +31,6 @@ DEPEND=" ${RDEPEND} " -PATCHES=( - "${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch - "${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch - "${FILESDIR}"/${PN}-1.8.0-openssl11-memleak.patch - "${FILESDIR}"/${PN}-1.8.0-openssl11.patch -) - multilib_src_configure() { local crypto_backend=OpenSSL if use gcrypt; then @@ -50,12 +44,10 @@ multilib_src_configure() { -DCRYPTO_BACKEND=${crypto_backend} -DENABLE_ZLIB_COMPRESSION=$(usex zlib) ) - cmake-utils_src_configure + cmake_src_configure } multilib_src_install_all() { einstalldocs find "${ED}" -name '*.la' -delete || die - mv "${ED}"/usr/share/doc/${PN}/* "${ED}"/usr/share/doc/${PF}/ || die - rm -r "${ED}"/usr/share/doc/${PN}/ || die } diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.0-r1.ebuild deleted file mode 100644 index 3a4f0b2a6f..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.0-r1.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit multilib-minimal - -DESCRIPTION="Library implementing the SSH2 protocol" -HOMEPAGE="https://www.libssh2.org" -SRC_URI="https://www.${PN}.org/download/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" -IUSE="gcrypt libressl static-libs test zlib" - -RDEPEND=" - !gcrypt? ( - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) - ) - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) -" -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch - "${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch - "${FILESDIR}"/${PN}-1.8.0-openssl11.patch - "${FILESDIR}"/${PN}-1.8.0-openssl11-memleak.patch -) - -multilib_src_configure() { - # Disable tests that require extra permissions (bug #333319) - use test && local -x ac_cv_path_SSHD= - - ECONF_SOURCE=${S} econf \ - $(use_with zlib libz) \ - $(usex gcrypt --with-libgcrypt --with-openssl) \ - $(use_enable static-libs static) -} - -multilib_src_install_all() { - einstalldocs - find "${D}" -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.0-r2.ebuild deleted file mode 100644 index 7eb5156df2..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-1.8.0-r2.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit cmake-multilib - -DESCRIPTION="Library implementing the SSH2 protocol" -HOMEPAGE="https://www.libssh2.org" -SRC_URI="https://www.${PN}.org/download/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris" -IUSE="gcrypt libressl mbedtls zlib" -REQUIRED_USE="?? ( gcrypt mbedtls )" -RESTRICT="test" - -RDEPEND=" - gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) - !gcrypt? ( - mbedtls? ( net-libs/mbedtls[${MULTILIB_USEDEP}] ) - !mbedtls? ( - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) - ) - ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) -" -DEPEND=" - ${RDEPEND} -" - -PATCHES=( - "${FILESDIR}"/${PN}-1.8.0-libgcrypt-prefix.patch - "${FILESDIR}"/${PN}-1.8.0-mansyntax_sh.patch - "${FILESDIR}"/${PN}-1.8.0-openssl11-memleak.patch - "${FILESDIR}"/${PN}-1.8.0-openssl11.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 - -DCRYPTO_BACKEND=${crypto_backend} - -DENABLE_ZLIB_COMPRESSION=$(usex zlib) - ) - cmake-utils_src_configure -} - -multilib_src_install_all() { - einstalldocs - find "${ED}" -name '*.la' -delete || die - mv "${ED}"/usr/share/doc/${PN}/* "${ED}"/usr/share/doc/${PF}/ || die - rm -r "${ED}"/usr/share/doc/${PN}/ || die -} diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-9999.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-9999.ebuild index d1797b7dcf..275a78e9da 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/libssh2-9999.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 +CMAKE_ECLASS=cmake inherit git-r3 cmake-multilib DESCRIPTION="Library implementing the SSH2 protocol" @@ -11,17 +12,16 @@ EGIT_REPO_URI="https://github.com/libssh2/libssh2" LICENSE="BSD" SLOT="0" KEYWORDS="" -IUSE="gcrypt libressl mbedtls zlib" +IUSE="gcrypt mbedtls zlib" REQUIRED_USE="?? ( gcrypt mbedtls )" RESTRICT="test" RDEPEND=" gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) !gcrypt? ( - mbedtls? ( net-libs/mbedtls[${MULTILIB_USEDEP}] ) + mbedtls? ( net-libs/mbedtls:0=[${MULTILIB_USEDEP}] ) !mbedtls? ( - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) + >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) ) zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) @@ -47,12 +47,10 @@ multilib_src_configure() { -DCRYPTO_BACKEND=${crypto_backend} -DENABLE_ZLIB_COMPRESSION=$(usex zlib) ) - cmake-utils_src_configure + cmake_src_configure } multilib_src_install_all() { einstalldocs find "${ED}" -name '*.la' -delete || die - mv "${ED}"/usr/share/doc/${PN}/* "${ED}"/usr/share/doc/${PF}/ || die - rm -r "${ED}"/usr/share/doc/${PN}/ || die } diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/metadata.xml b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/metadata.xml index 2149f2ed0c..f072d71970 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/libssh2/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/net-libs/libssh2/metadata.xml @@ -1,5 +1,5 @@ - + netmon@gentoo.org @@ -10,7 +10,6 @@ Use dev-libs/libgcrypt instead of dev-libs/openssl - Use dev-libs/libressl instead of dev-libs/openssl Use net-libs/mbedtls instead of dev-libs/openssl