[bug#78066,v2,1/6] gnu: fail2ban: Move file deletion to source snippet.

Message ID 20250503140234.9752-2-ngraves@ngraves.fr
State New
Headers
Series Fix fail2ban build. |

Commit Message

Nicolas Graves May 3, 2025, 1:59 p.m. UTC
  * gnu/packages/admin.scm (fail2ban)
  [arguments]<phases>: Move multiple file deletion from here...
  [source]<snippet>: ...to here.
---
 gnu/packages/admin.scm | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
  

Patch

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index d7ae926809..bd07a73c99 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -6244,6 +6244,15 @@  (define-public fail2ban
               (modules '((guix build utils)))
               (snippet
                '(begin
+                  ;; Replacing those by our own paths-guix.conf
+                  (with-directory-excursion "config"
+                    (for-each delete-file
+                              '("paths-arch.conf"
+                                "paths-debian.conf"
+                                "paths-fedora.conf"
+                                "paths-freebsd.conf"
+                                "paths-opensuse.conf"
+                                "paths-osx.conf")))
                   ;; Get rid of absolute file names.
                   (substitute* "setup.py"
                     (("/etc/fail2ban")
@@ -6307,14 +6316,6 @@  (define-public fail2ban
                     (lambda* (#:key inputs #:allow-other-keys)
                       ;; deleting things that are not feasible to fix
                       ;; or won't be used any way
-                      (with-directory-excursion "config"
-                        (for-each delete-file
-                                  '("paths-arch.conf"
-                                    "paths-debian.conf"
-                                    "paths-fedora.conf"
-                                    "paths-freebsd.conf"
-                                    "paths-opensuse.conf"
-                                    "paths-osx.conf")))
                       (with-directory-excursion "config/action.d"
                         (for-each delete-file
                                   '("apf.conf"