summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2023-05-05 11:00:00 -0400
committerMike Gilbert <floppym@gentoo.org>2023-05-05 11:00:21 -0400
commit0708b3a09f8be763316d3bc560cbca7da80847a9 (patch)
tree7fbf17179861e84c332a863061ce6bfe8dd525b1 /net-vpn
parentnet-vpn/ocserv: drop 1.0.1-r1, 1.1.3 (diff)
downloadgentoo-0708b3a09f8be763316d3bc560cbca7da80847a9.tar.gz
gentoo-0708b3a09f8be763316d3bc560cbca7da80847a9.tar.bz2
gentoo-0708b3a09f8be763316d3bc560cbca7da80847a9.zip
net-vpn/ocserv: wire up verify-sig
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/ocserv/Manifest1
-rw-r--r--net-vpn/ocserv/ocserv-1.1.6.ebuild21
-rw-r--r--net-vpn/ocserv/ocserv-9999.ebuild21
3 files changed, 37 insertions, 6 deletions
diff --git a/net-vpn/ocserv/Manifest b/net-vpn/ocserv/Manifest
index 2352ae6b3fde..16ced146731d 100644
--- a/net-vpn/ocserv/Manifest
+++ b/net-vpn/ocserv/Manifest
@@ -1 +1,2 @@
DIST ocserv-1.1.6.tar.xz 839744 BLAKE2B 3b3591588d9a5be4e723df739a5d8b4c33d78d536ecb169263c83cf8bedfdaab1a3d06e6dc11544acbede135626d37d98f2bc26b95ff80abb3f0e99f4688b7f6 SHA512 d1c5e5cf0e84aab168ed51516534df8b2968194dd1421f33563c61b3e47d5d79ebe9e6ffbf7cbcc9ff1242fae05151024f70ef586d063bec0b3eec00050bfdfa
+DIST ocserv-1.1.6.tar.xz.sig 442 BLAKE2B d24c46783f273bd329267cb3ba4effe0280655867e619bf0a3e4191386fa8851541fcd8768b0b1068e594caaf510ceeccfc30641169679ec394706fdf1ebe319 SHA512 2a87768ad63d40053732fa011bbeb3532c9673296b9be299bf8f7d8dd3dd35571eee96c0b4fa9bf5a30633b4c844337ab3d562d6ea2b6ad8efca084eb5e6f502
diff --git a/net-vpn/ocserv/ocserv-1.1.6.ebuild b/net-vpn/ocserv/ocserv-1.1.6.ebuild
index 85c409912412..cb0b28a4a458 100644
--- a/net-vpn/ocserv/ocserv-1.1.6.ebuild
+++ b/net-vpn/ocserv/ocserv-1.1.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Gentoo Authors
+# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -9,7 +9,11 @@ if [[ ${PV} == 9999 ]]; then
inherit autotools git-r3
EGIT_REPO_URI="https://gitlab.com/openconnect/ocserv.git"
else
- SRC_URI="ftp://ftp.infradead.org/pub/ocserv/${P}.tar.xz"
+ inherit verify-sig
+ VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/ocserv.asc"
+ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-ocserv )"
+ SRC_URI="https://www.infradead.org/ocserv/download/${P}.tar.xz
+ verify-sig? ( https://www.infradead.org/ocserv/download/${P}.tar.xz.sig )"
KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
fi
@@ -21,7 +25,7 @@ SLOT="0"
IUSE="geoip kerberos +lz4 otp pam radius +seccomp systemd tcpd test"
RESTRICT="!test? ( test )"
-BDEPEND="
+BDEPEND+="
virtual/pkgconfig
test? (
net-libs/gnutls[tools(+)]
@@ -55,6 +59,17 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz"{,.sig}
+ fi
+ unpack "${P}.tar.xz"
+ fi
+}
+
src_prepare() {
default
if [[ ${PV} == 9999 ]]; then
diff --git a/net-vpn/ocserv/ocserv-9999.ebuild b/net-vpn/ocserv/ocserv-9999.ebuild
index b28feddc1b05..ae6884026608 100644
--- a/net-vpn/ocserv/ocserv-9999.ebuild
+++ b/net-vpn/ocserv/ocserv-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Gentoo Authors
+# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -9,7 +9,11 @@ if [[ ${PV} == 9999 ]]; then
inherit autotools git-r3
EGIT_REPO_URI="https://gitlab.com/openconnect/ocserv.git"
else
- SRC_URI="ftp://ftp.infradead.org/pub/ocserv/${P}.tar.xz"
+ inherit verify-sig
+ VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/ocserv.asc"
+ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-ocserv )"
+ SRC_URI="https://www.infradead.org/ocserv/download/${P}.tar.xz
+ verify-sig? ( https://www.infradead.org/ocserv/download/${P}.tar.xz.sig )"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
fi
@@ -21,7 +25,7 @@ SLOT="0"
IUSE="geoip kerberos +lz4 otp pam radius +seccomp systemd tcpd test"
RESTRICT="!test? ( test )"
-BDEPEND="
+BDEPEND+="
virtual/pkgconfig
test? (
net-libs/gnutls[tools(+)]
@@ -55,6 +59,17 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}/${P}.tar.xz"{,.sig}
+ fi
+ unpack "${P}.tar.xz"
+ fi
+}
+
src_prepare() {
default
if [[ ${PV} == 9999 ]]; then