diff options
author | matthew <matthew@FreeBSD.org> | 2018-12-14 17:18:33 +0800 |
---|---|---|
committer | matthew <matthew@FreeBSD.org> | 2018-12-14 17:18:33 +0800 |
commit | 815908ff9a59f42bc9324c35f797352e86396606 (patch) | |
tree | 822489a3e4d09637cfa5dced7f14abdeac9c7672 /security | |
parent | 11efb9f71e1d2ed2362f09ac5bb5b00951d3accd (diff) | |
download | freebsd-ports-gnome-815908ff9a59f42bc9324c35f797352e86396606.tar.gz freebsd-ports-gnome-815908ff9a59f42bc9324c35f797352e86396606.tar.zst freebsd-ports-gnome-815908ff9a59f42bc9324c35f797352e86396606.zip |
Fix setting FreeBSD specific paths since upstream change
https://github.com/certbot/certbot/commit/a23d76beb0e2c9539670766045314a5d50f582a2#diff-64ccdc74e8a07f9b039a6254093f1d0d
as part of the update to 0.29.1
PR: 233909
Reported by: Paul Macdonald
Approved by: koobs (python)
Diffstat (limited to 'security')
-rw-r--r-- | security/py-certbot/Makefile | 7 | ||||
-rw-r--r-- | security/py-certbot/files/patch-certbot_compat.py | 36 | ||||
-rw-r--r-- | security/py-certbot/files/patch-setup.py | 6 |
3 files changed, 42 insertions, 7 deletions
diff --git a/security/py-certbot/Makefile b/security/py-certbot/Makefile index 8a93df8d2a0f..cc9e4b0a68eb 100644 --- a/security/py-certbot/Makefile +++ b/security/py-certbot/Makefile @@ -3,7 +3,7 @@ PORTNAME= certbot PORTVERSION= ${ACME_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= security python MASTER_SITES= CHEESESHOP @@ -38,9 +38,8 @@ NO_ARCH= yes post-patch: @${REINPLACE_CMD} \ - -e 's|/etc/|${LOCALBASE}/etc/|' \ - -e 's|/var/lib|/var/db|' \ - ${WRKSRC}/${PORTNAME}/constants.py + s,%%LOCALBASE%%,${LOCALBASE}, \ + ${WRKSRC}/${PORTNAME}/compat.py do-test: @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test diff --git a/security/py-certbot/files/patch-certbot_compat.py b/security/py-certbot/files/patch-certbot_compat.py new file mode 100644 index 000000000000..b34846ac98dc --- /dev/null +++ b/security/py-certbot/files/patch-certbot_compat.py @@ -0,0 +1,36 @@ +# Incorrect config file path since update to 0.29.1 +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233909 +# TODO: Upstream + +--- certbot/compat.py.orig 2018-12-05 23:47:58 UTC ++++ certbot/compat.py +@@ -183,6 +183,11 @@ LINUX_DEFAULT_FOLDERS = { + 'work': '/var/lib/letsencrypt', + 'logs': '/var/log/letsencrypt', + } ++FREEBSD_DEFAULT_FOLDERS = { ++ 'config': '%%LOCALBASE%%/etc/letsencrypt', ++ 'work': '/var/db/letsencrypt', ++ 'logs': '/var/log/letsencrypt', ++} + + def get_default_folder(folder_type): + """ +@@ -195,7 +200,13 @@ def get_default_folder(folder_type): + + """ + if 'fcntl' in sys.modules: +- # Linux specific +- return LINUX_DEFAULT_FOLDERS[folder_type] +- # Windows specific +- return WINDOWS_DEFAULT_FOLDERS[folder_type] ++ # Unix-like ++ if sys.platform.startswith('freebsd') or sys.platform.startswith('dragonfly'): ++ # FreeBSD specific ++ return FREEBSD_DEFAULT_FOLDERS[folder_type] ++ else: ++ # Linux specific ++ return LINUX_DEFAULT_FOLDERS[folder_type] ++ else: ++ # Windows specific ++ return WINDOWS_DEFAULT_FOLDERS[folder_type] diff --git a/security/py-certbot/files/patch-setup.py b/security/py-certbot/files/patch-setup.py index c5f3c75057b9..5c2e3bc1841d 100644 --- a/security/py-certbot/files/patch-setup.py +++ b/security/py-certbot/files/patch-setup.py @@ -1,6 +1,6 @@ ---- setup.py.orig 2018-03-08 22:20:34 UTC +--- setup.py.orig 2018-12-05 23:47:59 UTC +++ setup.py -@@ -44,7 +44,6 @@ install_requires = [ +@@ -39,7 +39,6 @@ install_requires = [ 'configobj', 'cryptography>=1.2', # load_pem_x509_certificate 'josepy', @@ -8,7 +8,7 @@ 'parsedatetime>=1.3', # Calendar.parseDT 'pyrfc3339', 'pytz', -@@ -58,6 +57,7 @@ dev_extras = [ +@@ -53,6 +52,7 @@ dev_extras = [ 'astroid==1.3.5', 'coverage', 'ipdb', |