Subject: bug#60707: closed (Re: bug#60707: [PATCH] gnu: services: Fix fail2ban configuration serialization.)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 10 Jan 2023 16:02:02 +0000

Your bug report

#60707: [PATCH] gnu: services: Fix fail2ban configuration serialization.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60707: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60707
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#60707: [PATCH] gnu: services: Fix fail2ban configuration serialization.
From: Maxim Cournoyer <[email-masked]>
To: muradm <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Tue, 10 Jan 2023 11:00:52 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi!

(Please make sure to keep all participants such as Bruno in '--cc' in
the fututer to make it more likely they see your v2!)

muradm <[email-masked]> writes:

> This fixes a regression from 543d971ed2a1d9eb934af1f51930741d7cc4e7ef whereby
> match-lambda due to configuration field reordering.
>
> * gnu/services/security.scm:
> [serialize-fail2ban-ignore-cache-configuration]: Switch to match-record.
> [serialize-fail2ban-jail-filter-configuration]: Switch to match-record.
> [serialize-fail2ban-jail-action-configuration]: Switch to match-record.

LGTM.  Thanks to Bruno for the suggestion to use match-record.

Applied as dc403ec7f1.

-- 
Thanks,
Maxim

Subject: [PATCH] gnu: services: Fix fail2ban configuration serialization.
From: muradm <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 10 Jan 2023 13:11:36 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

This fixes a regression from 543d971ed2a1d9eb934af1f51930741d7cc4e7ef whereby
match-lambda due to configuration field reordering.

* gnu/services/security.scm:
[serialize-fail2ban-ignore-cache-configuration]: Remove first _ field.
[serialize-fail2ban-jail-filter-configuration]: Remove first _ field.
[serialize-fail2ban-jail-action-configuration]: Remove first _ field.
---
 gnu/services/security.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/services/security.scm b/gnu/services/security.scm
index 50111455fb..53b3914a4f 100644
--- a/gnu/services/security.scm
+++ b/gnu/services/security.scm
@@ -44,7 +44,7 @@ (define-configuration/no-serialization fail2ban-ignore-cache-configuration
 
 (define serialize-fail2ban-ignore-cache-configuration
   (match-lambda
-    (($ <fail2ban-ignore-cache-configuration> _ key max-count max-time)
+    (($ <fail2ban-ignore-cache-configuration> key max-count max-time)
      (format #f "key=\"~a\", max-count=~d, max-time=~d"
              key max-count max-time))))
 
@@ -56,7 +56,7 @@ (define-configuration/no-serialization fail2ban-jail-filter-configuration
 
 (define serialize-fail2ban-jail-filter-configuration
   (match-lambda
-    (($ <fail2ban-jail-filter-configuration> _ name mode)
+    (($ <fail2ban-jail-filter-configuration> name mode)
      (format #f "~a~@[[mode=~a]~]" name (maybe-value mode)))))
 
 (define (argument? a)
@@ -88,7 +88,7 @@ (define (serialize-fail2ban-jail-action-configuration-arguments args)
 
 (define serialize-fail2ban-jail-action-configuration
   (match-lambda
-    (($ <fail2ban-jail-action-configuration> _ name arguments)
+    (($ <fail2ban-jail-action-configuration> name arguments)
      (format
       #f "~a~a"
       name
-- 
2.38.1