From nobody Tue Oct 11 20:04:31 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mn6FC68pZz4fK7x; Tue, 11 Oct 2022 20:04:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mn6FC5g43z3Qsc; Tue, 11 Oct 2022 20:04:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665518671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Owio5yDmniKMoaz6fkMBGsOzv9+uuV6F7MXBsq8EQgg=; b=LIsKbWHKS49v8LV+B+OVoTAfVXGsXOozghPzd1qscxdjnNrwvDLuD8GBe6oLsdDp3x3xyp Tvb05gC4sq3IrTsluXBXuVISUtTLQFdnJcTlj0nVV7RtwELcoZ5SZz2fbAqIuWJM02HSpB b2r9LIRcT3KHyEEMd+Ei1/AnciVa7abWX6LhJG6HXwEdp4i9b+gdiXn7GU9qWkZU2r8+eR iff1FFqOxUhcSGn2tG2L6irF61fjh2IyqGXnupyPFH5+7cnt9sk9l7/PuE4f7HCK67Hwfh ccTZXvg+uaFxgB3uNi8f978VgpfbmDd9FUt6N/uyL+dZpKMvxO3xUDa721rcFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mn6FC4T8tz14PZ; Tue, 11 Oct 2022 20:04:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29BK4VGL062128; Tue, 11 Oct 2022 20:04:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29BK4VcO062127; Tue, 11 Oct 2022 20:04:31 GMT (envelope-from git) Date: Tue, 11 Oct 2022 20:04:31 GMT Message-Id: <202210112004.29BK4VcO062127@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dan Langille Subject: git: 318400ae027b - main - security/acme.sh: Change crontab and add newsyslog List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dvl X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 318400ae027bf074838191f09437c19be5b062ff Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665518671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Owio5yDmniKMoaz6fkMBGsOzv9+uuV6F7MXBsq8EQgg=; b=cOka31ahGcw2Lq6x70VIpsaL70e2uanD/I1Arz5eZcwreOIHE3PWZh5/RCe0eQ/5dtXco+ SJZJOlRSrmuBfCRTTJT5+13YyWFYv94DxCggf8j962TweD5nqPXD/ONkv6MYWZRl7Vo7lJ pRvYWFmrD7NFfwZrhHKvAuL1uL6A5LMTgyhNtQ5ZXJPrTnx06KUggJQwo9arhB1YucjFwU PtqwfN5TqUSzw6vmIFpdoNGWJQoV31zdoIUWhMHy/PFAoKCrHhnWrXUl5fvA8B6P53npRX eObGCLm5+9hvPmFstIHf0YhPjRh4XTBxdA3eSKTN5C09+XVjWmzKhK1AChNULw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665518671; a=rsa-sha256; cv=none; b=Oylc9cxOA1JYsG74TaWsGP8da62+ARlWV/opaB78etNBoQSQgqubdtw1AH8OK8T8qjsbs7 YlbkYGSSJRrV2n9v9ZJOoXlIxPCAiurN9syVIzVxhcME0pv6VGKvw/HcnkKeJWjfo3UjiR DnFj1mp4hIbgT54s34VLTtfvVFsvEF9t8081JiG1X6Gb/KWLbyXT7qyyeEVfBW9hZwjtur 81F4qETHmGQzmUwn8TtQp+F/4C2SE9akjUipiWrT5L/bLTBVcnLj06axXO1BhTyJ/U0jbM nqTD4bZf0rkXvFrGYG/j+2Ju8ZOb4DL36FCMv9aW4zT0hEpDjvQmhRy+S0XCrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dvl: URL: https://cgit.FreeBSD.org/ports/commit/?id=318400ae027bf074838191f09437c19be5b062ff commit 318400ae027bf074838191f09437c19be5b062ff Author: Dan Langille AuthorDate: 2022-10-11 20:00:40 +0000 Commit: Dan Langille CommitDate: 2022-10-11 20:04:23 +0000 security/acme.sh: Change crontab and add newsyslog 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. While here, several portclippy updates Reported by: marck --- UPDATING | 16 +++++++++ security/acme.sh/Makefile | 39 ++++++++++++---------- security/acme.sh/files/acme-crontab.in | 7 ++++ .../acme.sh/files/{acme.sh.conf => acme-newsyslog} | 0 security/acme.sh/files/pkg-message.in | 21 +++++------- security/acme.sh/pkg-plist | 3 +- 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 similarity index 100% rename from security/acme.sh/files/acme.sh.conf rename to 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