summaryrefslogtreecommitdiff
path: root/security/py-certbot/files
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--security/py-certbot/files/patch-certbot-compat-misc.py36
-rw-r--r--security/py-certbot/files/patch-certbot___internal_tests_cli__test.py28
-rw-r--r--security/py-certbot/files/patch-src-certbot-compat-misc.py36
-rw-r--r--security/py-certbot/files/patch-src-certbot-internal_tests-cli__test.py28
4 files changed, 64 insertions, 64 deletions
diff --git a/security/py-certbot/files/patch-certbot-compat-misc.py b/security/py-certbot/files/patch-certbot-compat-misc.py
deleted file mode 100644
index 56031716086a..000000000000
--- a/security/py-certbot/files/patch-certbot-compat-misc.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 2023-04-04 15:06:41 UTC
-+++ certbot/compat/misc.py
-@@ -100,6 +100,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: str) -> str:
-@@ -113,8 +118,13 @@ def get_default_folder(folder_type: str) -> str:
-
- """
- 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]
-
diff --git a/security/py-certbot/files/patch-certbot___internal_tests_cli__test.py b/security/py-certbot/files/patch-certbot___internal_tests_cli__test.py
deleted file mode 100644
index c5c1cd41e898..000000000000
--- a/security/py-certbot/files/patch-certbot___internal_tests_cli__test.py
+++ /dev/null
@@ -1,28 +0,0 @@
---- certbot/_internal/tests/cli_test.py.orig 2023-04-04 15:06:41 UTC
-+++ certbot/_internal/tests/cli_test.py
-@@ -1,6 +1,7 @@
- """Tests for certbot._internal.cli."""
- import argparse
- import copy
-+import sys
- from importlib import reload as reload_module
- import io
- import sys
-@@ -60,9 +61,14 @@ class FlagDefaultTest(unittest.TestCase):
-
- def test_default_directories(self):
- if os.name != 'nt':
-- assert cli.flag_default('config_dir') == '/etc/letsencrypt'
-- assert cli.flag_default('work_dir') == '/var/lib/letsencrypt'
-- assert cli.flag_default('logs_dir') == '/var/log/letsencrypt'
-+ if sys.platform.startswith('freebsd') or sys.platform.startswith('dragonfly'):
-+ assert cli.flag_default('config_dir') == '/usr/local/etc/letsencrypt'
-+ assert cli.flag_default('work_dir') == '/var/db/letsencrypt'
-+ assert cli.flag_default('logs_dir') == '/var/log/letsencrypt'
-+ else:
-+ assert cli.flag_default('config_dir') == '/etc/letsencrypt'
-+ assert cli.flag_default('work_dir') == '/var/lib/letsencrypt'
-+ assert cli.flag_default('logs_dir') == '/var/log/letsencrypt'
- else:
- assert cli.flag_default('config_dir') == 'C:\\Certbot'
- assert cli.flag_default('work_dir') == 'C:\\Certbot\\lib'
diff --git a/security/py-certbot/files/patch-src-certbot-compat-misc.py b/security/py-certbot/files/patch-src-certbot-compat-misc.py
new file mode 100644
index 000000000000..1ffb2afd1010
--- /dev/null
+++ b/security/py-certbot/files/patch-src-certbot-compat-misc.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
+# https://github.com/certbot/certbot/pull/6702
+# https://github.com/certbot/certbot/pull/7056
+# TODO: Upstream
+
+--- src/certbot/compat/misc.py.orig 2023-04-04 15:06:41 UTC
++++ src/certbot/compat/misc.py
+@@ -100,6 +100,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: str) -> str:
+@@ -113,8 +118,13 @@ def get_default_folder(folder_type: str) -> str:
+
+ """
+ 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]
+
diff --git a/security/py-certbot/files/patch-src-certbot-internal_tests-cli__test.py b/security/py-certbot/files/patch-src-certbot-internal_tests-cli__test.py
new file mode 100644
index 000000000000..d89ec8254b9e
--- /dev/null
+++ b/security/py-certbot/files/patch-src-certbot-internal_tests-cli__test.py
@@ -0,0 +1,28 @@
+--- src/certbot/_internal/tests/cli_test.py.orig 2023-04-04 15:06:41 UTC
++++ src/certbot/_internal/tests/cli_test.py
+@@ -1,6 +1,7 @@
+ """Tests for certbot._internal.cli."""
+ import argparse
+ import copy
++import sys
+ from importlib import reload as reload_module
+ import io
+ import sys
+@@ -60,9 +61,14 @@ class FlagDefaultTest(unittest.TestCase):
+
+ def test_default_directories(self):
+ if os.name != 'nt':
+- assert cli.flag_default('config_dir') == '/etc/letsencrypt'
+- assert cli.flag_default('work_dir') == '/var/lib/letsencrypt'
+- assert cli.flag_default('logs_dir') == '/var/log/letsencrypt'
++ if sys.platform.startswith('freebsd') or sys.platform.startswith('dragonfly'):
++ assert cli.flag_default('config_dir') == '/usr/local/etc/letsencrypt'
++ assert cli.flag_default('work_dir') == '/var/db/letsencrypt'
++ assert cli.flag_default('logs_dir') == '/var/log/letsencrypt'
++ else:
++ assert cli.flag_default('config_dir') == '/etc/letsencrypt'
++ assert cli.flag_default('work_dir') == '/var/lib/letsencrypt'
++ assert cli.flag_default('logs_dir') == '/var/log/letsencrypt'
+ else:
+ assert cli.flag_default('config_dir') == 'C:\\Certbot'
+ assert cli.flag_default('work_dir') == 'C:\\Certbot\\lib'