From patchwork Sun Nov 12 15:28:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 56374 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 9000827BBEA; Sun, 12 Nov 2023 15:30:42 +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 CD7AA27BBE2 for ; Sun, 12 Nov 2023 15:30:41 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2CPn-0005D4-H8; Sun, 12 Nov 2023 10:30:23 -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 1r2CPm-0005Cw-Qf for guix-patches@gnu.org; Sun, 12 Nov 2023 10:30:22 -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 1r2CPm-0006oH-9Q for guix-patches@gnu.org; Sun, 12 Nov 2023 10:30:22 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r2CQQ-0000eN-IS; Sun, 12 Nov 2023 10:31:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67017] [PATCH v2] gnu: Add iptables-nft. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: hako@ultrarare.space, leo@famulari.name, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sun, 12 Nov 2023 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67017 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67017@debbugs.gnu.org Cc: Hilton Chain , Hilton Chain , Leo Famulari , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Hilton Chain , Leo Famulari , Tobias Geerinckx-Rice Received: via spool by 67017-submit@debbugs.gnu.org id=B67017.16998030092423 (code B ref 67017); Sun, 12 Nov 2023 15:31:02 +0000 Received: (at 67017) by debbugs.gnu.org; 12 Nov 2023 15:30:09 +0000 Received: from localhost ([127.0.0.1]:56777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2CPZ-0000d0-GB for submit@debbugs.gnu.org; Sun, 12 Nov 2023 10:30:09 -0500 Received: from mail.boiledscript.com ([144.168.59.46]:44098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2CPX-0000bl-1Q for 67017@debbugs.gnu.org; Sun, 12 Nov 2023 10:30:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1699802771; 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=WWHbJUhZwxFlBmXmJALyC8EaR0rYZ+MiZ/Cx0neDRXQ=; b=KnRrWRZyBQlfUdCKFJGdmAGaVQw6S8TJgA0ECvfYLB93LlQRTsXh7ZUfmfmoiyBOGs8+F4 kh83mh5QFmkmUrNqnTmb/9CA2hg5SNj1prBl6hXw/NDtuApy/vEpKzfP9+1qPrZvn+Ofzb 91D8UL65eWSBOT+FOU4vYRiw+YIb7NpmqSVgxiS6VHBBTvYtJwQPo/fLx2KmlIxhURvEak WNH3RVBaeYGO9rZ0jO83crYqNo49aSiZTbwkYw6JFKFF1P3fQOqnBFfeqiWGpbjhpygVJt +3BcRLoYk+7HLPYYAlkYo5stHs7oVeaYh80F/z3wEwwy6F4msI9ZoT2YWLpBDQ== Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space Date: Sun, 12 Nov 2023 23:28:19 +0800 Message-ID: In-Reply-To: <6655067807f1485e3a8e9bea0c8319c691c40340.1699540137.git.hako@ultrarare.space> References: <6655067807f1485e3a8e9bea0c8319c691c40340.1699540137.git.hako@ultrarare.space> MIME-Version: 1.0 X-Spamd-Bar: + 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 --- V1 -> V2: Add iptables to inputs and switch to copy-build-system, since there's no need to build it again. gnu/packages/linux.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) base-commit: e35b7c5386c1bfacf47ed31bac9b503373dd26fc diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 95a66e3d6a..397fc911ea 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3101,6 +3101,38 @@ (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") + (source #f) + (build-system copy-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'unpack) + (replace 'install + (lambda* (#:key inputs #:allow-other-keys) + (for-each + (lambda (command-path) + (let ((link-path (string-append #$output command-path))) + (mkdir-p (dirname link-path)) + (symlink (search-input-file inputs "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"))))))))) + (inputs (list iptables)) + (native-inputs '()))) + (define-public bolt (package (name "bolt")