Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/dehydrated/, app-crypt/dehydrated/files/
Date: Tue, 23 Aug 2022 05:24:32
Message-Id: 1661232240.957184a325e39b7a26b24c86b6f5356cc6c0e692.sam@gentoo
1 commit: 957184a325e39b7a26b24c86b6f5356cc6c0e692
2 Author: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
3 AuthorDate: Fri Jul 15 15:49:51 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 23 05:24:00 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=957184a3
7
8 app-crypt/dehydrated: don't run cron job exactly on the hour
9
10 The Let's Encrypt API is often overwhelmed at 2:00 because a lot of
11 people call it exactly on the hour. I chose a number over 23 to make
12 minutes and hours instantly distinguishable.
13
14 Closes: https://bugs.gentoo.org/864895
15 Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>
16 Closes: https://github.com/gentoo/gentoo/pull/26420
17 Signed-off-by: Sam James <sam <AT> gentoo.org>
18
19 app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild | 50 +++++++++++++++++++++++++
20 app-crypt/dehydrated/files/cron-r1 | 2 +
21 2 files changed, 52 insertions(+)
22
23 diff --git a/app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild b/app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild
24 new file mode 100644
25 index 000000000000..c5872631d266
26 --- /dev/null
27 +++ b/app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild
28 @@ -0,0 +1,50 @@
29 +# Copyright 1999-2022 Gentoo Authors
30 +# Distributed under the terms of the GNU General Public License v2
31 +
32 +EAPI="7"
33 +
34 +DESCRIPTION="A client for signing certificates with an ACME-server"
35 +HOMEPAGE="https://github.com/lukas2511/dehydrated"
36 +SRC_URI="https://github.com/lukas2511/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
37 +
38 +LICENSE="MIT"
39 +SLOT="0"
40 +KEYWORDS="amd64 arm arm64 ~ppc64 ~riscv x86"
41 +IUSE="+cron"
42 +
43 +RDEPEND="acct-group/dehydrated
44 + acct-user/dehydrated
45 + app-shells/bash
46 + net-misc/curl
47 + cron? ( virtual/cron )"
48 +
49 +PATCHES=( "${FILESDIR}"/${P}-fix-CN-extraction-for-older-openssl-versions.patch )
50 +
51 +src_configure() {
52 + default
53 + sed -i 's,^#CONFIG_D=.*,CONFIG_D="/etc/dehydrated/config.d",' docs/examples/config || die "could not set config (CONFIG_D)"
54 +}
55 +
56 +src_install() {
57 + dobin ${PN}
58 + insinto /etc/${PN}
59 + doins docs/examples/{config,domains.txt,hook.sh}
60 + fperms u+x /etc/${PN}/hook.sh
61 + dodoc docs/*.md
62 +
63 + insinto /etc/${PN}/config.d
64 + doins "${FILESDIR}"/00_gentoo.sh
65 +
66 + if use cron ; then
67 + insinto /etc/cron.d
68 + newins "${FILESDIR}"/cron-r1 ${PN}
69 + fi
70 +}
71 +
72 +pkg_postinst() {
73 + if [[ -z "${REPLACING_VERSIONS}" ]] ; then
74 + einfo "See /etc/dehydrated/config for configuration."
75 +
76 + use cron && einfo "After finishing setup you should enable the cronjob in /etc/cron.d/dehydrated."
77 + fi
78 +}
79
80 diff --git a/app-crypt/dehydrated/files/cron-r1 b/app-crypt/dehydrated/files/cron-r1
81 new file mode 100644
82 index 000000000000..31d1bb805a3e
83 --- /dev/null
84 +++ b/app-crypt/dehydrated/files/cron-r1
85 @@ -0,0 +1,2 @@
86 +# dehydrated cron job
87 +#27 2 * * * dehydrated /usr/bin/dehydrated --cron