aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahil Bhimjiani <me@rahil.rocks>2024-06-15 12:24:59 +0530
committerRahil Bhimjiani <me@rahil.rocks>2024-06-15 12:24:59 +0530
commitcbb8d17758903776d4b7fe494b932fddde224a6e (patch)
treee200436f39f0ecb24dec058e5b35315f132456ba /app-crypt
parentnet-dns/blocky: update to 0.24 (diff)
downloadguru-cbb8d17758903776d4b7fe494b932fddde224a6e.tar.gz
guru-cbb8d17758903776d4b7fe494b932fddde224a6e.tar.bz2
guru-cbb8d17758903776d4b7fe494b932fddde224a6e.zip
app-crypt/lego: update to 4.17.4
* significantly reduce deps tarball size 202 MiB -> 6.4 MiB using `go mod vendor` Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/lego/Manifest3
-rw-r--r--app-crypt/lego/lego-4.17.4.ebuild87
-rw-r--r--app-crypt/lego/lego-9999.ebuild5
3 files changed, 93 insertions, 2 deletions
diff --git a/app-crypt/lego/Manifest b/app-crypt/lego/Manifest
index 0cc3a5acf..7495cddf7 100644
--- a/app-crypt/lego/Manifest
+++ b/app-crypt/lego/Manifest
@@ -9,3 +9,6 @@ DIST lego-4.16.0-docs.tar.gz 3681408 BLAKE2B 3be8f0a8d9aaa13e4ff3bf0bd8b928bc7be
DIST lego-4.16.0.tar.gz 698821 BLAKE2B 9058f856a477c70c12352df4786e18dadf444df60ed462411367a8aa18ce1e98ede4358e6aad8032d5d3230341fd7e544343bda27fd92c46c494e0a5eb683f35 SHA512 ba40fdcd94cb1f12d609104d1af5c8e398f3a3d70e4d2a0b65365b401b6928149749778de9acb138e9548d634ea210641c07d2218135f2e4c903a39947f206e5
DIST lego-4.16.1-docs.tar.gz 3681606 BLAKE2B 9f80ba3f132eb08b06a960c8a9bdcf372a7925bdc931a078385ff1b6b9f01981d76758c15cc3f8c35f48e461bdc84f5a4d6a7b9a6b1aadbda249ca4d27459bc3 SHA512 1c953edd93b6d56b0b1bd48519b745d7ebfce9df76d6c92cccde88e4aff814de19d9a68e3d949f517530acaf738def97550d1a866e156a8d03e9ff644766df35
DIST lego-4.16.1.tar.gz 698801 BLAKE2B 005be7bf3462d941de99c46b659776f2b69b9298819a23009060fbf0f7532c62eae3512c10619f034916eaa3c20b9607d78786cf5ec023df139cc6c186b0df20 SHA512 a65c661fc003cc26c13ed6b38719a0ab49a8fe8e2a18c59c84e5c974b918aaf0c55c92015d2794a17b4fe5ac31c3557a4d5e1971527441b8bdf80907fe4b90e9
+DIST lego-4.17.4-deps.tar.xz 6737692 BLAKE2B 3c5ed3ed9eb2cd6ce75c26d822cd75f1e20ac0802f77811f68cab79631ab69d5e0d1493bf037280d6d422c1acefa900858e41387fea8c0f32c55aab80f243a8e SHA512 84bfd2b1deccea61f98f4fed41920622272ca6786877c74879a6f556d911c5a7bfd2147cde8eae87ae1c58549a3e78fa8544af030d2bff29c19139237389a045
+DIST lego-4.17.4-docs.tar.gz 3694481 BLAKE2B bccfa16f8bdd4fea165ef5fa1051b5d3b6d39ad55438791d997376015568215fb5ec0485bdef5246bcc725622f7ff412446eca48d60ec906f75d253532a3d556 SHA512 e4d910e68a312e7d193f5e2953956232f00b24a01ab47cb0bc8e5c7002143ea1e3d708af932a762c3a3abeca692f92d6ab62da172eea28a1ffe28e7b8ff4cad5
+DIST lego-4.17.4.tar.gz 710264 BLAKE2B 822cfbbf084477ea34cf263b66a54a9ab6b1307a99b463cb4da8488321e9da3d8e7260664a5261444e8d9a8c0508da8f60ab0887875846e040187a214eb13a42 SHA512 28118b6a7677dcca9b1476cbba4eb9d1ef0eda68ddc8b3db83b50a77bc8721fbe77ab5da9d66b1e7c4b75097f3a1aa64b60d0f58ebb36bbfdfc284ae5dabcfc1
diff --git a/app-crypt/lego/lego-4.17.4.ebuild b/app-crypt/lego/lego-4.17.4.ebuild
new file mode 100644
index 000000000..0a162fb3a
--- /dev/null
+++ b/app-crypt/lego/lego-4.17.4.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module
+
+DESCRIPTION="Let's Encrypt/ACME client (like certbot or acme.sh) and library written in Go"
+HOMEPAGE="https://github.com/go-acme/lego/"
+
+DOCUMENTATION_COMMIT=5b9931c1cf7c95b3e6bd5bf37126701d0327a08f
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/go-acme/lego.git"
+else
+ SRC_URI="
+ https://github.com/go-acme/lego/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz
+ doc? ( https://github.com/go-acme/lego/archive/${DOCUMENTATION_COMMIT}.tar.gz -> ${P}-docs.tar.gz )
+"
+ KEYWORDS="~amd64 ~arm64"
+fi
+
+# main
+LICENSE="MIT"
+# deps
+LICENSE+=" Apache-2.0 BSD-2 BSD ISC MPL-2.0"
+SLOT="0"
+IUSE="doc"
+
+# some tests require network access otherwise get following error
+# expected: "zoneee: unexpected status code: [status code: 401] body: Unauthorized"
+# actual : "zoneee: could not find zone for domain \"prefix.example.com\" (_acme-challenge.prefix.example.com.): could not find the start of authority for _acme-challenge.prefix.example.com.: read udp 10.0.0.1:54729->10.0.0.1:53: read: connection refused"
+PROPERTIES="test_network"
+RESTRICT="test"
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]]; then
+ git-r3_src_unpack
+ go-module_live_vendor
+ if use doc; then
+ EGIT_BRANCH="gh-pages"
+ EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}-${DOCUMENTATION_COMMIT}"
+ git-r3_src_unpack
+ fi
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ default
+ if use doc; then
+ find ../"${PN}"-"${DOCUMENTATION_COMMIT}"/ -type f -not -name '*.html' -delete || die
+ fi
+
+}
+
+src_compile() {
+ export CGO_ENABLED=0
+
+ local VERSION
+ if [[ ${PV} == 9999* ]]; then
+ VERSION="$(git rev-parse HEAD)" || die
+ else
+ VERSION="${PV}"
+ ln -sv ../vendor ./ || die
+ fi
+
+ ego build -trimpath -ldflags "-X main.version=${VERSION}" -o dist/"${PN}" ./cmd/lego/
+}
+
+src_test() {
+ ego test -v -cover ./...
+}
+
+src_install() {
+ # primary program
+ dobin dist/"${PN}"
+
+ # docs
+ einstalldocs
+ if use doc; then
+ dodoc -r ../"${PN}"-"${DOCUMENTATION_COMMIT}"/*
+ fi
+}
diff --git a/app-crypt/lego/lego-9999.ebuild b/app-crypt/lego/lego-9999.ebuild
index c4ae98059..0a162fb3a 100644
--- a/app-crypt/lego/lego-9999.ebuild
+++ b/app-crypt/lego/lego-9999.ebuild
@@ -8,7 +8,7 @@ inherit go-module
DESCRIPTION="Let's Encrypt/ACME client (like certbot or acme.sh) and library written in Go"
HOMEPAGE="https://github.com/go-acme/lego/"
-DOCUMENTATION_COMMIT=14be9e1e1c33a1e370b7fc76ebe3e6fba938c87d
+DOCUMENTATION_COMMIT=5b9931c1cf7c95b3e6bd5bf37126701d0327a08f
if [[ ${PV} == 9999* ]]; then
inherit git-r3
@@ -45,7 +45,7 @@ src_unpack() {
git-r3_src_unpack
fi
else
- go-module_src_unpack
+ default
fi
}
@@ -65,6 +65,7 @@ src_compile() {
VERSION="$(git rev-parse HEAD)" || die
else
VERSION="${PV}"
+ ln -sv ../vendor ./ || die
fi
ego build -trimpath -ldflags "-X main.version=${VERSION}" -o dist/"${PN}" ./cmd/lego/