abuild: Do not enable nftables ruleset automatically

As discussed in the aports merge request, we think it is better to not
enable the ruleset by default. Mainly because then an installed package
would make holes in the firewall, even if the users does not run the
software.

If we install the ruleset in a different folder, the users can symlink
what they needs. They can symlink all hooks, or the directory, or use
them however they wants.

This store the nft ruleset in /usr/share/nftables.avail/ as discussed
upstream:

https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/67137#note_458749
This commit is contained in:
Willow Barraco 2024-11-26 10:59:02 +01:00
parent 5ad0236004
commit 857d4c5896
No known key found for this signature in database
GPG Key ID: EABA44759877E02A

View File

@ -2214,8 +2214,8 @@ default_nftrules() {
pkgdesc="$pkgdesc (nftables ruleset)"
install_if="nftables-rulesets ${subpkgname%-nftrules}=$pkgver-r$pkgrel"
if [ -d "$pkgdir"/etc/nftables.d ]; then
amove 'etc/nftables.d/*.nft'
if [ -d "$pkgdir"/usr/share/nftables.avail ]; then
amove 'usr/share/nftables.avail/*.nft'
fi
}