* [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/files/, net-libs/libssh/
@ 2016-03-20 17:23 Lars Wendler
0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2016-03-20 17:23 UTC (permalink / raw
To: gentoo-commits
commit: ca3613078e0fe6f913bee37728bbf4dd45860a93
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 16:59:29 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 17:23:17 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca361307
net-libs/libssh: Security cleanup (bug #575484).
Package-Manager: portage-2.2.28
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
net-libs/libssh/Manifest | 2 -
.../libssh/files/libssh-0.6.5-compilefix.patch | 29 -------
net-libs/libssh/libssh-0.6.5.ebuild | 88 ---------------------
net-libs/libssh/libssh-0.7.2.ebuild | 90 ----------------------
4 files changed, 209 deletions(-)
diff --git a/net-libs/libssh/Manifest b/net-libs/libssh/Manifest
index c94a38d..9ef64dd 100644
--- a/net-libs/libssh/Manifest
+++ b/net-libs/libssh/Manifest
@@ -1,3 +1 @@
-DIST libssh-0.6.5.tar.xz 281564 SHA256 0fd52763e033d5e9b1cd55f60a74e619731c5ba630938eec95682dbe4cf7dc2c SHA512 55d614ff311a29a20b93094ac1dd16a2ad1345368b874a0e385f0c235e8defde8816948ab04eab68ade477a0a6901b317c7884df1ba3078cf12db89dfc4169cc WHIRLPOOL 9801eee45a178306b0645d75c268df381d206a8c566695d8b6c228ea7f5638a313bdbdf990ad7bd299c24d280595007b44fd16449ee3a0643b6e2084bb148d09
-DIST libssh-0.7.2.tar.xz 350540 SHA256 a32c45b9674141cab4bde84ded7d53e931076c6b0f10b8fd627f3584faebae62 SHA512 9cb15254478e2522e736688052e0862c856e2c1321d090c9b9d9562504fcb59cee344c07576eeee9c6d0ac5ead137d9ff05216d973c457c6a17ffa9fba475f5a WHIRLPOOL bf878264b900bfbbfe76f08d1c22e5ca2f1300024fc561841ed3fbef374ceab7a08ba0211c093d90d7e4047a896cce9f73e78268300362beaec194025eda1ed8
DIST libssh-0.7.3.tar.xz 350464 SHA256 26ef46be555da21112c01e4b9f5e3abba9194485c8822ab55ba3d6496222af98 SHA512 6797ea9492c9d07e0169163e6559a7880dd368ee763eff297b3cbddda5e892703cf32506f9513e7d9b5135984e1e888c4893b342df07da1b7ee30968c9185869 WHIRLPOOL f22c3f4ef8c3cbf4e93c5603224ae4d0f598639a471bc002c0917243c487e1de61a79db09308bcb570791cd1ab3b95f43d44f92652a7f0ec596d552cab0031c5
diff --git a/net-libs/libssh/files/libssh-0.6.5-compilefix.patch b/net-libs/libssh/files/libssh-0.6.5-compilefix.patch
deleted file mode 100644
index 658c159..0000000
--- a/net-libs/libssh/files/libssh-0.6.5-compilefix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 6e0dee7845cea22f59bd353ef42b31cb67170030 Mon Sep 17 00:00:00 2001
-From: Andreas Schneider <asn@cryptomilk.org>
-Date: Thu, 2 Apr 2015 15:02:29 +0200
-Subject: poll: Fix compilation with struct ssh_timestamp
-
-Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-(cherry picked from commit e0a73d3dbe909f8e2cb486ed344e5beb8148032e)
----
- src/poll.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/poll.c b/src/poll.c
-index dfa687a..05faba7 100644
---- a/src/poll.c
-+++ b/src/poll.c
-@@ -35,9 +35,9 @@
- #include "libssh/poll.h"
- #include "libssh/socket.h"
- #include "libssh/session.h"
-+#include "libssh/misc.h"
- #ifdef WITH_SERVER
- #include "libssh/server.h"
--#include "libssh/misc.h"
- #endif
-
-
---
-cgit v0.12
-
diff --git a/net-libs/libssh/libssh-0.6.5.ebuild b/net-libs/libssh/libssh-0.6.5.ebuild
deleted file mode 100644
index 30b9ff4..0000000
--- a/net-libs/libssh/libssh-0.6.5.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_P=${PN}-${PV/_rc/rc}
-inherit eutils cmake-multilib multilib
-
-DESCRIPTION="Access a working SSH implementation by means of a library"
-HOMEPAGE="http://www.libssh.org/"
-SRC_URI="https://red.libssh.org/attachments/download/121/${MY_P}.tar.xz -> ${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
-SLOT="0/4" # subslot = soname major version
-IUSE="debug doc examples gcrypt gssapi pcap +sftp ssh1 server static-libs test zlib"
-# Maintainer: check IUSE-defaults at DefineOptions.cmake
-
-RDEPEND="
- zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
- !gcrypt? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
- gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
- gssapi? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}
- doc? ( app-doc/doxygen )
- test? ( >=dev-util/cmocka-0.3.1[${MULTILIB_USEDEP}] )
-"
-
-DOCS=( AUTHORS README ChangeLog )
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0.5.0-tests.patch
- "${FILESDIR}"/${P}-compilefix.patch
-)
-
-src_prepare() {
- # just install the examples do not compile them
- sed -i \
- -e '/add_subdirectory(examples)/s/^/#DONOTWANT/' \
- CMakeLists.txt || die
-
- cmake-utils_src_prepare
-}
-
-multilib_src_configure() {
- local mycmakeargs=(
- $(cmake-utils_use_with debug DEBUG_CALLTRACE)
- $(cmake-utils_use_with debug DEBUG_CRYPTO)
- $(cmake-utils_use_with gcrypt)
- $(cmake-utils_use_with gssapi)
- $(cmake-utils_use_with pcap)
- $(cmake-utils_use_with server)
- $(cmake-utils_use_with sftp)
- $(cmake-utils_use_with ssh1)
- $(cmake-utils_use_with static-libs STATIC_LIB)
- $(cmake-utils_use_with test STATIC_LIB)
- $(cmake-utils_use_with test TESTING)
- $(cmake-utils_use_with zlib)
- )
-
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
- multilib_is_native_abi && use doc && cmake-utils_src_compile doc
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- multilib_is_native_abi && use doc && dohtml -r doc/html/.
-
- use static-libs || rm -f "${D}"/usr/$(get_libdir)/libssh{,_threads}.a
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if use examples; then
- docinto examples
- dodoc examples/*.{c,h,cpp}
- fi
-}
diff --git a/net-libs/libssh/libssh-0.7.2.ebuild b/net-libs/libssh/libssh-0.7.2.ebuild
deleted file mode 100644
index 507ff40..0000000
--- a/net-libs/libssh/libssh-0.7.2.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_P=${PN}-${PV/_rc/rc}
-inherit eutils cmake-multilib multilib
-
-DESCRIPTION="Access a working SSH implementation by means of a library"
-HOMEPAGE="http://www.libssh.org/"
-SRC_URI="https://red.libssh.org/attachments/download/177/${MY_P}.tar.xz -> ${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-SLOT="0/4" # subslot = soname major version
-IUSE="debug doc examples gcrypt gssapi libressl pcap +sftp ssh1 server static-libs test zlib"
-# Maintainer: check IUSE-defaults at DefineOptions.cmake
-
-RDEPEND="
- zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
- !gcrypt? (
- !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
- libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
- )
- gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
- gssapi? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}
- doc? ( app-doc/doxygen )
- test? ( >=dev-util/cmocka-0.3.1[${MULTILIB_USEDEP}] )
-"
-
-DOCS=( AUTHORS README ChangeLog )
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0.5.0-tests.patch
-)
-
-src_prepare() {
- # just install the examples do not compile them
- sed -i \
- -e '/add_subdirectory(examples)/s/^/#DONOTWANT/' \
- CMakeLists.txt || die
-
- cmake-utils_src_prepare
-}
-
-multilib_src_configure() {
- local mycmakeargs=(
- $(cmake-utils_use_with debug DEBUG_CALLTRACE)
- $(cmake-utils_use_with debug DEBUG_CRYPTO)
- $(cmake-utils_use_with gcrypt)
- $(cmake-utils_use_with gssapi)
- $(cmake-utils_use_with pcap)
- $(cmake-utils_use_with server)
- $(cmake-utils_use_with sftp)
- $(cmake-utils_use_with ssh1)
- $(cmake-utils_use_with static-libs STATIC_LIB)
- $(cmake-utils_use_with test STATIC_LIB)
- $(cmake-utils_use_with test TESTING)
- $(cmake-utils_use_with zlib)
- )
-
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
- multilib_is_native_abi && use doc && cmake-utils_src_compile doc
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- multilib_is_native_abi && use doc && dohtml -r doc/html/.
-
- use static-libs || rm -f "${D}"/usr/$(get_libdir)/libssh{,_threads}.a
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if use examples; then
- docinto examples
- dodoc examples/*.{c,h,cpp}
- fi
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/files/, net-libs/libssh/
@ 2017-08-15 13:41 Andreas Sturmlechner
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2017-08-15 13:41 UTC (permalink / raw
To: gentoo-commits
commit: cff4c91c68bcc74b06f0d2f9420480ecd0d2e1bf
Author: Mihai Moldovan <ionic <AT> ionic <DOT> de>
AuthorDate: Tue Aug 15 12:48:58 2017 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Aug 15 12:49:49 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cff4c91c
net-libs/libssh: Backport upstream fixes
Gentoo-bug: 627900
Package-Manager: Portage-2.3.7, Repoman-2.3.3
.../libssh-0.7.5-fix-config-buffer-underflow.patch | 25 +++++
.../files/libssh-0.7.5-fix-config-parsing.patch | 32 +++++++
net-libs/libssh/libssh-0.7.5-r1.ebuild | 101 +++++++++++++++++++++
3 files changed, 158 insertions(+)
diff --git a/net-libs/libssh/files/libssh-0.7.5-fix-config-buffer-underflow.patch b/net-libs/libssh/files/libssh-0.7.5-fix-config-buffer-underflow.patch
new file mode 100644
index 00000000000..7ff03263d19
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.7.5-fix-config-buffer-underflow.patch
@@ -0,0 +1,25 @@
+From 0cffb88b80b1e8b7e292646b955e9b9ca02315c4 Mon Sep 17 00:00:00 2001
+From: Aris Adamantiadis <aris@0xbadc0de.be>
+Date: Thu, 8 Jun 2017 00:22:02 +0200
+Subject: config: fix buffer underflow with unrecognized opcodes
+
+---
+ src/config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/config.c b/src/config.c
+index 519926e7..6187c90f 100644
+--- a/src/config.c
++++ b/src/config.c
+@@ -218,7 +218,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
+ }
+
+ opcode = ssh_config_get_opcode(keyword);
+- if (*parsing == 1 && opcode != SOC_HOST) {
++ if (*parsing == 1 && opcode != SOC_HOST && opcode != SOC_UNSUPPORTED) {
+ if (seen[opcode] != 0) {
+ return 0;
+ }
+--
+cgit v1.1
+
diff --git a/net-libs/libssh/files/libssh-0.7.5-fix-config-parsing.patch b/net-libs/libssh/files/libssh-0.7.5-fix-config-parsing.patch
new file mode 100644
index 00000000000..3596cf02105
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.7.5-fix-config-parsing.patch
@@ -0,0 +1,32 @@
+From 5333be5988c3789e7011598995f4df90d50d84d0 Mon Sep 17 00:00:00 2001
+From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
+Date: Sun, 4 Jun 2017 11:54:55 +0300
+Subject: config: Bugfix: Don't skip unseen opcodes
+
+libssh fails to read the configuration from a config file due to a
+wrong check in 'ssh_config_parse_line' procedure in 'config.c'; it's
+effectively skipping every opcode (and therefore every option) from
+the file. The change fixes that behaviour.
+
+Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
+Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
+---
+ src/config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/config.c b/src/config.c
+index 6478fc5f..519926e7 100644
+--- a/src/config.c
++++ b/src/config.c
+@@ -219,7 +219,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
+
+ opcode = ssh_config_get_opcode(keyword);
+ if (*parsing == 1 && opcode != SOC_HOST) {
+- if (seen[opcode] == 0) {
++ if (seen[opcode] != 0) {
+ return 0;
+ }
+ seen[opcode] = 1;
+--
+cgit v1.1
+
diff --git a/net-libs/libssh/libssh-0.7.5-r1.ebuild b/net-libs/libssh/libssh-0.7.5-r1.ebuild
new file mode 100644
index 00000000000..082de3cdefc
--- /dev/null
+++ b/net-libs/libssh/libssh-0.7.5-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P="${PN}-${PV/_rc/rc}"
+inherit eutils cmake-multilib multilib
+
+DESCRIPTION="Access a working SSH implementation by means of a library"
+HOMEPAGE="http://www.libssh.org/"
+SRC_URI="https://red.libssh.org/attachments/download/218/${MY_P}.tar.xz -> ${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+SLOT="0/4" # subslot = soname major version
+IUSE="debug doc examples gcrypt gssapi libressl pcap +sftp ssh1 server static-libs test zlib"
+# Maintainer: check IUSE-defaults at DefineOptions.cmake
+
+RDEPEND="
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ !gcrypt? (
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
+ )
+ gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
+ gssapi? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+ ${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? ( >=dev-util/cmocka-0.3.1[${MULTILIB_USEDEP}] )
+"
+
+DOCS=( AUTHORS README ChangeLog )
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.5.0-tests.patch
+ "${FILESDIR}"/${P}-fix-config-parsing.patch
+ "${FILESDIR}"/${P}-fix-config-buffer-underflow.patch
+)
+
+src_prepare() {
+ # just install the examples do not compile them
+ sed -i \
+ -e '/add_subdirectory(examples)/s/^/#DONOTWANT/' \
+ CMakeLists.txt || die
+
+ # keyfile torture test is currently broken
+ sed \
+ -e '/torture_keyfiles/d' \
+ -i tests/unittests/CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DWITH_DEBUG_CALLTRACE="$(usex debug)"
+ -DWITH_DEBUG_CRYPTO="$(usex debug)"
+ -DWITH_GCRYPT="$(usex gcrypt)"
+ -DWITH_GSSAPI="$(usex gssapi)"
+ -DWITH_NACL=no
+ -DWITH_PCAP="$(usex pcap)"
+ -DWITH_SERVER="$(usex server)"
+ -DWITH_SFTP="$(usex sftp)"
+ -DWITH_SSH1="$(usex ssh1)"
+ -DWITH_STATIC_LIB="$(usex static-libs)"
+ -DWITH_STATIC_LIB="$(usex test)"
+ -DWITH_TESTING="$(usex test)"
+ -DWITH_ZLIB="$(usex zlib)"
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+ multilib_is_native_abi && use doc && cmake-utils_src_compile doc
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+
+ if multilib_is_native_abi && use doc ; then
+ docinto html
+ dodoc -r doc/html/.
+ fi
+
+ use static-libs || rm -f "${D}"/usr/$(get_libdir)/libssh{,_threads}.a
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,h,cpp}
+ fi
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/files/, net-libs/libssh/
@ 2018-03-13 10:47 Lars Wendler
0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2018-03-13 10:47 UTC (permalink / raw
To: gentoo-commits
commit: eb18422c28376328204688bc7c24cf0e1dcea3e7
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 13 10:42:38 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Mar 13 10:47:01 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb18422c
net-libs/libssh: Revbump to add fixes from Ionic overlay.
Package-Manager: Portage-2.3.24, Repoman-2.3.6
.../files/libssh-0.7.5-add-macro-for-MAX.patch | 30 ++++
.../libssh-0.7.5-fix-internal-algo-selection.patch | 156 +++++++++++++++++++++
net-libs/libssh/libssh-0.7.5-r2.ebuild | 102 ++++++++++++++
3 files changed, 288 insertions(+)
diff --git a/net-libs/libssh/files/libssh-0.7.5-add-macro-for-MAX.patch b/net-libs/libssh/files/libssh-0.7.5-add-macro-for-MAX.patch
new file mode 100644
index 00000000000..d9226d69700
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.7.5-add-macro-for-MAX.patch
@@ -0,0 +1,30 @@
+From 310d423d36ae7bb6dac5a2ae2fb7b57bda72dcb5 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Thu, 24 Aug 2017 17:27:08 +0200
+Subject: [PATCH 1/2] priv: Add macro for MAX
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+(cherry picked from commit de35212789d11086621e176a11399de0d75ab3a6)
+Signed-off-by: Mihai Moldovan <ionic@ionic.de>
+---
+ include/libssh/priv.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/include/libssh/priv.h b/include/libssh/priv.h
+index 5a74915e..c3373c00 100644
+--- a/include/libssh/priv.h
++++ b/include/libssh/priv.h
+@@ -263,6 +263,10 @@ int match_hostname(const char *host, const char *pattern, unsigned int len);
+ #define MIN(a,b) ((a) < (b) ? (a) : (b))
+ #endif
+
++#ifndef MAX
++#define MAX(a,b) ((a) > (b) ? (a) : (b))
++#endif
++
+ /** Free memory space */
+ #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
+
+--
+2.15.1
+
diff --git a/net-libs/libssh/files/libssh-0.7.5-fix-internal-algo-selection.patch b/net-libs/libssh/files/libssh-0.7.5-fix-internal-algo-selection.patch
new file mode 100644
index 00000000000..931d63360a1
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.7.5-fix-internal-algo-selection.patch
@@ -0,0 +1,156 @@
+From 4893f9515da2696490e6bbe9aaf51f2ef9678b0f Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Thu, 24 Aug 2017 16:28:39 +0200
+Subject: [PATCH 2/2] ssh_options_set_algo: ensure we only set known algorithms
+ internally
+
+That way, we will not fail later on key exchange phase when something
+unknown is negotiated.
+
+Fixes T37
+
+Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Reviewed-by: Andreas Schneider <asn@samba.org>
+(cherry picked from commit 895055ab38e7716390019aae5e11771a88b99d26)
+Signed-off-by: Mihai Moldovan <ionic@ionic.de>
+---
+ include/libssh/kex.h | 1 +
+ src/kex.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/options.c | 11 ++++----
+ 3 files changed, 81 insertions(+), 6 deletions(-)
+
+diff --git a/include/libssh/kex.h b/include/libssh/kex.h
+index 1a5b6d41..23594985 100644
+--- a/include/libssh/kex.h
++++ b/include/libssh/kex.h
+@@ -41,6 +41,7 @@ void ssh_list_kex(struct ssh_kex_struct *kex);
+ int set_client_kex(ssh_session session);
+ int ssh_kex_select_methods(ssh_session session);
+ int verify_existing_algo(int algo, const char *name);
++char *keep_known_algos(int algo, const char *list);
+ char **space_tokenize(const char *chain);
+ int ssh_get_kex1(ssh_session session);
+ char *ssh_find_matching(const char *in_d, const char *what_d);
+diff --git a/src/kex.c b/src/kex.c
+index 519d79ce..f0c9d067 100644
+--- a/src/kex.c
++++ b/src/kex.c
+@@ -281,6 +281,71 @@ char *ssh_find_matching(const char *available_d, const char *preferred_d){
+ return NULL;
+ }
+
++static char *ssh_find_all_matching(const char *available_d,
++ const char *preferred_d)
++{
++ char **tok_available, **tok_preferred;
++ int i_avail, i_pref;
++ char *ret;
++ unsigned max, len, pos = 0;
++
++ if ((available_d == NULL) || (preferred_d == NULL)) {
++ return NULL; /* don't deal with null args */
++ }
++
++ max = MAX(strlen(available_d), strlen(preferred_d));
++
++ ret = malloc(max+1);
++ if (ret == NULL) {
++ return NULL;
++ }
++ ret[0] = 0;
++
++ tok_available = tokenize(available_d);
++ if (tok_available == NULL) {
++ SAFE_FREE(ret);
++ return NULL;
++ }
++
++ tok_preferred = tokenize(preferred_d);
++ if (tok_preferred == NULL) {
++ SAFE_FREE(ret);
++ SAFE_FREE(tok_available[0]);
++ SAFE_FREE(tok_available);
++ return NULL;
++ }
++
++ for (i_pref = 0; tok_preferred[i_pref] ; ++i_pref) {
++ for (i_avail = 0; tok_available[i_avail]; ++i_avail) {
++ int cmp = strcmp(tok_available[i_avail],tok_preferred[i_pref]);
++ if (cmp == 0) {
++ /* match */
++ if (pos != 0) {
++ ret[pos] = ',';
++ pos++;
++ }
++
++ len = strlen(tok_available[i_avail]);
++ memcpy(&ret[pos], tok_available[i_avail], len);
++ pos += len;
++ ret[pos] = '\0';
++ }
++ }
++ }
++
++ if (ret[0] == '\0') {
++ SAFE_FREE(ret);
++ ret = NULL;
++ }
++
++ SAFE_FREE(tok_available[0]);
++ SAFE_FREE(tok_preferred[0]);
++ SAFE_FREE(tok_available);
++ SAFE_FREE(tok_preferred);
++
++ return ret;
++}
++
+ /**
+ * @internal
+ * @brief returns whether the first client key exchange algorithm or
+@@ -668,4 +733,14 @@ int verify_existing_algo(int algo, const char *name){
+ return 0;
+ }
+
++/* returns a copy of the provided list if everything is supported,
++ * otherwise a new list of the supported algorithms */
++char *keep_known_algos(int algo, const char *list)
++{
++ if ((algo > 9) || (algo < 0)) {
++ return NULL;
++ }
++
++ return ssh_find_all_matching(supported_methods[algo], list);
++}
+ /* vim: set ts=2 sw=2 et cindent: */
+diff --git a/src/options.c b/src/options.c
+index aed2dda5..34fe9cc7 100644
+--- a/src/options.c
++++ b/src/options.c
+@@ -164,7 +164,10 @@ int ssh_options_copy(ssh_session src, ssh_session *dest) {
+
+ int ssh_options_set_algo(ssh_session session, int algo,
+ const char *list) {
+- if (!verify_existing_algo(algo, list)) {
++ char *p = NULL;
++
++ p = keep_known_algos(algo, list);
++ if (p == NULL) {
+ ssh_set_error(session, SSH_REQUEST_DENIED,
+ "Setting method: no algorithm for method \"%s\" (%s)\n",
+ ssh_kex_get_description(algo), list);
+@@ -172,11 +175,7 @@ int ssh_options_set_algo(ssh_session session, int algo,
+ }
+
+ SAFE_FREE(session->opts.wanted_methods[algo]);
+- session->opts.wanted_methods[algo] = strdup(list);
+- if (session->opts.wanted_methods[algo] == NULL) {
+- ssh_set_error_oom(session);
+- return -1;
+- }
++ session->opts.wanted_methods[algo] = p;
+
+ return 0;
+ }
+--
+2.15.1
+
diff --git a/net-libs/libssh/libssh-0.7.5-r2.ebuild b/net-libs/libssh/libssh-0.7.5-r2.ebuild
new file mode 100644
index 00000000000..381d0dd66c0
--- /dev/null
+++ b/net-libs/libssh/libssh-0.7.5-r2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P="${PN}-${PV/_rc/rc}"
+inherit cmake-multilib
+
+DESCRIPTION="Access a working SSH implementation by means of a library"
+HOMEPAGE="https://www.libssh.org/"
+SRC_URI="https://red.libssh.org/attachments/download/218/${MY_P}.tar.xz -> ${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+SLOT="0/4" # subslot = soname major version
+IUSE="debug doc examples gcrypt gssapi libressl pcap server +sftp ssh1 static-libs test zlib"
+# Maintainer: check IUSE-defaults at DefineOptions.cmake
+
+RDEPEND="
+ !gcrypt? (
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
+ )
+ gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
+ gssapi? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? ( >=dev-util/cmocka-0.3.1[${MULTILIB_USEDEP}] )
+"
+
+DOCS=( AUTHORS README ChangeLog )
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.5.0-tests.patch
+ "${FILESDIR}"/${P}-fix-config-parsing.patch
+ "${FILESDIR}"/${P}-fix-config-buffer-underflow.patch
+ "${FILESDIR}"/${P}-add-macro-for-MAX.patch
+ "${FILESDIR}"/${P}-fix-internal-algo-selection.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # just install the examples do not compile them
+ sed -i \
+ -e '/add_subdirectory(examples)/s/^/#DONOTWANT/' \
+ CMakeLists.txt || die
+
+ # keyfile torture test is currently broken
+ sed -i \
+ -e '/torture_keyfiles/d' \
+ tests/unittests/CMakeLists.txt || die
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DWITH_DEBUG_CALLTRACE="$(usex debug)"
+ -DWITH_DEBUG_CRYPTO="$(usex debug)"
+ -DWITH_GCRYPT="$(usex gcrypt)"
+ -DWITH_GSSAPI="$(usex gssapi)"
+ -DWITH_NACL=no
+ -DWITH_PCAP="$(usex pcap)"
+ -DWITH_SERVER="$(usex server)"
+ -DWITH_SFTP="$(usex sftp)"
+ -DWITH_SSH1="$(usex ssh1)"
+ -DWITH_STATIC_LIB="$(usex static-libs)"
+ -DWITH_STATIC_LIB="$(usex test)"
+ -DWITH_TESTING="$(usex test)"
+ -DWITH_ZLIB="$(usex zlib)"
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+ multilib_is_native_abi && use doc && cmake-utils_src_compile doc
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+
+ if multilib_is_native_abi && use doc ; then
+ docinto html
+ dodoc -r doc/html/.
+ fi
+
+ use static-libs || rm -f "${D}"/usr/$(get_libdir)/libssh{,_threads}.a
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,h,cpp}
+ fi
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/files/, net-libs/libssh/
@ 2018-08-10 14:14 Lars Wendler
0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2018-08-10 14:14 UTC (permalink / raw
To: gentoo-commits
commit: 8c0e44cdbc4a118f47548a5029b9ae19fbf2c9a0
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 10 14:08:06 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Aug 10 14:14:34 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c0e44cd
net-libs/libssh: Bump to version 0.8.0
Closes: https://bugs.gentoo.org/614782
Package-Manager: Portage-2.3.45, Repoman-2.3.10
net-libs/libssh/Manifest | 1 +
net-libs/libssh/files/libssh-0.8.0-tests.patch | 11 +++
net-libs/libssh/libssh-0.8.0.ebuild | 110 +++++++++++++++++++++++++
net-libs/libssh/metadata.xml | 4 +-
4 files changed, 124 insertions(+), 2 deletions(-)
diff --git a/net-libs/libssh/Manifest b/net-libs/libssh/Manifest
index b52b353973c..211ef2cd8c7 100644
--- a/net-libs/libssh/Manifest
+++ b/net-libs/libssh/Manifest
@@ -1,2 +1,3 @@
DIST libssh-0.7.4.tar.xz 351892 BLAKE2B 5427faa04eac7b57f73909f113d933daf667f8311c30364bbf06d4f01121a58f5b560e0a1d9071655ce9b310fa3f3f801e11e880ca3eacde66efa0f49dc51b2b SHA512 94b8183e5c83e339303c1a160c92ccff6159471ac7d189ab66cf6d606d2e803fd616519f079aef1577c947d3a14e315332b05ea08e44d0ab550edbcb768dbea7
DIST libssh-0.7.5.tar.xz 351632 BLAKE2B b41cccb6215c5b7e66742171d91e1081d3c1bf44455b65a5992093d31b28db7a6375e815303e115e02b2458c734d9c61e4b1528ba905bf8a421ca2bbb7221ce6 SHA512 6c7f539899caaedf13d66fa2e0fac1a475ecdfe389131abcbdf908bdebc50a0b9e6b0d43e67e52aea85c32f6aa68e46ca2f50695992f82ded83489f445a8e775
+DIST libssh-0.8.0.tar.xz 409280 BLAKE2B ac777167db69a956ecee172995dac0d13781b80f395b79f2aa4b691da9d33c886ecbdfe12f9ee926525cc97f358ddbda4f31be719386ef78cebfc9be51626fe0 SHA512 63512871f77a3dee52ace4434844647d5715c08f7803e2ffee3b0aa1effe287452e7601df56f7628608d3d58b6cb48d5c909501457e7a3ead5414b7b260070f4
diff --git a/net-libs/libssh/files/libssh-0.8.0-tests.patch b/net-libs/libssh/files/libssh-0.8.0-tests.patch
new file mode 100644
index 00000000000..7ce84f89983
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.8.0-tests.patch
@@ -0,0 +1,11 @@
+--- libssh-0.8.0/tests/unittests/torture_misc.c
++++ libssh-0.8.0/tests/unittests/torture_misc.c
+@@ -361,7 +361,7 @@
+ #ifdef _WIN32
+ cmocka_unit_test(torture_path_expand_tilde_win),
+ #else
+- cmocka_unit_test(torture_path_expand_tilde_unix),
++ //cmocka_unit_test(torture_path_expand_tilde_unix),
+ #endif
+ cmocka_unit_test_setup_teardown(torture_path_expand_escape, setup, teardown),
+ cmocka_unit_test_setup_teardown(torture_path_expand_known_hosts, setup, teardown),
diff --git a/net-libs/libssh/libssh-0.8.0.ebuild b/net-libs/libssh/libssh-0.8.0.ebuild
new file mode 100644
index 00000000000..f29e2283d91
--- /dev/null
+++ b/net-libs/libssh/libssh-0.8.0.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P="${PN}-${PV/_rc/rc}"
+inherit cmake-multilib
+
+DESCRIPTION="Access a working SSH implementation by means of a library"
+HOMEPAGE="https://www.libssh.org/"
+
+if [[ "${PV}" == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.libssh.org/projects/libssh.git"
+else
+ inherit eapi7-ver
+ SRC_URI="https://www.libssh.org/files/$(ver_cut 1-2)/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0/4" # subslot = soname major version
+IUSE="debug doc examples gcrypt gssapi libressl mbedtls pcap server +sftp static-libs test zlib"
+# Maintainer: check IUSE-defaults at DefineOptions.cmake
+
+RDEPEND="
+ !gcrypt? (
+ !mbedtls? (
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
+ )
+ )
+ gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
+ gssapi? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+ mbedtls? ( net-libs/mbedtls[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? ( >=dev-util/cmocka-0.3.1[${MULTILIB_USEDEP}] )
+"
+
+REQUIRED_USE="?? ( gcrypt mbedtls )"
+
+DOCS=( AUTHORS README ChangeLog )
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.8.0-tests.patch"
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # just install the examples do not compile them
+ sed -i \
+ -e '/add_subdirectory(examples)/s/^/#DONOTWANT/' \
+ CMakeLists.txt || die
+
+ # keyfile torture test is currently broken
+ sed -i \
+ -e '/torture_keyfiles/d' \
+ tests/unittests/CMakeLists.txt || die
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DUNIT_TESTING="$(usex test)"
+ -DWITH_DEBUG_CALLTRACE="$(usex debug)"
+ -DWITH_DEBUG_CRYPTO="$(usex debug)"
+ -DWITH_GCRYPT="$(usex gcrypt)"
+ -DWITH_GSSAPI="$(usex gssapi)"
+ -DWITH_MBEDTLS="$(usex mbedtls)"
+ -DWITH_NACL=no
+ -DWITH_PCAP="$(usex pcap)"
+ -DWITH_SERVER="$(usex server)"
+ -DWITH_SFTP="$(usex sftp)"
+ -DWITH_STATIC_LIB="$(usex static-libs)"
+ -DWITH_STATIC_LIB="$(usex test)"
+ -DWITH_ZLIB="$(usex zlib)"
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+ multilib_is_native_abi && use doc && cmake-utils_src_compile doc
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+
+ if multilib_is_native_abi && use doc ; then
+ docinto html
+ dodoc -r doc/html/.
+ fi
+
+ use static-libs || rm -f "${D}"/usr/$(get_libdir)/libssh{,_threads}.a
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,h,cpp}
+ fi
+}
diff --git a/net-libs/libssh/metadata.xml b/net-libs/libssh/metadata.xml
index d4993171dff..fa9ac337d5e 100644
--- a/net-libs/libssh/metadata.xml
+++ b/net-libs/libssh/metadata.xml
@@ -6,9 +6,9 @@
<name>Gentoo KDE Project</name>
</maintainer>
<use>
- <flag name="gcrypt">Prefer <pkg>dev-libs/libgcrypt</pkg> over
- <pkg>dev-libs/openssl</pkg> for encryption</flag>
+ <flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> as TLS provider</flag>
<flag name="gssapi">Enable gssapi support</flag>
+ <flag name="mbedtls">Use <pkg>net-libs/mbedtls</pkg> as TLS provider</flag>
<flag name="pcap">Build with PCAP output support</flag>
<flag name="sftp">Build with SFTP support</flag>
<flag name="ssh1">Build with SSH1 support</flag>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/files/, net-libs/libssh/
@ 2019-07-01 11:58 Stefan Strogin
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Strogin @ 2019-07-01 11:58 UTC (permalink / raw
To: gentoo-commits
commit: 76c59c377a3f2cef432012075ebd9b2cec80102c
Author: Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 1 11:17:51 2019 +0000
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Mon Jul 1 11:57:37 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76c59c37
net-libs/libssh: add patch for LibreSSL
Closes: https://bugs.gentoo.org/688974
Package-Manager: Portage-2.3.67, Repoman-2.3.16
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>
net-libs/libssh/files/libssh-0.9.0-libressl.patch | 33 +++++++++++++++++++++++
net-libs/libssh/libssh-0.9.0.ebuild | 5 +++-
net-libs/libssh/libssh-9999.ebuild | 5 +++-
3 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/net-libs/libssh/files/libssh-0.9.0-libressl.patch b/net-libs/libssh/files/libssh-0.9.0-libressl.patch
new file mode 100644
index 00000000000..355e832308e
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.9.0-libressl.patch
@@ -0,0 +1,33 @@
+From 08bdd5b26388f92867ab03e36d73e32481faed88 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Mon, 1 Jul 2019 13:35:09 +0300
+Subject: [PATCH] libcrypto: fix compilation with LibreSSL
+
+LibreSSL does not support FIPS, so do not check it.
+
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+Upstream-Status: Submitted
+[https://www.libssh.org/archive/libssh/2019-07/0000000.html]
+---
+ include/libssh/libcrypto.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/include/libssh/libcrypto.h b/include/libssh/libcrypto.h
+index 541912b5..1a1df635 100644
+--- a/include/libssh/libcrypto.h
++++ b/include/libssh/libcrypto.h
+@@ -112,7 +112,11 @@ typedef BN_CTX* bignum_CTX;
+
+
+ /* Returns true if the OpenSSL is operating in FIPS mode */
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define ssh_fips_mode() (FIPS_mode() != 0)
++#else
++#define ssh_fips_mode() false
++#endif
+
+ #endif /* HAVE_LIBCRYPTO */
+
+--
+2.22.0
+
diff --git a/net-libs/libssh/libssh-0.9.0.ebuild b/net-libs/libssh/libssh-0.9.0.ebuild
index 19777b48ff3..14ceb5386a6 100644
--- a/net-libs/libssh/libssh-0.9.0.ebuild
+++ b/net-libs/libssh/libssh-0.9.0.ebuild
@@ -42,7 +42,10 @@ DEPEND="${RDEPEND}
DOCS=( AUTHORS README ChangeLog )
-PATCHES=( "${FILESDIR}/${PN}-0.8.0-tests.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-0.8.0-tests.patch"
+ "${FILESDIR}/${PN}-0.9.0-libressl.patch"
+)
src_prepare() {
cmake-utils_src_prepare
diff --git a/net-libs/libssh/libssh-9999.ebuild b/net-libs/libssh/libssh-9999.ebuild
index 19777b48ff3..14ceb5386a6 100644
--- a/net-libs/libssh/libssh-9999.ebuild
+++ b/net-libs/libssh/libssh-9999.ebuild
@@ -42,7 +42,10 @@ DEPEND="${RDEPEND}
DOCS=( AUTHORS README ChangeLog )
-PATCHES=( "${FILESDIR}/${PN}-0.8.0-tests.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-0.8.0-tests.patch"
+ "${FILESDIR}/${PN}-0.9.0-libressl.patch"
+)
src_prepare() {
cmake-utils_src_prepare
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/files/, net-libs/libssh/
@ 2022-08-30 22:21 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-08-30 22:21 UTC (permalink / raw
To: gentoo-commits
commit: 68be73afc06c27eeeef724acbaa6ff5b20dacc3f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 30 22:20:55 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 30 22:21:19 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68be73af
net-libs/libssh: add 0.10.1
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-libs/libssh/Manifest | 1 +
.../files/libssh-0.10.1-disable-broken-test.patch | 28 +++++++++++++++++++
.../{libssh-9999.ebuild => libssh-0.10.1.ebuild} | 31 +++++++++++++---------
net-libs/libssh/libssh-9999.ebuild | 31 +++++++++++++---------
4 files changed, 65 insertions(+), 26 deletions(-)
diff --git a/net-libs/libssh/Manifest b/net-libs/libssh/Manifest
index e353f0232c89..f4d48d1a6473 100644
--- a/net-libs/libssh/Manifest
+++ b/net-libs/libssh/Manifest
@@ -1,2 +1,3 @@
DIST libssh-0.10.0.tar.xz 553384 BLAKE2B 4a57e2095a4f56d06b2be591e02c9b9ded5e1fa28ed2774389a2902a8277f6e6b99014f8868f0740ca2900409d33b968f65c9eaa312e259926436afb49fc108c SHA512 d97235f78b94a980aabc844ee7614108944967441219f0c2417b207734d5200eb26efd5fd6de0da97a34fb612b843dc0a3b32a3364c1d8333e4c49680212aaaa
+DIST libssh-0.10.1.tar.xz 553808 BLAKE2B 1e0a648153122619e473481484af70b9c388e75a6586a7b5ea605fede4a592f2f1ae2978c19762ac396d3dff2a3dd03451ee293c9fbd4f861a1bb5668e2489b7 SHA512 d56b2809527d4f3c1d88881b8f7a7cd49321df8abe4fde011dfe7323e7552641b36a607f3b1b37c26703adae01d0176fc3d71c6c207598aaae5ebdf10237742e
DIST libssh-0.9.6.tar.xz 1053056 BLAKE2B e8565279a430786b8877386a26700a39386e908546a209815b135a2bf4ef42c37b9890dc29cda9ce6c8bfe3f3bae4942097dc794302aec767d106a45c44b811d SHA512 4040ec4af937e95be2e41313ef6d4db60b46b8d4dea10c09402398127c1d1ca8843392d207088aeee3c7ef631c6ae7b66861327dcebf78ed3af0723777619fd1
diff --git a/net-libs/libssh/files/libssh-0.10.1-disable-broken-test.patch b/net-libs/libssh/files/libssh-0.10.1-disable-broken-test.patch
new file mode 100644
index 000000000000..0e91bedaef6e
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.10.1-disable-broken-test.patch
@@ -0,0 +1,28 @@
+https://sources.debian.org/patches/libssh/0.9.6-2/2003-disable-expand_tilde_unix-test.patch/
+
+Description: Disable torture_path_expand_tilde_unix, its not working well on buildd
+ On buildd, the HOME is set to a non-existing directory, this makes
+ torture_path_expand_tilde_unix fail
+Author: Laurent Bigonville <bigon@debian.org>
+Forwarded: not-needed
+
+--- a/tests/unittests/torture_misc.c
++++ b/tests/unittests/torture_misc.c
+@@ -662,11 +662,11 @@ int torture_run_tests(void) {
+ cmocka_unit_test(torture_basename),
+ cmocka_unit_test(torture_dirname),
+ cmocka_unit_test(torture_ntohll),
+-#ifdef _WIN32
+- cmocka_unit_test(torture_path_expand_tilde_win),
+-#else
+- cmocka_unit_test(torture_path_expand_tilde_unix),
+-#endif
++//#ifdef _WIN32
++// cmocka_unit_test(torture_path_expand_tilde_win),
++//#else
++// cmocka_unit_test(torture_path_expand_tilde_unix),
++//#endif
+ cmocka_unit_test_setup_teardown(torture_path_expand_escape, setup, teardown),
+ cmocka_unit_test_setup_teardown(torture_path_expand_known_hosts, setup, teardown),
+ cmocka_unit_test_setup_teardown(torture_path_expand_percent, setup, teardown),
+
diff --git a/net-libs/libssh/libssh-9999.ebuild b/net-libs/libssh/libssh-0.10.1.ebuild
similarity index 85%
copy from net-libs/libssh/libssh-9999.ebuild
copy to net-libs/libssh/libssh-0.10.1.ebuild
index 9b897cf8885e..25b41a81f804 100644
--- a/net-libs/libssh/libssh-9999.ebuild
+++ b/net-libs/libssh/libssh-0.10.1.ebuild
@@ -45,7 +45,9 @@ BDEPEND="doc? ( app-doc/doxygen[dot] )"
DOCS=( AUTHORS CHANGELOG README )
-PATCHES=( "${FILESDIR}/${PN}-0.8.0-tests.patch" )
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.10.1-disable-broken-test.patch
+)
src_prepare() {
cmake_src_prepare
@@ -53,22 +55,24 @@ src_prepare() {
# just install the examples, do not compile them
cmake_comment_add_subdirectory examples
- # keyfile torture test is currently broken
- sed -e "/torture_keyfiles/d" \
- -i tests/unittests/CMakeLists.txt || die
+ sed -e "/^check_include_file.*HAVE_VALGRIND_VALGRIND_H/s/^/#DONT /" \
+ -i ConfigureChecks.cmake || die
- # disable tests that take too long (bug #677006)
- if use sparc; then
- sed -e "/torture_threads_pki_rsa/d" -e "/torture_pki_dsa/d" \
+ if use test; then
+ # keyfile torture test is currently broken
+ sed -e "/torture_keyfiles/d" \
-i tests/unittests/CMakeLists.txt || die
- fi
- sed -e "/^check_include_file.*HAVE_VALGRIND_VALGRIND_H/s/^/#DONT /" \
- -i ConfigureChecks.cmake || die
+ # disable tests that take too long (bug #677006)
+ if use sparc; then
+ sed -e "/torture_threads_pki_rsa/d" -e "/torture_pki_dsa/d" \
+ -i tests/unittests/CMakeLists.txt || die
+ fi
- if use test && use elibc_musl; then
- sed -e "/SOLARIS/d" \
- -i tests/CMakeLists.txt || die
+ if use elibc_musl; then
+ sed -e "/SOLARIS/d" \
+ -i tests/CMakeLists.txt || die
+ fi
fi
}
@@ -86,6 +90,7 @@ multilib_src_configure() {
-DWITH_SERVER=$(usex server)
-DWITH_SFTP=$(usex sftp)
-DBUILD_STATIC_LIB=$(usex static-libs)
+ # TODO: try enabling {CLIENT,SERVER}_TESTING
-DUNIT_TESTING=$(usex test)
-DWITH_ZLIB=$(usex zlib)
)
diff --git a/net-libs/libssh/libssh-9999.ebuild b/net-libs/libssh/libssh-9999.ebuild
index 9b897cf8885e..25b41a81f804 100644
--- a/net-libs/libssh/libssh-9999.ebuild
+++ b/net-libs/libssh/libssh-9999.ebuild
@@ -45,7 +45,9 @@ BDEPEND="doc? ( app-doc/doxygen[dot] )"
DOCS=( AUTHORS CHANGELOG README )
-PATCHES=( "${FILESDIR}/${PN}-0.8.0-tests.patch" )
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.10.1-disable-broken-test.patch
+)
src_prepare() {
cmake_src_prepare
@@ -53,22 +55,24 @@ src_prepare() {
# just install the examples, do not compile them
cmake_comment_add_subdirectory examples
- # keyfile torture test is currently broken
- sed -e "/torture_keyfiles/d" \
- -i tests/unittests/CMakeLists.txt || die
+ sed -e "/^check_include_file.*HAVE_VALGRIND_VALGRIND_H/s/^/#DONT /" \
+ -i ConfigureChecks.cmake || die
- # disable tests that take too long (bug #677006)
- if use sparc; then
- sed -e "/torture_threads_pki_rsa/d" -e "/torture_pki_dsa/d" \
+ if use test; then
+ # keyfile torture test is currently broken
+ sed -e "/torture_keyfiles/d" \
-i tests/unittests/CMakeLists.txt || die
- fi
- sed -e "/^check_include_file.*HAVE_VALGRIND_VALGRIND_H/s/^/#DONT /" \
- -i ConfigureChecks.cmake || die
+ # disable tests that take too long (bug #677006)
+ if use sparc; then
+ sed -e "/torture_threads_pki_rsa/d" -e "/torture_pki_dsa/d" \
+ -i tests/unittests/CMakeLists.txt || die
+ fi
- if use test && use elibc_musl; then
- sed -e "/SOLARIS/d" \
- -i tests/CMakeLists.txt || die
+ if use elibc_musl; then
+ sed -e "/SOLARIS/d" \
+ -i tests/CMakeLists.txt || die
+ fi
fi
}
@@ -86,6 +90,7 @@ multilib_src_configure() {
-DWITH_SERVER=$(usex server)
-DWITH_SFTP=$(usex sftp)
-DBUILD_STATIC_LIB=$(usex static-libs)
+ # TODO: try enabling {CLIENT,SERVER}_TESTING
-DUNIT_TESTING=$(usex test)
-DWITH_ZLIB=$(usex zlib)
)
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-30 22:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-30 22:21 [gentoo-commits] repo/gentoo:master commit in: net-libs/libssh/files/, net-libs/libssh/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2019-07-01 11:58 Stefan Strogin
2018-08-10 14:14 Lars Wendler
2018-03-13 10:47 Lars Wendler
2017-08-15 13:41 Andreas Sturmlechner
2016-03-20 17:23 Lars Wendler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox