summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPDATING16
-rw-r--r--security/acme.sh/Makefile39
-rw-r--r--security/acme.sh/files/acme-crontab.in7
-rw-r--r--security/acme.sh/files/acme-newsyslog (renamed from security/acme.sh/files/acme.sh.conf)0
-rw-r--r--security/acme.sh/files/pkg-message.in21
-rw-r--r--security/acme.sh/pkg-plist3
6 files changed, 54 insertions, 32 deletions
diff --git a/UPDATING b/UPDATING
index a2f53794ba63..9087d5dac2b6 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,22 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20221011:
+ AFFECTS: users of security/acme.sh
+ AUTHOR: dvl@FreeBSD.org
+
+ This update may break your install if you were using a symlink to
+ %%EXAMPLESDIR%%/acme.sh.conf - that file is no longer installed. Instead,
+ a log rotation configuration is now installed to etc/cron.d/acme.sh.sample
+ you should modify etc/cron.d/acme.sh to needs.
+
+ The port now installs a log rotation file to etc/newsyslog.d/acme.sh.sample
+ and you you should update etc/newsyslog.d/acme.sh to suit your needs.
+ This file has long been part of the port, but was never installed.
+
+ Neither the log rotation nor the crontab are active until you remove the
+ comments.
+
20221002:
AFFECTS: users of shells/bash
AUTHOR: ehaupt@FreeBSD.org
diff --git a/security/acme.sh/Makefile b/security/acme.sh/Makefile
index 6d8d81e60fd2..4805f9b9ffba 100644
--- a/security/acme.sh/Makefile
+++ b/security/acme.sh/Makefile
@@ -1,6 +1,6 @@
PORTNAME= acme.sh
PORTVERSION= 3.0.4
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= security
MAINTAINER= dvl@FreeBSD.org
@@ -12,43 +12,47 @@ LICENSE= GPLv3+
USE_GITHUB= yes
GH_ACCOUNT= Neilpang
-USERS= acme
-GROUPS= acme
+USERS= acme
+GROUPS= acme
-OPTIONS_DEFINE= BINDTOOLS DOCS EXAMPLES IDN STANDALONE
-OPTIONS_SINGLE= HTTP
-OPTIONS_SINGLE_HTTP= CURL WGET
+OPTIONS_DEFINE= BINDTOOLS DOCS EXAMPLES IDN STANDALONE
OPTIONS_DEFAULT= CURL STANDALONE
+OPTIONS_SINGLE= HTTP
+OPTIONS_SINGLE_HTTP= CURL WGET
+
BINDTOOLS_DESC= Depend on bind-tools for nsupdate
-BINDTOOLS_RUN_DEPENDS= nsupdate:dns/bind-tools
-IDN_RUN_DEPENDS= idn2:dns/libidn2
-STANDALONE_DESC= Standalone mode requires SOCAT
-STANDALONE_RUN_DEPENDS= socat>0:net/socat
-CURL_DESC= Depend on cURL for HTTP(S) queries
-WGET_DESC= Depend on Wget for HTTP(S) queries
+CURL_DESC= Depend on cURL for HTTP(S) queries
+STANDALONE_DESC= Standalone mode requires SOCAT
+WGET_DESC= Depend on Wget for HTTP(S) queries
NO_ARCH= yes
NO_BUILD= yes
+BINDTOOLS_RUN_DEPENDS= nsupdate:dns/bind-tools
CURL_RUN_DEPENDS= curl:ftp/curl
+IDN_RUN_DEPENDS= idn2:dns/libidn2
+STANDALONE_RUN_DEPENDS= socat>0:net/socat
WGET_RUN_DEPENDS= wget:ftp/wget
PORTDOCS= README.md
-SUB_FILES= pkg-message
+SUB_FILES= acme-crontab pkg-message
+
+post-patch-EXAMPLES-on:
+ ${REINPLACE_CMD} -e 's|sed -i "|sed -i bak "|' ${WRKSRC}/dnsapi/dns_nsd.sh
post-patch-IDN-on:
${REINPLACE_CMD} -e 's|^ *idn | idn2 |'\
-e 's|_exists idn|_exists idn2|' ${WRKSRC}/acme.sh
-post-patch-EXAMPLES-on:
- ${REINPLACE_CMD} -e 's|sed -i "|sed -i bak "|' ${WRKSRC}/dnsapi/dns_nsd.sh
-
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin/${PORTNAME}
- ${MKDIR} ${STAGEDIR}/var/db/acme/.acme.sh ${STAGEDIR}/var/db/acme/certs
+ ${MKDIR} ${STAGEDIR}/var/db/acme/.acme.sh ${STAGEDIR}/var/db/acme/certs \
+ ${STAGEDIR}${PREFIX}/etc/cron.d ${STAGEDIR}${PREFIX}/etc/newsyslog.d
${INSTALL_DATA} ${FILESDIR}/account.conf.sample ${STAGEDIR}/var/db/acme/.acme.sh
+ ${INSTALL_DATA} ${WRKDIR}/acme-crontab ${STAGEDIR}${PREFIX}/etc/cron.d/acme.sh.sample
+ ${INSTALL_DATA} ${FILESDIR}/acme-newsyslog ${STAGEDIR}${PREFIX}/etc/newsyslog.d/acme.sh.sample
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
@@ -59,7 +63,6 @@ do-install-EXAMPLES-on:
( cd ${WRKSRC} && ${COPYTREE_BIN} deploy ${STAGEDIR}${EXAMPLESDIR} )
( cd ${WRKSRC} && ${COPYTREE_BIN} dnsapi ${STAGEDIR}${EXAMPLESDIR} )
( cd ${WRKSRC} && ${COPYTREE_BIN} notify ${STAGEDIR}${EXAMPLESDIR} )
- ${INSTALL_DATA} ${FILESDIR}/acme.sh.conf ${STAGEDIR}${EXAMPLESDIR}
${RLN} ${STAGEDIR}/${EXAMPLESDIR}/deploy ${STAGEDIR}/var/db/acme/.acme.sh
${RLN} ${STAGEDIR}/${EXAMPLESDIR}/dnsapi ${STAGEDIR}/var/db/acme/.acme.sh
${RLN} ${STAGEDIR}/${EXAMPLESDIR}/notify ${STAGEDIR}/var/db/acme/.acme.sh
diff --git a/security/acme.sh/files/acme-crontab.in b/security/acme.sh/files/acme-crontab.in
new file mode 100644
index 000000000000..831e6c497cc3
--- /dev/null
+++ b/security/acme.sh/files/acme-crontab.in
@@ -0,0 +1,7 @@
+# use /bin/sh to run commands, overriding the default set by cron
+SHELL=/bin/sh
+
+# mail any output to here, no matter whose crontab this is
+MAILTO=me@example.org
+
+xx yy * * * %%PREFIX%%/sbin/acme.sh --cron --home /var/db/acme/.acme.sh > /dev/null
diff --git a/security/acme.sh/files/acme.sh.conf b/security/acme.sh/files/acme-newsyslog
index 0f6a19728544..0f6a19728544 100644
--- a/security/acme.sh/files/acme.sh.conf
+++ b/security/acme.sh/files/acme-newsyslog
diff --git a/security/acme.sh/files/pkg-message.in b/security/acme.sh/files/pkg-message.in
index 6652629e6b01..d9ad093198f8 100644
--- a/security/acme.sh/files/pkg-message.in
+++ b/security/acme.sh/files/pkg-message.in
@@ -14,22 +14,17 @@ In the %%EXAMPLESDIR%% directory, you can find the dnsapi
scripts which will be useful if you decide to use dns-01 challenges. Also
included are the deploy scripts.
-A newsyslog.conf sample file is provided at %%EXAMPLESDIR%%/acme.sh.conf
-and you could create a symlink from that to %%PREFIX%%/etc/newsyslog.conf.d/
+A newsyslog.conf sample file is installed at
+%%PREFIX%%/etc/newsyslog.d/acme.sh - you must modify it by
+at least uncommenting the line.
-Your sample cronjob looks like this:
+If you run `newsyslog -NC` it will create the required logfiles.
-############################################################################
-$ sudo crontab -l -u acme
-# use /bin/sh to run commands, overriding the default set by cron
-SHELL=/bin/sh
-# mail any output to here, no matter whose crontab this is
-MAILTO=dan@example.org
+Please edit %%PREFIX%%/etc/cron.d/acme.sh changing:
-7 22 * * * /usr/local/sbin/acme.sh --cron --home /var/db/acme/.acme.sh > /dev/null
-############################################################################
-
-Change x & y to some minute and hour of the day.
+* MAILTO - your email address
+* xx to the minute you want the cronjob to run
+* yy to the hour you want the cronjob to run
EOM
}
]
diff --git a/security/acme.sh/pkg-plist b/security/acme.sh/pkg-plist
index 861a3a907e9f..bc87db4fe497 100644
--- a/security/acme.sh/pkg-plist
+++ b/security/acme.sh/pkg-plist
@@ -1,5 +1,6 @@
+@sample etc/cron.d/acme.sh.sample
+@sample etc/newsyslog.d/acme.sh.sample
sbin/acme.sh
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/acme.sh.conf
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/deploy/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/deploy/apache.sh
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/deploy/cleverreach.sh