Subject: [PATCH v2] gnu: sshguard: Update to 2.5.0.

From: Ashish SHUKLA <[email-masked]>
Date: Sun, 27 Apr 2025 15:31:23 +0200

* gnu/packages/admin.scm (sshguard): Update to 2.5.0.
[arguments]: Add a phase.

Change-Id: I774ef37069ded85412e55a9d83f76bc989ff8ec3
---
Hi,

This revision adds support for specifying configuration through an
environment variable, as right now configuration path is hardcoded,
making it unusable.

 gnu/packages/admin.scm | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index bd4c9c1c3c..d74f973eaf 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -72,7 +72,7 @@
 ;;; Copyright © 2024 nathan <[email-masked]>
 ;;; Copyright © 2024 Nikita Domnitskii <[email-masked]>
 ;;; Copyright © 2024 Roman Scherer <[email-masked]>
-;;; Copyright © 2024 Ashish SHUKLA <[email-masked]>
+;;; Copyright © 2024, 2025 Ashish SHUKLA <[email-masked]>
 ;;; Copyright © 2024 Ashvith Shetty <[email-masked]>
 ;;; Copyright © 2025 Dariqq <[email-masked]>
 ;;; Copyright © 2024 nik gaffney <[email-masked]>
@@ -6770,7 +6770,7 @@ (define-public rdfind
 (define-public sshguard
   (package
     (name "sshguard")
-    (version "2.4.3")
+    (version "2.5.0")
     (source
      (origin
        (method git-fetch)
@@ -6779,10 +6779,20 @@ (define-public sshguard
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1dkijr287zpwdz1bjdchxzmwf1sk6vzpkycz1skm25lkaba6nd9r"))))
+        (base32 "07hwbc6p29nnc5pgcdd3x5x0mry3l7d8ls8zq4yjpy35whs3l29f"))))
     (build-system gnu-build-system)
     (native-inputs
      (list autoconf automake bison flex python-docutils))
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; patch sshguard to find configuration through
+               ;; environment variable
+               (add-after 'unpack 'patch-sshguard
+                 (lambda _
+                   (substitute* "src/sshguard.in"
+                     (("^config=.*$")
+                      "config=${SSHGUARD_CONFIG_FILE:-@sysconfdir@/sshguard.conf}\n")))))))
     (home-page "https://sshguard.net/")
     (synopsis "Daemon to blocks SSH brute-force attacks")
     (description

base-commit: 97ea59b846c5267098a019f36c84dcaa55fb123e
-- 
2.49.0