summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Halchenko <debian@onerussian.com>2016-03-07 22:46:45 -0500
committerYaroslav Halchenko <debian@onerussian.com>2016-03-07 22:46:45 -0500
commit27a3997f190ea7fb78df79aaa698a5b00d1d9dc1 (patch)
tree6eee9163af9b962f9e4fbeda5a76bb8347828757
parentc188acd8ef9fe30967078a1eb4c24dd603994d70 (diff)
downloadfail2ban-27a3997f190ea7fb78df79aaa698a5b00d1d9dc1.tar.gz
added a patch to use CONFIG_DIR variable which listens to envriondebian/0.9.4-1
-rw-r--r--debian/patches/0001-BF-use-tests.utils.CONFIG_DIR-instead-of-fixed-one-C.patch43
-rw-r--r--debian/patches/series1
2 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches/0001-BF-use-tests.utils.CONFIG_DIR-instead-of-fixed-one-C.patch b/debian/patches/0001-BF-use-tests.utils.CONFIG_DIR-instead-of-fixed-one-C.patch
new file mode 100644
index 00000000..7fe826ac
--- /dev/null
+++ b/debian/patches/0001-BF-use-tests.utils.CONFIG_DIR-instead-of-fixed-one-C.patch
@@ -0,0 +1,43 @@
+From bb0dc17a874a296dfc86bdabf5d2e8a113b87141 Mon Sep 17 00:00:00 2001
+From: Yaroslav Halchenko <debian@onerussian.com>
+Date: Mon, 7 Mar 2016 22:40:36 -0500
+Subject: [PATCH] BF: use tests.utils.CONFIG_DIR instead of fixed one (Closes
+ #1348)
+
+---
+ fail2ban/tests/fail2banregextestcase.py | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/fail2ban/tests/fail2banregextestcase.py b/fail2ban/tests/fail2banregextestcase.py
+index 2fd362c..e4af50e 100644
+--- a/fail2ban/tests/fail2banregextestcase.py
++++ b/fail2ban/tests/fail2banregextestcase.py
+@@ -40,6 +40,7 @@ except ImportError:
+ from ..client import fail2banregex
+ from ..client.fail2banregex import Fail2banRegex, get_opt_parser, output
+ from .utils import LogCaptureTestCase, logSys
++from .utils import CONFIG_DIR
+
+
+ fail2banregex.logSys = logSys
+@@ -48,8 +49,6 @@ def _test_output(*args):
+
+ fail2banregex.output = _test_output
+
+-CONF_FILES_DIR = os.path.abspath(
+- os.path.join(os.path.dirname(__file__),"..", "..", "config"))
+ TEST_FILES_DIR = os.path.join(os.path.dirname(__file__), "files")
+
+
+@@ -66,7 +65,7 @@ class Fail2banRegexTest(LogCaptureTestCase):
+ FILENAME_02 = os.path.join(TEST_FILES_DIR, "testcase02.log")
+ FILENAME_WRONGCHAR = os.path.join(TEST_FILES_DIR, "testcase-wrong-char.log")
+
+- FILTER_SSHD = os.path.join(CONF_FILES_DIR, 'filter.d', 'sshd.conf')
++ FILTER_SSHD = os.path.join(CONFIG_DIR, 'filter.d', 'sshd.conf')
+
+ def setUp(self):
+ """Call before every test case."""
+--
+2.7.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 7438f9f3..b0758058 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
deb_init_paths
deb_manpages_reportbug
+0001-BF-use-tests.utils.CONFIG_DIR-instead-of-fixed-one-C.patch