mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: fail2ban: Improve snippet.
* gnu/packages/admin.scm (fail2ban) [source]<modules>: Remove (srfi srfi-26). <snippet>: Use gexp. Move substitute* patches... [arguments]<phases>: ...to phases 'patch-setup.py and 'disable-some-tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
bbae08827f
commit
f8bd2dbbd5
1 changed files with 11 additions and 15 deletions
|
@ -6218,23 +6218,19 @@ alias cysdig=sudo csysdig --modern-bpf
|
||||||
"'usr/share/doc/fail2ban'"))))
|
"'usr/share/doc/fail2ban'"))))
|
||||||
(add-after 'unpack 'disable-some-tests
|
(add-after 'unpack 'disable-some-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
(define (make-suite str)
|
(define (make-suite-regex tests)
|
||||||
(string-append "tests.addTest\\(loadTests\\(" str "\\)\\)"))
|
(string-append "tests.addTest\\(loadTests\\(("
|
||||||
|
(string-join tests "|")
|
||||||
|
")\\)\\)"))
|
||||||
;; disable tests performing unacceptable side-effects
|
;; disable tests performing unacceptable side-effects
|
||||||
(substitute* "fail2ban/tests/utils.py"
|
(substitute* "fail2ban/tests/utils.py"
|
||||||
(((make-suite "actiontestcase.CommandActionTest"))
|
(((make-suite-regex (list "actiontestcase.CommandActionTest"
|
||||||
"")
|
"misctestcase.SetupTest"
|
||||||
(((make-suite "misctestcase.SetupTest"))
|
"filtertestcase.DNSUtilsNetworkTests"
|
||||||
"")
|
"filtertestcase.IgnoreIPDNS"
|
||||||
(((make-suite "filtertestcase.DNSUtilsNetworkTests"))
|
"filtertestcase.GetFailures"
|
||||||
"")
|
"fail2banclienttestcase.Fail2banServerTest"
|
||||||
(((make-suite "filtertestcase.IgnoreIPDNS"))
|
"servertestcase.ServerConfigReaderTests")))
|
||||||
"")
|
|
||||||
(((make-suite "filtertestcase.GetFailures"))
|
|
||||||
"")
|
|
||||||
(((make-suite "fail2banclienttestcase.Fail2banServerTest"))
|
|
||||||
"")
|
|
||||||
(((make-suite "servertestcase.ServerConfigReaderTests"))
|
|
||||||
""))))
|
""))))
|
||||||
(add-before 'build 'fix-default-config
|
(add-before 'build 'fix-default-config
|
||||||
(lambda _
|
(lambda _
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue