commit:     957184a325e39b7a26b24c86b6f5356cc6c0e692
Author:     Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
AuthorDate: Fri Jul 15 15:49:51 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 23 05:24:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=957184a3

app-crypt/dehydrated: don't run cron job exactly on the hour

The Let's Encrypt API is often overwhelmed at 2:00 because a lot of
people call it exactly on the hour. I chose a number over 23 to make
minutes and hours instantly distinguishable.

Closes: https://bugs.gentoo.org/864895
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>
Closes: https://github.com/gentoo/gentoo/pull/26420
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild | 50 +++++++++++++++++++++++++
 app-crypt/dehydrated/files/cron-r1              |  2 +
 2 files changed, 52 insertions(+)

diff --git a/app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild 
b/app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild
new file mode 100644
index 000000000000..c5872631d266
--- /dev/null
+++ b/app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 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 ~ppc64 ~riscv 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-r1 ${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/cron-r1 
b/app-crypt/dehydrated/files/cron-r1
new file mode 100644
index 000000000000..31d1bb805a3e
--- /dev/null
+++ b/app-crypt/dehydrated/files/cron-r1
@@ -0,0 +1,2 @@
+# dehydrated cron job
+#27 2 * * * dehydrated /usr/bin/dehydrated --cron

Reply via email to