Message ID | c71870c7300ae57026afbc2c0eda9b89c7981688.1699802445.git.hako@ultrarare.space |
---|---|
State | New |
Headers | show |
Series | [bug#67017,v2] gnu: Add iptables-nft. | expand |
Hi, Hilton Chain <hako@ultrarare.space> skribis: > * gnu/packages/linux.scm (iptables-nft): New variable. > > Change-Id: I281514fcf05e70b4d62f374269c50c76bb676f78 [...] > +(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 '()))) I think we at least need ‘synopsis’ to clarify what this is about compared to ‘iptables’. Apart from that it LGTM, thanks! Ludo’.
Hi, On Mon, 27 Nov 2023 06:34:22 +0800, Ludovic Courtès wrote: > [...] > I think we at least need ‘synopsis’ to clarify what this is about > compared to ‘iptables’. Does it look good to append a "(nftables API)" to the synopsis of iptables? So that it says "Programs to configure Linux IP packet filtering rules (nftables API)".
On Sat, 09 Dec 2023 20:32:18 +0800, Hilton Chain wrote: > > Hi, > On Mon, 27 Nov 2023 06:34:22 +0800, > Ludovic Courtès wrote: > > > [...] > > I think we at least need ‘synopsis’ to clarify what this is about > > compared to ‘iptables’. > > Does it look good to append a "(nftables API)" to the synopsis of > iptables? So that it says "Programs to configure Linux IP packet > filtering rules (nftables API)". I used this for synopsis and applied the patch as 6884770464bd9ba95c1a5ccf10bf50d186a220d5.
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")