From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH 0/2] Fix fail2ban build Resent-From: Rodion Goritskov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Apr 2025 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Rodion Goritskov X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174561200319634 (code B ref -1); Fri, 25 Apr 2025 20:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Apr 2025 20:13:23 +0000 Received: from localhost ([127.0.0.1]:53585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8PQJ-00056Z-1A for submit@debbugs.gnu.org; Fri, 25 Apr 2025 16:13:23 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33180) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8PQE-00055Z-PL for submit@debbugs.gnu.org; Fri, 25 Apr 2025 16:13:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u8PQ8-0003tA-8P for guix-patches@gnu.org; Fri, 25 Apr 2025 16:13:12 -0400 Received: from mail.goritskov.com ([65.108.121.176]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u8PQ5-0003fU-SP for guix-patches@gnu.org; Fri, 25 Apr 2025 16:13:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=goritskov.com; s=04012025; t=1745611984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=z8xu1GyIIevdzOcGi4frxLMsfa+Yej5j0yMn/07ihNI=; b=n1+CFAIKvFLKZk1vvP67lZRNyGYSQ7UAuA77vu6JGkuVR1Czkwq3kL6KyUDL9FMzAmrlEI mwn92lHZfxH2dB5OgLyi0IlH9QdJgfNFMGu8sI5ZW+LSyB71H6wQ6FnY+0ELfZ4iQskDEt eqwqIUelJQajHXjyVpMixcB8kqePbOg= Received: from bumblebee-old.fritz.box (port-92-196-240-221.dynamic.as20676.net [92.196.240.221]) by mail.goritskov.com (OpenSMTPD) with ESMTPSA id d281ea62 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 25 Apr 2025 20:13:04 +0000 (UTC) From: Rodion Goritskov Date: Fri, 25 Apr 2025 22:12:30 +0200 Message-ID: <20250425201230.12492-1-rodion@goritskov.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=65.108.121.176; envelope-from=rodion@goritskov.com; helo=mail.goritskov.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Hi! Currently fail2ban is not building [1] because its test suite is not compatible with Python 3.11. Quick fix is to use Python 3.10 there. Probably I will find some time to update fail2ban package in the nearest future (because it is quite old now, four years passed already). However, I think it is good to have the current version building for now. [1] - https://issues.guix.gnu.org/77996 Rodion Goritskov (2): gnu: python: Export wrap-python3. gnu: fail2ban: Build with Python 3.10. gnu/packages/admin.scm | 3 ++- gnu/packages/python.scm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH 1/2] gnu: python: Export wrap-python3. References: <20250425201230.12492-1-rodion@goritskov.com> In-Reply-To: <20250425201230.12492-1-rodion@goritskov.com> Resent-From: Rodion Goritskov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Apr 2025 20:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Rodion Goritskov Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.174561235221138 (code B ref 78066); Fri, 25 Apr 2025 20:20:02 +0000 Received: (at 78066) by debbugs.gnu.org; 25 Apr 2025 20:19:12 +0000 Received: from localhost ([127.0.0.1]:53628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8PVw-0005Uq-0q for submit@debbugs.gnu.org; Fri, 25 Apr 2025 16:19:12 -0400 Received: from mail.goritskov.com ([65.108.121.176]:58750) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8PVt-0005Ua-9w for 78066@debbugs.gnu.org; Fri, 25 Apr 2025 16:19:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=goritskov.com; s=04012025; t=1745612346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3QJ2JTO/RJvgP4EouPGi+8raQCAVGozQL0twCmNRgx0=; b=RBoSnGwA80nERt/1U8YEfzyrKPigD+XifatSYS+ntloiJJM21ybI09GcSx4EjBMBiIjAdB 5IqNO6pcHnJsSN59bg7qkyMH5BVC0fRLsrYejYvydl+WmZPNovr94R8IfZNl6ueMl5FZog kr+eTqwlO/vO8tjtruSnD8qsQK3QV+8= Received: from bumblebee-old.fritz.box (port-92-196-240-221.dynamic.as20676.net [92.196.240.221]) by mail.goritskov.com (OpenSMTPD) with ESMTPSA id 67ccb6e2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 25 Apr 2025 20:19:06 +0000 (UTC) From: Rodion Goritskov Date: Fri, 25 Apr 2025 22:18:08 +0200 Message-ID: <20250425201809.13507-1-rodion@goritskov.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/python.scm (wrap-python3): Export wrap-python3. Change-Id: I89f8b53d0b5451dadb6f6e1c604523e8a718cb19 --- gnu/packages/python.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index dccd3cdd0e..00f4f9e07b 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -105,7 +105,8 @@ (define-module (gnu packages python) #:use-module (srfi srfi-26) #:export (customize-site - guix-pythonpath-search-path)) + guix-pythonpath-search-path + wrap-python3)) (define* (customize-site version) "Generate a install-sitecustomize.py phase, using VERSION." -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH 2/2] gnu: fail2ban: Build with Python 3.10. Resent-From: Rodion Goritskov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Apr 2025 20:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Rodion Goritskov Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.174561236621172 (code B ref 78066); Fri, 25 Apr 2025 20:20:03 +0000 Received: (at 78066) by debbugs.gnu.org; 25 Apr 2025 20:19:26 +0000 Received: from localhost ([127.0.0.1]:53631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8PW9-0005VQ-Jl for submit@debbugs.gnu.org; Fri, 25 Apr 2025 16:19:25 -0400 Received: from mail.goritskov.com ([65.108.121.176]:49000) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8PW7-0005VE-J8 for 78066@debbugs.gnu.org; Fri, 25 Apr 2025 16:19:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=goritskov.com; s=04012025; t=1745612361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iMbg/r4CeufVDKpClbAXyUfR5hEMhMCGLhkul1Go684=; b=Cdf296qk4IygmJ/Wr7PaAkzT595KtqE3xfGgwKu3BWseM3a/EGGYAwOltbpr95FXEXLkFn jDg/Nb+/z41hYzU1qvWdsxbnn6Ci5d4QfiZRWxE6bsHic8WsNOkWbn+OrODR9/0AeGtjgW KKqQ/pZCXMBN6IZ2nRBFeVDD4/DMIbc= Received: from bumblebee-old.fritz.box (port-92-196-240-221.dynamic.as20676.net [92.196.240.221]) by mail.goritskov.com (OpenSMTPD) with ESMTPSA id 7659d9ad (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 25 Apr 2025 20:19:21 +0000 (UTC) From: Rodion Goritskov Date: Fri, 25 Apr 2025 22:18:09 +0200 Message-ID: <20250425201809.13507-2-rodion@goritskov.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250425201809.13507-1-rodion@goritskov.com> References: <20250425201809.13507-1-rodion@goritskov.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban): Change Python version used to 3.10 to fix test problems. Change-Id: I67d2cf3c465ab1639659402d50357395afb35213 --- gnu/packages/admin.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index d7ae926809..225ae87b06 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6289,7 +6289,8 @@ (define-public fail2ban "fail2ban-paths-guix-conf.patch")))) (build-system python-build-system) (arguments - '(#:phases (modify-phases %standard-phases + `(#:python ,(wrap-python3 python-3.10) + #:phases (modify-phases %standard-phases (add-before 'build 'invoke-2to3 (lambda _ (invoke "./fail2ban-2to3"))) -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH 0/2] Fix fail2ban build References: <20250425201230.12492-1-rodion@goritskov.com> In-Reply-To: <20250425201230.12492-1-rodion@goritskov.com> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 26 Apr 2025 15:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.174567959729010 (code B ref 78066); Sat, 26 Apr 2025 15:00:02 +0000 Received: (at 78066) by debbugs.gnu.org; 26 Apr 2025 14:59:57 +0000 Received: from localhost ([127.0.0.1]:34012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8h0X-0007Xq-7p for submit@debbugs.gnu.org; Sat, 26 Apr 2025 10:59:57 -0400 Received: from 10.mo562.mail-out.ovh.net ([46.105.72.220]:38441) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8h0T-0007Xa-6L for 78066@debbugs.gnu.org; Sat, 26 Apr 2025 10:59:56 -0400 Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net [51.68.80.175]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4ZlCYM0Jxqz1g6F for <78066@debbugs.gnu.org>; Sat, 26 Apr 2025 14:59:50 +0000 (UTC) Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net. [127.0.0.1]) by director1.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sat, 26 Apr 2025 14:59:50 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.140.178]) by director1.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZlCYL4l0PzHcF2 for <78066@debbugs.gnu.org>; Sat, 26 Apr 2025 14:59:50 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.7]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 34D68C3A57 for <78066@debbugs.gnu.org>; Sat, 26 Apr 2025 14:59:50 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G0022b0ac566-bbf6-4592-9acc-2c6a27fe0a1f, 71B27894A99BB3B761C0D32CA48F74712B6A5776) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 From: Nicolas Graves Date: Sat, 26 Apr 2025 16:59:49 +0200 Message-ID: <87ldrnezoa.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 17646792191950971535 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheehhedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepteefueekheeltdffvdeiueeljeekhfduuefhudekgfdtveegteegtdekheeuiedvnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=7EQUYKM/oQypAvxC9dzJYQfva2Bm/6sBStLJSJ7KS+0=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745679591; v=1; b=ejesnRWjQ3GzkugmTqgnpUVFEQsSy95RnwQ/Lm44/TIHIYaDWsGUhAgsjuTbhIf5QZbyEsiZ vGB0YzNQu+GH68SV2bLWhNzJvtpfEBABkRk2wL1Tabh1gep++1UxcrGePoTJm3z99Nu8RcSjWph sxfZaSsgXHdJ8n0amfncFmnNj30Z1E5+mgqRWQzgD5mxFfODb4gGsrMzCmQMZGT470UlSrsVZW6 uA7xig/B5sF/g3HxRQeMKiimM+Z3QU6CYCsxI0pn6+ZRoS8AThej86lkC1Cb7+ER9PTf7TNtJSX RDBgbERLNCVhaa9hOtr+UaSyyDQA2c8Q8ZnQZAiZw+V4w== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Rodion! I think the issue with using a different Python version is that I'm not sure it behaves well in a profile, since python packages are propagated. Maybe the CLI might work well, but importing python modules would probably be broken. If it's only the tests that are broken, maybe it's better to ignore failing tests? Or even better : simply update the package to a more recent version. I get the impression that it should work well from https://github.com/fail2ban/fail2ban/releases/tag/1.1.0 I'll see if such an update fixes your issue, if yes I'll send an update here. -- Best regards, Nicolas Graves From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH 0/2] Fix fail2ban build Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Apr 2025 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17457353871693 (code B ref 78066); Sun, 27 Apr 2025 06:30:02 +0000 Received: (at 78066) by debbugs.gnu.org; 27 Apr 2025 06:29:47 +0000 Received: from localhost ([127.0.0.1]:38283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8vWM-0000RF-JG for submit@debbugs.gnu.org; Sun, 27 Apr 2025 02:29:46 -0400 Received: from 8.mo562.mail-out.ovh.net ([46.105.60.65]:49413) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8vWI-0000R0-8T for 78066@debbugs.gnu.org; Sun, 27 Apr 2025 02:29:44 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4ZlcBD1RHsz1X7J for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 06:29:39 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 06:29:39 +0000 (UTC) Received: from mta11.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.139.248]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZlcBC4tX8zyBw for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 06:29:39 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.5]) by mta11.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 4CAEE263A59 for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 06:29:39 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G00231618021-39d1-4d53-9700-d21a82d6a3e5, 9AB25D737CCC7858AAE0948041C432A519AE1DDE) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.171.153 From: Nicolas Graves In-Reply-To: <87ldrnezoa.fsf@ngraves.fr> References: <20250425201230.12492-1-rodion@goritskov.com> <87ldrnezoa.fsf@ngraves.fr> Date: Sun, 27 Apr 2025 08:29:34 +0200 Message-ID: <87zfg2t8vl.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 14903255594747355791 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheejfeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepgfffveffteekfeeuuefgtedtieduhfffueeghefgfeeuffegveetvdektdduheeinecuffhomhgrihhnpehgnhhurdhorhhgpdhgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpkeelrddvtdejrddujedurdduheefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedvmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=Pmrjx9XDyoz6yBUntXTna0Z8eVJSrNsybf5JSM6h7dY=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745735380; v=1; b=DztAhTJiv+4WLZ3NkEQSHVA5jGZ0GAt032i7DWRr84ckrib2BTFNvbv7Mb/P06jyC6LILh+t CMb93rZI7+iYeQUoTPhFqrIH2eXg8nd2UxL2vR/2y/kwi1Oa7W8joUSZfRl7eJFh2EMgbEh5qQy uCYC/dLWwFsJVSFP5K5fGuEyGglpIcYziMM54SIyCZKdZOgzdzAg0OH643uD4OmaqYRnAoi7fz8 t4ZLmokB1s7g98xTFZwK7ciYZ7K/wHy+jhVSWNM9s6Aq0x4ChEph8sRXcNRZVjQzBg2gb8kD3Px utAy22/qMAZM0z8k4oZEtJZxxtmQcGsP4tBRJXd5jxbkg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I managed to get tests to pass properly with an update and minimal changes (but a change in the build-system [1], I still have to replace the install phase to avoid a world-rebuild). The subject with fail2ban is that there's also a complete config, and since I'm not a user, I'm not sure everything will work well there. But let's update it, and modify the fail2ban configuration if things have changed there. See you in a few minutes/hours when I'll send an updated patch series! [1]: https://lists.gnu.org/archive/html/guix-devel/2025-04/msg00332.html On 2025-04-26 16:59, Nicolas Graves via Guix-patches via wrote: > Hi Rodion! > > I think the issue with using a different Python version is that I'm not > sure it behaves well in a profile, since python packages are propagated. > Maybe the CLI might work well, but importing python modules would > probably be broken. > > If it's only the tests that are broken, maybe it's better to ignore > failing tests? > > Or even better : simply update the package to a more recent version. I > get the impression that it should work well from > https://github.com/fail2ban/fail2ban/releases/tag/1.1.0 > > I'll see if such an update fixes your issue, if yes I'll send an update > here. -- Best regards, Nicolas Graves From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 0/5] Update fail2ban. References: <20250425201230.12492-1-rodion@goritskov.com> In-Reply-To: <20250425201230.12492-1-rodion@goritskov.com> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Apr 2025 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17457449808770 (code B ref 78066); Sun, 27 Apr 2025 09:10:02 +0000 Received: (at 78066) by debbugs.gnu.org; 27 Apr 2025 09:09:40 +0000 Received: from localhost ([127.0.0.1]:38983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8y16-0002HE-51 for submit@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:40 -0400 Received: from 7.mo562.mail-out.ovh.net ([46.105.55.234]:46927) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8y11-0002Gm-Ai for 78066@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:37 -0400 Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net [152.228.215.222]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkj2YM7z1WSX; Sun, 27 Apr 2025 09:09:33 +0000 (UTC) Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net. [127.0.0.1]) by director3.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 09:09:32 +0000 (UTC) Received: from mta6.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.96.170]) by director3.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkh6kVcz7wVj; Sun, 27 Apr 2025 09:09:32 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.4]) by mta6.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id C7892D43E54; Sun, 27 Apr 2025 09:09:31 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-103G0053eea1231-8857-4974-b9ef-b6545a352747, 9AB25D737CCC7858AAE0948041C432A519AE1DDE) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.171.153 From: Nicolas Graves Date: Sun, 27 Apr 2025 11:08:07 +0200 Message-ID: <20250427090915.11846-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17603445043908240098 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheejieejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdekledrvddtjedrudejuddrudehfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=GcDQfswOQkdK9bpXsL7v2olIjXQ+3alsrVu3cr/Wop0=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745744973; v=1; b=GoOcOscq8XAnHknixWV8Xut0WOL2LJglBcA/KmokiiDgUmv85wW0cO46FRcTQcNSvxgWkfmd 4PIyLE3fqw7jaCdQihVu+PrLWfHHwZh5QamkBR40VOwJnxiZL5yVMKJMTyCIFYJYB3SYo2III6j aOkvb9VzXMsdq4jgIbZtNeuwb1aloqkLigO0ebO9u4RKkBGzv/JpGZinfuza2iHfn2SDuQVk5yi 8Unzgn9s/1G3XVbWOplyQKWGa44SA6nDSszcWHQJWH6AoRw0kzGF2+BlPIBKMfv7vSyMwegAULq YtSXZ+g20JgxLbPJ3E+R+TkRnst1uQvmFITmul2Qz+oFg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Instead of building fail2ban with Python@3.10, update it to run with Python@3.11. Nicolas Graves (5): gnu: fail2ban: Move file deletion to source snippet. gnu: fail2ban: Update to 1.1.0. gnu: fail2ban: Improve style. gnu: fail2ban: Improve snippet. gnu: fail2ban: Improve style. gnu/local.mk | 6 - gnu/packages/admin.scm | 325 ++++++++---------- .../fail2ban-0.11.2_CVE-2021-32749.patch | 155 --------- ...2ban-0.11.2_fix-setuptools-drop-2to3.patch | 64 ---- .../fail2ban-0.11.2_fix-test-suite.patch | 48 --- .../fail2ban-python310-server-action.patch | 27 -- .../fail2ban-python310-server-actions.patch | 25 -- .../fail2ban-python310-server-jails.patch | 25 -- 8 files changed, 147 insertions(+), 528 deletions(-) delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-action.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-actions.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-jails.patch -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 1/5] gnu: fail2ban: Move file deletion to source snippet. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Apr 2025 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17457449818783 (code B ref 78066); Sun, 27 Apr 2025 09:10:02 +0000 Received: (at 78066) by debbugs.gnu.org; 27 Apr 2025 09:09:41 +0000 Received: from localhost ([127.0.0.1]:38987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8y16-0002HO-JR for submit@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:41 -0400 Received: from 7.mo563.mail-out.ovh.net ([46.105.59.58]:35625) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8y12-0002Gx-SN for 78066@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:37 -0400 Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net [79.137.60.36]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkl14MZz1Rjp; Sun, 27 Apr 2025 09:09:35 +0000 (UTC) Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net. [127.0.0.1]) by director2.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 09:09:35 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.108.25.205]) by director2.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkl0Zb7zy5M; Sun, 27 Apr 2025 09:09:35 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.0]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 3E1D0C3A63; Sun, 27 Apr 2025 09:09:34 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-110S0042205ee18-eeef-4970-9e84-ecda164ae0c7, 9AB25D737CCC7858AAE0948041C432A519AE1DDE) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.171.153 From: Nicolas Graves Date: Sun, 27 Apr 2025 11:08:08 +0200 Message-ID: <20250427090915.11846-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250427090915.11846-1-ngraves@ngraves.fr> References: <20250427090915.11846-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17604289468518884066 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheejieekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdekuedujeeukeelfeevheeiueeuhedttdfhfeefudekhedujeehleeiffehjeelnecuffhomhgrihhnpehsvghtuhhprdhphienucfkphepuddvjedrtddrtddruddpkeelrddvtdejrddujedurdduheefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehieefmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=nDbvoCksDmasOTv5WU4+0A7TbCU1f3S80Gs6WYeoO0Y=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745744975; v=1; b=by+UgpDtyOELt/oef+5TY0MSbDHBdVlGbHjrmKR8clz28VoZNEE7EcmBeVWXGew509BozXqS yQ207obTzHNmLKcun5Cftb5npEu9jz4qnuYEY9R2qZtA9BLE/Cg7SEJ0HgHl2Lio+tZMVoQB3Rb 1d5GY+x70whe8VXo6g1wHGkTUtDxZQlJZe+2tVRx3nHGVUnJn4BBQRI44bsxmlQwIG6S81EmDLg /h/q7SDXWrmpzFFcKy3/gcXkMv/73H8+8oJBzv5a5SCOeMftlW13/VjrnMdtc+/TB5xvlGHqJ/A xUSMOZdtHUZXY8CHIScT7+7Bjdr7G2V6SH4q+i+qSwzsQ== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban) [arguments]: Move multiple file deletion from here... [source]: ...to here. --- gnu/packages/admin.scm | 64 +++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index d7ae926809..c6c5188d81 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6244,6 +6244,38 @@ (define-public fail2ban (modules '((guix build utils))) (snippet '(begin + ;; 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" + "bsd-ipfw.conf" + "dshield.conf" + "ipfilter.conf" + "ipfw.conf" + "firewallcmd-allports.conf" + "firewallcmd-common.conf" + "firewallcmd-ipset.conf" + "firewallcmd-multiport.conf" + "firewallcmd-new.conf" + "firewallcmd-rich-logging.conf" + "firewallcmd-rich-rules.conf" + "osx-afctl.conf" + "osx-ipfw.conf" + "pf.conf" + "nginx-block-map.conf" + "npf.conf" + "shorewall.conf" + "shorewall-ipset-proto6.conf" + "ufw.conf"))) ;; Get rid of absolute file names. (substitute* "setup.py" (("/etc/fail2ban") @@ -6305,38 +6337,6 @@ (define-public fail2ban "/etc/fail2ban"))))) (add-after 'fix-default-config 'set-action-dependencies (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" - "bsd-ipfw.conf" - "dshield.conf" - "ipfilter.conf" - "ipfw.conf" - "firewallcmd-allports.conf" - "firewallcmd-common.conf" - "firewallcmd-ipset.conf" - "firewallcmd-multiport.conf" - "firewallcmd-new.conf" - "firewallcmd-rich-logging.conf" - "firewallcmd-rich-rules.conf" - "osx-afctl.conf" - "osx-ipfw.conf" - "pf.conf" - "nginx-block-map.conf" - "npf.conf" - "shorewall.conf" - "shorewall-ipset-proto6.conf" - "ufw.conf"))) (let* ((lookup-cmd (lambda (i) (search-input-file inputs i))) (bin (lambda (i) -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 2/5] gnu: fail2ban: Update to 1.1.0. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Apr 2025 09:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17457449908824 (code B ref 78066); Sun, 27 Apr 2025 09:10:03 +0000 Received: (at 78066) by debbugs.gnu.org; 27 Apr 2025 09:09:50 +0000 Received: from localhost ([127.0.0.1]:38991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8y17-0002Hk-Qm for submit@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:50 -0400 Received: from 9.mo562.mail-out.ovh.net ([46.105.72.114]:40943) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8y14-0002H0-8w for 78066@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:40 -0400 Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net [79.137.60.36]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkm5YkWz1YW5; Sun, 27 Apr 2025 09:09:36 +0000 (UTC) Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net. [127.0.0.1]) by director2.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 09:09:36 +0000 (UTC) Received: from mta11.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.176.132]) by director2.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkm59vjzy5M; Sun, 27 Apr 2025 09:09:36 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.3]) by mta11.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 136A5263A59; Sun, 27 Apr 2025 09:09:35 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-102R00445130ad8-0c5e-4e90-902d-6a382d53833d, 9AB25D737CCC7858AAE0948041C432A519AE1DDE) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.171.153 From: Nicolas Graves Date: Sun, 27 Apr 2025 11:08:09 +0200 Message-ID: <20250427090915.11846-3-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250427090915.11846-1-ngraves@ngraves.fr> References: <20250427090915.11846-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17604570944647258850 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheejieejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekledrvddtjedrudejuddrudehfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=2/Ktgn145cfOSIXaYA1TA+ySL+QLSM1ZKxYRFs+RDo8=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745744976; v=1; b=W6aKaktwFFHgznJnqPiu2hSifpn9NTlfstzvExblkiKSv24VB410fVOSNAQw73EWxMdOo+fz R3nwTqBCy9lFyKb1KO08cdvmVXqS2QU37bUWgdSyfzPH4i6PrghK1/21DrJLTKTTXzjREN602dJ uKjmW1J/Ga/gu5W2tp3Sveo6aPrXYvykC6x5I6qjgdMbH7nphH3Nlb3xXt6nqGiOERpx30K9x5/ 6LMkqC9sC9caWm66rgnPItE6qbfpt2T4piHOEkaxc/Yf8fy4/ZKvOFsIrzQLcTxU03DZXagpksi oTaEoN/pEFk3T4efTjjGS8h99PNRazXp9tzFn0eXVGbVg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch, gnu/packages/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch, gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch, gnu/packages/patches/fail2ban-python310-server-action.patch, gnu/packages/fail2ban-python310-server-actions.patch: Delete patches. * gnu/local.mk: Deregister patches. * gnu/packages/admin.scm (fail2ban): Update to 1.1.0. [source]: Use (srfi srfi-26) for readability. : Deregister patches. [build-system]: Switch to pyproject-build-system. [arguments]: Remove phase 'invoke-2to3. Add phase 'avoid-external-binary-in-/bin to avoid creating a symlink to python-wrapper binary during installation (current 'install phase breaks otherwise). [native-inputs]: Add python-setuptools, python-wheel. --- gnu/local.mk | 6 - gnu/packages/admin.scm | 33 ++-- .../fail2ban-0.11.2_CVE-2021-32749.patch | 155 ------------------ ...2ban-0.11.2_fix-setuptools-drop-2to3.patch | 64 -------- .../fail2ban-0.11.2_fix-test-suite.patch | 48 ------ .../fail2ban-python310-server-action.patch | 27 --- .../fail2ban-python310-server-actions.patch | 25 --- .../fail2ban-python310-server-jails.patch | 25 --- 8 files changed, 15 insertions(+), 368 deletions(-) delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-action.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-actions.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-jails.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3f5e4cec38..be2639eeb4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1259,13 +1259,7 @@ dist_patch_DATA = \ %D%/packages/patches/expat-CVE-2024-45492.patch \ %D%/packages/patches/extempore-unbundle-external-dependencies.patch \ %D%/packages/patches/extundelete-e2fsprogs-1.44.patch \ - %D%/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch \ - %D%/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch \ - %D%/packages/patches/fail2ban-0.11.2_fix-test-suite.patch \ %D%/packages/patches/fail2ban-paths-guix-conf.patch \ - %D%/packages/patches/fail2ban-python310-server-action.patch \ - %D%/packages/patches/fail2ban-python310-server-actions.patch \ - %D%/packages/patches/fail2ban-python310-server-jails.patch \ %D%/packages/patches/faiss-tests-CMakeLists-find-googletest.patch \ %D%/packages/patches/falcosecurity-libs-shared-build.patch \ %D%/packages/patches/farstream-gupnp.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index c6c5188d81..689e9bcd4a 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6231,7 +6231,7 @@ (define-public sysdig (define-public fail2ban (package (name "fail2ban") - (version "0.11.2") + (version "1.1.0") (source (origin (method git-fetch) (uri (git-reference @@ -6240,8 +6240,8 @@ (define-public fail2ban (file-name (git-file-name name version)) (sha256 (base32 - "00d9q8m284q2wy6q462nipzszplfbvrs9fhgn0y3imwsc24kv1db")) - (modules '((guix build utils))) + "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) + (modules '((guix build utils) (srfi srfi-26))) (snippet '(begin ;; deleting things that are not feasible to fix @@ -6289,10 +6289,9 @@ (define-public 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 "..")))) + (let ((make-suite (cut string-append + "tests.addTest\\(loadTests\\(" + <> "\\)\\)"))) (substitute* "fail2ban/tests/utils.py" (((make-suite "actiontestcase.CommandActionTest")) "") @@ -6311,20 +6310,16 @@ (define-public fail2ban (((make-suite "servertestcase.ServerConfigReaderTests")) ""))))) - (patches (search-patches - "fail2ban-0.11.2_fix-setuptools-drop-2to3.patch" - "fail2ban-python310-server-action.patch" - "fail2ban-python310-server-actions.patch" - "fail2ban-python310-server-jails.patch" - "fail2ban-0.11.2_fix-test-suite.patch" - "fail2ban-0.11.2_CVE-2021-32749.patch" - "fail2ban-paths-guix-conf.patch")))) - (build-system python-build-system) + (patches (search-patches "fail2ban-paths-guix-conf.patch")))) + (build-system pyproject-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-before 'build 'invoke-2to3 + (add-after 'unpack 'avoid-external-binary-in-/bin (lambda _ - (invoke "./fail2ban-2to3"))) + (delete-file "fail2ban/setup.py") + (substitute* '("bin/fail2ban-testcases" + "setup.py") + ((".*updatePyExec.*") "")))) (add-before 'install 'fix-default-config (lambda* (#:key outputs #:allow-other-keys) (substitute* '("config/paths-common.conf" @@ -6410,6 +6405,8 @@ (define-public fail2ban "fail2ban-testcases")) (for-each install-man5 '("jail.conf"))))))))) + (native-inputs + (list python-setuptools python-wheel)) (inputs (list gawk coreutils-minimal curl diff --git a/gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch b/gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch deleted file mode 100644 index d3c677918c..0000000000 --- a/gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 410a6ce5c80dd981c22752da034f2529b5eee844 Mon Sep 17 00:00:00 2001 -From: sebres -Date: Mon, 21 Jun 2021 17:12:53 +0200 -Subject: [PATCH] fixed possible RCE vulnerability, unset escape variable - (default tilde) stops consider "~" char after new-line as composing escape - sequence - ---- - config/action.d/complain.conf | 2 +- - config/action.d/dshield.conf | 2 +- - config/action.d/mail-buffered.conf | 8 ++++---- - config/action.d/mail-whois-lines.conf | 2 +- - config/action.d/mail-whois.conf | 6 +++--- - config/action.d/mail.conf | 6 +++--- - 6 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/config/action.d/complain.conf b/config/action.d/complain.conf -index 3a5f882c9f..4d73b05859 100644 ---- a/config/action.d/complain.conf -+++ b/config/action.d/complain.conf -@@ -102,7 +102,7 @@ logpath = /dev/null - # Notes.: Your system mail command. Is passed 2 args: subject and recipient - # Values: CMD - # --mailcmd = mail -s -+mailcmd = mail -E 'set escape' -s - - # Option: mailargs - # Notes.: Additional arguments to mail command. e.g. for standard Unix mail: -diff --git a/config/action.d/dshield.conf b/config/action.d/dshield.conf -index c128bef348..3d5a7a53a9 100644 ---- a/config/action.d/dshield.conf -+++ b/config/action.d/dshield.conf -@@ -179,7 +179,7 @@ tcpflags = - # Notes.: Your system mail command. Is passed 2 args: subject and recipient - # Values: CMD - # --mailcmd = mail -s -+mailcmd = mail -E 'set escape' -s - - # Option: mailargs - # Notes.: Additional arguments to mail command. e.g. for standard Unix mail: -diff --git a/config/action.d/mail-buffered.conf b/config/action.d/mail-buffered.conf -index 325f185b2f..79b841049c 100644 ---- a/config/action.d/mail-buffered.conf -+++ b/config/action.d/mail-buffered.conf -@@ -17,7 +17,7 @@ actionstart = printf %%b "Hi,\n - The jail has been started successfully.\n - Output will be buffered until lines are available.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : started on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : started on " - - # Option: actionstop - # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) -@@ -28,13 +28,13 @@ actionstop = if [ -f ]; then - These hosts have been banned by Fail2Ban.\n - `cat ` - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : Summary from " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : Summary from " - rm - fi - printf %%b "Hi,\n - The jail has been stopped.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : stopped on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : stopped on " - - # Option: actioncheck - # Notes.: command executed once before each actionban command -@@ -55,7 +55,7 @@ actionban = printf %%b "`date`: ( failures)\n" >> - These hosts have been banned by Fail2Ban.\n - `cat ` - \nRegards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : Summary" -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : Summary" - rm - fi - -diff --git a/config/action.d/mail-whois-lines.conf b/config/action.d/mail-whois-lines.conf -index 3a3e56b2c7..d2818cb9b9 100644 ---- a/config/action.d/mail-whois-lines.conf -+++ b/config/action.d/mail-whois-lines.conf -@@ -72,7 +72,7 @@ actionunban = - # Notes.: Your system mail command. Is passed 2 args: subject and recipient - # Values: CMD - # --mailcmd = mail -s -+mailcmd = mail -E 'set escape' -s - - # Default name of the chain - # -diff --git a/config/action.d/mail-whois.conf b/config/action.d/mail-whois.conf -index 7fea34c40d..ab33b616dc 100644 ---- a/config/action.d/mail-whois.conf -+++ b/config/action.d/mail-whois.conf -@@ -20,7 +20,7 @@ norestored = 1 - actionstart = printf %%b "Hi,\n - The jail has been started successfully.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : started on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : started on " - - # Option: actionstop - # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) -@@ -29,7 +29,7 @@ actionstart = printf %%b "Hi,\n - actionstop = printf %%b "Hi,\n - The jail has been stopped.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : stopped on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : stopped on " - - # Option: actioncheck - # Notes.: command executed once before each actionban command -@@ -49,7 +49,7 @@ actionban = printf %%b "Hi,\n - Here is more information about :\n - `%(_whois_command)s`\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : banned from " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : banned from " - - # Option: actionunban - # Notes.: command executed when unbanning an IP. Take care that the -diff --git a/config/action.d/mail.conf b/config/action.d/mail.conf -index 5d8c0e154c..f4838ddcb6 100644 ---- a/config/action.d/mail.conf -+++ b/config/action.d/mail.conf -@@ -16,7 +16,7 @@ norestored = 1 - actionstart = printf %%b "Hi,\n - The jail has been started successfully.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : started on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : started on " - - # Option: actionstop - # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) -@@ -25,7 +25,7 @@ actionstart = printf %%b "Hi,\n - actionstop = printf %%b "Hi,\n - The jail has been stopped.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : stopped on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : stopped on " - - # Option: actioncheck - # Notes.: command executed once before each actionban command -@@ -43,7 +43,7 @@ actionban = printf %%b "Hi,\n - The IP has just been banned by Fail2Ban after - attempts against .\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : banned from " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : banned from " - - # Option: actionunban - # Notes.: command executed when unbanning an IP. Take care that the diff --git a/gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch b/gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch deleted file mode 100644 index b0b14364b1..0000000000 --- a/gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 5ac303df8a171f748330d4c645ccbf1c2c7f3497 Mon Sep 17 00:00:00 2001 -From: sebres -Date: Sun, 19 Sep 2021 18:49:18 +0200 -Subject: [PATCH] fix gh-3098: build fails with error in fail2ban setup - command: use_2to3 is invalid (setuptools 58+) - ---- - setup.py | 16 +--------------- - 1 file changed, 1 insertion(+), 15 deletions(-) - -diff --git a/setup.py b/setup.py -index f4c2550f6f..98413273c5 100755 ---- a/setup.py -+++ b/setup.py -@@ -48,7 +48,7 @@ - from glob import glob - - from fail2ban.setup import updatePyExec -- -+from fail2ban.version import version - - source_dir = os.path.realpath(os.path.dirname( - # __file__ seems to be overwritten sometimes on some python versions (e.g. bug of 2.6 by running under cProfile, etc.): -@@ -112,22 +112,12 @@ def update_scripts(self, dry_run=False): - # Wrapper to specify fail2ban own options: - class install_command_f2b(install): - user_options = install.user_options + [ -- ('disable-2to3', None, 'Specify to deactivate 2to3, e.g. if the install runs from fail2ban test-cases.'), - ('without-tests', None, 'without tests files installation'), - ] - def initialize_options(self): -- self.disable_2to3 = None - self.without_tests = not with_tests - install.initialize_options(self) - def finalize_options(self): -- global _2to3 -- ## in the test cases 2to3 should be already done (fail2ban-2to3): -- if self.disable_2to3: -- _2to3 = False -- if _2to3: -- cmdclass = self.distribution.cmdclass -- cmdclass['build_py'] = build_py_2to3 -- cmdclass['build_scripts'] = build_scripts_2to3 - if self.without_tests: - self.distribution.scripts.remove('bin/fail2ban-testcases') - -@@ -178,7 +168,6 @@ def run(self): - if setuptools: - setup_extra = { - 'test_suite': "fail2ban.tests.utils.gatherTests", -- 'use_2to3': True, - } - else: - setup_extra = {} -@@ -202,9 +191,6 @@ def run(self): - ('/usr/share/doc/fail2ban', doc_files) - ) - --# Get version number, avoiding importing fail2ban. --# This is due to tests not functioning for python3 as 2to3 takes place later --exec(open(join("fail2ban", "version.py")).read()) - - setup( - name = "fail2ban", diff --git a/gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch b/gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch deleted file mode 100644 index 91d973e72e..0000000000 --- a/gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 747d4683221b5584f9663695fb48145689b42ceb Mon Sep 17 00:00:00 2001 -From: sebres -Date: Mon, 4 Jan 2021 02:42:38 +0100 -Subject: [PATCH] fixes century selector of %ExY and %Exy in datepattern for - tests, considering interval from 2005 (alternate now) to now; + better - grouping algorithm for resulting century RE - ---- - fail2ban/server/strptime.py | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - -diff --git a/fail2ban/server/strptime.py b/fail2ban/server/strptime.py -index 1464a96d1f..39fc795865 100644 ---- a/fail2ban/server/strptime.py -+++ b/fail2ban/server/strptime.py -@@ -36,10 +36,30 @@ def _getYearCentRE(cent=(0,3), distance=3, now=(MyTime.now(), MyTime.alternateNo - Thereby respect possible run in the test-cases (alternate date used there) - """ - cent = lambda year, f=cent[0], t=cent[1]: str(year)[f:t] -+ def grp(exprset): -+ c = None -+ if len(exprset) > 1: -+ for i in exprset: -+ if c is None or i[0:-1] == c: -+ c = i[0:-1] -+ else: -+ c = None -+ break -+ if not c: -+ for i in exprset: -+ if c is None or i[0] == c: -+ c = i[0] -+ else: -+ c = None -+ break -+ if c: -+ return "%s%s" % (c, grp([i[len(c):] for i in exprset])) -+ return ("(?:%s)" % "|".join(exprset) if len(exprset[0]) > 1 else "[%s]" % "".join(exprset)) \ -+ if len(exprset) > 1 else "".join(exprset) - exprset = set( cent(now[0].year + i) for i in (-1, distance) ) - if len(now) and now[1]: -- exprset |= set( cent(now[1].year + i) for i in (-1, distance) ) -- return "(?:%s)" % "|".join(exprset) if len(exprset) > 1 else "".join(exprset) -+ exprset |= set( cent(now[1].year + i) for i in xrange(-1, now[0].year-now[1].year+1, distance) ) -+ return grp(sorted(list(exprset))) - - timeRE = TimeRE() - diff --git a/gnu/packages/patches/fail2ban-python310-server-action.patch b/gnu/packages/patches/fail2ban-python310-server-action.patch deleted file mode 100644 index 723d7f7aa6..0000000000 --- a/gnu/packages/patches/fail2ban-python310-server-action.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2b6bb2c1bed8f7009631e8f8c306fa3160324a49 Mon Sep 17 00:00:00 2001 -From: "Sergey G. Brester" -Date: Mon, 8 Feb 2021 17:19:24 +0100 -Subject: [PATCH] follow bpo-37324: :ref:`collections-abstract-base-classes` - moved to the :mod:`collections.abc` module - -(since 3.10-alpha.5 `MutableMapping` is missing in collections module) ---- - fail2ban/server/action.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/fail2ban/server/action.py b/fail2ban/server/action.py -index 3bc48fe046..f0f1e6f59a 100644 ---- a/fail2ban/server/action.py -+++ b/fail2ban/server/action.py -@@ -30,7 +30,10 @@ - import threading - import time - from abc import ABCMeta --from collections import MutableMapping -+try: -+ from collections.abc import MutableMapping -+except ImportError: -+ from collections import MutableMapping - - from .failregex import mapTag2Opt - from .ipdns import DNSUtils diff --git a/gnu/packages/patches/fail2ban-python310-server-actions.patch b/gnu/packages/patches/fail2ban-python310-server-actions.patch deleted file mode 100644 index e31316d28b..0000000000 --- a/gnu/packages/patches/fail2ban-python310-server-actions.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 42dee38ad2ac5c3f23bdf297d824022923270dd9 Mon Sep 17 00:00:00 2001 -From: "Sergey G. Brester" -Date: Mon, 8 Feb 2021 17:25:45 +0100 -Subject: [PATCH] amend for `Mapping` - ---- - fail2ban/server/actions.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/fail2ban/server/actions.py b/fail2ban/server/actions.py -index b7b95b445a..897d907c1a 100644 ---- a/fail2ban/server/actions.py -+++ b/fail2ban/server/actions.py -@@ -28,7 +28,10 @@ - import os - import sys - import time --from collections import Mapping -+try: -+ from collections.abc import Mapping -+except ImportError: -+ from collections import Mapping - try: - from collections import OrderedDict - except ImportError: diff --git a/gnu/packages/patches/fail2ban-python310-server-jails.patch b/gnu/packages/patches/fail2ban-python310-server-jails.patch deleted file mode 100644 index e5873c415e..0000000000 --- a/gnu/packages/patches/fail2ban-python310-server-jails.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9f1d1f4fbd0804695a976beb191f2c49a2739834 Mon Sep 17 00:00:00 2001 -From: "Sergey G. Brester" -Date: Mon, 8 Feb 2021 17:35:59 +0100 -Subject: [PATCH] amend for `Mapping` (jails) - ---- - fail2ban/server/jails.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/fail2ban/server/jails.py b/fail2ban/server/jails.py -index 972a8c4bd2..27e12ddf65 100644 ---- a/fail2ban/server/jails.py -+++ b/fail2ban/server/jails.py -@@ -22,7 +22,10 @@ - __license__ = "GPL" - - from threading import Lock --from collections import Mapping -+try: -+ from collections.abc import Mapping -+except ImportError: -+ from collections import Mapping - - from ..exceptions import DuplicateJailException, UnknownJailException - from .jail import Jail -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 3/5] gnu: fail2ban: Improve style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Apr 2025 09:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17457449928840 (code B ref 78066); Sun, 27 Apr 2025 09:10:03 +0000 Received: (at 78066) by debbugs.gnu.org; 27 Apr 2025 09:09:52 +0000 Received: from localhost ([127.0.0.1]:38995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8y1G-0002II-HL for submit@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:51 -0400 Received: from 8.mo563.mail-out.ovh.net ([46.105.60.197]:59957) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8y16-0002HC-3E for 78066@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:41 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkp36bvz1Rjw; Sun, 27 Apr 2025 09:09:38 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 09:09:38 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.148.241]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkp2FVszyB8; Sun, 27 Apr 2025 09:09:38 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.7]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id BE7E9C3A63; Sun, 27 Apr 2025 09:09:37 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-105G006a5444ff9-dda1-49e0-8021-eadc252f6010, 9AB25D737CCC7858AAE0948041C432A519AE1DDE) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.171.153 From: Nicolas Graves Date: Sun, 27 Apr 2025 11:08:10 +0200 Message-ID: <20250427090915.11846-4-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250427090915.11846-1-ngraves@ngraves.fr> References: <20250427090915.11846-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17605133894011380450 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheejieekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdehleeiffehtedvlefhffffjeefgfduhfetkeevheeiteduiedugfekuedtheejnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpkeelrddvtdejrddujedurdduheefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehieefmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=Q8x4XcFHnEHMsuRnRGuaYF7W8MA+fka6A1j+60JW7Yw=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745744978; v=1; b=CUGWE+qX61KMDWbQ6w4WKeYAhcQ8HPZpLURrOR0rvwyrRzAps9AxAKjU4Y98HZ/ikHYQ2Ief 723RR4ycuvHKt0kOZsOVVGS3K1E7incaO8ZlUs7tjft6imUcy+/9qwGCusEB1h+ro8kWJiaJd9a Ew2Nh413ardFR2m6aNAFnf4TAT6dObU08E7NpwQFkNqmqKT78SEmmRczMm8LOxgNY6GiHBjikOF uFcMgdJutUmYGsBWPH1mLZGiHB1EWnRXcc5FHc2s5HB6gIJggapBh1hr/+E878/gaIuRXd3Jc4C WPYN8cn1EsI0VdDyM8te72FWv8x9Sn+SrFFgBYr1dMtOQ== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban): Improve style (through guix-style). [arguments]: Rewrite using gexps. Rewrite phases 'set-action-dependencies and copy-man-pages for readability. --- gnu/packages/admin.scm | 321 +++++++++++++++++++---------------------- 1 file changed, 148 insertions(+), 173 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 689e9bcd4a..1f48eb264d 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6232,181 +6232,156 @@ (define-public fail2ban (package (name "fail2ban") (version "1.1.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/fail2ban/fail2ban") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) - (modules '((guix build utils) (srfi srfi-26))) - (snippet - '(begin - ;; 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" - "bsd-ipfw.conf" - "dshield.conf" - "ipfilter.conf" - "ipfw.conf" - "firewallcmd-allports.conf" - "firewallcmd-common.conf" - "firewallcmd-ipset.conf" - "firewallcmd-multiport.conf" - "firewallcmd-new.conf" - "firewallcmd-rich-logging.conf" - "firewallcmd-rich-rules.conf" - "osx-afctl.conf" - "osx-ipfw.conf" - "pf.conf" - "nginx-block-map.conf" - "npf.conf" - "shorewall.conf" - "shorewall-ipset-proto6.conf" - "ufw.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 (cut string-append - "tests.addTest\\(loadTests\\(" - <> "\\)\\)"))) - (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")) - ""))))) - (patches (search-patches "fail2ban-paths-guix-conf.patch")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fail2ban/fail2ban") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) + (modules '((guix build utils) + (srfi srfi-26))) + (snippet '(begin + ;; 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" "bsd-ipfw.conf" + "dshield.conf" + "ipfilter.conf" + "ipfw.conf" + "firewallcmd-allports.conf" + "firewallcmd-common.conf" + "firewallcmd-ipset.conf" + "firewallcmd-multiport.conf" + "firewallcmd-new.conf" + "firewallcmd-rich-logging.conf" + "firewallcmd-rich-rules.conf" + "osx-afctl.conf" + "osx-ipfw.conf" + "pf.conf" + "nginx-block-map.conf" + "npf.conf" + "shorewall.conf" + "shorewall-ipset-proto6.conf" + "ufw.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 (cut string-append + "tests.addTest\\(loadTests\\(" <> + "\\)\\)"))) + (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")) + ""))))) + (patches (search-patches "fail2ban-paths-guix-conf.patch")))) (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'avoid-external-binary-in-/bin - (lambda _ - (delete-file "fail2ban/setup.py") - (substitute* '("bin/fail2ban-testcases" - "setup.py") - ((".*updatePyExec.*") "")))) - (add-before 'install 'fix-default-config - (lambda* (#:key outputs #:allow-other-keys) - (substitute* '("config/paths-common.conf" - "fail2ban/tests/utils.py" - "fail2ban/client/configreader.py" - "fail2ban/client/fail2bancmdline.py" - "fail2ban/client/fail2banregex.py") - (("/etc/fail2ban") - (string-append (assoc-ref outputs "out") - "/etc/fail2ban"))))) - (add-after 'fix-default-config 'set-action-dependencies - (lambda* (#:key inputs #:allow-other-keys) - (let* ((lookup-cmd (lambda (i) - (search-input-file inputs i))) - (bin (lambda (i) - (lookup-cmd (string-append "/bin/" i)))) - (sbin (lambda (i) - (lookup-cmd (string-append "/sbin/" i)))) - (ip (sbin "ip")) - (sendmail (sbin "sendmail"))) - (substitute* (find-files "config/action.d" "\\.conf$") - ;; TODO: deal with geoiplookup .. - (("(awk|curl|dig|jq)" all cmd) - (bin cmd)) - (("(cat|echo|grep|head|printf|wc) " all - cmd) - (string-append (bin cmd) " ")) - ((" (date|rm|sed|tail|touch|tr) " all - cmd) - (string-append " " - (bin cmd) " ")) - (("cut -d") - (string-append (bin "cut") " -d")) - (("`date`") - (string-append "`" - (bin "date") "`")) - (("id -") - (string-append (bin "id") " -")) - (("ip -([46]) addr" all ver) - (string-append ip " -" ver " addr")) - (("ip route") - (string-append ip " route")) - (("ipset ") - (string-append (sbin "ipset") " ")) - (("(iptables|ip6tables) <" all cmd) - (string-append (sbin cmd) " <")) - (("/usr/bin/nsupdate") - (bin "nsupdate")) - (("mail -E") - (string-append sendmail " -E")) - (("nftables = nft") - (string-append "nftables = " (sbin "nft"))) - (("perl -e") - (string-append (bin "perl") " -e")) - (("/usr/sbin/sendmail") - sendmail) - (("test -e") - (string-append (bin "test") " -e")) - (("_whois = whois") - (string-append "_whois = " (bin "whois"))))) - (substitute* "config/jail.conf" - (("before = paths-debian.conf") - "before = paths-guix.conf")))) - (add-after 'install 'copy-man-pages - (lambda* (#:key outputs #:allow-other-keys) - (let* ((man (string-append (assoc-ref outputs "out") - "/man")) - (install-man (lambda (m) - (lambda (f) - (install-file (string-append f - "." m) - (string-append man - "/man" m))))) - (install-man1 (install-man "1")) - (install-man5 (install-man "5"))) - (with-directory-excursion "man" - (for-each install-man1 - '("fail2ban" - "fail2ban-client" - "fail2ban-python" - "fail2ban-regex" - "fail2ban-server" - "fail2ban-testcases")) - (for-each install-man5 - '("jail.conf"))))))))) - (native-inputs - (list python-setuptools python-wheel)) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'avoid-external-binary-in-/bin + (lambda _ + (delete-file "fail2ban/setup.py") + (substitute* '("bin/fail2ban-testcases" "setup.py") + ((".*updatePyExec.*") + "")))) + (add-before 'install 'fix-default-config + (lambda _ + (substitute* '("config/paths-common.conf" + "fail2ban/tests/utils.py" + "fail2ban/client/configreader.py" + "fail2ban/client/fail2bancmdline.py" + "fail2ban/client/fail2banregex.py") + (("/etc/fail2ban") + (string-append #$output "/etc/fail2ban"))))) + (add-after 'fix-default-config 'set-action-dependencies + (lambda* (#:key inputs #:allow-other-keys) + (define (lookup dir file) + (search-input-file inputs (string-append "/" dir "/" file))) + + (substitute* (find-files "config/action.d" "\\.conf$") + ;; TODO: deal with geoiplookup .. + (("(awk|curl|dig|jq)" all cmd) + (lookup "bin" cmd)) + (("(cat|echo|grep|head|printf|wc) " all cmd) + (string-append (lookup "bin" cmd) " ")) + ((" (date|rm|sed|tail|touch|tr) " all cmd) + (string-append " " (lookup "bin" cmd) " ")) + (("cut -d") + (string-append (lookup "bin" "cut") " -d")) + (("`date`") + (string-append "`" (lookup "bin" "date") "`")) + (("id -") + (string-append (lookup "bin" "id") " -")) + (("ip (route|-[46] addr)" all rest) + (string-append (lookup "sbin" "ip") rest)) + (("ipset ") + (string-append (lookup "sbin" "ipset") " ")) + (("(iptables|ip6tables) <" all cmd) + (string-append (lookup "sbin" cmd) " <")) + (("/usr/bin/nsupdate") + (lookup "bin" "nsupdate")) + (("mail -E") + (string-append (lookup "sbin" "sendmail") " -E")) + (("nftables = nft") + (string-append "nftables = " (lookup "sbin" "nft"))) + (("perl -e") + (string-append (lookup "bin" "perl") " -e")) + (("/usr/sbin/sendmail") + (lookup "sbin" "sendmail")) + (("test -e") + (string-append (lookup "bin" "test") " -e")) + (("_whois = whois") + (string-append "_whois = " (lookup "bin" "whois")))) + + (substitute* "config/jail.conf" + (("before = paths-debian.conf") + "before = paths-guix.conf")))) + (add-after 'install 'copy-man-pages + (lambda _ + (define (install-man m) + (lambda (f) + (install-file (string-append f "." m) + (string-append #$output "man/man" m)))) + + (with-directory-excursion "man" + (for-each (install-man "1") + '("fail2ban" "fail2ban-client" "fail2ban-python" + "fail2ban-regex" "fail2ban-server" + "fail2ban-testcases")) + ((install-man "5") "jail.conf"))))))) + (native-inputs (list python-setuptools python-wheel)) (inputs (list gawk coreutils-minimal curl -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 4/5] gnu: fail2ban: Improve snippet. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Apr 2025 09:10:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17457449928848 (code B ref 78066); Sun, 27 Apr 2025 09:10:04 +0000 Received: (at 78066) by debbugs.gnu.org; 27 Apr 2025 09:09:52 +0000 Received: from localhost ([127.0.0.1]:38997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8y1H-0002IX-Rs for submit@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:52 -0400 Received: from 8.mo563.mail-out.ovh.net ([46.105.60.197]:33059) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8y17-0002HX-Fr for 78066@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:43 -0400 Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net [152.228.215.222]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkr4cdsz1Rjp; Sun, 27 Apr 2025 09:09:40 +0000 (UTC) Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net. [127.0.0.1]) by director3.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 09:09:40 +0000 (UTC) Received: from mta2.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.188.184]) by director3.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkr3nz7z7wVj; Sun, 27 Apr 2025 09:09:40 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.5]) by mta2.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id BEAABBA3F3A; Sun, 27 Apr 2025 09:09:39 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-111S00570d6064e-e549-4a09-9b9e-448fba730604, 9AB25D737CCC7858AAE0948041C432A519AE1DDE) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.171.153 From: Nicolas Graves Date: Sun, 27 Apr 2025 11:08:11 +0200 Message-ID: <20250427090915.11846-5-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250427090915.11846-1-ngraves@ngraves.fr> References: <20250427090915.11846-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17605696847177769698 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheejieekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekledrvddtjedrudejuddrudehfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeifegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=JV3UUJiv0HhNNOU0R5r08xnFvraALbnrR10LKhPlArY=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745744980; v=1; b=U2KpleQ1Q99xTfsMqJCXwdMooMQ/xlGcT/mLxjz48iUScway2wXSwtWKmTBDCyBh8pLUzz/k OR1JNJioUzTDo7yFWh7TI57uM8UfZLSygVpWk0+OXcGiHUndncYTCfYgilg2KCSpz83NXdIubcj sayDTKfecgKbRIwKtWU7fAG1gVi+5XWKmZ4YPmM6mVsibKeq6h3JFNUrGAEX0ITFg0K88makSuW 1gFJB44kdbLGR4IX4ooNSrNoZpjre+Iea40hLYfxYpVJBos18C5Udq9Yh6te38FKbMiPQej7IJC BSWTsyDZpI1bGdwjQyIocEfVEABojtCkCbbH6FkY9d8mg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban) [source]: Remove (srfi srfi-26). : Use gexp. Move substitute* patches... [arguments]: ...to phases 'patch-setup.py and 'disable-some-tests. --- gnu/packages/admin.scm | 127 +++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 63 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 1f48eb264d..25bce63aaf 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6241,69 +6241,36 @@ (define-public fail2ban (file-name (git-file-name name version)) (sha256 (base32 "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) - (modules '((guix build utils) - (srfi srfi-26))) - (snippet '(begin - ;; 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" "bsd-ipfw.conf" - "dshield.conf" - "ipfilter.conf" - "ipfw.conf" - "firewallcmd-allports.conf" - "firewallcmd-common.conf" - "firewallcmd-ipset.conf" - "firewallcmd-multiport.conf" - "firewallcmd-new.conf" - "firewallcmd-rich-logging.conf" - "firewallcmd-rich-rules.conf" - "osx-afctl.conf" - "osx-ipfw.conf" - "pf.conf" - "nginx-block-map.conf" - "npf.conf" - "shorewall.conf" - "shorewall-ipset-proto6.conf" - "ufw.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 (cut string-append - "tests.addTest\\(loadTests\\(" <> - "\\)\\)"))) - (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")) - ""))))) + (modules '((guix build utils))) + (snippet #~(begin + ;; 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" "bsd-ipfw.conf" + "dshield.conf" + "ipfilter.conf" + "ipfw.conf" + "firewallcmd-allports.conf" + "firewallcmd-common.conf" + "firewallcmd-ipset.conf" + "firewallcmd-multiport.conf" + "firewallcmd-new.conf" + "firewallcmd-rich-logging.conf" + "firewallcmd-rich-rules.conf" + "osx-afctl.conf" + "osx-ipfw.conf" + "pf.conf" + "nginx-block-map.conf" + "npf.conf" + "shorewall.conf" + "shorewall-ipset-proto6.conf" + "ufw.conf"))))) (patches (search-patches "fail2ban-paths-guix-conf.patch")))) (build-system pyproject-build-system) (arguments @@ -6316,6 +6283,40 @@ (define-public fail2ban (substitute* '("bin/fail2ban-testcases" "setup.py") ((".*updatePyExec.*") "")))) + (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\\(loadTests\\(" 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 _ (substitute* '("config/paths-common.conf" -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 5/5] gnu: fail2ban: Improve style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Apr 2025 09:10:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17457449938855 (code B ref 78066); Sun, 27 Apr 2025 09:10:04 +0000 Received: (at 78066) by debbugs.gnu.org; 27 Apr 2025 09:09:53 +0000 Received: from localhost ([127.0.0.1]:38999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8y1I-0002Ik-J6 for submit@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:52 -0400 Received: from 6.mo563.mail-out.ovh.net ([46.105.55.200]:55877) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8y19-0002Hr-GQ for 78066@debbugs.gnu.org; Sun, 27 Apr 2025 05:09:44 -0400 Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net [79.137.60.36]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgkt04Dgz1XJJ; Sun, 27 Apr 2025 09:09:42 +0000 (UTC) Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net. [127.0.0.1]) by director2.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 27 Apr 2025 09:09:41 +0000 (UTC) Received: from mta2.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.113.125]) by director2.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zlgks6hhtzyCg; Sun, 27 Apr 2025 09:09:41 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.6]) by mta2.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 62063BA3F3A; Sun, 27 Apr 2025 09:09:41 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G002a89c58dd-0d1a-4b66-a7b5-5fc50c7d6c93, 9AB25D737CCC7858AAE0948041C432A519AE1DDE) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.171.153 From: Nicolas Graves Date: Sun, 27 Apr 2025 11:08:12 +0200 Message-ID: <20250427090915.11846-6-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250427090915.11846-1-ngraves@ngraves.fr> References: <20250427090915.11846-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17605978322293285602 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheejieekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekledrvddtjedrudejuddrudehfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeifegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=4ZhHEIxb5z7W9LTdYsxs0CHUamVffevnm84u3+keLOk=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745744982; v=1; b=iLxnFvnP2iS1uFVz5DlaMLkN8mc6bxPdmOQs8lGaDCgOlwEQswWxAwhAnI5PYNPIoZ35ztu1 ke9k7bS//o0R4v0OdFJ3qBpcIRoqUrWkDJpjUTRYnfM096TgrJGkBv2rwz5cGRpRlyNdg054EUe Ym3XUv6bExt+MpqaoQ9NeMnKo5IYMHu2kW5J54PdskVmBP9x7fSH1kR7j4l3SPZV6dWb/oirKM7 0bkKhERES/co/+UXrRkZiauzyHXSD/Qj3nbXOmgc4BITroYjvl9lBhjcChfEzLdkJ8tavD3FXLC Q1Jvwe1nR4ucz88lxdVQmbIjVy3Qof2ZL0Wr9lUtHDIYg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban)[arguments]: Rewrite phase 'disable-some-tests. --- gnu/packages/admin.scm | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 25bce63aaf..777d0abb47 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6299,23 +6299,19 @@ (define-public fail2ban "'usr/share/doc/fail2ban'")))) (add-after 'unpack 'disable-some-tests (lambda _ - (define (make-suite str) - (string-append "tests.addTest\\(loadTests\\(" str "\\)\\)")) + (define (make-suite-regex tests) + (string-append "tests.addTest\\(loadTests\\((" + (string-join tests "|") + ")\\)\\)")) ;; 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")) + (((make-suite-regex (list "actiontestcase.CommandActionTest" + "misctestcase.SetupTest" + "filtertestcase.DNSUtilsNetworkTests" + "filtertestcase.IgnoreIPDNS" + "filtertestcase.GetFailures" + "fail2banclienttestcase.Fail2banServerTest" + "servertestcase.ServerConfigReaderTests"))) "")))) (add-before 'install 'fix-default-config (lambda _ -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 1/5] gnu: fail2ban: Move file deletion to source snippet. Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Apr 2025 08:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves Cc: 78066@debbugs.gnu.org, Rodion Goritskov Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.174591364421041 (code B ref 78066); Tue, 29 Apr 2025 08:01:01 +0000 Received: (at 78066) by debbugs.gnu.org; 29 Apr 2025 08:00:44 +0000 Received: from localhost ([127.0.0.1]:47790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u9ftR-0005Su-J9 for submit@debbugs.gnu.org; Tue, 29 Apr 2025 04:00:43 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:46536) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u9ftM-0005Rr-Pe for 78066@debbugs.gnu.org; Tue, 29 Apr 2025 04:00:37 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id EF91026F; Tue, 29 Apr 2025 10:00:28 +0200 (CEST) Authentication-Results: hera.aquilenet.fr; none X-Virus-Scanned: Debian amavis at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP id oD_ysTgSambD; Tue, 29 Apr 2025 10:00:28 +0200 (CEST) Received: from jurong (176-179-191-150.abo.bbox.fr [176.179.191.150]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 89C46157; Tue, 29 Apr 2025 10:00:26 +0200 (CEST) Date: Tue, 29 Apr 2025 10:00:24 +0200 From: Andreas Enge Message-ID: References: <20250427090915.11846-1-ngraves@ngraves.fr> <20250427090915.11846-2-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250427090915.11846-2-ngraves@ngraves.fr> X-Rspamd-Queue-Id: EF91026F X-Spamd-Result: default: False [5.40 / 15.00]; SPAM_FLAG(5.00)[]; BAYES_HAM(-3.00)[99.99%]; NEURAL_SPAM(3.00)[1.000]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[] X-Spamd-Bar: +++++ X-Rspamd-Action: greylist X-Rspamd-Server: hera X-Spam-Level: ***** X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Nicolas, thanks for the update! Am Sun, Apr 27, 2025 at 11:08:08AM +0200 schrieb Nicolas Graves: > * gnu/packages/admin.scm (fail2ban) > [arguments]: Move multiple file deletion from here... > [source]: ...to here. > + ;; deleting things that are not feasible to fix > + ;; or won't be used any way What is the motivation for this change? I think we always remove non-free code and often bundled libraries in a snippet, but changes only related to the idiosyncrasies of Guix usually occur in the phases. In this way, "guix build -S" returns essentially the source code of a package. But this is not written policy, so no hard obstacle to pushing the commit; I just do not see why a snippet would be better than a phase. Andreas From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 0/5] Update fail2ban. Resent-From: Rodion Goritskov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Apr 2025 21:28:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17459620223972 (code B ref 78066); Tue, 29 Apr 2025 21:28:05 +0000 Received: (at 78066) by debbugs.gnu.org; 29 Apr 2025 21:27:02 +0000 Received: from localhost ([127.0.0.1]:35907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u9sTl-00011s-NQ for submit@debbugs.gnu.org; Tue, 29 Apr 2025 17:27:02 -0400 Received: from mail.goritskov.com ([65.108.121.176]:58468) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u9sTi-00011H-MZ for 78066@debbugs.gnu.org; Tue, 29 Apr 2025 17:27:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=goritskov.com; s=04012025; t=1745962015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Bp1Ja763dhgE4IWXxsyQTTDpsb9Ul+cvDJvSceukBrM=; b=J/QUsyuQDiIWij7dIdPd4ah/G1Q0zY63lwrOzG5hkGEOPvPTdtSbBd9ZlPaWgE6Tp9rU+V D4YAAvyPuiRd7mexHsORjRWv2ytuuMt1R2wpFsY7iNiX81u0Lkp6OQ2XwmNOIPvniSxjM2 sZk/1Qft5uCLYO7OG3pLWIlYgDFKZIk= Received: from bumblebee-serious (port-92-196-27-22.dynamic.as20676.net [92.196.27.22]) by mail.goritskov.com (OpenSMTPD) with ESMTPSA id b920e14a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 29 Apr 2025 21:26:55 +0000 (UTC) From: Rodion Goritskov In-Reply-To: <20250427090915.11846-1-ngraves@ngraves.fr> (Nicolas Graves via Guix-patches via's message of "Sun, 27 Apr 2025 11:08:07 +0200") References: <20250425201230.12492-1-rodion@goritskov.com> <20250427090915.11846-1-ngraves@ngraves.fr> Date: Tue, 29 Apr 2025 23:26:54 +0200 Message-ID: <86o6wed5gh.fsf@goritskov.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Nicolas! Thank you for your patch, it is great to have the updated version of fail2ban. I quickly tried to run available tests for fail2ban (it appears that Guix has some). I applied your patches and tried running: > make check-system TESTS="fail2ban-basic fail2ban-extension > fail2ban-simple" To find out that tests are failing: > /gnu/store/amc2p1x9gkgn6q6arak7ki4yxzcbs2cc-fail2ban-basic-test-builder:1: FAIL fail2ban running > /gnu/store/amc2p1x9gkgn6q6arak7ki4yxzcbs2cc-fail2ban-basic-test-builder:1: FAIL fail2ban socket ready > PASS: fail2ban running after restart > /gnu/store/amc2p1x9gkgn6q6arak7ki4yxzcbs2cc-fail2ban-basic-test-builder:1: FAIL fail2ban socket ready after restart > /gnu/store/amc2p1x9gkgn6q6arak7ki4yxzcbs2cc-fail2ban-basic-test-builder:1: FAIL fail2ban pid ready > /gnu/store/amc2p1x9gkgn6q6arak7ki4yxzcbs2cc-fail2ban-basic-test-builder:1: FAIL fail2ban log file > /gnu/store/amc2p1x9gkgn6q6arak7ki4yxzcbs2cc-fail2ban-basic-test-builder:1: FAIL fail2ban sshd jail running status output > /gnu/store/amc2p1x9gkgn6q6arak7ki4yxzcbs2cc-fail2ban-basic-test-builder:1: FAIL fail2ban sshd jail running exit code I have not investigated this problem yet, will try to do it tomorrow evening. Looks like "simple" and "extension" tests were already unstable (as per ci.guix.gnu.org), but "basic" was passing before the Python upgrade and the following changes. From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 1/5] gnu: fail2ban: Move file deletion to source snippet. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Apr 2025 08:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andreas Enge Cc: 78066@debbugs.gnu.org, Rodion Goritskov Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.174600000028622 (code B ref 78066); Wed, 30 Apr 2025 08:00:02 +0000 Received: (at 78066) by debbugs.gnu.org; 30 Apr 2025 08:00:00 +0000 Received: from localhost ([127.0.0.1]:39246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uA2MJ-0007RY-LH for submit@debbugs.gnu.org; Wed, 30 Apr 2025 04:00:00 -0400 Received: from 10.mo562.mail-out.ovh.net ([46.105.72.220]:58035) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uA2MF-0007RJ-Ud for 78066@debbugs.gnu.org; Wed, 30 Apr 2025 03:59:58 -0400 Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net [51.68.80.175]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4ZnV2x1ZsXz1d5G; Wed, 30 Apr 2025 07:59:52 +0000 (UTC) Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net. [127.0.0.1]) by director1.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Wed, 30 Apr 2025 07:59:52 +0000 (UTC) Received: from mta3.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.108.9.74]) by director1.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZnV2w4mhYz626v; Wed, 30 Apr 2025 07:59:52 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.5]) by mta3.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 0D23B3A3FDC; Wed, 30 Apr 2025 07:59:51 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-101G004b9d802ee-24bb-4a8c-96c2-ca23d7d478ab, 4BDBA972AF85C82894B67DEC658AB0CDA28C544E) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 37.67.182.183 From: Nicolas Graves In-Reply-To: References: <20250427090915.11846-1-ngraves@ngraves.fr> <20250427090915.11846-2-ngraves@ngraves.fr> Date: Wed, 30 Apr 2025 09:59:51 +0200 Message-ID: <87v7qm9j0o.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 15598217311052685919 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvieeiudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepveekleeujedthefgffekleekhffhffetgfdvheekleeuhfehueeljedtjefhvdfgnecukfhppeduvdejrddtrddtrddupdefjedrieejrddukedvrddukeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepfedprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheprghnughrvggrshesvghnghgvrdhfrhdprhgtphhtthhopehrohguihhonhesghhorhhithhskhhovhdrtghomhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=cGwwrRx2BjdMjlcwNcpGhEwpYlsr7+chABj7O6TQNsw=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1745999993; v=1; b=uwHs1GUex6IjsVUU7zBN9bOZ4T/hi4A2j9rnWXuj8HjAin7Xf695612ASGgV3b/jtwKUtktN v3jRrrMsaM73rdvG4i/Hxu0dv9JUdiSWQrRsQvczK21p+PvbhrR0oxMybd+/xAVE1ENt32B3anM zGebVEwMC7jzyQaY3Py8Pr324/bvdsC4ITTy77BbQQFOVRm5MG798IAFTv8cOqwFInhxe2oAMpl NM/h/B6FC25yq0gkY/6uFfYjuIvmGaEIdSsyOQNm7lJpCbpKcUAokjj6FASGwqb3gF9qNVIHo/d m75qkZ/l/jb8J9+Zb1t9Gs01oy8Q3fBc49G6fPOyIIPhA== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2025-04-29 10:00, Andreas Enge wrote: > Hello Nicolas, > > thanks for the update! > > Am Sun, Apr 27, 2025 at 11:08:08AM +0200 schrieb Nicolas Graves: >> * gnu/packages/admin.scm (fail2ban) >> [arguments]: Move multiple file deletion from here... >> [source]: ...to here. >> + ;; deleting things that are not feasible to fix >> + ;; or won't be used any way > > What is the motivation for this change? I think we always remove > non-free code and often bundled libraries in a snippet, but changes only > related to the idiosyncrasies of Guix usually occur in the phases. In this > way, "guix build -S" returns essentially the source code of a package. > > But this is not written policy, so no hard obstacle to pushing the > commit; I just do not see why a snippet would be better than a phase. My rationale was that those files are not going to be used and are replaced by a guix alternative file, provided as a patch. Since they are removed anyway, it's arguably better to remove them from source too, as not to download them when not needed. It might also be better for readability of the phases replacement. But it's not also an issue if we prefer to keep them in phases, I don't really care. -- Best regards, Nicolas Graves From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 1/5] gnu: fail2ban: Move file deletion to source snippet. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Apr 2025 08:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andreas Enge Cc: 78066@debbugs.gnu.org, Rodion Goritskov Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17460024975168 (code B ref 78066); Wed, 30 Apr 2025 08:42:02 +0000 Received: (at 78066) by debbugs.gnu.org; 30 Apr 2025 08:41:37 +0000 Received: from localhost ([127.0.0.1]:39483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uA30a-0001LH-Ip for submit@debbugs.gnu.org; Wed, 30 Apr 2025 04:41:36 -0400 Received: from 5.mo563.mail-out.ovh.net ([46.105.53.64]:54005) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uA30W-0001Kz-Mm for 78066@debbugs.gnu.org; Wed, 30 Apr 2025 04:41:34 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4ZnVyy3g4hz1J48; Wed, 30 Apr 2025 08:41:30 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Wed, 30 Apr 2025 08:41:30 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.148.244]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZnVyy32dSzyC0; Wed, 30 Apr 2025 08:41:30 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.0]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id EB3A1C3A82; Wed, 30 Apr 2025 08:41:29 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-99G00307fc4957-532e-44e8-9a3a-b2086cfd2b28, 4BDBA972AF85C82894B67DEC658AB0CDA28C544E) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 37.67.182.183 From: Nicolas Graves In-Reply-To: <87v7qm9j0o.fsf@ngraves.fr> References: <20250427090915.11846-1-ngraves@ngraves.fr> <20250427090915.11846-2-ngraves@ngraves.fr> <87v7qm9j0o.fsf@ngraves.fr> Date: Wed, 30 Apr 2025 10:41:29 +0200 Message-ID: <87cycu9h3a.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 16301341803118584415 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvieeivdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepveekleeujedthefgffekleekhffhffetgfdvheekleeuhfehueeljedtjefhvdfgnecukfhppeduvdejrddtrddtrddupdefjedrieejrddukedvrddukeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepfedprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheprghnughrvggrshesvghnghgvrdhfrhdprhgtphhtthhopehrohguihhonhesghhorhhithhskhhovhdrtghomhdpoffvtefjohhsthepmhhoheeifegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=WZ8CDkzfV1LSgsyj5KQ47K5xNzkphbtKSGClviu3PMw=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746002490; v=1; b=ababKbzkmf1DPbTM4deOwSBbGNMGuigAYjqB/S17a9u9Y9cU7VAEGr0/soYXVcyHcYe6e6lp Shmv9oC4LcW/5p/64vlPN5PtlPCi1A5+fkpmr5BMIE1YPcuTyfYNvhWzPIfIvHw4dp3CJZBBV70 VKcBJNW6JCvqoPA3fV8dpk/DZSrR0Dp+kKqsOmWGgyXhh4Vg2eBYYboQv9zhalR8R7va1cDlmXh jJrPDOQV9KA8j5AXU6VujSonhHgFSOkMtsyzevAdHr7q2a/6y3aQ+y2MlMnLUvojVTT5NO6YBNL ORs09Z59qfkVoWM8EwIMk604tA35cXJnZnL6pQb0QvCdg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2025-04-30 09:59, Nicolas Graves wrote: > On 2025-04-29 10:00, Andreas Enge wrote: > >> Hello Nicolas, >> >> thanks for the update! >> >> Am Sun, Apr 27, 2025 at 11:08:08AM +0200 schrieb Nicolas Graves: >>> * gnu/packages/admin.scm (fail2ban) >>> [arguments]: Move multiple file deletion from here... >>> [source]: ...to here. >>> + ;; deleting things that are not feasible to fix >>> + ;; or won't be used any way >> >> What is the motivation for this change? I think we always remove >> non-free code and often bundled libraries in a snippet, but changes only >> related to the idiosyncrasies of Guix usually occur in the phases. In this >> way, "guix build -S" returns essentially the source code of a package. >> >> But this is not written policy, so no hard obstacle to pushing the >> commit; I just do not see why a snippet would be better than a phase. > > My rationale was that those files are not going to be used and are > replaced by a guix alternative file, provided as a patch. Since they > are removed anyway, it's arguably better to remove them from source too, > as not to download them when not needed. It might also be better for > readability of the phases replacement. > > But it's not also an issue if we prefer to keep them in phases, I don't > really care. Maybe it's better to only remove files for other distros in snippet, and remove files in action.d in phases, that would make better sense overall IMO. I'll change that. -- Best regards, Nicolas Graves From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 1/6] gnu: fail2ban: Move file deletion to source snippet. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 May 2025 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17462809682837 (code B ref 78066); Sat, 03 May 2025 14:03:02 +0000 Received: (at 78066) by debbugs.gnu.org; 3 May 2025 14:02:48 +0000 Received: from localhost ([127.0.0.1]:41859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBDS4-0000jf-0o for submit@debbugs.gnu.org; Sat, 03 May 2025 10:02:48 -0400 Received: from 9.mo562.mail-out.ovh.net ([46.105.72.114]:34215) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBDRx-0000j6-PL for 78066@debbugs.gnu.org; Sat, 03 May 2025 10:02:44 -0400 Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net [79.137.60.36]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTy75VfPz1dFX; Sat, 3 May 2025 14:02:39 +0000 (UTC) Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net. [127.0.0.1]) by director2.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sat, 3 May 2025 14:02:39 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.140.34]) by director2.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTy74BPnz2D4B; Sat, 3 May 2025 14:02:39 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.3]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 2647FC3AA5; Sat, 3 May 2025 14:02:39 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-106R00644a54a16-0a2f-46b9-b404-c07d854159ba, 2C797D8F94FD4BAB69F3C297EB7FEDCEB15A77A0) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.175.193 From: Nicolas Graves Date: Sat, 3 May 2025 15:59:57 +0200 Message-ID: <20250503140234.9752-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250503140234.9752-1-ngraves@ngraves.fr> References: <20250503140234.9752-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2449676724201251554 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeehhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdekuedujeeukeelfeevheeiueeuhedttdfhfeefudekhedujeehleeiffehjeelnecuffhomhgrihhnpehsvghtuhhprdhphienucfkphepuddvjedrtddrtddruddpkeelrddvtdejrddujeehrdduleefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehiedvmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=WO0v83oHUnrLaGqRZWAxoBX82v5dSbdf7IwgzpliMLs=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746280959; v=1; b=fXKQNIV5J0wFkAx32FYAacvtSXaDCF1OgXM4udK00C7Y6EkmtYDlOkZONG1xGjBj1dz0GlL1 O61DF0vcU0sbgzBbSE/xh3orOby0WJ3n0CCbIRhwblw2epR7lAVqU3k8ZQkT+FnrzeB28MfSAhQ L1v4I4b8dqMioaPVWoLy/Uv952TRBZf9fFMz7PI0PEhq001Uz5wygpk/jD4bdJTPo0sShmr/NYb uB59gc6EmhXfIaj+9nhma3hlgT8by5MIWz3zbHmsDtcW9cKdpuACPV0MY8yNcTY5zwrRnPBOZS2 uqA0mRhIbQc7n92wP7XWYhsHIB58v29frAGJGRJ/5sGrQ== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban) [arguments]: Move multiple file deletion from here... [source]: ...to here. --- gnu/packages/admin.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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" -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 2/6] gnu: fail2ban: Move setup and test patches to phases. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 May 2025 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17462809692849 (code B ref 78066); Sat, 03 May 2025 14:03:02 +0000 Received: (at 78066) by debbugs.gnu.org; 3 May 2025 14:02:49 +0000 Received: from localhost ([127.0.0.1]:41861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBDS4-0000jk-Hy for submit@debbugs.gnu.org; Sat, 03 May 2025 10:02:49 -0400 Received: from 8.mo563.mail-out.ovh.net ([46.105.60.197]:42489) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBDS0-0000jH-Em for 78066@debbugs.gnu.org; Sat, 03 May 2025 10:02:45 -0400 Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net [51.68.80.175]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTyB2Cwtz1cXj; Sat, 3 May 2025 14:02:42 +0000 (UTC) Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net. [127.0.0.1]) by director1.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sat, 3 May 2025 14:02:42 +0000 (UTC) Received: from mta11.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.139.133]) by director1.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTy96Y9wz61s1; Sat, 3 May 2025 14:02:41 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.1]) by mta11.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 12289263AA5; Sat, 3 May 2025 14:02:40 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-110S004773decb6-5422-4b46-a174-48aa70ee0505, 2C797D8F94FD4BAB69F3C297EB7FEDCEB15A77A0) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.175.193 From: Nicolas Graves Date: Sat, 3 May 2025 15:59:58 +0200 Message-ID: <20250503140234.9752-3-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250503140234.9752-1-ngraves@ngraves.fr> References: <20250503140234.9752-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2450239676423004898 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeehhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekledrvddtjedrudejhedrudelfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeifegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=9d4SjUzfmKcY163Y1UfPpC27+BapLBPEq/UFnBnLK4A=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746280962; v=1; b=QMr67LnT9LvgELWJg/o2p1ztLY2nyQfRwttIM4ArOCp37OvShbFHi9ZcusfWBg4lnr42xEg4 mo5hSb5FFhYF9tXkHCA9yDp7dUf9CzOn8ya4RePai+ZtiVWxijmHOuTuHXuZYmsoDxSnPiorMYb mPpXUiO5HOmL6n/FPT5lgLrKd7Q5aceL6PWfDTiW+aOVHy5bPu++sH69nkADH3WunjqGeX78S+3 zIAJnbxKyrWHaHskjjvJU5FK6ritop/Yz9B/g1BcS0IFAs7hXGJndmQ/EBMYs3mfunupBQV1JBj OOpXU4t1WYyQNZ12w5OpZAsvdzsmlhJqXk6xb0NWNLddA== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban) [source]: Move setup and test substitutions... [arguments]: ...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 bd07a73c99..ee428c00df 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6252,42 +6252,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" @@ -6302,6 +6267,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 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 0/6] Fix fail2ban build. References: <20250425201230.12492-1-rodion@goritskov.com> In-Reply-To: <20250425201230.12492-1-rodion@goritskov.com> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 May 2025 14:03:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17462809722859 (code B ref 78066); Sat, 03 May 2025 14:03:03 +0000 Received: (at 78066) by debbugs.gnu.org; 3 May 2025 14:02:52 +0000 Received: from localhost ([127.0.0.1]:41863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBDS6-0000k1-8j for submit@debbugs.gnu.org; Sat, 03 May 2025 10:02:52 -0400 Received: from 8.mo562.mail-out.ovh.net ([46.105.60.65]:43825) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBDRx-0000j2-G3 for 78066@debbugs.gnu.org; Sat, 03 May 2025 10:02:46 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTy65YP4z1cxW; Sat, 3 May 2025 14:02:38 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sat, 3 May 2025 14:02:38 +0000 (UTC) Received: from mta3.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.176.75]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTy63qfZz2c5j; Sat, 3 May 2025 14:02:38 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.1]) by mta3.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 04A813A3F7E; Sat, 3 May 2025 14:02:37 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-105G00606470d9a-5129-4ee4-ae8f-03aa59bbc76d, 2C797D8F94FD4BAB69F3C297EB7FEDCEB15A77A0) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.175.193 From: Nicolas Graves Date: Sat, 3 May 2025 15:59:56 +0200 Message-ID: <20250503140234.9752-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2449395249407845090 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeehhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdekledrvddtjedrudejhedrudelfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=HRvLffOwXj0D/3HC0AVy2yheIeWXNKyeKuCkveW79eo=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746280958; v=1; b=REbx4OdYVauvmxUC8WHhXSJsxyKE0u1yuocyn/bVu9OvxYwnKYtYpCHz4mFHfx0yRTygb0ZJ k+iAlsOqYZHLrqX3BspGk+ytwKd3Lfrc8wm8L6SKFO1ZOaEIxHMgTgFZhieGlGGQ1MaYhbacmPc TPYlVMOSWOcezBR6s2MYd6XSMY8/nwij1UjTZG3LzESRRjui7YItAkK6LZWxsd8NtsRC/HQnHC1 dbTY6SSzCCEJsV5f0FTijXctswIUJyX78CMlkhHcLigNIAeKGohZ6DQ9ZWnEGJSE6pXbYv/10d7 TdaJBB91AXcQIXrmd/HXJf+YrQVsx7Tz/iqUpYEWayIWg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Haven't fixed tests yet, but this new version should a bit easier to review. I don't know if/how it's possible to get shepherd's side details while testing, so I'll probably end up trying the service myself to see what's wrong before trying to dig in tests. Nicolas Graves (6): gnu: fail2ban: Move file deletion to source snippet. gnu: fail2ban: Move setup and test patches to phases. gnu: fail2ban: Update to 1.1.0. gnu: fail2ban: Improve style. gnu: fail2ban: Improve style. gnu: fail2ban: Improve snippet. gnu/local.mk | 6 - gnu/packages/admin.scm | 327 ++++++++---------- .../fail2ban-0.11.2_CVE-2021-32749.patch | 155 --------- ...2ban-0.11.2_fix-setuptools-drop-2to3.patch | 64 ---- .../fail2ban-0.11.2_fix-test-suite.patch | 48 --- .../fail2ban-python310-server-action.patch | 27 -- .../fail2ban-python310-server-actions.patch | 25 -- .../fail2ban-python310-server-jails.patch | 25 -- 8 files changed, 149 insertions(+), 528 deletions(-) delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-action.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-actions.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-jails.patch -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 3/6] gnu: fail2ban: Update to 1.1.0. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 May 2025 14:03:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17462809792875 (code B ref 78066); Sat, 03 May 2025 14:03:03 +0000 Received: (at 78066) by debbugs.gnu.org; 3 May 2025 14:02:59 +0000 Received: from localhost ([127.0.0.1]:41865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBDSD-0000kI-Fe for submit@debbugs.gnu.org; Sat, 03 May 2025 10:02:58 -0400 Received: from 7.mo562.mail-out.ovh.net ([46.105.55.234]:53113) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBDS2-0000jQ-EY for 78066@debbugs.gnu.org; Sat, 03 May 2025 10:02:48 -0400 Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net [51.68.80.175]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTyF0507z1dGk; Sat, 3 May 2025 14:02:44 +0000 (UTC) Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net. [127.0.0.1]) by director1.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sat, 3 May 2025 14:02:44 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.176.132]) by director1.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTyD4nRYz61qb; Sat, 3 May 2025 14:02:44 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.3]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id BE851C3AA5; Sat, 3 May 2025 14:02:43 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G00220606b4e-4570-41e0-98bb-2afbece5de26, 2C797D8F94FD4BAB69F3C297EB7FEDCEB15A77A0) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.175.193 From: Nicolas Graves Date: Sat, 3 May 2025 15:59:59 +0200 Message-ID: <20250503140234.9752-4-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250503140234.9752-1-ngraves@ngraves.fr> References: <20250503140234.9752-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2451084098677367522 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeehhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekledrvddtjedrudejhedrudelfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=S2VVXifQxijyTcIjoBo8ScQ4bo0OAtV5tkeujeNP0oc=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746280965; v=1; b=B/TZGe9sKRE13uCZIiKe42iOKTOyU5Awg16xB+UKNpw0Xui24jX1utRi5kvdq8fz7nh6ByD/ Z0gyQM9RTN2xrGW+A5g9eilw5h+DCJmiH4djo2KksfXzxSwWmSFznVV417zZmaXKsCm1AVDUD9B T9dUA9gW+BySVenLNo7kFiP40MLzIbTgrYEv6WE3oNBv8jVMUMK7kjvgSvMolIsPDPf+au5id2o CkVQA+XdZhPSth+mniT4h4zlPbbUr3kzHSnpuYbINIyfGgfJNgDBDPOw8CMSxzXeCQ/VqIzZe3d j/Znrp1L+PUdZ0tTdyZmHv796d8aSH54csMeRh2Ay5KQA== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch, gnu/packages/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch, gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch, gnu/packages/patches/fail2ban-python310-server-action.patch, gnu/packages/fail2ban-python310-server-actions.patch: Delete patches. * gnu/local.mk: Deregister patches. * gnu/packages/admin.scm (fail2ban): Update to 1.1.0. [source]: Use (srfi srfi-26) for readability. : Deregister patches. [build-system]: Switch to pyproject-build-system. [arguments]: Remove phase 'invoke-2to3. Add phase 'avoid-external-binary-in-/bin to avoid creating a symlink to python-wrapper binary during installation (current 'install phase breaks otherwise). [native-inputs]: Add python-setuptools, python-wheel. --- gnu/local.mk | 6 - gnu/packages/admin.scm | 26 ++- .../fail2ban-0.11.2_CVE-2021-32749.patch | 155 ------------------ ...2ban-0.11.2_fix-setuptools-drop-2to3.patch | 64 -------- .../fail2ban-0.11.2_fix-test-suite.patch | 48 ------ .../fail2ban-python310-server-action.patch | 27 --- .../fail2ban-python310-server-actions.patch | 25 --- .../fail2ban-python310-server-jails.patch | 25 --- 8 files changed, 12 insertions(+), 364 deletions(-) delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-action.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-actions.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-jails.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3f5e4cec38..be2639eeb4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1259,13 +1259,7 @@ dist_patch_DATA = \ %D%/packages/patches/expat-CVE-2024-45492.patch \ %D%/packages/patches/extempore-unbundle-external-dependencies.patch \ %D%/packages/patches/extundelete-e2fsprogs-1.44.patch \ - %D%/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch \ - %D%/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch \ - %D%/packages/patches/fail2ban-0.11.2_fix-test-suite.patch \ %D%/packages/patches/fail2ban-paths-guix-conf.patch \ - %D%/packages/patches/fail2ban-python310-server-action.patch \ - %D%/packages/patches/fail2ban-python310-server-actions.patch \ - %D%/packages/patches/fail2ban-python310-server-jails.patch \ %D%/packages/patches/faiss-tests-CMakeLists-find-googletest.patch \ %D%/packages/patches/falcosecurity-libs-shared-build.patch \ %D%/packages/patches/farstream-gupnp.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index ee428c00df..342d11e49e 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6231,7 +6231,7 @@ (define-public sysdig (define-public fail2ban (package (name "fail2ban") - (version "0.11.2") + (version "1.1.0") (source (origin (method git-fetch) (uri (git-reference @@ -6240,7 +6240,7 @@ (define-public fail2ban (file-name (git-file-name name version)) (sha256 (base32 - "00d9q8m284q2wy6q462nipzszplfbvrs9fhgn0y3imwsc24kv1db")) + "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) (modules '((guix build utils))) (snippet '(begin @@ -6253,20 +6253,16 @@ (define-public fail2ban "paths-freebsd.conf" "paths-opensuse.conf" "paths-osx.conf"))))) - (patches (search-patches - "fail2ban-0.11.2_fix-setuptools-drop-2to3.patch" - "fail2ban-python310-server-action.patch" - "fail2ban-python310-server-actions.patch" - "fail2ban-python310-server-jails.patch" - "fail2ban-0.11.2_fix-test-suite.patch" - "fail2ban-0.11.2_CVE-2021-32749.patch" - "fail2ban-paths-guix-conf.patch")))) - (build-system python-build-system) + (patches (search-patches "fail2ban-paths-guix-conf.patch")))) + (build-system pyproject-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-before 'build 'invoke-2to3 + (add-after 'unpack 'avoid-external-binary-in-/bin (lambda _ - (invoke "./fail2ban-2to3"))) + (delete-file "fail2ban/setup.py") + (substitute* '("bin/fail2ban-testcases" + "setup.py") + ((".*updatePyExec.*") "")))) (add-after 'unpack 'patch-setup.py (lambda _ ;; Get rid of absolute file names. @@ -6284,7 +6280,7 @@ (define-public fail2ban (add-after 'unpack 'disable-some-tests (lambda _ (define (make-suite str) - (string-append "tests.addTest.unittest.makeSuite." str "..")) + (string-append "tests.addTest\\(loadTests\\(" str "\\)\\)")) ;; disable tests performing unacceptable side-effects (substitute* "fail2ban/tests/utils.py" (((make-suite "actiontestcase.CommandActionTest")) @@ -6410,6 +6406,8 @@ (define (make-suite str) "fail2ban-testcases")) (for-each install-man5 '("jail.conf"))))))))) + (native-inputs + (list python-setuptools python-wheel)) (inputs (list gawk coreutils-minimal curl diff --git a/gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch b/gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch deleted file mode 100644 index d3c677918c..0000000000 --- a/gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 410a6ce5c80dd981c22752da034f2529b5eee844 Mon Sep 17 00:00:00 2001 -From: sebres -Date: Mon, 21 Jun 2021 17:12:53 +0200 -Subject: [PATCH] fixed possible RCE vulnerability, unset escape variable - (default tilde) stops consider "~" char after new-line as composing escape - sequence - ---- - config/action.d/complain.conf | 2 +- - config/action.d/dshield.conf | 2 +- - config/action.d/mail-buffered.conf | 8 ++++---- - config/action.d/mail-whois-lines.conf | 2 +- - config/action.d/mail-whois.conf | 6 +++--- - config/action.d/mail.conf | 6 +++--- - 6 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/config/action.d/complain.conf b/config/action.d/complain.conf -index 3a5f882c9f..4d73b05859 100644 ---- a/config/action.d/complain.conf -+++ b/config/action.d/complain.conf -@@ -102,7 +102,7 @@ logpath = /dev/null - # Notes.: Your system mail command. Is passed 2 args: subject and recipient - # Values: CMD - # --mailcmd = mail -s -+mailcmd = mail -E 'set escape' -s - - # Option: mailargs - # Notes.: Additional arguments to mail command. e.g. for standard Unix mail: -diff --git a/config/action.d/dshield.conf b/config/action.d/dshield.conf -index c128bef348..3d5a7a53a9 100644 ---- a/config/action.d/dshield.conf -+++ b/config/action.d/dshield.conf -@@ -179,7 +179,7 @@ tcpflags = - # Notes.: Your system mail command. Is passed 2 args: subject and recipient - # Values: CMD - # --mailcmd = mail -s -+mailcmd = mail -E 'set escape' -s - - # Option: mailargs - # Notes.: Additional arguments to mail command. e.g. for standard Unix mail: -diff --git a/config/action.d/mail-buffered.conf b/config/action.d/mail-buffered.conf -index 325f185b2f..79b841049c 100644 ---- a/config/action.d/mail-buffered.conf -+++ b/config/action.d/mail-buffered.conf -@@ -17,7 +17,7 @@ actionstart = printf %%b "Hi,\n - The jail has been started successfully.\n - Output will be buffered until lines are available.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : started on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : started on " - - # Option: actionstop - # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) -@@ -28,13 +28,13 @@ actionstop = if [ -f ]; then - These hosts have been banned by Fail2Ban.\n - `cat ` - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : Summary from " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : Summary from " - rm - fi - printf %%b "Hi,\n - The jail has been stopped.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : stopped on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : stopped on " - - # Option: actioncheck - # Notes.: command executed once before each actionban command -@@ -55,7 +55,7 @@ actionban = printf %%b "`date`: ( failures)\n" >> - These hosts have been banned by Fail2Ban.\n - `cat ` - \nRegards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : Summary" -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : Summary" - rm - fi - -diff --git a/config/action.d/mail-whois-lines.conf b/config/action.d/mail-whois-lines.conf -index 3a3e56b2c7..d2818cb9b9 100644 ---- a/config/action.d/mail-whois-lines.conf -+++ b/config/action.d/mail-whois-lines.conf -@@ -72,7 +72,7 @@ actionunban = - # Notes.: Your system mail command. Is passed 2 args: subject and recipient - # Values: CMD - # --mailcmd = mail -s -+mailcmd = mail -E 'set escape' -s - - # Default name of the chain - # -diff --git a/config/action.d/mail-whois.conf b/config/action.d/mail-whois.conf -index 7fea34c40d..ab33b616dc 100644 ---- a/config/action.d/mail-whois.conf -+++ b/config/action.d/mail-whois.conf -@@ -20,7 +20,7 @@ norestored = 1 - actionstart = printf %%b "Hi,\n - The jail has been started successfully.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : started on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : started on " - - # Option: actionstop - # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) -@@ -29,7 +29,7 @@ actionstart = printf %%b "Hi,\n - actionstop = printf %%b "Hi,\n - The jail has been stopped.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : stopped on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : stopped on " - - # Option: actioncheck - # Notes.: command executed once before each actionban command -@@ -49,7 +49,7 @@ actionban = printf %%b "Hi,\n - Here is more information about :\n - `%(_whois_command)s`\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : banned from " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : banned from " - - # Option: actionunban - # Notes.: command executed when unbanning an IP. Take care that the -diff --git a/config/action.d/mail.conf b/config/action.d/mail.conf -index 5d8c0e154c..f4838ddcb6 100644 ---- a/config/action.d/mail.conf -+++ b/config/action.d/mail.conf -@@ -16,7 +16,7 @@ norestored = 1 - actionstart = printf %%b "Hi,\n - The jail has been started successfully.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : started on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : started on " - - # Option: actionstop - # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) -@@ -25,7 +25,7 @@ actionstart = printf %%b "Hi,\n - actionstop = printf %%b "Hi,\n - The jail has been stopped.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : stopped on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : stopped on " - - # Option: actioncheck - # Notes.: command executed once before each actionban command -@@ -43,7 +43,7 @@ actionban = printf %%b "Hi,\n - The IP has just been banned by Fail2Ban after - attempts against .\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : banned from " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : banned from " - - # Option: actionunban - # Notes.: command executed when unbanning an IP. Take care that the diff --git a/gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch b/gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch deleted file mode 100644 index b0b14364b1..0000000000 --- a/gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 5ac303df8a171f748330d4c645ccbf1c2c7f3497 Mon Sep 17 00:00:00 2001 -From: sebres -Date: Sun, 19 Sep 2021 18:49:18 +0200 -Subject: [PATCH] fix gh-3098: build fails with error in fail2ban setup - command: use_2to3 is invalid (setuptools 58+) - ---- - setup.py | 16 +--------------- - 1 file changed, 1 insertion(+), 15 deletions(-) - -diff --git a/setup.py b/setup.py -index f4c2550f6f..98413273c5 100755 ---- a/setup.py -+++ b/setup.py -@@ -48,7 +48,7 @@ - from glob import glob - - from fail2ban.setup import updatePyExec -- -+from fail2ban.version import version - - source_dir = os.path.realpath(os.path.dirname( - # __file__ seems to be overwritten sometimes on some python versions (e.g. bug of 2.6 by running under cProfile, etc.): -@@ -112,22 +112,12 @@ def update_scripts(self, dry_run=False): - # Wrapper to specify fail2ban own options: - class install_command_f2b(install): - user_options = install.user_options + [ -- ('disable-2to3', None, 'Specify to deactivate 2to3, e.g. if the install runs from fail2ban test-cases.'), - ('without-tests', None, 'without tests files installation'), - ] - def initialize_options(self): -- self.disable_2to3 = None - self.without_tests = not with_tests - install.initialize_options(self) - def finalize_options(self): -- global _2to3 -- ## in the test cases 2to3 should be already done (fail2ban-2to3): -- if self.disable_2to3: -- _2to3 = False -- if _2to3: -- cmdclass = self.distribution.cmdclass -- cmdclass['build_py'] = build_py_2to3 -- cmdclass['build_scripts'] = build_scripts_2to3 - if self.without_tests: - self.distribution.scripts.remove('bin/fail2ban-testcases') - -@@ -178,7 +168,6 @@ def run(self): - if setuptools: - setup_extra = { - 'test_suite': "fail2ban.tests.utils.gatherTests", -- 'use_2to3': True, - } - else: - setup_extra = {} -@@ -202,9 +191,6 @@ def run(self): - ('/usr/share/doc/fail2ban', doc_files) - ) - --# Get version number, avoiding importing fail2ban. --# This is due to tests not functioning for python3 as 2to3 takes place later --exec(open(join("fail2ban", "version.py")).read()) - - setup( - name = "fail2ban", diff --git a/gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch b/gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch deleted file mode 100644 index 91d973e72e..0000000000 --- a/gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 747d4683221b5584f9663695fb48145689b42ceb Mon Sep 17 00:00:00 2001 -From: sebres -Date: Mon, 4 Jan 2021 02:42:38 +0100 -Subject: [PATCH] fixes century selector of %ExY and %Exy in datepattern for - tests, considering interval from 2005 (alternate now) to now; + better - grouping algorithm for resulting century RE - ---- - fail2ban/server/strptime.py | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - -diff --git a/fail2ban/server/strptime.py b/fail2ban/server/strptime.py -index 1464a96d1f..39fc795865 100644 ---- a/fail2ban/server/strptime.py -+++ b/fail2ban/server/strptime.py -@@ -36,10 +36,30 @@ def _getYearCentRE(cent=(0,3), distance=3, now=(MyTime.now(), MyTime.alternateNo - Thereby respect possible run in the test-cases (alternate date used there) - """ - cent = lambda year, f=cent[0], t=cent[1]: str(year)[f:t] -+ def grp(exprset): -+ c = None -+ if len(exprset) > 1: -+ for i in exprset: -+ if c is None or i[0:-1] == c: -+ c = i[0:-1] -+ else: -+ c = None -+ break -+ if not c: -+ for i in exprset: -+ if c is None or i[0] == c: -+ c = i[0] -+ else: -+ c = None -+ break -+ if c: -+ return "%s%s" % (c, grp([i[len(c):] for i in exprset])) -+ return ("(?:%s)" % "|".join(exprset) if len(exprset[0]) > 1 else "[%s]" % "".join(exprset)) \ -+ if len(exprset) > 1 else "".join(exprset) - exprset = set( cent(now[0].year + i) for i in (-1, distance) ) - if len(now) and now[1]: -- exprset |= set( cent(now[1].year + i) for i in (-1, distance) ) -- return "(?:%s)" % "|".join(exprset) if len(exprset) > 1 else "".join(exprset) -+ exprset |= set( cent(now[1].year + i) for i in xrange(-1, now[0].year-now[1].year+1, distance) ) -+ return grp(sorted(list(exprset))) - - timeRE = TimeRE() - diff --git a/gnu/packages/patches/fail2ban-python310-server-action.patch b/gnu/packages/patches/fail2ban-python310-server-action.patch deleted file mode 100644 index 723d7f7aa6..0000000000 --- a/gnu/packages/patches/fail2ban-python310-server-action.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2b6bb2c1bed8f7009631e8f8c306fa3160324a49 Mon Sep 17 00:00:00 2001 -From: "Sergey G. Brester" -Date: Mon, 8 Feb 2021 17:19:24 +0100 -Subject: [PATCH] follow bpo-37324: :ref:`collections-abstract-base-classes` - moved to the :mod:`collections.abc` module - -(since 3.10-alpha.5 `MutableMapping` is missing in collections module) ---- - fail2ban/server/action.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/fail2ban/server/action.py b/fail2ban/server/action.py -index 3bc48fe046..f0f1e6f59a 100644 ---- a/fail2ban/server/action.py -+++ b/fail2ban/server/action.py -@@ -30,7 +30,10 @@ - import threading - import time - from abc import ABCMeta --from collections import MutableMapping -+try: -+ from collections.abc import MutableMapping -+except ImportError: -+ from collections import MutableMapping - - from .failregex import mapTag2Opt - from .ipdns import DNSUtils diff --git a/gnu/packages/patches/fail2ban-python310-server-actions.patch b/gnu/packages/patches/fail2ban-python310-server-actions.patch deleted file mode 100644 index e31316d28b..0000000000 --- a/gnu/packages/patches/fail2ban-python310-server-actions.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 42dee38ad2ac5c3f23bdf297d824022923270dd9 Mon Sep 17 00:00:00 2001 -From: "Sergey G. Brester" -Date: Mon, 8 Feb 2021 17:25:45 +0100 -Subject: [PATCH] amend for `Mapping` - ---- - fail2ban/server/actions.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/fail2ban/server/actions.py b/fail2ban/server/actions.py -index b7b95b445a..897d907c1a 100644 ---- a/fail2ban/server/actions.py -+++ b/fail2ban/server/actions.py -@@ -28,7 +28,10 @@ - import os - import sys - import time --from collections import Mapping -+try: -+ from collections.abc import Mapping -+except ImportError: -+ from collections import Mapping - try: - from collections import OrderedDict - except ImportError: diff --git a/gnu/packages/patches/fail2ban-python310-server-jails.patch b/gnu/packages/patches/fail2ban-python310-server-jails.patch deleted file mode 100644 index e5873c415e..0000000000 --- a/gnu/packages/patches/fail2ban-python310-server-jails.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9f1d1f4fbd0804695a976beb191f2c49a2739834 Mon Sep 17 00:00:00 2001 -From: "Sergey G. Brester" -Date: Mon, 8 Feb 2021 17:35:59 +0100 -Subject: [PATCH] amend for `Mapping` (jails) - ---- - fail2ban/server/jails.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/fail2ban/server/jails.py b/fail2ban/server/jails.py -index 972a8c4bd2..27e12ddf65 100644 ---- a/fail2ban/server/jails.py -+++ b/fail2ban/server/jails.py -@@ -22,7 +22,10 @@ - __license__ = "GPL" - - from threading import Lock --from collections import Mapping -+try: -+ from collections.abc import Mapping -+except ImportError: -+ from collections import Mapping - - from ..exceptions import DuplicateJailException, UnknownJailException - from .jail import Jail -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 4/6] gnu: fail2ban: Improve style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 May 2025 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17462810453063 (code B ref 78066); Sat, 03 May 2025 14:05:01 +0000 Received: (at 78066) by debbugs.gnu.org; 3 May 2025 14:04:05 +0000 Received: from localhost ([127.0.0.1]:41876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBDTE-0000mq-Vn for submit@debbugs.gnu.org; Sat, 03 May 2025 10:04:05 -0400 Received: from 3.mo563.mail-out.ovh.net ([46.105.40.8]:37553) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBDTA-0000mX-HN for 78066@debbugs.gnu.org; Sat, 03 May 2025 10:03:58 -0400 Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net [152.228.215.222]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTzZ75YZz1f71; Sat, 3 May 2025 14:03:54 +0000 (UTC) Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net. [127.0.0.1]) by director3.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sat, 3 May 2025 14:03:54 +0000 (UTC) Received: from mta11.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.139.248]) by director3.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTzZ60drz5vLG; Sat, 3 May 2025 14:03:54 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.5]) by mta11.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 3B93F263AA5; Sat, 3 May 2025 14:03:54 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-108S002557457a9-1ff6-46ef-b190-7b3c162bd913, 2C797D8F94FD4BAB69F3C297EB7FEDCEB15A77A0) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.175.193 From: Nicolas Graves Date: Sat, 3 May 2025 16:00:00 +0200 Message-ID: <20250503140234.9752-5-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250503140234.9752-1-ngraves@ngraves.fr> References: <20250503140234.9752-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2470787347007726306 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeehhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdehleeiffehtedvlefhffffjeefgfduhfetkeevheeiteduiedugfekuedtheejnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpkeelrddvtdejrddujeehrdduleefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehieefmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=iRySs+D6MhLWY0avMzAesIlko/QcFKgGeshvq/VKeC0=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746281035; v=1; b=wM6Q4T/z9TjS2aYE51iKAS9UfLd/58o932XXx653erTYVJrpQGV9JtYMV5ewbkdNBkCsTd0i CGsQUzEzd6FW/+hO9Kv5CGnmq98vFtwiSkzivTxGyHbnTu+C5wgy6r7XizNupiRtsAl7mcaVCW2 JCAyEUPp5LrAjRTfEoq49HXJFU6Ng/SKwVJXNyBxrJvVxyQmLWIcgXlY27zoX4f7NEbwVcOcpuB P9wRlAbYqqYn0kdmsCemXA3f8BkFm93andDXxARpTHiVkDZFnh/YHTGv88kNxnYdofnDwnxvKQO eknRj/x55lnXyhtNgrY9Xag9teubP72T/Ck4QF4vtfrnA== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban): Use gexps and run guix style. --- gnu/packages/admin.scm | 338 ++++++++++++++++++++--------------------- 1 file changed, 164 insertions(+), 174 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 342d11e49e..1f99059e4f 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6232,182 +6232,172 @@ (define-public fail2ban (package (name "fail2ban") (version "1.1.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/fail2ban/fail2ban") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) - (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"))))) - (patches (search-patches "fail2ban-paths-guix-conf.patch")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fail2ban/fail2ban") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) + (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"))))) + (patches (search-patches "fail2ban-paths-guix-conf.patch")))) (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'avoid-external-binary-in-/bin - (lambda _ - (delete-file "fail2ban/setup.py") - (substitute* '("bin/fail2ban-testcases" - "setup.py") - ((".*updatePyExec.*") "")))) - (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\\(loadTests\\(" 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" - "fail2ban/tests/utils.py" - "fail2ban/client/configreader.py" - "fail2ban/client/fail2bancmdline.py" - "fail2ban/client/fail2banregex.py") - (("/etc/fail2ban") - (string-append (assoc-ref outputs "out") - "/etc/fail2ban"))))) - (add-after 'fix-default-config 'set-action-dependencies - (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/action.d" - (for-each delete-file - '("apf.conf" - "bsd-ipfw.conf" - "dshield.conf" - "ipfilter.conf" - "ipfw.conf" - "firewallcmd-allports.conf" - "firewallcmd-common.conf" - "firewallcmd-ipset.conf" - "firewallcmd-multiport.conf" - "firewallcmd-new.conf" - "firewallcmd-rich-logging.conf" - "firewallcmd-rich-rules.conf" - "osx-afctl.conf" - "osx-ipfw.conf" - "pf.conf" - "nginx-block-map.conf" - "npf.conf" - "shorewall.conf" - "shorewall-ipset-proto6.conf" - "ufw.conf"))) - (let* ((lookup-cmd (lambda (i) - (search-input-file inputs i))) - (bin (lambda (i) - (lookup-cmd (string-append "/bin/" i)))) - (sbin (lambda (i) - (lookup-cmd (string-append "/sbin/" i)))) - (ip (sbin "ip")) - (sendmail (sbin "sendmail"))) - (substitute* (find-files "config/action.d" "\\.conf$") - ;; TODO: deal with geoiplookup .. - (("(awk|curl|dig|jq)" all cmd) - (bin cmd)) - (("(cat|echo|grep|head|printf|wc) " all - cmd) - (string-append (bin cmd) " ")) - ((" (date|rm|sed|tail|touch|tr) " all - cmd) - (string-append " " - (bin cmd) " ")) - (("cut -d") - (string-append (bin "cut") " -d")) - (("`date`") - (string-append "`" - (bin "date") "`")) - (("id -") - (string-append (bin "id") " -")) - (("ip -([46]) addr" all ver) - (string-append ip " -" ver " addr")) - (("ip route") - (string-append ip " route")) - (("ipset ") - (string-append (sbin "ipset") " ")) - (("(iptables|ip6tables) <" all cmd) - (string-append (sbin cmd) " <")) - (("/usr/bin/nsupdate") - (bin "nsupdate")) - (("mail -E") - (string-append sendmail " -E")) - (("nftables = nft") - (string-append "nftables = " (sbin "nft"))) - (("perl -e") - (string-append (bin "perl") " -e")) - (("/usr/sbin/sendmail") - sendmail) - (("test -e") - (string-append (bin "test") " -e")) - (("_whois = whois") - (string-append "_whois = " (bin "whois"))))) - (substitute* "config/jail.conf" - (("before = paths-debian.conf") - "before = paths-guix.conf")))) - (add-after 'install 'copy-man-pages - (lambda* (#:key outputs #:allow-other-keys) - (let* ((man (string-append (assoc-ref outputs "out") - "/man")) - (install-man (lambda (m) - (lambda (f) - (install-file (string-append f - "." m) - (string-append man - "/man" m))))) - (install-man1 (install-man "1")) - (install-man5 (install-man "5"))) - (with-directory-excursion "man" - (for-each install-man1 - '("fail2ban" - "fail2ban-client" - "fail2ban-python" - "fail2ban-regex" - "fail2ban-server" - "fail2ban-testcases")) - (for-each install-man5 - '("jail.conf"))))))))) - (native-inputs - (list python-setuptools python-wheel)) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'avoid-external-binary-in-/bin + (lambda _ + (delete-file "fail2ban/setup.py") + (substitute* '("bin/fail2ban-testcases" "setup.py") + ((".*updatePyExec.*") + "")))) + (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\\(loadTests\\(" 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" + "fail2ban/tests/utils.py" + "fail2ban/client/configreader.py" + "fail2ban/client/fail2bancmdline.py" + "fail2ban/client/fail2banregex.py") + (("/etc/fail2ban") + (string-append (assoc-ref outputs "out") "/etc/fail2ban"))))) + (add-after 'fix-default-config 'set-action-dependencies + (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/action.d" + (for-each delete-file + '("apf.conf" "bsd-ipfw.conf" + "dshield.conf" + "ipfilter.conf" + "ipfw.conf" + "firewallcmd-allports.conf" + "firewallcmd-common.conf" + "firewallcmd-ipset.conf" + "firewallcmd-multiport.conf" + "firewallcmd-new.conf" + "firewallcmd-rich-logging.conf" + "firewallcmd-rich-rules.conf" + "osx-afctl.conf" + "osx-ipfw.conf" + "pf.conf" + "nginx-block-map.conf" + "npf.conf" + "shorewall.conf" + "shorewall-ipset-proto6.conf" + "ufw.conf"))) + (let* ((lookup-cmd (lambda (i) + (search-input-file inputs i))) + (bin (lambda (i) + (lookup-cmd (string-append "/bin/" i)))) + (sbin (lambda (i) + (lookup-cmd (string-append "/sbin/" i)))) + (ip (sbin "ip")) + (sendmail (sbin "sendmail"))) + (substitute* (find-files "config/action.d" "\\.conf$") + ;; TODO: deal with geoiplookup .. + (("(awk|curl|dig|jq)" all cmd) + (bin cmd)) + (("(cat|echo|grep|head|printf|wc) " all cmd) + (string-append (bin cmd) " ")) + ((" (date|rm|sed|tail|touch|tr) " all cmd) + (string-append " " + (bin cmd) " ")) + (("cut -d") + (string-append (bin "cut") " -d")) + (("`date`") + (string-append "`" + (bin "date") "`")) + (("id -") + (string-append (bin "id") " -")) + (("ip -([46]) addr" all ver) + (string-append ip " -" ver " addr")) + (("ip route") + (string-append ip " route")) + (("ipset ") + (string-append (sbin "ipset") " ")) + (("(iptables|ip6tables) <" all cmd) + (string-append (sbin cmd) " <")) + (("/usr/bin/nsupdate") + (bin "nsupdate")) + (("mail -E") + (string-append sendmail " -E")) + (("nftables = nft") + (string-append "nftables = " + (sbin "nft"))) + (("perl -e") + (string-append (bin "perl") " -e")) + (("/usr/sbin/sendmail") + sendmail) + (("test -e") + (string-append (bin "test") " -e")) + (("_whois = whois") + (string-append "_whois = " + (bin "whois"))))) + (substitute* "config/jail.conf" + (("before = paths-debian.conf") + "before = paths-guix.conf")))) + (add-after 'install 'copy-man-pages + (lambda* (#:key outputs #:allow-other-keys) + (let* ((man (string-append (assoc-ref outputs "out") "/man")) + (install-man (lambda (m) + (lambda (f) + (install-file (string-append f "." m) + (string-append man "/man" + m))))) + (install-man1 (install-man "1")) + (install-man5 (install-man "5"))) + (with-directory-excursion "man" + (for-each install-man1 + '("fail2ban" "fail2ban-client" "fail2ban-python" + "fail2ban-regex" "fail2ban-server" + "fail2ban-testcases")) + (for-each install-man5 + '("jail.conf"))))))))) + (native-inputs (list python-setuptools python-wheel)) (inputs (list gawk coreutils-minimal curl -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 5/6] gnu: fail2ban: Improve style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 May 2025 14:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17462810463070 (code B ref 78066); Sat, 03 May 2025 14:05:02 +0000 Received: (at 78066) by debbugs.gnu.org; 3 May 2025 14:04:06 +0000 Received: from localhost ([127.0.0.1]:41880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBDTJ-0000nN-Pp for submit@debbugs.gnu.org; Sat, 03 May 2025 10:04:06 -0400 Received: from 5.mo563.mail-out.ovh.net ([46.105.53.64]:41849) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBDTC-0000ma-CV for 78066@debbugs.gnu.org; Sat, 03 May 2025 10:03:59 -0400 Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net [51.68.80.175]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTzc5fd6z1fBq; Sat, 3 May 2025 14:03:56 +0000 (UTC) Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net. [127.0.0.1]) by director1.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sat, 3 May 2025 14:03:56 +0000 (UTC) Received: from mta6.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.113.27]) by director1.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTzc3XFzz61qd; Sat, 3 May 2025 14:03:56 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.7]) by mta6.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id D0D8BD43E88; Sat, 3 May 2025 14:03:55 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-101G0046fcc430a-e9a0-4763-a902-b93f68226c93, 2C797D8F94FD4BAB69F3C297EB7FEDCEB15A77A0) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.175.193 From: Nicolas Graves Date: Sat, 3 May 2025 16:00:01 +0200 Message-ID: <20250503140234.9752-6-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250503140234.9752-1-ngraves@ngraves.fr> References: <20250503140234.9752-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2471350298684154594 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeehhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnheptdejjedvkedtkeekfeehvdejteegvefgveelgfehhfdvjeelffdtteefudetieffnecuffhomhgrihhnpehfrghilhdvsggrnhhrvghgvgigrdhphienucfkphepuddvjedrtddrtddruddpkeelrddvtdejrddujeehrdduleefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehieefmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=s+ikIRLCgqDpvMCbwfMztJA1RFMb6kkUlnPaL5K51/s=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746281036; v=1; b=n1oLnlwo8G5qm5cpuAzM9FxgBWK5HT6pkMyLanATOfogNVaZh4rct7okMdiq6aEjaTUDNbdS 5lsttOd97yqwDnxDAOJJiZTFxD40kd2ExkjyH+ZFdHYyAiQ40vkZVv0kBPDNBMyAVQXXZcYByDz aNYnZNHNEgQI5QPcXdmKPKygx3wZATOomBpfO9Z27fySdRyxm4403aIMkLMLdH1cEpBWLJ6wstm 9Y+MdvLcqtcdu90VYzm0EcKTq9IGl6qxSBkP8zGN1KIB521H9zAwgo1OnoUGrHXLGNOvs5ONtHy 8/3df6U/GXDn6Cn3SI015DbY6GrP0cBsm/WFA6dG9d5vA== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban): [arguments]: Rewrite phases 'set-action-dependencies and copy-man-pages for readability. --- gnu/packages/admin.scm | 121 ++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 67 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 1f99059e4f..b808a3b6c5 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6296,21 +6296,22 @@ (define (make-suite str) (((make-suite "servertestcase.ServerConfigReaderTests")) "")))) (add-before 'install 'fix-default-config - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ (substitute* '("config/paths-common.conf" "fail2ban/tests/utils.py" "fail2ban/client/configreader.py" "fail2ban/client/fail2bancmdline.py" "fail2ban/client/fail2banregex.py") (("/etc/fail2ban") - (string-append (assoc-ref outputs "out") "/etc/fail2ban"))))) + (string-append #$output "/etc/fail2ban"))))) (add-after 'fix-default-config 'set-action-dependencies (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/action.d" (for-each delete-file - '("apf.conf" "bsd-ipfw.conf" + '("apf.conf" + "bsd-ipfw.conf" "dshield.conf" "ipfilter.conf" "ipfw.conf" @@ -6329,74 +6330,60 @@ (define (make-suite str) "shorewall.conf" "shorewall-ipset-proto6.conf" "ufw.conf"))) - (let* ((lookup-cmd (lambda (i) - (search-input-file inputs i))) - (bin (lambda (i) - (lookup-cmd (string-append "/bin/" i)))) - (sbin (lambda (i) - (lookup-cmd (string-append "/sbin/" i)))) - (ip (sbin "ip")) - (sendmail (sbin "sendmail"))) - (substitute* (find-files "config/action.d" "\\.conf$") - ;; TODO: deal with geoiplookup .. - (("(awk|curl|dig|jq)" all cmd) - (bin cmd)) - (("(cat|echo|grep|head|printf|wc) " all cmd) - (string-append (bin cmd) " ")) - ((" (date|rm|sed|tail|touch|tr) " all cmd) - (string-append " " - (bin cmd) " ")) - (("cut -d") - (string-append (bin "cut") " -d")) - (("`date`") - (string-append "`" - (bin "date") "`")) - (("id -") - (string-append (bin "id") " -")) - (("ip -([46]) addr" all ver) - (string-append ip " -" ver " addr")) - (("ip route") - (string-append ip " route")) - (("ipset ") - (string-append (sbin "ipset") " ")) - (("(iptables|ip6tables) <" all cmd) - (string-append (sbin cmd) " <")) - (("/usr/bin/nsupdate") - (bin "nsupdate")) - (("mail -E") - (string-append sendmail " -E")) - (("nftables = nft") - (string-append "nftables = " - (sbin "nft"))) - (("perl -e") - (string-append (bin "perl") " -e")) - (("/usr/sbin/sendmail") - sendmail) - (("test -e") - (string-append (bin "test") " -e")) - (("_whois = whois") - (string-append "_whois = " - (bin "whois"))))) + (define (lookup dir file) + (search-input-file inputs (string-append "/" dir "/" file))) + + (substitute* (find-files "config/action.d" "\\.conf$") + ;; TODO: deal with geoiplookup .. + (("(awk|curl|dig|jq)" all cmd) + (lookup "bin" cmd)) + (("(cat|echo|grep|head|printf|wc) " all cmd) + (string-append (lookup "bin" cmd) " ")) + ((" (date|rm|sed|tail|touch|tr) " all cmd) + (string-append " " (lookup "bin" cmd) " ")) + (("cut -d") + (string-append (lookup "bin" "cut") " -d")) + (("`date`") + (string-append "`" (lookup "bin" "date") "`")) + (("id -") + (string-append (lookup "bin" "id") " -")) + (("ip (route|-[46] addr)" all rest) + (string-append (lookup "sbin" "ip") rest)) + (("ipset ") + (string-append (lookup "sbin" "ipset") " ")) + (("(iptables|ip6tables) <" all cmd) + (string-append (lookup "sbin" cmd) " <")) + (("/usr/bin/nsupdate") + (lookup "bin" "nsupdate")) + (("mail -E") + (string-append (lookup "sbin" "sendmail") " -E")) + (("nftables = nft") + (string-append "nftables = " (lookup "sbin" "nft"))) + (("perl -e") + (string-append (lookup "bin" "perl") " -e")) + (("/usr/sbin/sendmail") + (lookup "sbin" "sendmail")) + (("test -e") + (string-append (lookup "bin" "test") " -e")) + (("_whois = whois") + (string-append "_whois = " (lookup "bin" "whois")))) + (substitute* "config/jail.conf" (("before = paths-debian.conf") "before = paths-guix.conf")))) (add-after 'install 'copy-man-pages - (lambda* (#:key outputs #:allow-other-keys) - (let* ((man (string-append (assoc-ref outputs "out") "/man")) - (install-man (lambda (m) - (lambda (f) - (install-file (string-append f "." m) - (string-append man "/man" - m))))) - (install-man1 (install-man "1")) - (install-man5 (install-man "5"))) - (with-directory-excursion "man" - (for-each install-man1 - '("fail2ban" "fail2ban-client" "fail2ban-python" - "fail2ban-regex" "fail2ban-server" - "fail2ban-testcases")) - (for-each install-man5 - '("jail.conf"))))))))) + (lambda _ + (define (install-man m) + (lambda (f) + (install-file (string-append f "." m) + (string-append #$output "man/man" m)))) + + (with-directory-excursion "man" + (for-each (install-man "1") + '("fail2ban" "fail2ban-client" "fail2ban-python" + "fail2ban-regex" "fail2ban-server" + "fail2ban-testcases")) + ((install-man "5") "jail.conf"))))))) (native-inputs (list python-setuptools python-wheel)) (inputs (list gawk coreutils-minimal -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v2 6/6] gnu: fail2ban: Improve snippet. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 May 2025 14:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17462810463077 (code B ref 78066); Sat, 03 May 2025 14:05:02 +0000 Received: (at 78066) by debbugs.gnu.org; 3 May 2025 14:04:06 +0000 Received: from localhost ([127.0.0.1]:41882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBDTK-0000nY-Ei for submit@debbugs.gnu.org; Sat, 03 May 2025 10:04:06 -0400 Received: from 9.mo563.mail-out.ovh.net ([46.105.73.201]:55461) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBDTF-0000mo-33 for 78066@debbugs.gnu.org; Sat, 03 May 2025 10:04:01 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTzf4W3yz1f71; Sat, 3 May 2025 14:03:58 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sat, 3 May 2025 14:03:58 +0000 (UTC) Received: from mta11.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.108.2.249]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4ZqTzf3RCSz2c2K; Sat, 3 May 2025 14:03:58 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.1]) by mta11.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id A947A263AA5; Sat, 3 May 2025 14:03:57 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-102R0040dfd3f79-069f-49f3-b7f6-b3a65c9fe7b5, 2C797D8F94FD4BAB69F3C297EB7FEDCEB15A77A0) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 89.207.175.193 From: Nicolas Graves Date: Sat, 3 May 2025 16:00:02 +0200 Message-ID: <20250503140234.9752-7-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250503140234.9752-1-ngraves@ngraves.fr> References: <20250503140234.9752-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2471913248896639714 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeehhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdekledrvddtjedrudejhedrudelfeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeifegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=DvJ+kjISn0kW5587b0/TLbLR8H80AiyTxxP3HCe4QwM=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746281038; v=1; b=wbAnHxr7Vf/f7wpqBebU+gdY4yVo8/kV7GfZVyeYEOou6JdE/H16gT2/zOsUTZedULWX+fWA d27F+UoJE9vHmpupUvLguT2hG1nuiAMt8MDhNqi28M5O7APm3xA83JoYn8ln1VahScYs84gYjnq KPsa2RiMWlRfaKDUQC297clcPBT15Aen2FSQOLw9NljtNLSmP7mb43TtraxuAUBj1pbp9GSb8XG ZeomSLcnjsdZMAusP3YKGV3s7uLVv2UosnfpmE26D1Qq7oWQce8bjdZgZWDb6OGOx+jw6QXvvZc 62rgTBWslwtn6MauXtQzsF/37RymDq50IoL5nCZozCHGQ== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban) [source]: Remove (srfi srfi-26). : Use gexp. Move substitute* patches... [arguments]: ...to phases 'patch-setup.py and 'disable-some-tests. --- gnu/packages/admin.scm | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index b808a3b6c5..7492de3a32 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6277,23 +6277,19 @@ (define-public fail2ban "'usr/share/doc/fail2ban'")))) (add-after 'unpack 'disable-some-tests (lambda _ - (define (make-suite str) - (string-append "tests.addTest\\(loadTests\\(" str "\\)\\)")) + (define (make-suite-regex tests) + (string-append "tests.addTest\\(loadTests\\((" + (string-join tests "|") + ")\\)\\)")) ;; 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")) + (((make-suite-regex (list "actiontestcase.CommandActionTest" + "misctestcase.SetupTest" + "filtertestcase.DNSUtilsNetworkTests" + "filtertestcase.IgnoreIPDNS" + "filtertestcase.GetFailures" + "fail2banclienttestcase.Fail2banServerTest" + "servertestcase.ServerConfigReaderTests"))) "")))) (add-before 'install 'fix-default-config (lambda _ -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v3 0/6] Fix fail2ban build References: <20250425201230.12492-1-rodion@goritskov.com> In-Reply-To: <20250425201230.12492-1-rodion@goritskov.com> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 May 2025 08:58:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17463490801424 (code B ref 78066); Sun, 04 May 2025 08:58:09 +0000 Received: (at 78066) by debbugs.gnu.org; 4 May 2025 08:58:00 +0000 Received: from localhost ([127.0.0.1]:51328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBVAd-0000Mb-GF for submit@debbugs.gnu.org; Sun, 04 May 2025 04:58:00 -0400 Received: from 10.mo562.mail-out.ovh.net ([46.105.72.220]:35867) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBVAX-0000Lu-5q for 78066@debbugs.gnu.org; Sun, 04 May 2025 04:57:57 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz7y630yz1VtB; Sun, 4 May 2025 08:57:50 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 4 May 2025 08:57:50 +0000 (UTC) Received: from mta2.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.164.205]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz7y3QxXz2cHc; Sun, 4 May 2025 08:57:50 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.2]) by mta2.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 0873ABA3FE1; Sun, 4 May 2025 08:57:49 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-103G005b0a78824-0cfb-42c7-8ba8-f526a99b26a4, 8CD8A0E5D230CF78A323F194FBE8D47D3072D94D) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 From: Nicolas Graves Date: Sun, 4 May 2025 10:56:20 +0200 Message-ID: <20250504085747.6387-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 3174474789347648226 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeejjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehiedvmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=YN+EWVhFTh+RPcaMph+dp44FaKmsEP+VsKa9/SkekQ0=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746349070; v=1; b=YTd/wVDbcjNY5rOuxRUelw9t2CJT39DDOPEzCm0NedxO2JU2kPeL/ZeiiOgd84l/BgEM3qFU Y8gslI8g0ndN5Hwgt5Eeg/HoYmU1rAHpZs7X3BQ3aoQOPpRaBtN9qHne7ZhQb6bhAJ42SLVfX65 aX/2ADDIsXGbQsgnwTTf3vdEaghTvNltLjA3OMe0OG5XE7mtPpTpep5HjJeUAYurQRsHLqf3JRA n2cIoXmZ7Z4bf/rPeeIwQdIi0emyswjN4BGTnyJ1Hpnexr04DFCQelzvAFKKE7rL+nUqHYzN9GO +56gqGhPuDrJmbBRN3PxkEW4mgTrKrLaoWQmmnHWsIBwQ== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I think the fail2ban tests were broken before the Python@3.10 update. The -basic test runs properly, but the other tests do not. I focussed on fixing the -basic test because I don't understand why the other tests fail (socket is not found, but when I try it in real conditions, it is). The main issue was that the paths-debian.conf in jail.conf was substituted after the wheel was built, so the change didn't make it in the output. Probably related to the migration to the pyproject-build-system. So now the -basic test passes, but the -simple and -extension tests don't, but I guess it's because tests rather than the package are broken. Ready to be merged IMHO. Nicolas Graves (6): gnu: fail2ban: Move file deletion to source snippet. gnu: fail2ban: Move setup and test patches to phases. gnu: fail2ban: Update to 1.1.0. gnu: fail2ban: Improve style. gnu: fail2ban: Improve style. gnu: fail2ban: Improve snippet. gnu/local.mk | 6 - gnu/packages/admin.scm | 327 ++++++++---------- .../fail2ban-0.11.2_CVE-2021-32749.patch | 155 --------- ...2ban-0.11.2_fix-setuptools-drop-2to3.patch | 64 ---- .../fail2ban-0.11.2_fix-test-suite.patch | 48 --- .../fail2ban-python310-server-action.patch | 27 -- .../fail2ban-python310-server-actions.patch | 25 -- .../fail2ban-python310-server-jails.patch | 25 -- 8 files changed, 149 insertions(+), 528 deletions(-) delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-action.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-actions.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-jails.patch -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v3 1/6] gnu: fail2ban: Move file deletion to source snippet. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 May 2025 08:58:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17463490831460 (code B ref 78066); Sun, 04 May 2025 08:58:10 +0000 Received: (at 78066) by debbugs.gnu.org; 4 May 2025 08:58:03 +0000 Received: from localhost ([127.0.0.1]:51330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBVAe-0000Mv-CG for submit@debbugs.gnu.org; Sun, 04 May 2025 04:58:01 -0400 Received: from 1.mo562.mail-out.ovh.net ([178.33.109.175]:56941) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBVAX-0000Lw-5n for 78066@debbugs.gnu.org; Sun, 04 May 2025 04:57:57 -0400 Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net [152.228.215.222]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz7z3Nhyz1VwY; Sun, 4 May 2025 08:57:51 +0000 (UTC) Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net. [127.0.0.1]) by director3.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 4 May 2025 08:57:51 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.176.114]) by director3.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz7z2D1Qz6252; Sun, 4 May 2025 08:57:51 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.0]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id DC3CCC3AB0; Sun, 4 May 2025 08:57:50 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-101G004d7036f4b-8b5f-434c-958f-ca844d776698, 8CD8A0E5D230CF78A323F194FBE8D47D3072D94D) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 From: Nicolas Graves Date: Sun, 4 May 2025 10:56:21 +0200 Message-ID: <20250504085747.6387-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250504085747.6387-1-ngraves@ngraves.fr> References: <20250504085747.6387-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 3174756266389594850 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeejjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdekuedujeeukeelfeevheeiueeuhedttdfhfeefudekhedujeehleeiffehjeelnecuffhomhgrihhnpehsvghtuhhprdhphienucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=oJvWlY81aQRdMEPIHPuAcwK6RQSDjLAP0XdlJXdGzLE=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746349071; v=1; b=C7x7pToP4853bzGNV535c2JmaCJGhcJoSKdRiiokoU1hWfDqOuCEIGsvB/MhBmNAJuJBrrsO 6n2F0fMgNwopag7yvxubjXfJa8SaSKIuanVdBD24MXMrSVTMF+DxkPvzaye+2B8l3LwOsy5zfK8 K+atKR47aGjoJ2T7BJqjeWYF4teyCmmrZJoFLrKiKvfGzffb1xb2hH4eXRouXONurxsk5V244Y9 7ddDcdJrIHVUBrsLLoFM3kcsNqsk2gCEUWgcPCN7WXMZZ7tloYtJsRjhsK2AIDuzoW2gn3un7wJ kks2xbqH3VjyYlm0QEcCl1Pp9BaVKqDx/2iqLn8yAQ+SQ== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban) [arguments]: Move multiple file deletion from here... [source]: ...to here. --- gnu/packages/admin.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 1d0ec121ff..216776e62c 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6185,6 +6185,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") @@ -6248,14 +6257,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" -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v3 6/6] gnu: fail2ban: Improve snippet. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 May 2025 08:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17463490921604 (code B ref 78066); Sun, 04 May 2025 08:59:02 +0000 Received: (at 78066) by debbugs.gnu.org; 4 May 2025 08:58:12 +0000 Received: from localhost ([127.0.0.1]:51334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBVAp-0000Pm-PP for submit@debbugs.gnu.org; Sun, 04 May 2025 04:58:12 -0400 Received: from 9.mo562.mail-out.ovh.net ([46.105.72.114]:43265) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBVAa-0000MB-Vl for 78066@debbugs.gnu.org; Sun, 04 May 2025 04:57:58 -0400 Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net [152.228.215.222]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz840zP4z1W2l; Sun, 4 May 2025 08:57:56 +0000 (UTC) Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net. [127.0.0.1]) by director3.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 4 May 2025 08:57:55 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.109.139.55]) by director3.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz836fsfz61lp; Sun, 4 May 2025 08:57:55 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.3]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 694E3C3AB1; Sun, 4 May 2025 08:57:55 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-95G00182190a72-a616-4d4f-9ef3-dd899533d690, 8CD8A0E5D230CF78A323F194FBE8D47D3072D94D) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 From: Nicolas Graves Date: Sun, 4 May 2025 10:56:26 +0200 Message-ID: <20250504085747.6387-7-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250504085747.6387-1-ngraves@ngraves.fr> References: <20250504085747.6387-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 3175882162924544738 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeejjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehiedvmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=tQ/tOhN/wClrGCdKG1t9s/+iJqK8uhQlqh+alDlBk+M=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746349076; v=1; b=j1/DFSQI5mav+nYZVgSp8RE81vFGnNomUYtd2dxSwnhDJhvTcq/LiA05mrL9BTe533hOl7oF VDxRxfU/0Jh0wGtxPDnU2bHo5dugsEFH1gkc93A5SvQYL/S8Af1K70Jo/0n3n1HmByk9twWbBnU KIgiiuflMU2AlEwQefIc2ufJhyRja2m83nSIsnn89Pohbdv++S+ESS1Jc8Sx/7sJaV+BHflyJrQ SQ6LXontGC7sFCl2z4IWErsYKhm+16FBB01KPTMiPdQjZCIvyLXI5Jk19M+t83tdlGpuwSEiZTw 5SNomEu/bwZSizjQSMMAMkhE20+xZ2yjClCDqlw3VcEeA== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban) [source]: Remove (srfi srfi-26). : Use gexp. Move substitute* patches... [arguments]: ...to phases 'patch-setup.py and 'disable-some-tests. --- gnu/packages/admin.scm | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index e508340ef0..8fee710c7f 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6218,23 +6218,19 @@ (define-public fail2ban "'usr/share/doc/fail2ban'")))) (add-after 'unpack 'disable-some-tests (lambda _ - (define (make-suite str) - (string-append "tests.addTest\\(loadTests\\(" str "\\)\\)")) + (define (make-suite-regex tests) + (string-append "tests.addTest\\(loadTests\\((" + (string-join tests "|") + ")\\)\\)")) ;; 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")) + (((make-suite-regex (list "actiontestcase.CommandActionTest" + "misctestcase.SetupTest" + "filtertestcase.DNSUtilsNetworkTests" + "filtertestcase.IgnoreIPDNS" + "filtertestcase.GetFailures" + "fail2banclienttestcase.Fail2banServerTest" + "servertestcase.ServerConfigReaderTests"))) "")))) (add-before 'build 'fix-default-config (lambda _ -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v3 2/6] gnu: fail2ban: Move setup and test patches to phases. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 May 2025 08:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17463490931612 (code B ref 78066); Sun, 04 May 2025 08:59:03 +0000 Received: (at 78066) by debbugs.gnu.org; 4 May 2025 08:58:13 +0000 Received: from localhost ([127.0.0.1]:51336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBVAq-0000Pp-PA for submit@debbugs.gnu.org; Sun, 04 May 2025 04:58:13 -0400 Received: from 5.mo562.mail-out.ovh.net ([46.105.48.192]:39411) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBVAX-0000M2-Pw for 78066@debbugs.gnu.org; Sun, 04 May 2025 04:57:59 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz803QLQz184j; Sun, 4 May 2025 08:57:52 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 4 May 2025 08:57:52 +0000 (UTC) Received: from mta2.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.188.244]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz802FRlz2cHd; Sun, 4 May 2025 08:57:52 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.3]) by mta2.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 008C0BA3FD0; Sun, 4 May 2025 08:57:51 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-111S0057f14ee90-dfbd-4ae8-89fb-4f5f675df78c, 8CD8A0E5D230CF78A323F194FBE8D47D3072D94D) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 From: Nicolas Graves Date: Sun, 4 May 2025 10:56:22 +0200 Message-ID: <20250504085747.6387-3-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250504085747.6387-1-ngraves@ngraves.fr> References: <20250504085747.6387-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 3175037739246805730 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeejjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehiedvmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=7DqOXXhPNgAzuO4/S/ZQz3pDdaV30dgMFewJn/U75Xo=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746349072; v=1; b=tjAeeWtRDalECX07czbrVhGbR+fC0aryG2RXB83TIqslZb/8D9i2ky6Hv6qCDPZa8O4HFznn z4OT88Yt0aroT2YJYld3OARu3UII4VJMMM/TTo5++HaoDha+u9zRulOSFLSHvx9al2cAPtFuE01 l5CFeN69Eo1TTKCjKrpdZrTcj9MvNgkSB0rAgZhtRb09XXUVEfWH+DkzAMdDmhTIyzvWptZpinE XkKnWxZ2VwcHzyKYC0rVkrVvgDlDkYuXZ5accBKWaRHVjVaG1rTUQMdJojoayI7btNn7iLC22QP PAvC2E3xnmB6C7C5lujvl0dC/rmZycI44b0mIhiuhdP1A== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban) [source]: Move setup and test substitutions... [arguments]: ...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 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v3 5/6] gnu: fail2ban: Improve style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 May 2025 08:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17463490941620 (code B ref 78066); Sun, 04 May 2025 08:59:03 +0000 Received: (at 78066) by debbugs.gnu.org; 4 May 2025 08:58:14 +0000 Received: from localhost ([127.0.0.1]:51338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBVAr-0000Py-IP for submit@debbugs.gnu.org; Sun, 04 May 2025 04:58:14 -0400 Received: from 9.mo562.mail-out.ovh.net ([46.105.72.114]:45797) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBVAa-0000M7-7X for 78066@debbugs.gnu.org; Sun, 04 May 2025 04:57:59 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz826mTfz1W1v; Sun, 4 May 2025 08:57:54 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 4 May 2025 08:57:54 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.108.2.71]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz825dLVz2c5j; Sun, 4 May 2025 08:57:54 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.6]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 7DCE4C3AB1; Sun, 4 May 2025 08:57:54 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-99G003f7fe9720-8e5f-4c4d-933b-9627259a9705, 8CD8A0E5D230CF78A323F194FBE8D47D3072D94D) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 From: Nicolas Graves Date: Sun, 4 May 2025 10:56:25 +0200 Message-ID: <20250504085747.6387-6-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250504085747.6387-1-ngraves@ngraves.fr> References: <20250504085747.6387-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 3175600688989135586 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeejjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnheptdejjedvkedtkeekfeehvdejteegvefgveelgfehhfdvjeelffdtteefudetieffnecuffhomhgrihhnpehfrghilhdvsggrnhhrvghgvgigrdhphienucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=fiyNp+kFwllwhr97cTlN/uwnxKmABGYRh54v6E+Qa/I=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746349075; v=1; b=WdEXYc+RDUK5174tXdSonaVQ5ROQVFQQgoVxIS0mY8X5DCII5+2QDcM4uDTf8/dm1Jv4Wx96 +Z8ywdFjTKrE9bkPSjAvpv/gNIchyYp6YnEAsmZWrZQqq5dE5WotcuuObzj0lWr6Qg29IT3RKKj smlPUlXCgic89l1D9enuZNfVvFdsok/IGTKPyo90rmmeFSuJg7oexsmxOgjOBQsdFJJYaKu/qwX Z4cUisDA57Dn6Jbz48J9SrTtSTJiPy1wmGouWh6yXsc2QfbWyslnvjxBNe2G4XbIv/8eXJg16it 2k2YFA3x/a0R7Xz4QWEelTz/J1BzrtN01rKmbsrH0/hHA== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban): [arguments]: Rewrite phases 'set-action-dependencies and copy-man-pages for readability. --- gnu/packages/admin.scm | 121 ++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 67 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index c9dd154313..e508340ef0 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6237,21 +6237,22 @@ (define (make-suite str) (((make-suite "servertestcase.ServerConfigReaderTests")) "")))) (add-before 'build 'fix-default-config - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ (substitute* '("config/paths-common.conf" "fail2ban/tests/utils.py" "fail2ban/client/configreader.py" "fail2ban/client/fail2bancmdline.py" "fail2ban/client/fail2banregex.py") (("/etc/fail2ban") - (string-append (assoc-ref outputs "out") "/etc/fail2ban"))))) + (string-append #$output "/etc/fail2ban"))))) (add-after 'fix-default-config 'set-action-dependencies (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/action.d" (for-each delete-file - '("apf.conf" "bsd-ipfw.conf" + '("apf.conf" + "bsd-ipfw.conf" "dshield.conf" "ipfilter.conf" "ipfw.conf" @@ -6270,74 +6271,60 @@ (define (make-suite str) "shorewall.conf" "shorewall-ipset-proto6.conf" "ufw.conf"))) - (let* ((lookup-cmd (lambda (i) - (search-input-file inputs i))) - (bin (lambda (i) - (lookup-cmd (string-append "/bin/" i)))) - (sbin (lambda (i) - (lookup-cmd (string-append "/sbin/" i)))) - (ip (sbin "ip")) - (sendmail (sbin "sendmail"))) - (substitute* (find-files "config/action.d" "\\.conf$") - ;; TODO: deal with geoiplookup .. - (("(awk|curl|dig|jq)" all cmd) - (bin cmd)) - (("(cat|echo|grep|head|printf|wc) " all cmd) - (string-append (bin cmd) " ")) - ((" (date|rm|sed|tail|touch|tr) " all cmd) - (string-append " " - (bin cmd) " ")) - (("cut -d") - (string-append (bin "cut") " -d")) - (("`date`") - (string-append "`" - (bin "date") "`")) - (("id -") - (string-append (bin "id") " -")) - (("ip -([46]) addr" all ver) - (string-append ip " -" ver " addr")) - (("ip route") - (string-append ip " route")) - (("ipset ") - (string-append (sbin "ipset") " ")) - (("(iptables|ip6tables) <" all cmd) - (string-append (sbin cmd) " <")) - (("/usr/bin/nsupdate") - (bin "nsupdate")) - (("mail -E") - (string-append sendmail " -E")) - (("nftables = nft") - (string-append "nftables = " - (sbin "nft"))) - (("perl -e") - (string-append (bin "perl") " -e")) - (("/usr/sbin/sendmail") - sendmail) - (("test -e") - (string-append (bin "test") " -e")) - (("_whois = whois") - (string-append "_whois = " - (bin "whois"))))) + (define (lookup dir file) + (search-input-file inputs (string-append "/" dir "/" file))) + + (substitute* (find-files "config/action.d" "\\.conf$") + ;; TODO: deal with geoiplookup .. + (("(awk|curl|dig|jq)" all cmd) + (lookup "bin" cmd)) + (("(cat|echo|grep|head|printf|wc) " all cmd) + (string-append (lookup "bin" cmd) " ")) + ((" (date|rm|sed|tail|touch|tr) " all cmd) + (string-append " " (lookup "bin" cmd) " ")) + (("cut -d") + (string-append (lookup "bin" "cut") " -d")) + (("`date`") + (string-append "`" (lookup "bin" "date") "`")) + (("id -") + (string-append (lookup "bin" "id") " -")) + (("ip (route|-[46] addr)" all rest) + (string-append (lookup "sbin" "ip") rest)) + (("ipset ") + (string-append (lookup "sbin" "ipset") " ")) + (("(iptables|ip6tables) <" all cmd) + (string-append (lookup "sbin" cmd) " <")) + (("/usr/bin/nsupdate") + (lookup "bin" "nsupdate")) + (("mail -E") + (string-append (lookup "sbin" "sendmail") " -E")) + (("nftables = nft") + (string-append "nftables = " (lookup "sbin" "nft"))) + (("perl -e") + (string-append (lookup "bin" "perl") " -e")) + (("/usr/sbin/sendmail") + (lookup "sbin" "sendmail")) + (("test -e") + (string-append (lookup "bin" "test") " -e")) + (("_whois = whois") + (string-append "_whois = " (lookup "bin" "whois")))) + (substitute* "config/jail.conf" (("before = paths-debian\\.conf") "before = paths-guix.conf")))) (add-after 'install 'copy-man-pages - (lambda* (#:key outputs #:allow-other-keys) - (let* ((man (string-append (assoc-ref outputs "out") "/man")) - (install-man (lambda (m) - (lambda (f) - (install-file (string-append f "." m) - (string-append man "/man" - m))))) - (install-man1 (install-man "1")) - (install-man5 (install-man "5"))) - (with-directory-excursion "man" - (for-each install-man1 - '("fail2ban" "fail2ban-client" "fail2ban-python" - "fail2ban-regex" "fail2ban-server" - "fail2ban-testcases")) - (for-each install-man5 - '("jail.conf"))))))))) + (lambda _ + (define (install-man m) + (lambda (f) + (install-file (string-append f "." m) + (string-append #$output "man/man" m)))) + + (with-directory-excursion "man" + (for-each (install-man "1") + '("fail2ban" "fail2ban-client" "fail2ban-python" + "fail2ban-regex" "fail2ban-server" + "fail2ban-testcases")) + ((install-man "5") "jail.conf"))))))) (native-inputs (list python-setuptools python-wheel)) (inputs (list gawk coreutils-minimal -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v3 4/6] gnu: fail2ban: Improve style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 May 2025 08:59:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17463490951630 (code B ref 78066); Sun, 04 May 2025 08:59:04 +0000 Received: (at 78066) by debbugs.gnu.org; 4 May 2025 08:58:15 +0000 Received: from localhost ([127.0.0.1]:51340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBVAs-0000Q6-68 for submit@debbugs.gnu.org; Sun, 04 May 2025 04:58:15 -0400 Received: from 7.mo563.mail-out.ovh.net ([46.105.59.58]:46057) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBVAa-0000M6-8I for 78066@debbugs.gnu.org; Sun, 04 May 2025 04:58:00 -0400 Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net [51.68.80.175]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz825LSLz1SdW; Sun, 4 May 2025 08:57:54 +0000 (UTC) Received: from director1.derp.mail-out.ovh.net (director1.derp.mail-out.ovh.net. [127.0.0.1]) by director1.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 4 May 2025 08:57:54 +0000 (UTC) Received: from mta2.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.118.229]) by director1.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz821gsKz61pS; Sun, 4 May 2025 08:57:54 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.3]) by mta2.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id D4DADBA3F92; Sun, 4 May 2025 08:57:53 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-99G00395f8d8fb-69bc-42e8-b12f-c073ea7d4510, 8CD8A0E5D230CF78A323F194FBE8D47D3072D94D) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 From: Nicolas Graves Date: Sun, 4 May 2025 10:56:24 +0200 Message-ID: <20250504085747.6387-5-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250504085747.6387-1-ngraves@ngraves.fr> References: <20250504085747.6387-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 3175600691197436642 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeejjeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdehleeiffehtedvlefhffffjeefgfduhfetkeevheeiteduiedugfekuedtheejnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeektdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeifegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=6t8UMI4AC5atqsIVab+hIQPBr9IeHJvJg7WLEAyevto=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746349074; v=1; b=a2Veah8IuLEIHzfMWHeYEksV4Pgp9hZPOw94Du8s4SpWr+VwgvylLDiDPpxuiVDgBNGHjeoo iYeWQXKFH1M08OVxm2NUxQ5w6fajYhosz9BC45653HKVPFZ//vu5t8iUU/AHnaMOUmAUyVfy+YQ LXbvOglhmIuXyeBJCCzR3bZgyU0nAMYY1nu6UemJihFovPxgOsXFBvQrYYdchKUyzfrZeF6gGVJ kpdIBOjUQEQ42Uq3YkFtn+2JncPxVQhqpFhnUNWsyJVq0/9OCSUdy4+xPQXBZf0JilSapp0MZPE 8BoC6VRQgWTKNFHmGFgZFPaTRDpcCJiiyaN6VdtwKDMZw== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/admin.scm (fail2ban): Use gexps and run guix style. --- gnu/packages/admin.scm | 338 ++++++++++++++++++++--------------------- 1 file changed, 164 insertions(+), 174 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index c6dc8ff43c..c9dd154313 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6173,182 +6173,172 @@ (define-public fail2ban (package (name "fail2ban") (version "1.1.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/fail2ban/fail2ban") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) - (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"))))) - (patches (search-patches "fail2ban-paths-guix-conf.patch")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fail2ban/fail2ban") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) + (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"))))) + (patches (search-patches "fail2ban-paths-guix-conf.patch")))) (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'avoid-external-binary-in-/bin - (lambda _ - (delete-file "fail2ban/setup.py") - (substitute* '("bin/fail2ban-testcases" - "setup.py") - ((".*updatePyExec.*") "")))) - (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\\(loadTests\\(" 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 'build 'fix-default-config - (lambda* (#:key outputs #:allow-other-keys) - (substitute* '("config/paths-common.conf" - "fail2ban/tests/utils.py" - "fail2ban/client/configreader.py" - "fail2ban/client/fail2bancmdline.py" - "fail2ban/client/fail2banregex.py") - (("/etc/fail2ban") - (string-append (assoc-ref outputs "out") - "/etc/fail2ban"))))) - (add-after 'fix-default-config 'set-action-dependencies - (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/action.d" - (for-each delete-file - '("apf.conf" - "bsd-ipfw.conf" - "dshield.conf" - "ipfilter.conf" - "ipfw.conf" - "firewallcmd-allports.conf" - "firewallcmd-common.conf" - "firewallcmd-ipset.conf" - "firewallcmd-multiport.conf" - "firewallcmd-new.conf" - "firewallcmd-rich-logging.conf" - "firewallcmd-rich-rules.conf" - "osx-afctl.conf" - "osx-ipfw.conf" - "pf.conf" - "nginx-block-map.conf" - "npf.conf" - "shorewall.conf" - "shorewall-ipset-proto6.conf" - "ufw.conf"))) - (let* ((lookup-cmd (lambda (i) - (search-input-file inputs i))) - (bin (lambda (i) - (lookup-cmd (string-append "/bin/" i)))) - (sbin (lambda (i) - (lookup-cmd (string-append "/sbin/" i)))) - (ip (sbin "ip")) - (sendmail (sbin "sendmail"))) - (substitute* (find-files "config/action.d" "\\.conf$") - ;; TODO: deal with geoiplookup .. - (("(awk|curl|dig|jq)" all cmd) - (bin cmd)) - (("(cat|echo|grep|head|printf|wc) " all - cmd) - (string-append (bin cmd) " ")) - ((" (date|rm|sed|tail|touch|tr) " all - cmd) - (string-append " " - (bin cmd) " ")) - (("cut -d") - (string-append (bin "cut") " -d")) - (("`date`") - (string-append "`" - (bin "date") "`")) - (("id -") - (string-append (bin "id") " -")) - (("ip -([46]) addr" all ver) - (string-append ip " -" ver " addr")) - (("ip route") - (string-append ip " route")) - (("ipset ") - (string-append (sbin "ipset") " ")) - (("(iptables|ip6tables) <" all cmd) - (string-append (sbin cmd) " <")) - (("/usr/bin/nsupdate") - (bin "nsupdate")) - (("mail -E") - (string-append sendmail " -E")) - (("nftables = nft") - (string-append "nftables = " (sbin "nft"))) - (("perl -e") - (string-append (bin "perl") " -e")) - (("/usr/sbin/sendmail") - sendmail) - (("test -e") - (string-append (bin "test") " -e")) - (("_whois = whois") - (string-append "_whois = " (bin "whois"))))) - (substitute* "config/jail.conf" - (("before = paths-debian\\.conf") - "before = paths-guix.conf")))) - (add-after 'install 'copy-man-pages - (lambda* (#:key outputs #:allow-other-keys) - (let* ((man (string-append (assoc-ref outputs "out") - "/man")) - (install-man (lambda (m) - (lambda (f) - (install-file (string-append f - "." m) - (string-append man - "/man" m))))) - (install-man1 (install-man "1")) - (install-man5 (install-man "5"))) - (with-directory-excursion "man" - (for-each install-man1 - '("fail2ban" - "fail2ban-client" - "fail2ban-python" - "fail2ban-regex" - "fail2ban-server" - "fail2ban-testcases")) - (for-each install-man5 - '("jail.conf"))))))))) - (native-inputs - (list python-setuptools python-wheel)) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'avoid-external-binary-in-/bin + (lambda _ + (delete-file "fail2ban/setup.py") + (substitute* '("bin/fail2ban-testcases" "setup.py") + ((".*updatePyExec.*") + "")))) + (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\\(loadTests\\(" 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 'build 'fix-default-config + (lambda* (#:key outputs #:allow-other-keys) + (substitute* '("config/paths-common.conf" + "fail2ban/tests/utils.py" + "fail2ban/client/configreader.py" + "fail2ban/client/fail2bancmdline.py" + "fail2ban/client/fail2banregex.py") + (("/etc/fail2ban") + (string-append (assoc-ref outputs "out") "/etc/fail2ban"))))) + (add-after 'fix-default-config 'set-action-dependencies + (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/action.d" + (for-each delete-file + '("apf.conf" "bsd-ipfw.conf" + "dshield.conf" + "ipfilter.conf" + "ipfw.conf" + "firewallcmd-allports.conf" + "firewallcmd-common.conf" + "firewallcmd-ipset.conf" + "firewallcmd-multiport.conf" + "firewallcmd-new.conf" + "firewallcmd-rich-logging.conf" + "firewallcmd-rich-rules.conf" + "osx-afctl.conf" + "osx-ipfw.conf" + "pf.conf" + "nginx-block-map.conf" + "npf.conf" + "shorewall.conf" + "shorewall-ipset-proto6.conf" + "ufw.conf"))) + (let* ((lookup-cmd (lambda (i) + (search-input-file inputs i))) + (bin (lambda (i) + (lookup-cmd (string-append "/bin/" i)))) + (sbin (lambda (i) + (lookup-cmd (string-append "/sbin/" i)))) + (ip (sbin "ip")) + (sendmail (sbin "sendmail"))) + (substitute* (find-files "config/action.d" "\\.conf$") + ;; TODO: deal with geoiplookup .. + (("(awk|curl|dig|jq)" all cmd) + (bin cmd)) + (("(cat|echo|grep|head|printf|wc) " all cmd) + (string-append (bin cmd) " ")) + ((" (date|rm|sed|tail|touch|tr) " all cmd) + (string-append " " + (bin cmd) " ")) + (("cut -d") + (string-append (bin "cut") " -d")) + (("`date`") + (string-append "`" + (bin "date") "`")) + (("id -") + (string-append (bin "id") " -")) + (("ip -([46]) addr" all ver) + (string-append ip " -" ver " addr")) + (("ip route") + (string-append ip " route")) + (("ipset ") + (string-append (sbin "ipset") " ")) + (("(iptables|ip6tables) <" all cmd) + (string-append (sbin cmd) " <")) + (("/usr/bin/nsupdate") + (bin "nsupdate")) + (("mail -E") + (string-append sendmail " -E")) + (("nftables = nft") + (string-append "nftables = " + (sbin "nft"))) + (("perl -e") + (string-append (bin "perl") " -e")) + (("/usr/sbin/sendmail") + sendmail) + (("test -e") + (string-append (bin "test") " -e")) + (("_whois = whois") + (string-append "_whois = " + (bin "whois"))))) + (substitute* "config/jail.conf" + (("before = paths-debian\\.conf") + "before = paths-guix.conf")))) + (add-after 'install 'copy-man-pages + (lambda* (#:key outputs #:allow-other-keys) + (let* ((man (string-append (assoc-ref outputs "out") "/man")) + (install-man (lambda (m) + (lambda (f) + (install-file (string-append f "." m) + (string-append man "/man" + m))))) + (install-man1 (install-man "1")) + (install-man5 (install-man "5"))) + (with-directory-excursion "man" + (for-each install-man1 + '("fail2ban" "fail2ban-client" "fail2ban-python" + "fail2ban-regex" "fail2ban-server" + "fail2ban-testcases")) + (for-each install-man5 + '("jail.conf"))))))))) + (native-inputs (list python-setuptools python-wheel)) (inputs (list gawk coreutils-minimal curl -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78066] [PATCH v3 3/6] gnu: fail2ban: Update to 1.1.0. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 May 2025 08:59:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78066@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78066-submit@debbugs.gnu.org id=B78066.17463491001680 (code B ref 78066); Sun, 04 May 2025 08:59:04 +0000 Received: (at 78066) by debbugs.gnu.org; 4 May 2025 08:58:20 +0000 Received: from localhost ([127.0.0.1]:51342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBVAt-0000QF-6u for submit@debbugs.gnu.org; Sun, 04 May 2025 04:58:18 -0400 Received: from 5.mo562.mail-out.ovh.net ([46.105.48.192]:43041) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBVAY-0000M4-DA for 78066@debbugs.gnu.org; Sun, 04 May 2025 04:58:04 -0400 Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net [79.137.60.36]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz813sXfz1W0m; Sun, 4 May 2025 08:57:53 +0000 (UTC) Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net. [127.0.0.1]) by director2.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78066@debbugs.gnu.org>; Sun, 4 May 2025 08:57:53 +0000 (UTC) Received: from mta7.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.108.17.212]) by director2.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4Zqz812z02z2D4D; Sun, 4 May 2025 08:57:53 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.3]) by mta7.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 05E39C3AB1; Sun, 4 May 2025 08:57:52 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-114S008558caae1-0b35-485a-b739-c48341e192b2, 8CD8A0E5D230CF78A323F194FBE8D47D3072D94D) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 From: Nicolas Graves Date: Sun, 4 May 2025 10:56:23 +0200 Message-ID: <20250504085747.6387-4-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250504085747.6387-1-ngraves@ngraves.fr> References: <20250504085747.6387-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 3175319213825909474 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjeejjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeejkedtieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdfovfetjfhoshhtpehmohehiedvmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=cZ3+DlWOLrpiJtDN/rLa4E0jRUHGtdBHu/RvwJJVfo0=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1746349073; v=1; b=zL1W0NudhSBMw6p6ee81aRzcnwYwgtYK0DgwXdwarN8st7U3+jWo0gpsM6vZREHXLPY0XOyr D15J0CtiY8ZVxMs4STfhlfiefyQb19z7goUcQa5rwRMTQiiEtTtoIaLVjpU9hYBpbYOHP8OwGdA zji+6CGIYcLxeKKC62FRomchWdof5NWxf+fkHUeE7jUduZE8p7kuqCq5tVYv2y/10q6zq0SQtHR sSCy975rI28KvbT3BpSW0VcmmYneuTZXhyX7H1TDZLWFT/LhyGBJ2p0bTw/+/0wyPeNq8HI9aM9 dGd1Xv8FisfzwSq94yuPy1YZlEPyODY1vc4hgMCDNjrcQ== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch, gnu/packages/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch, gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch, gnu/packages/patches/fail2ban-python310-server-action.patch, gnu/packages/fail2ban-python310-server-actions.patch: Delete patches. * gnu/local.mk: Deregister patches. * gnu/packages/admin.scm (fail2ban): Update to 1.1.0. [source]: Use (srfi srfi-26) for readability. : Deregister patches. [build-system]: Switch to pyproject-build-system. [arguments]: Remove phase 'invoke-2to3. Add phase 'avoid-external-binary-in-/bin to avoid creating a symlink to python-wrapper binary during installation (current 'install phase breaks otherwise). Run phases 'fix-default-config and 'set-action-dependencies before 'build phase (needed for pyproject). [native-inputs]: Add python-setuptools, python-wheel. --- gnu/local.mk | 6 - gnu/packages/admin.scm | 30 ++-- .../fail2ban-0.11.2_CVE-2021-32749.patch | 155 ------------------ ...2ban-0.11.2_fix-setuptools-drop-2to3.patch | 64 -------- .../fail2ban-0.11.2_fix-test-suite.patch | 48 ------ .../fail2ban-python310-server-action.patch | 27 --- .../fail2ban-python310-server-actions.patch | 25 --- .../fail2ban-python310-server-jails.patch | 25 --- 8 files changed, 14 insertions(+), 366 deletions(-) delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch delete mode 100644 gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-action.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-actions.patch delete mode 100644 gnu/packages/patches/fail2ban-python310-server-jails.patch diff --git a/gnu/local.mk b/gnu/local.mk index f6f95bbf10..5269bfe5ee 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1259,13 +1259,7 @@ dist_patch_DATA = \ %D%/packages/patches/expat-CVE-2024-45492.patch \ %D%/packages/patches/extempore-unbundle-external-dependencies.patch \ %D%/packages/patches/extundelete-e2fsprogs-1.44.patch \ - %D%/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch \ - %D%/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch \ - %D%/packages/patches/fail2ban-0.11.2_fix-test-suite.patch \ %D%/packages/patches/fail2ban-paths-guix-conf.patch \ - %D%/packages/patches/fail2ban-python310-server-action.patch \ - %D%/packages/patches/fail2ban-python310-server-actions.patch \ - %D%/packages/patches/fail2ban-python310-server-jails.patch \ %D%/packages/patches/faiss-tests-CMakeLists-find-googletest.patch \ %D%/packages/patches/falcosecurity-libs-shared-build.patch \ %D%/packages/patches/farstream-gupnp.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index d47a1935c3..c6dc8ff43c 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -6172,7 +6172,7 @@ (define-public sysdig (define-public fail2ban (package (name "fail2ban") - (version "0.11.2") + (version "1.1.0") (source (origin (method git-fetch) (uri (git-reference @@ -6181,7 +6181,7 @@ (define-public fail2ban (file-name (git-file-name name version)) (sha256 (base32 - "00d9q8m284q2wy6q462nipzszplfbvrs9fhgn0y3imwsc24kv1db")) + "0lfakna6ad2xwz95sjxzkavipcsxiy7ybavkdkf9zzmspf2ws4yk")) (modules '((guix build utils))) (snippet '(begin @@ -6194,20 +6194,16 @@ (define-public fail2ban "paths-freebsd.conf" "paths-opensuse.conf" "paths-osx.conf"))))) - (patches (search-patches - "fail2ban-0.11.2_fix-setuptools-drop-2to3.patch" - "fail2ban-python310-server-action.patch" - "fail2ban-python310-server-actions.patch" - "fail2ban-python310-server-jails.patch" - "fail2ban-0.11.2_fix-test-suite.patch" - "fail2ban-0.11.2_CVE-2021-32749.patch" - "fail2ban-paths-guix-conf.patch")))) - (build-system python-build-system) + (patches (search-patches "fail2ban-paths-guix-conf.patch")))) + (build-system pyproject-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-before 'build 'invoke-2to3 + (add-after 'unpack 'avoid-external-binary-in-/bin (lambda _ - (invoke "./fail2ban-2to3"))) + (delete-file "fail2ban/setup.py") + (substitute* '("bin/fail2ban-testcases" + "setup.py") + ((".*updatePyExec.*") "")))) (add-after 'unpack 'patch-setup.py (lambda _ ;; Get rid of absolute file names. @@ -6225,7 +6221,7 @@ (define-public fail2ban (add-after 'unpack 'disable-some-tests (lambda _ (define (make-suite str) - (string-append "tests.addTest.unittest.makeSuite." str "..")) + (string-append "tests.addTest\\(loadTests\\(" str "\\)\\)")) ;; disable tests performing unacceptable side-effects (substitute* "fail2ban/tests/utils.py" (((make-suite "actiontestcase.CommandActionTest")) @@ -6242,7 +6238,7 @@ (define (make-suite str) "") (((make-suite "servertestcase.ServerConfigReaderTests")) "")))) - (add-before 'install 'fix-default-config + (add-before 'build 'fix-default-config (lambda* (#:key outputs #:allow-other-keys) (substitute* '("config/paths-common.conf" "fail2ban/tests/utils.py" @@ -6327,7 +6323,7 @@ (define (make-suite str) (("_whois = whois") (string-append "_whois = " (bin "whois"))))) (substitute* "config/jail.conf" - (("before = paths-debian.conf") + (("before = paths-debian\\.conf") "before = paths-guix.conf")))) (add-after 'install 'copy-man-pages (lambda* (#:key outputs #:allow-other-keys) @@ -6351,6 +6347,8 @@ (define (make-suite str) "fail2ban-testcases")) (for-each install-man5 '("jail.conf"))))))))) + (native-inputs + (list python-setuptools python-wheel)) (inputs (list gawk coreutils-minimal curl diff --git a/gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch b/gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch deleted file mode 100644 index d3c677918c..0000000000 --- a/gnu/packages/patches/fail2ban-0.11.2_CVE-2021-32749.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 410a6ce5c80dd981c22752da034f2529b5eee844 Mon Sep 17 00:00:00 2001 -From: sebres -Date: Mon, 21 Jun 2021 17:12:53 +0200 -Subject: [PATCH] fixed possible RCE vulnerability, unset escape variable - (default tilde) stops consider "~" char after new-line as composing escape - sequence - ---- - config/action.d/complain.conf | 2 +- - config/action.d/dshield.conf | 2 +- - config/action.d/mail-buffered.conf | 8 ++++---- - config/action.d/mail-whois-lines.conf | 2 +- - config/action.d/mail-whois.conf | 6 +++--- - config/action.d/mail.conf | 6 +++--- - 6 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/config/action.d/complain.conf b/config/action.d/complain.conf -index 3a5f882c9f..4d73b05859 100644 ---- a/config/action.d/complain.conf -+++ b/config/action.d/complain.conf -@@ -102,7 +102,7 @@ logpath = /dev/null - # Notes.: Your system mail command. Is passed 2 args: subject and recipient - # Values: CMD - # --mailcmd = mail -s -+mailcmd = mail -E 'set escape' -s - - # Option: mailargs - # Notes.: Additional arguments to mail command. e.g. for standard Unix mail: -diff --git a/config/action.d/dshield.conf b/config/action.d/dshield.conf -index c128bef348..3d5a7a53a9 100644 ---- a/config/action.d/dshield.conf -+++ b/config/action.d/dshield.conf -@@ -179,7 +179,7 @@ tcpflags = - # Notes.: Your system mail command. Is passed 2 args: subject and recipient - # Values: CMD - # --mailcmd = mail -s -+mailcmd = mail -E 'set escape' -s - - # Option: mailargs - # Notes.: Additional arguments to mail command. e.g. for standard Unix mail: -diff --git a/config/action.d/mail-buffered.conf b/config/action.d/mail-buffered.conf -index 325f185b2f..79b841049c 100644 ---- a/config/action.d/mail-buffered.conf -+++ b/config/action.d/mail-buffered.conf -@@ -17,7 +17,7 @@ actionstart = printf %%b "Hi,\n - The jail has been started successfully.\n - Output will be buffered until lines are available.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : started on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : started on " - - # Option: actionstop - # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) -@@ -28,13 +28,13 @@ actionstop = if [ -f ]; then - These hosts have been banned by Fail2Ban.\n - `cat ` - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : Summary from " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : Summary from " - rm - fi - printf %%b "Hi,\n - The jail has been stopped.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : stopped on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : stopped on " - - # Option: actioncheck - # Notes.: command executed once before each actionban command -@@ -55,7 +55,7 @@ actionban = printf %%b "`date`: ( failures)\n" >> - These hosts have been banned by Fail2Ban.\n - `cat ` - \nRegards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : Summary" -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : Summary" - rm - fi - -diff --git a/config/action.d/mail-whois-lines.conf b/config/action.d/mail-whois-lines.conf -index 3a3e56b2c7..d2818cb9b9 100644 ---- a/config/action.d/mail-whois-lines.conf -+++ b/config/action.d/mail-whois-lines.conf -@@ -72,7 +72,7 @@ actionunban = - # Notes.: Your system mail command. Is passed 2 args: subject and recipient - # Values: CMD - # --mailcmd = mail -s -+mailcmd = mail -E 'set escape' -s - - # Default name of the chain - # -diff --git a/config/action.d/mail-whois.conf b/config/action.d/mail-whois.conf -index 7fea34c40d..ab33b616dc 100644 ---- a/config/action.d/mail-whois.conf -+++ b/config/action.d/mail-whois.conf -@@ -20,7 +20,7 @@ norestored = 1 - actionstart = printf %%b "Hi,\n - The jail has been started successfully.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : started on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : started on " - - # Option: actionstop - # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) -@@ -29,7 +29,7 @@ actionstart = printf %%b "Hi,\n - actionstop = printf %%b "Hi,\n - The jail has been stopped.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : stopped on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : stopped on " - - # Option: actioncheck - # Notes.: command executed once before each actionban command -@@ -49,7 +49,7 @@ actionban = printf %%b "Hi,\n - Here is more information about :\n - `%(_whois_command)s`\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : banned from " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : banned from " - - # Option: actionunban - # Notes.: command executed when unbanning an IP. Take care that the -diff --git a/config/action.d/mail.conf b/config/action.d/mail.conf -index 5d8c0e154c..f4838ddcb6 100644 ---- a/config/action.d/mail.conf -+++ b/config/action.d/mail.conf -@@ -16,7 +16,7 @@ norestored = 1 - actionstart = printf %%b "Hi,\n - The jail has been started successfully.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : started on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : started on " - - # Option: actionstop - # Notes.: command executed at the stop of jail (or at the end of Fail2Ban) -@@ -25,7 +25,7 @@ actionstart = printf %%b "Hi,\n - actionstop = printf %%b "Hi,\n - The jail has been stopped.\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : stopped on " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : stopped on " - - # Option: actioncheck - # Notes.: command executed once before each actionban command -@@ -43,7 +43,7 @@ actionban = printf %%b "Hi,\n - The IP has just been banned by Fail2Ban after - attempts against .\n - Regards,\n -- Fail2Ban"|mail -s "[Fail2Ban] : banned from " -+ Fail2Ban"|mail -E 'set escape' -s "[Fail2Ban] : banned from " - - # Option: actionunban - # Notes.: command executed when unbanning an IP. Take care that the diff --git a/gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch b/gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch deleted file mode 100644 index b0b14364b1..0000000000 --- a/gnu/packages/patches/fail2ban-0.11.2_fix-setuptools-drop-2to3.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 5ac303df8a171f748330d4c645ccbf1c2c7f3497 Mon Sep 17 00:00:00 2001 -From: sebres -Date: Sun, 19 Sep 2021 18:49:18 +0200 -Subject: [PATCH] fix gh-3098: build fails with error in fail2ban setup - command: use_2to3 is invalid (setuptools 58+) - ---- - setup.py | 16 +--------------- - 1 file changed, 1 insertion(+), 15 deletions(-) - -diff --git a/setup.py b/setup.py -index f4c2550f6f..98413273c5 100755 ---- a/setup.py -+++ b/setup.py -@@ -48,7 +48,7 @@ - from glob import glob - - from fail2ban.setup import updatePyExec -- -+from fail2ban.version import version - - source_dir = os.path.realpath(os.path.dirname( - # __file__ seems to be overwritten sometimes on some python versions (e.g. bug of 2.6 by running under cProfile, etc.): -@@ -112,22 +112,12 @@ def update_scripts(self, dry_run=False): - # Wrapper to specify fail2ban own options: - class install_command_f2b(install): - user_options = install.user_options + [ -- ('disable-2to3', None, 'Specify to deactivate 2to3, e.g. if the install runs from fail2ban test-cases.'), - ('without-tests', None, 'without tests files installation'), - ] - def initialize_options(self): -- self.disable_2to3 = None - self.without_tests = not with_tests - install.initialize_options(self) - def finalize_options(self): -- global _2to3 -- ## in the test cases 2to3 should be already done (fail2ban-2to3): -- if self.disable_2to3: -- _2to3 = False -- if _2to3: -- cmdclass = self.distribution.cmdclass -- cmdclass['build_py'] = build_py_2to3 -- cmdclass['build_scripts'] = build_scripts_2to3 - if self.without_tests: - self.distribution.scripts.remove('bin/fail2ban-testcases') - -@@ -178,7 +168,6 @@ def run(self): - if setuptools: - setup_extra = { - 'test_suite': "fail2ban.tests.utils.gatherTests", -- 'use_2to3': True, - } - else: - setup_extra = {} -@@ -202,9 +191,6 @@ def run(self): - ('/usr/share/doc/fail2ban', doc_files) - ) - --# Get version number, avoiding importing fail2ban. --# This is due to tests not functioning for python3 as 2to3 takes place later --exec(open(join("fail2ban", "version.py")).read()) - - setup( - name = "fail2ban", diff --git a/gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch b/gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch deleted file mode 100644 index 91d973e72e..0000000000 --- a/gnu/packages/patches/fail2ban-0.11.2_fix-test-suite.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 747d4683221b5584f9663695fb48145689b42ceb Mon Sep 17 00:00:00 2001 -From: sebres -Date: Mon, 4 Jan 2021 02:42:38 +0100 -Subject: [PATCH] fixes century selector of %ExY and %Exy in datepattern for - tests, considering interval from 2005 (alternate now) to now; + better - grouping algorithm for resulting century RE - ---- - fail2ban/server/strptime.py | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - -diff --git a/fail2ban/server/strptime.py b/fail2ban/server/strptime.py -index 1464a96d1f..39fc795865 100644 ---- a/fail2ban/server/strptime.py -+++ b/fail2ban/server/strptime.py -@@ -36,10 +36,30 @@ def _getYearCentRE(cent=(0,3), distance=3, now=(MyTime.now(), MyTime.alternateNo - Thereby respect possible run in the test-cases (alternate date used there) - """ - cent = lambda year, f=cent[0], t=cent[1]: str(year)[f:t] -+ def grp(exprset): -+ c = None -+ if len(exprset) > 1: -+ for i in exprset: -+ if c is None or i[0:-1] == c: -+ c = i[0:-1] -+ else: -+ c = None -+ break -+ if not c: -+ for i in exprset: -+ if c is None or i[0] == c: -+ c = i[0] -+ else: -+ c = None -+ break -+ if c: -+ return "%s%s" % (c, grp([i[len(c):] for i in exprset])) -+ return ("(?:%s)" % "|".join(exprset) if len(exprset[0]) > 1 else "[%s]" % "".join(exprset)) \ -+ if len(exprset) > 1 else "".join(exprset) - exprset = set( cent(now[0].year + i) for i in (-1, distance) ) - if len(now) and now[1]: -- exprset |= set( cent(now[1].year + i) for i in (-1, distance) ) -- return "(?:%s)" % "|".join(exprset) if len(exprset) > 1 else "".join(exprset) -+ exprset |= set( cent(now[1].year + i) for i in xrange(-1, now[0].year-now[1].year+1, distance) ) -+ return grp(sorted(list(exprset))) - - timeRE = TimeRE() - diff --git a/gnu/packages/patches/fail2ban-python310-server-action.patch b/gnu/packages/patches/fail2ban-python310-server-action.patch deleted file mode 100644 index 723d7f7aa6..0000000000 --- a/gnu/packages/patches/fail2ban-python310-server-action.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2b6bb2c1bed8f7009631e8f8c306fa3160324a49 Mon Sep 17 00:00:00 2001 -From: "Sergey G. Brester" -Date: Mon, 8 Feb 2021 17:19:24 +0100 -Subject: [PATCH] follow bpo-37324: :ref:`collections-abstract-base-classes` - moved to the :mod:`collections.abc` module - -(since 3.10-alpha.5 `MutableMapping` is missing in collections module) ---- - fail2ban/server/action.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/fail2ban/server/action.py b/fail2ban/server/action.py -index 3bc48fe046..f0f1e6f59a 100644 ---- a/fail2ban/server/action.py -+++ b/fail2ban/server/action.py -@@ -30,7 +30,10 @@ - import threading - import time - from abc import ABCMeta --from collections import MutableMapping -+try: -+ from collections.abc import MutableMapping -+except ImportError: -+ from collections import MutableMapping - - from .failregex import mapTag2Opt - from .ipdns import DNSUtils diff --git a/gnu/packages/patches/fail2ban-python310-server-actions.patch b/gnu/packages/patches/fail2ban-python310-server-actions.patch deleted file mode 100644 index e31316d28b..0000000000 --- a/gnu/packages/patches/fail2ban-python310-server-actions.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 42dee38ad2ac5c3f23bdf297d824022923270dd9 Mon Sep 17 00:00:00 2001 -From: "Sergey G. Brester" -Date: Mon, 8 Feb 2021 17:25:45 +0100 -Subject: [PATCH] amend for `Mapping` - ---- - fail2ban/server/actions.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/fail2ban/server/actions.py b/fail2ban/server/actions.py -index b7b95b445a..897d907c1a 100644 ---- a/fail2ban/server/actions.py -+++ b/fail2ban/server/actions.py -@@ -28,7 +28,10 @@ - import os - import sys - import time --from collections import Mapping -+try: -+ from collections.abc import Mapping -+except ImportError: -+ from collections import Mapping - try: - from collections import OrderedDict - except ImportError: diff --git a/gnu/packages/patches/fail2ban-python310-server-jails.patch b/gnu/packages/patches/fail2ban-python310-server-jails.patch deleted file mode 100644 index e5873c415e..0000000000 --- a/gnu/packages/patches/fail2ban-python310-server-jails.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9f1d1f4fbd0804695a976beb191f2c49a2739834 Mon Sep 17 00:00:00 2001 -From: "Sergey G. Brester" -Date: Mon, 8 Feb 2021 17:35:59 +0100 -Subject: [PATCH] amend for `Mapping` (jails) - ---- - fail2ban/server/jails.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/fail2ban/server/jails.py b/fail2ban/server/jails.py -index 972a8c4bd2..27e12ddf65 100644 ---- a/fail2ban/server/jails.py -+++ b/fail2ban/server/jails.py -@@ -22,7 +22,10 @@ - __license__ = "GPL" - - from threading import Lock --from collections import Mapping -+try: -+ from collections.abc import Mapping -+except ImportError: -+ from collections import Mapping - - from ..exceptions import DuplicateJailException, UnknownJailException - from .jail import Jail -- 2.49.0 From unknown Sun Jun 22 08:06:24 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Rodion Goritskov Subject: bug#78066: closed (Re: [bug#78066] [PATCH v3 0/6] Fix fail2ban build) Message-ID: References: <87a57qvxqj.fsf@gnu.org> <20250425201230.12492-1-rodion@goritskov.com> X-Gnu-PR-Message: they-closed 78066 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 78066@debbugs.gnu.org Date: Tue, 06 May 2025 10:32:05 +0000 Content-Type: multipart/mixed; boundary="----------=_1746527525-7110-1" This is a multi-part message in MIME format... ------------=_1746527525-7110-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #78066: [PATCH 0/2] Fix fail2ban build 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 78066@debbugs.gnu.org. --=20 78066: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78066 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1746527525-7110-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 78066-done) by debbugs.gnu.org; 6 May 2025 10:31:30 +0000 Received: from localhost ([127.0.0.1]:52881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uCFaD-0001mP-J3 for submit@debbugs.gnu.org; Tue, 06 May 2025 06:31:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57970) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uCFZw-0001k2-7Z for 78066-done@debbugs.gnu.org; Tue, 06 May 2025 06:31:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uCFZm-0003Ui-Ox; Tue, 06 May 2025 06:31:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=qysDgLvvxCTi2RAcra7SnoJFypuB5WqZtizANM4234Q=; b=TH/pReqwrN5EUt550DV/ gpU758Kggz/OtUU3SBnBQkoz9fN3hQkmmdjEvlwkeweK79qnyZALb3zjXoObs3qpwHdeo8YqNqvKG crPr2XR935tLXgRHIDqxi7ijoC2JaL+/ogMSSsFP7nMLHCcTWmLgDIEhwrfnw6Z2FucTpwHhdImC5 q6Hf167uuBmeDvxrF/818Pg4sCTiX5p+wvR8di3xfCdJ1XZ8YrW0Y3LoAfIbUw5zALxq8zm2QALzX PxysOMW5hOOWEa9Rq5JfCWMltQscQmHT/t66lSYqNh0bkprWw5ImLB32hH9M8hpPMyScNwjkHxH4g 5Gr03OkMUPE4sg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Nicolas Graves Subject: Re: [bug#78066] [PATCH v3 0/6] Fix fail2ban build In-Reply-To: <20250504085747.6387-1-ngraves@ngraves.fr> (Nicolas Graves's message of "Sun, 4 May 2025 10:56:20 +0200") References: <20250425201230.12492-1-rodion@goritskov.com> <20250504085747.6387-1-ngraves@ngraves.fr> Date: Tue, 06 May 2025 12:29:08 +0200 Message-ID: <87a57qvxqj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78066-done Cc: 78066-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Nicolas Graves writes: > I think the fail2ban tests were broken before the Python@3.10 update. > The -basic test runs properly, but the other tests do not. > > I focussed on fixing the -basic test because I don't understand why > the other tests fail (socket is not found, but when I try it in real > conditions, it is). > > The main issue was that the paths-debian.conf in jail.conf was > substituted after the wheel was built, so the change didn't make it in > the output. Probably related to the migration to the > pyproject-build-system. > > So now the -basic test passes, but the -simple and -extension tests > don't, but I guess it's because tests rather than the package are > broken. Ready to be merged IMHO. > > Nicolas Graves (6): > gnu: fail2ban: Move file deletion to source snippet. > gnu: fail2ban: Move setup and test patches to phases. > gnu: fail2ban: Update to 1.1.0. > gnu: fail2ban: Improve style. > gnu: fail2ban: Improve style. > gnu: fail2ban: Improve snippet. Applied, thanks! Ludo'. ------------=_1746527525-7110-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Apr 2025 20:13:23 +0000 Received: from localhost ([127.0.0.1]:53585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8PQJ-00056Z-1A for submit@debbugs.gnu.org; Fri, 25 Apr 2025 16:13:23 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33180) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8PQE-00055Z-PL for submit@debbugs.gnu.org; Fri, 25 Apr 2025 16:13:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u8PQ8-0003tA-8P for guix-patches@gnu.org; Fri, 25 Apr 2025 16:13:12 -0400 Received: from mail.goritskov.com ([65.108.121.176]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u8PQ5-0003fU-SP for guix-patches@gnu.org; Fri, 25 Apr 2025 16:13:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=goritskov.com; s=04012025; t=1745611984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=z8xu1GyIIevdzOcGi4frxLMsfa+Yej5j0yMn/07ihNI=; b=n1+CFAIKvFLKZk1vvP67lZRNyGYSQ7UAuA77vu6JGkuVR1Czkwq3kL6KyUDL9FMzAmrlEI mwn92lHZfxH2dB5OgLyi0IlH9QdJgfNFMGu8sI5ZW+LSyB71H6wQ6FnY+0ELfZ4iQskDEt eqwqIUelJQajHXjyVpMixcB8kqePbOg= Received: from bumblebee-old.fritz.box (port-92-196-240-221.dynamic.as20676.net [92.196.240.221]) by mail.goritskov.com (OpenSMTPD) with ESMTPSA id d281ea62 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 25 Apr 2025 20:13:04 +0000 (UTC) From: Rodion Goritskov To: guix-patches@gnu.org Subject: [PATCH 0/2] Fix fail2ban build Date: Fri, 25 Apr 2025 22:12:30 +0200 Message-ID: <20250425201230.12492-1-rodion@goritskov.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=65.108.121.176; envelope-from=rodion@goritskov.com; helo=mail.goritskov.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Rodion Goritskov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Hi! Currently fail2ban is not building [1] because its test suite is not compatible with Python 3.11. Quick fix is to use Python 3.10 there. Probably I will find some time to update fail2ban package in the nearest future (because it is quite old now, four years passed already). However, I think it is good to have the current version building for now. [1] - https://issues.guix.gnu.org/77996 Rodion Goritskov (2): gnu: python: Export wrap-python3. gnu: fail2ban: Build with Python 3.10. gnu/packages/admin.scm | 3 ++- gnu/packages/python.scm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.49.0 ------------=_1746527525-7110-1--