svn commit: r408879 - in head/security/letsencrypt.sh: . files

Bernard Spil brnrd at FreeBSD.org
Sun Feb 14 18:29:06 UTC 2016


Author: brnrd
Date: Sun Feb 14 18:29:04 2016
New Revision: 408879
URL: https://svnweb.freebsd.org/changeset/ports/408879

Log:
  security/letsencrypt.sh: Update to 2016-02-12
  
    - Update to 2016-02-16
    - Add options for ZSH
    - Change periodic script to weekly
      - Add unprivileged renewal option
      - Add privileged post-script option
  
  PR:		206976
  Reviewed by:	feld (mentor), koobs (mentor), sascha (maintainer)
  Approved by:	sascha (maintainer), feld (mentor)
  Differential Revision:	D5264

Modified:
  head/security/letsencrypt.sh/Makefile
  head/security/letsencrypt.sh/distinfo
  head/security/letsencrypt.sh/files/000.letsencrypt.sh.in
  head/security/letsencrypt.sh/files/pkg-message.in

Modified: head/security/letsencrypt.sh/Makefile
==============================================================================
--- head/security/letsencrypt.sh/Makefile	Sun Feb 14 18:28:34 2016	(r408878)
+++ head/security/letsencrypt.sh/Makefile	Sun Feb 14 18:29:04 2016	(r408879)
@@ -1,43 +1,59 @@
 # $FreeBSD$
 
 PORTNAME=	letsencrypt.sh
-PORTVERSION=	0.0.0.20160116
+PORTVERSION=	0.0.0.20160212
 CATEGORIES=	security
 
 MAINTAINER=	sascha at root-login.org
-COMMENT=	Pure BASH Lets Encrypt client
+COMMENT=	Pure BASH/ZSH Lets Encrypt client
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash \
-		curl:${PORTSDIR}/ftp/curl
+RUN_DEPENDS=	curl:${PORTSDIR}/ftp/curl
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	lukas2511
-GH_TAGNAME=	23b0ef5
+GH_TAGNAME=	f7c079c
+
+OPTIONS_SINGLE=	SHELL
+OPTIONS_SINGLE_SHELL=	BASH ZSH
+BASH_DESC=	Use the Bourne Again shell (BASH)
+ZSH_DESC=	Use the Z shell (ZSH)
+
+OPTIONS_DEFAULT=	BASH
 
 NO_ARCH=	yes
 NO_BUILD=	yes
 USES=		shebangfix
 
-PERIODIC_DIRS=	etc/periodic/monthly
+BASH_RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash
+ZSH_RUN_DEPENDS=	zsh:${PORTSDIR}/shells/zsh
+
+PERIODIC_DIRS=	etc/periodic/weekly
 PERIODIC_FILES=	000.letsencrypt.sh
 
 PLIST_DIRS=	%%ETCDIR%%/.acme-challenges
 PLIST_FILES=	bin/letsencrypt.sh \
 		%%ETCDIR%%/config.sh.example \
+		%%ETCDIR%%/hook.sh.example \
 		%%ETCDIR%%/domains.txt.example \
-		etc/periodic/monthly/000.letsencrypt.sh
+		${PERIODIC_DIRS}/000.letsencrypt.sh
 
 SUB_FILES=	000.letsencrypt.sh pkg-message
 SUB_LIST=	PORTNAME=${PORTNAME}
 
-SHEBANG_FILES=	config.sh.example
+SHEBANG_FILES=	config.sh.example hook.sh.example letsencrypt.sh
+
+post-patch-ZSH-on:
+.	for p in config.sh.example hook.sh.example letsencrypt.sh
+	${REINPLACE_CMD} '1 s/bash/zsh/' ${WRKSRC}/${p}
+.	endfor
 
 do-install:
 	@${MKDIR} ${STAGEDIR}${ETCDIR}/.acme-challenges ${STAGEDIR}${PREFIX}/${PERIODIC_DIRS}
 	${INSTALL_DATA} ${WRKSRC}/config.sh.example ${STAGEDIR}${ETCDIR}/config.sh.example
+	${INSTALL_DATA} ${WRKSRC}/hook.sh.example ${STAGEDIR}${ETCDIR}/hook.sh.example
 	${INSTALL_DATA} ${WRKSRC}/domains.txt.example ${STAGEDIR}${ETCDIR}/domains.txt.example
 	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
 	${INSTALL_SCRIPT} ${WRKDIR}/${PERIODIC_FILES} ${STAGEDIR}${PREFIX}/${PERIODIC_DIRS}/${PERIODIC_FILES}

Modified: head/security/letsencrypt.sh/distinfo
==============================================================================
--- head/security/letsencrypt.sh/distinfo	Sun Feb 14 18:28:34 2016	(r408878)
+++ head/security/letsencrypt.sh/distinfo	Sun Feb 14 18:29:04 2016	(r408879)
@@ -1,2 +1,2 @@
-SHA256 (lukas2511-letsencrypt.sh-0.0.0.20160116-23b0ef5_GH0.tar.gz) = bac41812abec6ff36e13b72bf8c84de20a7e3d5568a0fdae848a693c08973683
-SIZE (lukas2511-letsencrypt.sh-0.0.0.20160116-23b0ef5_GH0.tar.gz) = 12190
+SHA256 (lukas2511-letsencrypt.sh-0.0.0.20160212-f7c079c_GH0.tar.gz) = 6cd11b961779716b68cf238ff729b7ef03074fb529d2004cccad9b0748592e9c
+SIZE (lukas2511-letsencrypt.sh-0.0.0.20160212-f7c079c_GH0.tar.gz) = 15216

Modified: head/security/letsencrypt.sh/files/000.letsencrypt.sh.in
==============================================================================
--- head/security/letsencrypt.sh/files/000.letsencrypt.sh.in	Sun Feb 14 18:28:34 2016	(r408878)
+++ head/security/letsencrypt.sh/files/000.letsencrypt.sh.in	Sun Feb 14 18:29:04 2016	(r408879)
@@ -8,9 +8,17 @@ then
     source_periodic_confs
 fi
 
-case "$monthly_letsencrypt_enable" in
+case "$weekly_letsencrypt_enable" in
     [Yy][Ee][Ss])
-	%%PREFIX%%/bin/letsencrypt.sh -c
+	if [ -z "$weekly_letsencrypt_user" ]
+	then
+		%%PREFIX%%/bin/letsencrypt.sh -c
+	else
+		su -m "$weekly_letsencrypt_user" -c '%%PREFIX%%/bin/letsencrypt.sh -c'
+	fi
+	if [ -x "$weekly_letsencrypt_deployscript" ]
+		$weekly_letsencrypt_deployscript
+	fi
         ;;
     *)
         ;;

Modified: head/security/letsencrypt.sh/files/pkg-message.in
==============================================================================
--- head/security/letsencrypt.sh/files/pkg-message.in	Sun Feb 14 18:28:34 2016	(r408878)
+++ head/security/letsencrypt.sh/files/pkg-message.in	Sun Feb 14 18:29:04 2016	(r408879)
@@ -10,5 +10,13 @@ it missing.
 In order to run the script regularly to update
 the certificates add this line to /etc/periodic.conf
 
-monthly_letsencrypt_enable="YES"
+weekly_letsencrypt_enable="YES"
+
+Additionally the following parameters can be added to
+/etc/periodic.conf
+
+To run the certification renenewal as a different user
+weekly_letsencrypt_user="_letsencrypt"
+To run a script after the renewal (as root)
+weekly_letsencrypt_deployscript="%%PREFIX%%/etc/%%PORTNAME%%/deploy.sh"
 


More information about the svn-ports-all mailing list