[bug#67017,v2] gnu: Add iptables-nft.
Commit Message
* 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
Comments
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.
@@ -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")