summaryrefslogtreecommitdiff
path: root/app-crypt/dehydrated
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/dehydrated')
-rw-r--r--app-crypt/dehydrated/Manifest3
-rw-r--r--app-crypt/dehydrated/dehydrated-0.7.0.ebuild50
-rw-r--r--app-crypt/dehydrated/files/dehydrated-0.7.0-fix-CN-extraction-for-older-openssl-versions.patch30
3 files changed, 83 insertions, 0 deletions
diff --git a/app-crypt/dehydrated/Manifest b/app-crypt/dehydrated/Manifest
index 49ee4bc796d3..0c025e26f6a9 100644
--- a/app-crypt/dehydrated/Manifest
+++ b/app-crypt/dehydrated/Manifest
@@ -1,5 +1,8 @@
AUX 00_gentoo.sh 115 BLAKE2B f24fe757e45d9af58adb9417ef6dbd36c5db85bdc50af1403048a01625dac68e649fee2913ed2c9f199ec285666cb4b9100650b3b1b54929005260c2182adb49 SHA512 2092f8bffbc6b34fa806276194873fed42146d8c8a434bb68088e03ec9eb0a2e0c1862a9ade67d56a6bd553119cd00f8815353b71345e451039254708430e52b
AUX cron 71 BLAKE2B 88ec5a0d8618bc9e058d4cb3fedb0f74a530828bf63dd58a267386bd3ed2c3b647a642bfca14f6b05161d13266983bf5672787c7fc5c44e55d953ebebf346259 SHA512 0a8ac29abf2ce84b7b429ec969a3fcbfbab3ba0ed854237efa9bc86eb62859138b027f8879e016d4bedabc788ead0bb5d55ea5b629687c0c980cb63b225852b6
+AUX dehydrated-0.7.0-fix-CN-extraction-for-older-openssl-versions.patch 1179 BLAKE2B d4925675e868e24e2bd38aa0444e9b934e351fb706be5b66e71315d213186719260c20ebb976c160b1458eed1f14416ed6d27dad79a6b39b08cca50285802cb9 SHA512 2f18fa75ea6674b9b8746645395317046012f01032e35736580d87ac9a410ec4641e81c5f307d31bb238a53886b30820cde778bf83e3d04083ae1b6323777307
DIST dehydrated-0.6.5.tar.gz 82274 BLAKE2B 3c8138bafdaab9c60db1463860d6c16dd0fb8e686f368e55a4fa010d004f350d03cdd161dde38361411506959f896a25ef802b76432c0fcd89a69d75fe1be9c9 SHA512 da8ff3ecb7ddeb25356469fa272aef4e7c3705049caf88d09656dbc4baf29e0efa135e6f154c78cec82da17a27a78f2145ee3b7bd71521a080e10550d09b8a53
+DIST dehydrated-0.7.0.tar.gz 86574 BLAKE2B 35a3b0b7592126ca65003a6c9eb8934a76584710d028057e5add7f77bb2fa3799e89a060306da3b98a62d291229a2a78f23e0f95f19e033796aee31e97b94488 SHA512 47740d2d31ca73482a4fc5ed0dfce986af907dd5449cb3a5230bf9683845686c8122fc32e6219a4439574ef11d6fb104ee09591c5ff667927a2c9c13ba005511
EBUILD dehydrated-0.6.5.ebuild 1670 BLAKE2B a56a2e470747449996491568e960a663b9b45d58d22e0ae242ecb91d4b3b03024c4b7ba74b632cffc945094a55b2f03c25ed2b281f973e27431c4ca343b942be SHA512 619518a0d6224ac0cac0d08e796ab34d456b500f39afe54fc226c191d26bcdf2f7acaa11e50f96b798ff8e6d0930193872613b04b8ffbaf9b83370e9f1342bac
+EBUILD dehydrated-0.7.0.ebuild 1259 BLAKE2B a489aee59c6fc77010fff133552e86d178dbac6ea18014d244620e3421acf8fcb324b0071db4a1242b443f639d71553a9e79b2173023e1cdfa2b83bae6df7f94 SHA512 f2d1089bd25f484f96dd423fe4cddd5fe4e203d067f43440818641ebf496a4cc87da70e0708eb6ff2cd17b53d43f416a8bc1fc0e890bd0481d89471c5839daf6
MISC metadata.xml 531 BLAKE2B dcd597fde3bafe2970275a99609546b1a2ef764729cd410a62389a29f8ce95e269f2155970503e041c937a28026c3d70763c86f492c4a8a3478026125eb5eecc SHA512 fe42f3b7b8ca0d2f18d389348599f468eaa80928a05fa7151bae23f5dd73d260fca6ebd3a701eed450b639438e44ca038aef420732e92ab9ddc672c0022bfbdd
diff --git a/app-crypt/dehydrated/dehydrated-0.7.0.ebuild b/app-crypt/dehydrated/dehydrated-0.7.0.ebuild
new file mode 100644
index 000000000000..a0b9dd29497c
--- /dev/null
+++ b/app-crypt/dehydrated/dehydrated-0.7.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+DESCRIPTION="a client for signing certificates with an ACME-server"
+HOMEPAGE="https://github.com/lukas2511/dehydrated"
+SRC_URI="https://github.com/lukas2511/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="+cron"
+
+RDEPEND="acct-group/dehydrated
+ acct-user/dehydrated
+ app-shells/bash
+ net-misc/curl
+ cron? ( virtual/cron )"
+
+PATCHES=( "${FILESDIR}"/${P}-fix-CN-extraction-for-older-openssl-versions.patch )
+
+src_configure() {
+ default
+ sed -i 's,^#CONFIG_D=.*,CONFIG_D="/etc/dehydrated/config.d",' docs/examples/config || die "could not set config (CONFIG_D)"
+}
+
+src_install() {
+ dobin ${PN}
+ insinto /etc/${PN}
+ doins docs/examples/{config,domains.txt,hook.sh}
+ fperms u+x /etc/${PN}/hook.sh
+ dodoc docs/*.md
+
+ insinto /etc/${PN}/config.d
+ doins "${FILESDIR}"/00_gentoo.sh
+
+ if use cron ; then
+ insinto /etc/cron.d
+ newins "${FILESDIR}"/cron ${PN}
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo "See /etc/dehydrated/config for configuration."
+
+ use cron && einfo "After finishing setup you should enable the cronjob in /etc/cron.d/dehydrated."
+ fi
+}
diff --git a/app-crypt/dehydrated/files/dehydrated-0.7.0-fix-CN-extraction-for-older-openssl-versions.patch b/app-crypt/dehydrated/files/dehydrated-0.7.0-fix-CN-extraction-for-older-openssl-versions.patch
new file mode 100644
index 000000000000..91188fbe3587
--- /dev/null
+++ b/app-crypt/dehydrated/files/dehydrated-0.7.0-fix-CN-extraction-for-older-openssl-versions.patch
@@ -0,0 +1,30 @@
+From 29b67962ac07d5d2b24f69c863a9ef31e8ac53ee Mon Sep 17 00:00:00 2001
+From: Lukas Schauer <lukas@schauer.so>
+Date: Fri, 11 Dec 2020 18:02:51 +0100
+Subject: [PATCH] fix CN extraction for older openssl versions
+
+---
+ dehydrated | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/dehydrated b/dehydrated
+index 622165e..37e0ab6 100755
+--- a/dehydrated
++++ b/dehydrated
+@@ -926,14 +926,14 @@ extract_altnames() {
+ printf "%s" "${altnames}" | tr '\n' ' '
+ else
+ # No SANs, extract CN
+- altnames="$( <<<"${reqtext}" grep '^[[:space:]]*Subject:' | _sed -e 's/.* CN ?= ?([^ /,]*).*/\1/' )"
++ altnames="$( <<<"${reqtext}" grep '^[[:space:]]*Subject:' | _sed -e 's/.*[ /]CN ?= ?([^ /,]*).*/\1/' )"
+ printf "%s" "${altnames}"
+ fi
+ }
+
+ # Get last issuer CN in certificate chain
+ get_last_cn() {
+- <<<"${1}" _sed 'H;/-----BEGIN CERTIFICATE-----/h;$!d;x' | "${OPENSSL}" x509 -noout -issuer | head -n1 | _sed -e 's/.* CN ?= ?([^/,]*).*/\1/'
++ <<<"${1}" _sed 'H;/-----BEGIN CERTIFICATE-----/h;$!d;x' | "${OPENSSL}" x509 -noout -issuer | head -n1 | _sed -e 's/.*[ /]CN ?= ?([^/,]*).*/\1/'
+ }
+
+ # Create certificate for domain(s) and outputs it FD 3