From owner-svn-ports-head@freebsd.org Mon Jul 3 22:22:05 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ED469F0F20; Mon, 3 Jul 2017 22:22:05 +0000 (UTC) (envelope-from dvl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A95383BC2; Mon, 3 Jul 2017 22:22:05 +0000 (UTC) (envelope-from dvl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v63MM4WZ040507; Mon, 3 Jul 2017 22:22:04 GMT (envelope-from dvl@FreeBSD.org) Received: (from dvl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v63MM4VY040502; Mon, 3 Jul 2017 22:22:04 GMT (envelope-from dvl@FreeBSD.org) Message-Id: <201707032222.v63MM4VY040502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dvl set sender to dvl@FreeBSD.org using -f From: Dan Langille Date: Mon, 3 Jul 2017 22:22:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r444990 - in head/security/acme.sh: . files X-SVN-Group: ports-head X-SVN-Commit-Author: dvl X-SVN-Commit-Paths: in head/security/acme.sh: . files X-SVN-Commit-Revision: 444990 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 22:22:05 -0000 Author: dvl Date: Mon Jul 3 22:22:04 2017 New Revision: 444990 URL: https://svnweb.freebsd.org/changeset/ports/444990 Log: Add some sane defaults in account.conf to get you started. Supply a link to the dnsapi/deploy scripts so it all just works. Create ~acme/.acme.sh & ~acme/certs to make things easier. Also provide a newsyslog.conf sample file for the log file rotation. Differential Revision: https://reviews.freebsd.org/D11450 Added: head/security/acme.sh/files/ head/security/acme.sh/files/acme.sh (contents, props changed) head/security/acme.sh/files/pkg-install.in (contents, props changed) head/security/acme.sh/files/pkg-message.in (contents, props changed) Modified: head/security/acme.sh/Makefile head/security/acme.sh/pkg-plist Modified: head/security/acme.sh/Makefile ============================================================================== --- head/security/acme.sh/Makefile Mon Jul 3 20:40:27 2017 (r444989) +++ head/security/acme.sh/Makefile Mon Jul 3 22:22:04 2017 (r444990) @@ -2,8 +2,8 @@ PORTNAME= acme.sh PORTVERSION= 2.6.9 -PORTREVISION= 2 DISTVERSIONPREFIX= v +PORTREVISION= 3 CATEGORIES= security MAINTAINER= dvl@FreeBSD.org @@ -34,11 +34,14 @@ WGET_RUN_DEPENDS= wget:ftp/wget PORTDOCS= README.md +SUB_FILES= pkg-install pkg-message + do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin/${PORTNAME} ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/deploy ${STAGEDIR}${EXAMPLESDIR}/dnsapi ( cd ${WRKSRC} && ${COPYTREE_BIN} deploy ${STAGEDIR}${EXAMPLESDIR} ) ( cd ${WRKSRC} && ${COPYTREE_BIN} dnsapi ${STAGEDIR}${EXAMPLESDIR} ) + ${INSTALL_DATA} ${FILESDIR}/acme.sh ${STAGEDIR}${EXAMPLESDIR} do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} Added: head/security/acme.sh/files/acme.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/acme.sh/files/acme.sh Mon Jul 3 22:22:04 2017 (r444990) @@ -0,0 +1,6 @@ +# acme.sh configuration file for newsyslog.conf +# +# see newsyslog.conf(5) for details +# +# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] +/var/log/acme.sh.log acme:acme 640 90 * @T00 B Added: head/security/acme.sh/files/pkg-install.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/acme.sh/files/pkg-install.in Mon Jul 3 22:22:04 2017 (r444990) @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ + +if [ "$2" = "POST-INSTALL" ]; then + if [ ! -d ~acme/.acme.sh ]; then + /usr/bin/install -d -o acme -g acme -m 750 ~acme/.acme.sh + fi + + if [ ! -d ~acme/certs ]; then + /usr/bin/install -d -o acme -g acme -m 750 ~acme/certs + fi + + if [ ! -d ~acme/.acme.sh/dnsapi ]; then + /bin/ln -sf %%EXAMPLESDIR%%/dnsapi ~acme/.acme.sh + fi + + if [ ! -f ~acme/.acme.sh/account.conf.sample ]; then + + /bin/cat << EOF >> ~acme/.acme.sh/account.conf.sample +NSUPDATE_SERVER="mydns.example.org" +NSUPDATE_KEY="/var/db/acme/Kmydns.example.org.+165+59977.key" +DEFAULT_DNS_SLEEP="10" +CERT_HOME="/var/db/acme/certs" +LOG_FILE='/var/log/acme.sh.log' +EOF + /bin/chmod 640 ~acme/.acme.sh/account.conf.sample + fi +fi Added: head/security/acme.sh/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/acme.sh/files/pkg-message.in Mon Jul 3 22:22:04 2017 (r444990) @@ -0,0 +1,19 @@ + + +This script will create the following directories if they do not exist: + + ~acme/.acme.sh + ~acme/certs + +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. + +A newsyslog.conf sample file is provided at %%EXAMPLESDIR%%/acme.sh +and you could create a symlink from that to %%PREFIX%%/etc/newsyslog.conf.d/ + + Modified: head/security/acme.sh/pkg-plist ============================================================================== --- head/security/acme.sh/pkg-plist Mon Jul 3 20:40:27 2017 (r444989) +++ head/security/acme.sh/pkg-plist Mon Jul 3 22:22:04 2017 (r444990) @@ -1,4 +1,5 @@ sbin/acme.sh +%%EXAMPLESDIR%%/acme.sh %%EXAMPLESDIR%%/deploy/README.md %%EXAMPLESDIR%%/deploy/apache.sh %%EXAMPLESDIR%%/deploy/cpanel.sh