summaryrefslogtreecommitdiff
path: root/net-libs/libssh2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-30 17:36:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-30 17:36:28 +0100
commit7014a5a3ea0feffab9701fdd6b64cc7667a985af (patch)
treef2cbbaa8bb9209cd15208721103228336149b799 /net-libs/libssh2
parent7a86906b67693cc65671d3e1476835d3a7e13092 (diff)
gentoo resync : 30.06.2019
Diffstat (limited to 'net-libs/libssh2')
-rw-r--r--net-libs/libssh2/Manifest5
-rw-r--r--net-libs/libssh2/files/libssh2-1.9.0-missing.patch181
-rw-r--r--net-libs/libssh2/libssh2-1.9.0.ebuild57
-rw-r--r--net-libs/libssh2/libssh2-9999.ebuild4
4 files changed, 243 insertions, 4 deletions
diff --git a/net-libs/libssh2/Manifest b/net-libs/libssh2/Manifest
index b7b37f7cf305..515519aa0952 100644
--- a/net-libs/libssh2/Manifest
+++ b/net-libs/libssh2/Manifest
@@ -2,10 +2,13 @@ AUX libssh2-1.8.0-libgcrypt-prefix.patch 1026 BLAKE2B da1ba552aafecb1b950bc8d5d4
AUX libssh2-1.8.0-mansyntax_sh.patch 770 BLAKE2B 743bb8032baab056fb578429bf540c8f41d2cdf07c1285a7abe25e804b2ada3c8d7f0c126f8b6973461279e891d2e3e942e2cea7d1cb352f17541f22757c11f0 SHA512 9da051dd5dda823ae8797b0dadb9a3734590e196898b0985f389492f1225c720dac0ce374ba6d9cc8956820128fc2d7457350248b486f0da4d12cc3bb93e275a
AUX libssh2-1.8.0-openssl11-memleak.patch 823 BLAKE2B 3d2abd43798a23b551ef5ba97b705f8e8e24db010a19a2387efe10299e436e0dbe655db419fa8da1467aed18ec2bb39e1d863eb981603afecb302700c565159e SHA512 d93ee0b8ea5f37b81883ff79fb7d2f19633a4415990de1743f1388f49f7897be200ae0911b6ca14d505498294727aa5542c7d76a29e7b8df0051a53e6dcd586a
AUX libssh2-1.8.0-openssl11.patch 2551 BLAKE2B 32875e90a9cfb754050559a315c24d51065ceb9be22e450984aef9dea0a59b5b93cac7498e3c3e9cf8057ac13dd93330bc470bd717c9a06af9d9294ef7172eed SHA512 3cfd11ef23884a3de173422e001b0ec0f9af48c832948b5d0f90f0be2008334c30ed769a642786cad9aa68ea445b66780b10d3c64434178978018e709510deab
+AUX libssh2-1.9.0-missing.patch 4796 BLAKE2B 185428de9298fc210c30a1b826b958ebde761a6b258d2b6a79c2162533c81c6f9dfa5a1c574b239067a7bf79bda36656498cea78b0da797579b5cb6711a6dfe0 SHA512 65d75ecdc041cfb627c49f992804201dc234ba63558e2cbac066efbe0c4de03900668f61f87674ea9ef5beeb217d82cb441018f11e703545ba9349a4f05c8ae6
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.9.0.tar.gz 888551 BLAKE2B 7bce5cd38b88654f0ca0f8b562e4bddc56346e3359e5873000cad7619607b2ec01c3945112dd8815d5de6daf650a750a4727cebe7d8996cc62f07ded06f3235f SHA512 41a3ebcf84e32eab69b7411ffb0a3b6e6db71491c968602b17392cfe3490ef00239726ec28acb3d25bf0ed62700db7f4d0bb5a9175618f413865f40badca6e17
EBUILD libssh2-1.8.0-r1.ebuild 1362 BLAKE2B 0765a2ec7cfb2b0eb5ab4f52054d4cf8abebeda0b47814520ec76a5b3ff4299efa642483bfad8051788a27cc0934bdecf9a91bf6a17b49e81562e2b3a6b246d6 SHA512 61067547b394f9c5959bf7dec2ec2cb0a69629ca5a65f9f5dbc6f71b8664767802af0fe59eae210eefb165378c9f4af58eae0358421ae4f339da3812a80dd579
EBUILD libssh2-1.8.0-r2.ebuild 1647 BLAKE2B 47a2d718a0a2bf40f31fa3a3251ddf64e44fdb2823b61a3c10b54cf34c41af01adc3831b99f25a8b012cf7ce54a0120d4216dd3c7ec9921b48df15d29d542561 SHA512 43bbf761c4075cbe523b1b5ab247ef7e69c800f529ac41981ff61cf53a0c37b3b2b989cd9a08e7e709b9ddc0cb9d2a86f31e7930b96c95a0e5857aadf2a3eda9
EBUILD libssh2-1.8.2.ebuild 1637 BLAKE2B c1ee43a0355c0f6fd4d761355c9a10f2ec70ff5b6dcdd175ef5162a852921e747ddae104d429536978fee57042764155bc8785ca3c15d9d3462302ff978be4dd SHA512 772baee7fe1f82db778da86c7cd7490e3d2a5843eb130aef310b5ebbffaa317d55aeea1cfc17ed71ab3e467209edbe2f5ede66482337028a1ddf2b780fe3011e
-EBUILD libssh2-9999.ebuild 1350 BLAKE2B 4c235624aeef7721a3488a1dac91d406f5f83b8e7b1482bdddf7a71f0d2ad19c0124aa64b00b228d713a5da0c394accc9d3dce19374d588256e2905139176b64 SHA512 e12db58e8a20272414575ab19378dec2ecb2c97aa79d3f8d4397ec9638a2377d9218f21302c2c56af03dbc8620e807189b50442cb8d86b3b50d9c8caf15d717a
+EBUILD libssh2-1.9.0.ebuild 1431 BLAKE2B 6caea62b094f55ac37a13f3c9b6cf03d99a327d2be46fdea8f9dbc50f4ce2cd590931188a7c1bb9e408a32c919a5efac26c5af25f5022cf3c1353da769951211 SHA512 9ebf32223963a62259bd085818fce1e4594af9b21e41773ed822cce02ad84594a18885e623a4d011d3a0da38bf391a35ed16ee1160b965387f1d028d167e5f21
+EBUILD libssh2-9999.ebuild 1237 BLAKE2B 0a4ace453cacc7e735fc5df42d1bbadfb3a231954a94e992b8c7141037cd07b73a3f262f3ad9dcad9e98d51fe024a41220e0d34593f96e563c26f632e0f172f7 SHA512 f8f597a5adee5b882d3e6d22ce1dd739d5f1a57da4466bfedeebe1d7bfecddac296f687cf4982ece60f5e3e0b52eb4ae8fda30a2e6e4d091f479fbb0872116e2
MISC metadata.xml 634 BLAKE2B 09afb03a2a77e95f5717d21936668a650f01d0dc44173a57cf6d702d5a51076ae41b1a71974dfbaf66baf3b746af2dbb07e02556aeed793edfff93d0b38e14ba SHA512 4596f1e9a12c3d35d2a0b69e349b12a9bba72e57ea505e10fb814a3d310a7e63f75d1e5628946cd2045260c7466bc654a6770aea5743afa52c742913f7c62960
diff --git a/net-libs/libssh2/files/libssh2-1.9.0-missing.patch b/net-libs/libssh2/files/libssh2-1.9.0-missing.patch
new file mode 100644
index 000000000000..7cc58d239638
--- /dev/null
+++ b/net-libs/libssh2/files/libssh2-1.9.0-missing.patch
@@ -0,0 +1,181 @@
+--- /dev/null
++++ b/tests/test_public_key_auth_succeeds_with_correct_ed25519_key.c
+@@ -0,0 +1,37 @@
++#include "session_fixture.h"
++
++#include <libssh2.h>
++
++#include <stdio.h>
++
++static const char *USERNAME = "libssh2"; /* configured in Dockerfile */
++static const char *KEY_FILE_PRIVATE = "key_ed25519";
++static const char *KEY_FILE_PUBLIC = "key_ed25519.pub"; /* configured in Dockerfile */
++
++int test(LIBSSH2_SESSION *session)
++{
++ int rc;
++ const char *userauth_list = NULL;
++
++ userauth_list = libssh2_userauth_list(session, USERNAME, strlen(USERNAME));
++ if(userauth_list == NULL) {
++ print_last_session_error("libssh2_userauth_list");
++ return 1;
++ }
++
++ if(strstr(userauth_list, "publickey") == NULL) {
++ fprintf(stderr, "'publickey' was expected in userauth list: %s\n",
++ userauth_list);
++ return 1;
++ }
++
++ rc = libssh2_userauth_publickey_fromfile_ex(
++ session, USERNAME, strlen(USERNAME), KEY_FILE_PUBLIC, KEY_FILE_PRIVATE,
++ NULL);
++ if(rc != 0) {
++ print_last_session_error("libssh2_userauth_publickey_fromfile_ex");
++ return 1;
++ }
++
++ return 0;
++}
+--- /dev/null
++++ b/tests/test_public_key_auth_succeeds_with_correct_encrypted_ed25519_key.c
+@@ -0,0 +1,38 @@
++#include "session_fixture.h"
++
++#include <libssh2.h>
++
++#include <stdio.h>
++
++static const char *USERNAME = "libssh2"; /* configured in Dockerfile */
++static const char *PASSWORD = "libssh2";
++static const char *KEY_FILE_PRIVATE = "key_ed25519_encrypted";
++static const char *KEY_FILE_PUBLIC = "key_ed25519_encrypted.pub"; /* configured in Dockerfile */
++
++int test(LIBSSH2_SESSION *session)
++{
++ int rc;
++ const char *userauth_list = NULL;
++
++ userauth_list = libssh2_userauth_list(session, USERNAME, strlen(USERNAME));
++ if(userauth_list == NULL) {
++ print_last_session_error("libssh2_userauth_list");
++ return 1;
++ }
++
++ if(strstr(userauth_list, "publickey") == NULL) {
++ fprintf(stderr, "'publickey' was expected in userauth list: %s\n",
++ userauth_list);
++ return 1;
++ }
++
++ rc = libssh2_userauth_publickey_fromfile_ex(
++ session, USERNAME, strlen(USERNAME), KEY_FILE_PUBLIC, KEY_FILE_PRIVATE,
++ PASSWORD);
++ if(rc != 0) {
++ print_last_session_error("libssh2_userauth_publickey_fromfile_ex");
++ return 1;
++ }
++
++ return 0;
++}
+--- /dev/null
++++ b/tests/test_public_key_auth_succeeds_with_correct_ed25519_key_from_mem.c
+@@ -0,0 +1,97 @@
++#include "session_fixture.h"
++
++#include <libssh2.h>
++
++#include <stdio.h>
++#include <stdlib.h>
++
++static const char *USERNAME = "libssh2"; /* configured in Dockerfile */
++static const char *KEY_FILE_ED25519_PRIVATE = "key_ed25519";
++
++int read_file(const char *path, char **buf, size_t *len);
++
++int test(LIBSSH2_SESSION *session)
++{
++ int rc;
++ FILE *fp = NULL;
++ char *buffer = NULL;
++ size_t len = 0;
++ const char *userauth_list = NULL;
++
++ userauth_list = libssh2_userauth_list(session, USERNAME, strlen(USERNAME));
++ if(userauth_list == NULL) {
++ print_last_session_error("libssh2_userauth_list");
++ return 1;
++ }
++
++ if(strstr(userauth_list, "publickey") == NULL) {
++ fprintf(stderr, "'publickey' was expected in userauth list: %s\n",
++ userauth_list);
++ return 1;
++ }
++
++ if(read_file(KEY_FILE_ED25519_PRIVATE, &buffer, &len)) {
++ fprintf(stderr, "Reading key file failed.");
++ return 1;
++ }
++
++ rc = libssh2_userauth_publickey_frommemory(session, USERNAME, strlen(USERNAME),
++ NULL, 0, buffer, len, NULL);
++
++ free(buffer);
++
++ if(rc != 0) {
++ print_last_session_error("libssh2_userauth_publickey_fromfile_ex");
++ return 1;
++ }
++
++ return 0;
++}
++
++int read_file(const char *path, char **out_buffer, size_t *out_len)
++{
++ int rc;
++ FILE *fp = NULL;
++ char *buffer = NULL;
++ size_t len = 0;
++
++ if(out_buffer == NULL || out_len == NULL || path == NULL) {
++ fprintf(stderr, "invalid params.");
++ return 1;
++ }
++
++ *out_buffer = NULL;
++ *out_len = 0;
++
++ fp = fopen(path, "r");
++
++ if(!fp) {
++ fprintf(stderr, "File could not be read.");
++ return 1;
++ }
++
++ fseek(fp, 0L, SEEK_END);
++ len = ftell(fp);
++ rewind(fp);
++
++ buffer = calloc(1, len + 1);
++ if(!buffer) {
++ fclose(fp);
++ fprintf(stderr, "Could not alloc memory.");
++ return 1;
++ }
++
++ if(1 != fread(buffer, len, 1, fp)) {
++ fclose(fp);
++ free(buffer);
++ fprintf(stderr, "Could not read file into memory.");
++ return 1;
++ }
++
++ fclose(fp);
++
++ *out_buffer = buffer;
++ *out_len = len;
++
++ return 0;
++}
diff --git a/net-libs/libssh2/libssh2-1.9.0.ebuild b/net-libs/libssh2/libssh2-1.9.0.ebuild
new file mode 100644
index 000000000000..12ad74fa242b
--- /dev/null
+++ b/net-libs/libssh2/libssh2-1.9.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+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-mansyntax_sh.patch
+ "${FILESDIR}"/${PN}-1.9.0-missing.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
+}
diff --git a/net-libs/libssh2/libssh2-9999.ebuild b/net-libs/libssh2/libssh2-9999.ebuild
index d1797b7dcfa7..5bf05457d9ad 100644
--- a/net-libs/libssh2/libssh2-9999.ebuild
+++ b/net-libs/libssh2/libssh2-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit git-r3 cmake-multilib
DESCRIPTION="Library implementing the SSH2 protocol"
@@ -53,6 +53,4 @@ multilib_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
}