summaryrefslogtreecommitdiff
path: root/net-firewall/xtables-addons
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-24 03:02:55 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-24 03:02:55 +0000
commit530a5a826feeb71085fb8a01927f4d775a0b131b (patch)
treeb7669c45ea3f2a3a37b2437817a370226bb1c819 /net-firewall/xtables-addons
parent71dd9d29cdaf7cc0ecdb9ea37d128726a941c630 (diff)
gentoo auto-resync : 24:11:2024 - 03:02:54
Diffstat (limited to 'net-firewall/xtables-addons')
-rw-r--r--net-firewall/xtables-addons/Manifest4
-rw-r--r--net-firewall/xtables-addons/metadata.xml1
-rw-r--r--net-firewall/xtables-addons/xtables-addons-3.27.ebuild107
3 files changed, 111 insertions, 1 deletions
diff --git a/net-firewall/xtables-addons/Manifest b/net-firewall/xtables-addons/Manifest
index c77bdf7f8a43..44e5447f9da8 100644
--- a/net-firewall/xtables-addons/Manifest
+++ b/net-firewall/xtables-addons/Manifest
@@ -1,3 +1,5 @@
DIST xtables-addons-3.24.tar.xz 335724 BLAKE2B c086616c0366346bd87813ae0fc561bdb8f892eecea19ef88c65afef5318ac6f75fec658e0c6595de5c620c965b2bd7f10e45ff3ec55ffb9ddf8e85643190e7e SHA512 08c3b87617e0124aef99a3953fc5e03e8d98be50ce70771e352509ec64263d5256f744489f10f39879630d9dc8d28f3c91173b4739c95bbd8d5ad56e33138eb4
+DIST xtables-addons-3.27.tar.xz 340360 BLAKE2B 5b82069e21464bc293d76c6cd298e6beafdda57bc07582be64d7ff9a5511741bd1acd9a54a7b1caa08631d108a17b51dc7e7c2926003e6a893b1df0f6b360b62 SHA512 1938342914c24621743d0460e4057ffa6d3b6d01f3d0ca5feaa3852675f18c309f57fcb73725972d4aa87b7da92667efffa16e203f4cd1362cb8bb03a116636a
EBUILD xtables-addons-3.24-r1.ebuild 2736 BLAKE2B 6c9276ebebccd0553c4f580fdc0ef8727ae9f419f4f3d573633893c9abc2f8911c69f51da103101420532fbf31672968139b13a6922655441627f98020ef334d SHA512 c3899f153fdef7e207f0329f0bf59a2dabbec33dcdc079361e46df5d42e53db9e43eba98c57f7514a148a64018812e9453c4ab1ce456029b9ed32a88b4dc9093
-MISC metadata.xml 698 BLAKE2B 64bcff2bb22f8b71b1acd94386eb10067dfd7be07d829f6e7e75a77da09b5999b8a53da6b9a1aca727dc7d32518fd11cd447ad19aeaec97f1eddfd9107b3d8e9 SHA512 99851425f9be6f3aa906d8d1d908a64a1354bc5b9d0ff771a016cc6b2c31ceb107a01ead4287db7cbaf20bb4661b372ee5454881b00ca5c01ef3b4b81073f9e3
+EBUILD xtables-addons-3.27.ebuild 2743 BLAKE2B 0de5ade43d460b156ef5bbb65ffbcc149464988c7935bea06adda8aaad391cc8c364882eb85a3a1b060f78fe36109be35ffc6e0b81ce37741d765b61783441fc SHA512 a3374b9e2fbe61281fbd31d0ec4b1ab35d2a4563485446af5a205b1c75622c0bf5cb9438fef1d0c91ad74ebb683bf62d505f2483d9619cb268dc7e4aca2e2a56
+MISC metadata.xml 762 BLAKE2B e5a118cab049379de2eba56e19f8135d160aa692be7a88ebb229d39283b0465c5a2d7f6fa918dac76b7474c201f3b78114190dfd9b19c9ea4f72e0c0e5dcebc0 SHA512 461fd8f79b5cc47d276809ff3344d4895c2eea51f1fc13eeab30df86f1b39603ff77c451f76fcc131d9134afae57461e8b0d4c78bcc20562de62da96891c067b
diff --git a/net-firewall/xtables-addons/metadata.xml b/net-firewall/xtables-addons/metadata.xml
index 22c9b77bb8cd..461cf8e0f052 100644
--- a/net-firewall/xtables-addons/metadata.xml
+++ b/net-firewall/xtables-addons/metadata.xml
@@ -13,5 +13,6 @@
</longdescription>
<upstream>
<remote-id type="sourceforge">xtables-addons</remote-id>
+ <remote-id type="codeberg">jengelh/xtables-addons</remote-id>
</upstream>
</pkgmetadata>
diff --git a/net-firewall/xtables-addons/xtables-addons-3.27.ebuild b/net-firewall/xtables-addons/xtables-addons-3.27.ebuild
new file mode 100644
index 000000000000..dd7a313409cf
--- /dev/null
+++ b/net-firewall/xtables-addons/xtables-addons-3.27.ebuild
@@ -0,0 +1,107 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MODULES_OPTIONAL_IUSE="+modules"
+inherit flag-o-matic linux-mod-r1
+
+XTABLES_MODULES=(
+ account chaos delude dhcpmac dnetmap echo ipmark logmark
+ proto sysrq tarpit asn condition fuzzy geoip gradm iface
+ ipp2p ipv4options length2 lscan pknock psd quota2
+)
+
+MODULES_KERNEL_MIN=4.15
+
+DESCRIPTION="iptables extensions not yet accepted in the main kernel"
+HOMEPAGE="
+ https://inai.de/projects/xtables-addons/
+ https://codeberg.org/jengelh/xtables-addons/
+"
+SRC_URI="https://inai.de/files/xtables-addons/${P}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="${XTABLES_MODULES[*]/#/xtables_addons_}"
+
+XTABLES_SCRIPTS_DEPEND="
+ app-arch/unzip
+ dev-perl/Net-CIDR-Lite
+ dev-perl/Text-CSV_XS
+ virtual/perl-Getopt-Long
+"
+DEPEND="net-firewall/iptables:="
+RDEPEND="
+ ${DEPEND}
+ xtables_addons_asn? ( ${XTABLES_SCRIPTS_DEPEND} )
+ xtables_addons_geoip? ( ${XTABLES_SCRIPTS_DEPEND} )
+"
+
+pkg_setup() {
+ local CONFIG_CHECK="NF_CONNTRACK NF_CONNTRACK_MARK"
+
+ if use xtables_addons_pknock; then
+ CONFIG_CHECK+=" ~CONNECTOR"
+ local ERROR_CONNECTOR="CONFIG_CONNECTOR: is not set but is needed to receive userspace
+ notifications from pknock through netlink/connector"
+ fi
+
+ linux-mod-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ local mod modules
+ mapfile -t modules < <(sed -En 's/^build_(.+)=.*/\L\1/p' mconfig || die)
+ [[ ${modules[*]} == "${XTABLES_MODULES[*]}" ]] ||
+ die "XTABLES_MODULES needs to be updated to: '${modules[*]}'"
+
+ for mod in "${modules[@]}"; do
+ use xtables_addons_${mod} || sed -i "/^build_${mod}=/Id" mconfig || die
+ done
+}
+
+src_configure() {
+ # Uses CFLAGS for tools, and it may mismatch with the kernel's CC
+ # FIXME?: ideally would want to build tools with normal CC
+ use modules && CC=${KERNEL_CC} strip-unsupported-flags
+
+ local econfargs=(
+ # TODO?: should move to ${EPREFIX}/usr + use default libexecdir by now
+ # (matching documentation), but could be a disruptive change for users
+ # with xt_asn/geoip_* paths they may have hardcoded in scripts
+ --prefix="${EPREFIX:-/}"
+ --libexecdir="${EPREFIX}"/$(get_libdir)
+ $(usex modules --with-kbuild="${KV_OUT_DIR}" --without-kbuild)
+ )
+
+ econf "${econfargs[@]}"
+}
+
+src_compile() {
+ use modules || MODULES_MAKEARGS=()
+
+ emake "${MODULES_MAKEARGS[@]}"
+}
+
+src_install() {
+ MODULES_MAKEARGS+=(
+ DESTDIR="${D}"
+ INSTALL_MOD_DIR=xtables_addons
+ )
+
+ emake "${MODULES_MAKEARGS[@]}" install
+ modules_post_process
+
+ dodoc -r README.rst doc/.
+
+ use xtables_addons_asn ||
+ find "${ED}" -type f -name '*_asn*' -delete || die
+ use xtables_addons_geoip ||
+ find "${ED}" -type f -name '*_geoip*' -delete || die
+
+ find "${ED}" -type f -name '*.la' -delete || die
+}