ports/security/py-certbot/files/patch-certbot-compat-misc.py
Danilo G. Baio c55f495230 security/py-[acme|certbot]: Update to 1.3.0
Add patch to satisfy a 'test' error, our local patch to fix config
file path was reverted upstream, we need some action there.

Changelog:	https://github.com/certbot/certbot/releases/tag/v1.3.0

PR:		244826
Approved by:	koobs (python, maintainer)
2020-03-18 00:21:59 +00:00

36 lines
1.1 KiB
Python

# Incorrect config file path since update to 0.29.1
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233909
# https://github.com/certbot/certbot/pull/6702
# https://github.com/certbot/certbot/pull/7056
# TODO: Upstream
--- certbot/compat/misc.py.orig 2020-01-14 18:41:31 UTC
+++ certbot/compat/misc.py
@@ -74,6 +74,11 @@ LINUX_DEFAULT_FOLDERS = {
'work': '/var/lib/letsencrypt',
'logs': '/var/log/letsencrypt',
}
+FREEBSD_DEFAULT_FOLDERS = {
+ 'config': '/usr/local/etc/letsencrypt',
+ 'work': '/var/db/letsencrypt',
+ 'logs': '/var/log/letsencrypt',
+}
def get_default_folder(folder_type):
@@ -88,8 +93,13 @@ def get_default_folder(folder_type):
"""
if os.name != 'nt':
- # Linux specific
- return LINUX_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]
# Windows specific
return WINDOWS_DEFAULT_FOLDERS[folder_type]