commit: 390246e0aa580e66e866d8e6a8e9088260272a98
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 21 02:20:52 2026 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 21 02:20:52 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=390246e0
net-libs/libssh: wire up verify-sig
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-libs/libssh/Manifest | 1 +
net-libs/libssh/libssh-0.11.3.ebuild | 25 ++++++++++++++++++++++---
net-libs/libssh/libssh-9999.ebuild | 25 ++++++++++++++++++++++---
3 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/net-libs/libssh/Manifest b/net-libs/libssh/Manifest
index ec88a274afb1..2bfd2ea7f22e 100644
--- a/net-libs/libssh/Manifest
+++ b/net-libs/libssh/Manifest
@@ -1,2 +1,3 @@
DIST libssh-0.11.2.tar.xz 619428 BLAKE2B
7f4a97b2027e386f5bfd308b1aac1938484722d4d1bb55ce0fa2de8358bedea47955df1cb4e68679033d1a5538058422770872f2f6513a82199ff506eccfad0e
SHA512
15d56c3f82ee81c3ab4af2b17eba054626bb53c3337ef45f829479f8b64c552f6e7cbf307e41c9792bcb3438f282d2690acbe994150bd03a8b6c21ba8b1cfe50
DIST libssh-0.11.3.tar.xz 622776 BLAKE2B
859e4af9bf6305e54175e456d153a85e678a6fc49ac184dbe09d94ab01dde42f0321f5a2ac35cf4ca9df188daab6c4bf3171dcd8a3776419a3a1a20474ccf89a
SHA512
0670bee29a7cf5507dba7dd82b82cd8a926b83a43cee441fa8a698be2523b16aacb392433f9e63887bd72e6eb817667f6ef986f292f335d1856759af4ede40c4
+DIST libssh-0.11.3.tar.xz.asc 833 BLAKE2B
496c32ab055ad8b5413af28078bd4f28923e91af311ed02d6b1b4cb4868777942472efda1c46c6df4b6ffa27a14420f94b4ebda7bb2839511e41fcbda1a5e82d
SHA512
c9801aabb9aa2ca61f2ee5ddb328b6661bb8c319a7dbfa228af43e1cd04c9c6c227ceeeedd5a4b5ec780dc031a3cbe6fe7eb2b8a6bea2f460e4316b7fc0710da
diff --git a/net-libs/libssh/libssh-0.11.3.ebuild
b/net-libs/libssh/libssh-0.11.3.ebuild
index 63f02653b90d..7595cf756eee 100644
--- a/net-libs/libssh/libssh-0.11.3.ebuild
+++ b/net-libs/libssh/libssh-0.11.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,8 +12,14 @@ if [[ ${PV} == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://git.libssh.org/projects/libssh.git"
else
- SRC_URI="https://www.libssh.org/files/$(ver_cut 1-2)/${P}.tar.xz"
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libssh.asc
+ inherit verify-sig
+ SRC_URI="
+ https://www.libssh.org/files/$(ver_cut 1-2)/${P}.tar.xz
+ verify-sig? ( https://www.libssh.org/files/$(ver_cut
1-2)/${P}.tar.xz.asc )
+ "
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv
~s390 ~sparc x86"
+ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-libssh )"
fi
LICENSE="LGPL-2.1"
@@ -35,10 +41,23 @@ DEPEND="
elibc_musl? ( sys-libs/argp-standalone )
)
"
-BDEPEND="doc? ( app-text/doxygen[dot] )"
+BDEPEND+=" doc? ( app-text/doxygen[dot] )"
DOCS=( AUTHORS CHANGELOG README )
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ return
+ fi
+
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.asc}
+ fi
+
+ default
+}
+
src_prepare() {
# Remove custom find module to use system one
rm cmake/Modules/FindMbedTLS.cmake || die
diff --git a/net-libs/libssh/libssh-9999.ebuild
b/net-libs/libssh/libssh-9999.ebuild
index b5f6fee5879b..a4a0ee906ffe 100644
--- a/net-libs/libssh/libssh-9999.ebuild
+++ b/net-libs/libssh/libssh-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,8 +12,14 @@ if [[ ${PV} == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://git.libssh.org/projects/libssh.git"
else
- SRC_URI="https://www.libssh.org/files/$(ver_cut 1-2)/${P}.tar.xz"
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libssh.asc
+ inherit verify-sig
+ SRC_URI="
+ https://www.libssh.org/files/$(ver_cut 1-2)/${P}.tar.xz
+ verify-sig? ( https://www.libssh.org/files/$(ver_cut
1-2)/${P}.tar.xz.asc )
+ "
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64
~riscv ~s390 ~sparc ~x86"
+ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-libssh )"
fi
LICENSE="LGPL-2.1"
@@ -35,10 +41,23 @@ DEPEND="
elibc_musl? ( sys-libs/argp-standalone )
)
"
-BDEPEND="doc? ( app-text/doxygen[dot] )"
+BDEPEND+=" doc? ( app-text/doxygen[dot] )"
DOCS=( AUTHORS CHANGELOG README )
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ return
+ fi
+
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.asc}
+ fi
+
+ default
+}
+
src_prepare() {
# Remove custom find module to use system one
rm cmake/Modules/FindMbedTLS.cmake || die