unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 67017@debbugs.gnu.org
Cc: Hilton Chain <hako@ultrarare.space>,
	Hilton Chain <hako@ultrarare.space>,
	Leo Famulari <leo@famulari.name>,
	Tobias Geerinckx-Rice <me@tobias.gr>
Subject: [bug#67017] [PATCH v2] gnu: Add iptables-nft.
Date: Sun, 12 Nov 2023 23:28:19 +0800	[thread overview]
Message-ID: <c71870c7300ae57026afbc2c0eda9b89c7981688.1699802445.git.hako@ultrarare.space> (raw)
In-Reply-To: <6655067807f1485e3a8e9bea0c8319c691c40340.1699540137.git.hako@ultrarare.space>

* 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(+)

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")

base-commit: e35b7c5386c1bfacf47ed31bac9b503373dd26fc
-- 
2.41.0





  reply	other threads:[~2023-11-12 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 14:36 [bug#67017] [PATCH] gnu: Add iptables-nft Hilton Chain via Guix-patches via
2023-11-12 15:28 ` Hilton Chain via Guix-patches via [this message]
2023-11-26 22:34   ` [bug#67017] [PATCH v2] " Ludovic Courtès
2023-12-09 12:32     ` Hilton Chain via Guix-patches via
2023-12-19 13:52       ` bug#67017: Close: " Hilton Chain via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c71870c7300ae57026afbc2c0eda9b89c7981688.1699802445.git.hako@ultrarare.space \
    --to=guix-patches@gnu.org \
    --cc=67017@debbugs.gnu.org \
    --cc=hako@ultrarare.space \
    --cc=leo@famulari.name \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).