From nobody Wed Oct 12 13:49:16 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 4MnYsn08rwz4fNtV; Wed, 12 Oct 2022 13:49:17 +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 4MnYsm6L5wz42Gg; Wed, 12 Oct 2022 13:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665582556; 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=C0dIPmTk4r/IQxBoLheeMAu1/BWTGQehxY2UnyQ5gso=; b=waCbGPyxJ0ss0eHzyDaI2DRHCvSBQ7rQj7D5ZF2X6mwPDALG4GUZzuMtt/z9gVYUSMylQD zoj1TdIp7R4gPuQCqqmp5UJFsJC62kWVWZKqWq46Jd7b98Ft1yrOh3Nlh39hiqYgGvhB15 t51tCZvnRwnGT0Km85tl3Jhya/tapSptsStL00znet5Rs8abTvXooa0P5yWs1F7ijAqN4l 17etpmLf2Rnd2V6FYYAbwljLd02kYdgyWdm8epaqfTajOLoGd50EpuTbQlg4oKlgwUatEZ cRF6qWWHFSKRV1N98RN5bzwTA5vLH4kE0JFsF/6/kon6v8/9mtqUJegH44HLaw== 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 4MnYsm5PNZz1Kh6; Wed, 12 Oct 2022 13:49:16 +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 29CDnGPv081864; Wed, 12 Oct 2022 13:49:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29CDnGwa081863; Wed, 12 Oct 2022 13:49:16 GMT (envelope-from git) Date: Wed, 12 Oct 2022 13:49:16 GMT Message-Id: <202210121349.29CDnGwa081863@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: 375881c9d3d1 - main - security/acme.sh: Move cron example to EXAMPLESDIR 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: 375881c9d3d1550ceae3c7aee99c51e84dbf57ad Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665582556; 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=C0dIPmTk4r/IQxBoLheeMAu1/BWTGQehxY2UnyQ5gso=; b=GmueYX9BvJFT8a+eC0GDPT3YiLklBU8jGD2XpkgSpfszIcX0j2hacKvZNjxRMyeuaHBPyW KHvUyQi2k0xUNeo+7lustmRlhGoiK1L0ec0Dzk16XS7QpGUQiv7uBReiGOm1LLdvZDmF6E kqSDPqqpBlWxu2AMIsEi1uqN9YTtoCxpNCOmNdirZLLuYrIDsZgIUmZgYeelY3wAvuGRtt MMoYVSMuuUzs4cQKt8zvkiWnbNmYEjsjXkKwemwTGMgWO8sMRkZJ0AVfX6mw9JJIhbp8NI FY2uSR78h/SMVVKUK8Qb+qKDQqlQ7qIi82QuE19+pFGMfw3xeFgqp0DkogTBsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665582556; a=rsa-sha256; cv=none; b=bW/HkgLWQcwcF54iKjY8bxWkD1W6pid2COPncEtkQyLZM4kijDAbyByUQtNi/FG2z53OZd 1yfLJLYX3xpUvMxheoKLKIV7aWoTR8pLmBKfaDALervmfuKlQr5WtFLocd9q8AnFrZQmfc 26sggofEJLGRllj9vwJxEJoRCKWD739L8jHhwMEBR1fQBCaB1/+NNeguZUeE3eClVqlqM1 i/Kn8svhlQ+RrvQxcm78oNjVReixBTUKWntlSQp8VXDFW93ry5BUhFqTbeK0ZItgehVtsX cjPhISvdxJD4G+l+Zwb64Oep71I+W9Jq9kqZi1u6MLob4/vZ9EVdizzSkCA2tQ== 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=375881c9d3d1550ceae3c7aee99c51e84dbf57ad commit 375881c9d3d1550ceae3c7aee99c51e84dbf57ad Author: Dan Langille AuthorDate: 2022-10-12 13:47:00 +0000 Commit: Dan Langille CommitDate: 2022-10-12 13:49:13 +0000 security/acme.sh: Move cron example to EXAMPLESDIR Instead of installing the sample crontab to etc/cron.d, install it to EXAMPLESDIR etc/cron.d/acme.sh will still be installed (if not present) but now contains no active lines and more complete instructions. Both the cron the newsyslog examples are only installed if the EXAMPLES config option is ON (default). Reported by: bapt --- security/acme.sh/Makefile | 19 ++++++++++++++----- security/acme.sh/files/acme-crontab.in | 14 +++++++++++--- security/acme.sh/files/pkg-message.in | 21 ++++++++++----------- security/acme.sh/pkg-plist | 5 +++-- 4 files changed, 38 insertions(+), 21 deletions(-) diff --git a/security/acme.sh/Makefile b/security/acme.sh/Makefile index 4805f9b9ffba..b58fcdbb2cc6 100644 --- a/security/acme.sh/Makefile +++ b/security/acme.sh/Makefile @@ -1,6 +1,6 @@ PORTNAME= acme.sh PORTVERSION= 3.0.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MAINTAINER= dvl@FreeBSD.org @@ -48,11 +48,19 @@ post-patch-IDN-on: do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin/${PORTNAME} - ${MKDIR} ${STAGEDIR}/var/db/acme/.acme.sh ${STAGEDIR}/var/db/acme/certs \ - ${STAGEDIR}${PREFIX}/etc/cron.d ${STAGEDIR}${PREFIX}/etc/newsyslog.d + + ${MKDIR} ${STAGEDIR}/var/db/acme/.acme.sh \ + ${STAGEDIR}/var/db/acme/certs \ + ${STAGEDIR}${PREFIX}/etc/cron.d \ + ${STAGEDIR}${PREFIX}/etc/newsyslog.d \ + ${STAGEDIR}${EXAMPLESDIR} + ${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 + + # install the sample file; pkg-plist will install to etc/cron.d for us + ${INSTALL_DATA} ${WRKDIR}/acme-crontab ${STAGEDIR}${EXAMPLESDIR}/acme.sh-cron.d + + ${INSTALL_DATA} ${FILESDIR}/acme-newsyslog ${STAGEDIR}${PREFIX}/etc/newsyslog.d/acme.sh.sample do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} @@ -60,6 +68,7 @@ do-install-DOCS-on: do-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/deploy ${STAGEDIR}${EXAMPLESDIR}/dnsapi + ( cd ${WRKSRC} && ${COPYTREE_BIN} deploy ${STAGEDIR}${EXAMPLESDIR} ) ( cd ${WRKSRC} && ${COPYTREE_BIN} dnsapi ${STAGEDIR}${EXAMPLESDIR} ) ( cd ${WRKSRC} && ${COPYTREE_BIN} notify ${STAGEDIR}${EXAMPLESDIR} ) diff --git a/security/acme.sh/files/acme-crontab.in b/security/acme.sh/files/acme-crontab.in index 831e6c497cc3..ce8379bd2e76 100644 --- a/security/acme.sh/files/acme-crontab.in +++ b/security/acme.sh/files/acme-crontab.in @@ -1,7 +1,15 @@ +# +# By default, all entries in this file are commented and inactive. +# Please uncomment and customize as shown below. + # use /bin/sh to run commands, overriding the default set by cron -SHELL=/bin/sh +# uncomment, don't change the value +#SHELL=/bin/sh # mail any output to here, no matter whose crontab this is -MAILTO=me@example.org +# uncomment, set the addres +#MAILTO=me@example.org -xx yy * * * %%PREFIX%%/sbin/acme.sh --cron --home /var/db/acme/.acme.sh > /dev/null +# uncomment, set mm and hh to the time (e.g. hh:mm) of day you want the +# cronjob to run +#mm hh * * * %%PREFIX%%/sbin/acme.sh --cron --home /var/db/acme/.acme.sh > /dev/null diff --git a/security/acme.sh/files/pkg-message.in b/security/acme.sh/files/pkg-message.in index d9ad093198f8..7668c66202a1 100644 --- a/security/acme.sh/files/pkg-message.in +++ b/security/acme.sh/files/pkg-message.in @@ -10,21 +10,20 @@ The script will also install ~acme/.acme.sh/account.conf.sample which has sane defaults. Copy this to ~acme/.acme.sh/account.conf and edit contents to suit. -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. +If you have EXAMPLES on: -A newsyslog.conf sample file is installed at -%%PREFIX%%/etc/newsyslog.d/acme.sh - you must modify it by -at least uncommenting the line. +* 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. -If you run `newsyslog -NC` it will create the required logfiles. +* A newsyslog.conf sample file is installed at + %%PREFIX%%/etc/newsyslog.d/acme.sh - you must modify it by + at least uncommenting the line. -Please edit %%PREFIX%%/etc/cron.d/acme.sh changing: +* If you run `newsyslog -NC` it will create the required logfiles. -* MAILTO - your email address -* xx to the minute you want the cronjob to run -* yy to the hour you want the cronjob to run +* Please edit %%PREFIX%%/etc/cron.d/acme.sh - directions are provided in that + file. EOM } ] diff --git a/security/acme.sh/pkg-plist b/security/acme.sh/pkg-plist index bc87db4fe497..086403c8ccf6 100644 --- a/security/acme.sh/pkg-plist +++ b/security/acme.sh/pkg-plist @@ -1,5 +1,5 @@ -@sample etc/cron.d/acme.sh.sample -@sample etc/newsyslog.d/acme.sh.sample +%%PORTEXAMPLES%%@sample %%EXAMPLESDIR%%/acme.sh-cron.d etc/cron.d/acme.sh +%%PORTEXAMPLES%%@sample etc/newsyslog.d/acme.sh.sample sbin/acme.sh %%PORTEXAMPLES%%%%EXAMPLESDIR%%/deploy/README.md %%PORTEXAMPLES%%%%EXAMPLESDIR%%/deploy/apache.sh @@ -192,6 +192,7 @@ sbin/acme.sh %%PORTEXAMPLES%%/var/db/acme/.acme.sh/deploy %%PORTEXAMPLES%%/var/db/acme/.acme.sh/dnsapi %%PORTEXAMPLES%%/var/db/acme/.acme.sh/notify +@dir etc/cron.d @dir(acme,acme,0750) /var/db/acme/.acme.sh @dir(acme,acme,0750) /var/db/acme/certs @dir(acme,acme,0750) /var/db/acme