From d1ef2a8d340df3ca3abd5ab8613a249bdd73e172 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Sun, 22 Dec 2024 17:22:58 +0000 Subject: [PATCH] Add baseconfig package and depend on nftables --- main/nnd-nft/APKBUILD | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/main/nnd-nft/APKBUILD b/main/nnd-nft/APKBUILD index 23d82b2..e8b1cd8 100644 --- a/main/nnd-nft/APKBUILD +++ b/main/nnd-nft/APKBUILD @@ -3,10 +3,13 @@ . ../../APKBUILD.template -pkgrel=0 +pkgrel=3 pkgdesc="Basic generic nftables template" options="!check" # check requires root? -subpackages="" +depends="nftables" +subpackages=" + $pkgname-baseconfig +" for i in "$startdir"/nft/inet/nnd-base/*/*/*/*; do subpackages="$subpackages $pkgname-$(echo "${i##*/nft/inet/nnd-base/}" | sed 's/\//-/g'):_mod" @@ -32,3 +35,17 @@ _mod() { local _modname="${subpkgname##$pkgname-}" amove etc/nnd/nftables/inet/nnd-base/"$(echo $_modname | sed 's/-/\//g')" } + +baseconfig() { + pkgdesc="Base configuration set applicable to most hosts" + depends=" + $pkgname + $pkgname-filter-input-iface-lo + $pkgname-filter-input-ct-established + $pkgname-filter-input-ct-invalid + $pkgname-filter-input-ct-related + $pkgname-filter-input-icmp-v4 + $pkgname-filter-input-icmp-v6 + " + mkdir -p "$subpkgdir" +}