View | Details | Raw Unified | Return to bug 221043 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-3 / +12 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	certbot
4
PORTNAME=	certbot
5
PORTVERSION=	0.16.0
5
PORTVERSION=	0.16.0
6
PORTREVISION=	1
6
PORTEPOCH=	1
7
PORTEPOCH=	1
7
CATEGORIES=	security python
8
CATEGORIES=	security python
8
MASTER_SITES=	CHEESESHOP
9
MASTER_SITES=	CHEESESHOP
Lines 14-20 Link Here
14
LICENSE=	APACHE20
15
LICENSE=	APACHE20
15
LICENSE_FILE=	${WRKSRC}/LICENSE.txt
16
LICENSE_FILE=	${WRKSRC}/LICENSE.txt
16
17
17
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}acme==${PKGVERSION}:security/py-acme \
18
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}acme>0:security/py-acme \
18
		${PYTHON_PKGNAMEPREFIX}configargparse>=0.9.3:devel/py-configargparse \
19
		${PYTHON_PKGNAMEPREFIX}configargparse>=0.9.3:devel/py-configargparse \
19
		${PYTHON_PKGNAMEPREFIX}configobj>0:devel/py-configobj \
20
		${PYTHON_PKGNAMEPREFIX}configobj>0:devel/py-configobj \
20
		${PYTHON_PKGNAMEPREFIX}cryptography>=1.2:security/py-cryptography \
21
		${PYTHON_PKGNAMEPREFIX}cryptography>=1.2:security/py-cryptography \
Lines 28-43 Link Here
28
		${PYTHON_PKGNAMEPREFIX}zope.interface>0:devel/py-zope.interface
29
		${PYTHON_PKGNAMEPREFIX}zope.interface>0:devel/py-zope.interface
29
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock
30
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock
30
31
31
USES=		python:-2.7
32
USES=		python
32
USE_PYTHON=	autoplist distutils
33
USE_PYTHON=	autoplist distutils
33
34
34
NO_ARCH=	yes
35
NO_ARCH=	yes
35
36
37
SUB_FILES=	000.certbot.sh
38
PLIST_FILES=	etc/periodic/weekly/000.certbot.sh
39
36
post-patch:
40
post-patch:
37
	${REINPLACE_CMD} \
41
	@${REINPLACE_CMD} \
38
		-e 's|/etc/|${LOCALBASE}/etc/|' \
42
		-e 's|/etc/|${LOCALBASE}/etc/|' \
39
		-e 's|/var/lib|/var/db|' \
43
		-e 's|/var/lib|/var/db|' \
40
		${WRKSRC}/${PORTNAME}/constants.py
44
		${WRKSRC}/${PORTNAME}/constants.py
45
46
post-install:
47
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/weekly
48
	${INSTALL_SCRIPT} ${WRKDIR}/000.certbot.sh ${STAGEDIR}${PREFIX}/etc/periodic/weekly
49
41
do-test:
50
do-test:
42
	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
51
	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
43
52
(-)files/000.certbot.sh.in (+21 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
if [ -r /etc/defaults/periodic.conf ]
4
then
5
    . /etc/defaults/periodic.conf
6
    source_periodic_confs
7
fi
8
9
PATH=$PATH:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
10
export PATH
11
12
case "$weekly_certbot_enable" in
13
[Yy][Ee][Ss])
14
	echo
15
	echo "Updating Let's Encrypt certificates:"
16
17
	%%PREFIX%%/bin/certbot renew
18
	;;
19
*)
20
	;;
21
esac
(-)pkg-message (+5 lines)
Lines 18-21 Link Here
18
 * Apache plugin: security/py-certbot-apache
18
 * Apache plugin: security/py-certbot-apache
19
 * Nginx plugin: security/py-certbot-nginx
19
 * Nginx plugin: security/py-certbot-nginx
20
20
21
In order to run the script regularly to update the certificates add this
22
line to /etc/periodic.conf:
23
24
    weekly_certbot_enable="YES"
25
21
===========================================================================
26
===========================================================================

Return to bug 221043