[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#78066] [PATCH v3 2/6] gnu: fail2ban: Move setup and test patches to
From: |
Nicolas Graves |
Subject: |
[bug#78066] [PATCH v3 2/6] gnu: fail2ban: Move setup and test patches to phases. |
Date: |
Sun, 4 May 2025 10:56:22 +0200 |
* gnu/packages/admin.scm (fail2ban)
[source]<snippet>: Move setup and test substitutions...
[arguments]<phases>: ...to phases 'patch-setup.py and
'disable-some-tests.
---
gnu/packages/admin.scm | 71 +++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 36 deletions(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 216776e62c..d47a1935c3 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -6193,42 +6193,7 @@ (define-public fail2ban
"paths-fedora.conf"
"paths-freebsd.conf"
"paths-opensuse.conf"
- "paths-osx.conf")))
- ;; Get rid of absolute file names.
- (substitute* "setup.py"
- (("/etc/fail2ban")
- "etc/fail2ban")
- (("/var/lib/fail2ban")
- "var/lib/fail2ban")
- (("\"/usr/bin/\"")
- "\"usr/bin/\"")
- (("\"/usr/lib/fail2ban/\"")
- "\"usr/lib/fail2ban/\"")
- (("'/usr/share/doc/fail2ban'")
- "'usr/share/doc/fail2ban'"))
- ;; disable tests performing unacceptable side-effects
- (let ((make-suite (lambda (t)
- (string-append
- "tests.addTest.unittest.makeSuite."
- t ".."))))
- (substitute* "fail2ban/tests/utils.py"
- (((make-suite "actiontestcase.CommandActionTest"))
- "")
- (((make-suite "misctestcase.SetupTest"))
- "")
- (((make-suite
- "filtertestcase.DNSUtilsNetworkTests"))
- "")
- (((make-suite "filtertestcase.IgnoreIPDNS"))
- "")
- (((make-suite "filtertestcase.GetFailures"))
- "")
- (((make-suite
- "fail2banclienttestcase.Fail2banServerTest"))
- "")
- (((make-suite
- "servertestcase.ServerConfigReaderTests"))
- "")))))
+ "paths-osx.conf")))))
(patches (search-patches
"fail2ban-0.11.2_fix-setuptools-drop-2to3.patch"
"fail2ban-python310-server-action.patch"
@@ -6243,6 +6208,40 @@ (define-public fail2ban
(add-before 'build 'invoke-2to3
(lambda _
(invoke "./fail2ban-2to3")))
+ (add-after 'unpack 'patch-setup.py
+ (lambda _
+ ;; Get rid of absolute file names.
+ (substitute* "setup.py"
+ (("/etc/fail2ban")
+ "etc/fail2ban")
+ (("/var/lib/fail2ban")
+ "var/lib/fail2ban")
+ (("\"/usr/bin/\"")
+ "\"usr/bin/\"")
+ (("\"/usr/lib/fail2ban/\"")
+ "\"usr/lib/fail2ban/\"")
+ (("'/usr/share/doc/fail2ban'")
+ "'usr/share/doc/fail2ban'"))))
+ (add-after 'unpack 'disable-some-tests
+ (lambda _
+ (define (make-suite str)
+ (string-append "tests.addTest.unittest.makeSuite." str
".."))
+ ;; disable tests performing unacceptable side-effects
+ (substitute* "fail2ban/tests/utils.py"
+ (((make-suite "actiontestcase.CommandActionTest"))
+ "")
+ (((make-suite "misctestcase.SetupTest"))
+ "")
+ (((make-suite "filtertestcase.DNSUtilsNetworkTests"))
+ "")
+ (((make-suite "filtertestcase.IgnoreIPDNS"))
+ "")
+ (((make-suite "filtertestcase.GetFailures"))
+ "")
+ (((make-suite
"fail2banclienttestcase.Fail2banServerTest"))
+ "")
+ (((make-suite
"servertestcase.ServerConfigReaderTests"))
+ ""))))
(add-before 'install 'fix-default-config
(lambda* (#:key outputs #:allow-other-keys)
(substitute* '("config/paths-common.conf"
--
2.49.0
- [bug#78066] [PATCH v3 0/6] Fix fail2ban build, Nicolas Graves, 2025/05/04
- [bug#78066] [PATCH v3 1/6] gnu: fail2ban: Move file deletion to source snippet., Nicolas Graves, 2025/05/04
- [bug#78066] [PATCH v3 5/6] gnu: fail2ban: Improve style., Nicolas Graves, 2025/05/04
- [bug#78066] [PATCH v3 4/6] gnu: fail2ban: Improve style., Nicolas Graves, 2025/05/04
- [bug#78066] [PATCH v3 6/6] gnu: fail2ban: Improve snippet., Nicolas Graves, 2025/05/04
- [bug#78066] [PATCH v3 3/6] gnu: fail2ban: Update to 1.1.0., Nicolas Graves, 2025/05/04
- [bug#78066] [PATCH v3 2/6] gnu: fail2ban: Move setup and test patches to phases.,
Nicolas Graves <=
- bug#78066: [PATCH v3 0/6] Fix fail2ban build, Ludovic Courtès, 2025/05/06