From patchwork Thu Nov 9 14:36:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 56136 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E484127BBE9; Thu, 9 Nov 2023 14:39:45 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 516CE27BBE2 for ; Thu, 9 Nov 2023 14:39:42 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r16Br-0006Xa-Mx; Thu, 09 Nov 2023 09:39:27 -0500 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 1r16Bn-0006W0-TH for guix-patches@gnu.org; Thu, 09 Nov 2023 09:39:24 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r16Bn-0007WX-LD for guix-patches@gnu.org; Thu, 09 Nov 2023 09:39:23 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r16CP-0004lo-R9; Thu, 09 Nov 2023 09:40:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67017] [PATCH] gnu: Add iptables-nft. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, guix-patches@gnu.org Resent-Date: Thu, 09 Nov 2023 14:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67017 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67017@debbugs.gnu.org Cc: Hilton Chain , Leo Famulari , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.169954079018312 (code B ref -1); Thu, 09 Nov 2023 14:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 14:39:50 +0000 Received: from localhost ([127.0.0.1]:47129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r16CD-0004lH-FK for submit@debbugs.gnu.org; Thu, 09 Nov 2023 09:39:49 -0500 Received: from lists.gnu.org ([2001:470:142::17]:52246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r16CA-0004l3-8w for submit@debbugs.gnu.org; Thu, 09 Nov 2023 09:39:47 -0500 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 1r16BR-0006Lw-6Z for guix-patches@gnu.org; Thu, 09 Nov 2023 09:39:01 -0500 Received: from mail.boiledscript.com ([144.168.59.46]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r16BP-0007JP-GH for guix-patches@gnu.org; Thu, 09 Nov 2023 09:39:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1699540547; 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=kbRKs5C/s+aeZ8VwGfVktqIfeQw1eesQNpmHdh0jq8E=; b=PbuzDFLnvmkeBBT2c8zT5qONQz3xv/+WYDM1uznEzs9LPIMo3P2kw6/nyBwFzDfBq3wSti yQEcqQM80Klyrjhlh12eSBkwkWLBx9cK+KYJ3duq+GX4c1RfnOtF7ZfyWuPDomfXE1QAu+ jhi4S1A1nZQhxA3kqIjSQNZUfYsjNQJ5vQFaWjFmE/HyqKQWqRJQVYZkxCNNHXKqZSDLBv 62m4eH8uIPy/ZSGIKqJVmmcWhb6YbvNALZaww8mN5EfmzYrR1qF1IePtARrIrIvqvbx0+j eFIxvWXnLQ2MNZ1ezfKgAWYGavIpO2EkSE5/REvpFlg0++W8/yBZ7emlMWNo6g== Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space Date: Thu, 9 Nov 2023 22:36:44 +0800 Message-ID: <6655067807f1485e3a8e9bea0c8319c691c40340.1699540137.git.hako@ultrarare.space> MIME-Version: 1.0 X-Spamd-Bar: + Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@ultrarare.space; helo=mail.boiledscript.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches X-Patchwork-Original-From: Hilton Chain via Guix-patches via From: Hilton Chain Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (iptables-nft): New variable. Change-Id: I281514fcf05e70b4d62f374269c50c76bb676f78 --- gnu/packages/linux.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) base-commit: 960d7ac5a56155895543e03622f6555cc162d13a diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 95a66e3d6a..596019ae5b 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3101,6 +3101,33 @@ (define-public iptables '((release-monitoring-url . "https://www.netfilter.org/pub/iptables/"))) (license license:gpl2+))) +(define-public iptables-nft + (package/inherit iptables + (name "iptables-nft") + (arguments + (substitute-keyword-arguments (package-arguments iptables) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'install 'symlink-xtables-nft-multi + (lambda _ + (for-each + (lambda (command-path) + (let ((link-path (string-append #$output command-path))) + (when (file-exists? link-path) + (delete-file link-path)) + (symlink (string-append #$output "/sbin/xtables-nft-multi") + link-path))) + (apply append + '("/bin/iptables-xml") + (map (lambda (xtables) + (list (string-append "/sbin/" xtables) + (string-append "/sbin/" xtables "-restore") + (string-append "/sbin/" xtables "-save"))) + '("arptables" + "ebtables" + "iptables" + "ip6tables")))))))))))) + (define-public bolt (package (name "bolt")