From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2BFCB1581EC for ; Sat, 23 Nov 2024 15:25:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 26480E0856; Sat, 23 Nov 2024 15:25:55 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 071F0E0856 for ; Sat, 23 Nov 2024 15:25:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 01E7233FE7D for ; Sat, 23 Nov 2024 15:25:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5DD08130F for ; Sat, 23 Nov 2024 15:25:52 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1732375469.2421fda43b2aa6fd7c4063a1831ab4ef0869d841.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/xtables-addons/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-firewall/xtables-addons/Manifest net-firewall/xtables-addons/xtables-addons-3.27.ebuild X-VCS-Directories: net-firewall/xtables-addons/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 2421fda43b2aa6fd7c4063a1831ab4ef0869d841 X-VCS-Branch: master Date: Sat, 23 Nov 2024 15:25:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2d119c0b-d06f-453a-bbe6-fe0452e45c26 X-Archives-Hash: 45ce6267cf5c0f598bc123c25bc4be68 commit: 2421fda43b2aa6fd7c4063a1831ab4ef0869d841 Author: Sam James gentoo org> AuthorDate: Sat Nov 23 15:24:29 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat Nov 23 15:24:29 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2421fda4 net-firewall/xtables-addons: add 3.27 Closes: https://bugs.gentoo.org/944211 Signed-off-by: Sam James gentoo.org> net-firewall/xtables-addons/Manifest | 1 + .../xtables-addons/xtables-addons-3.27.ebuild | 107 +++++++++++++++++++++ 2 files changed, 108 insertions(+) diff --git a/net-firewall/xtables-addons/Manifest b/net-firewall/xtables-addons/Manifest index 9dfa189cce62..c7600d5d4f47 100644 --- a/net-firewall/xtables-addons/Manifest +++ b/net-firewall/xtables-addons/Manifest @@ -1 +1,2 @@ DIST xtables-addons-3.24.tar.xz 335724 BLAKE2B c086616c0366346bd87813ae0fc561bdb8f892eecea19ef88c65afef5318ac6f75fec658e0c6595de5c620c965b2bd7f10e45ff3ec55ffb9ddf8e85643190e7e SHA512 08c3b87617e0124aef99a3953fc5e03e8d98be50ce70771e352509ec64263d5256f744489f10f39879630d9dc8d28f3c91173b4739c95bbd8d5ad56e33138eb4 +DIST xtables-addons-3.27.tar.xz 340360 BLAKE2B 5b82069e21464bc293d76c6cd298e6beafdda57bc07582be64d7ff9a5511741bd1acd9a54a7b1caa08631d108a17b51dc7e7c2926003e6a893b1df0f6b360b62 SHA512 1938342914c24621743d0460e4057ffa6d3b6d01f3d0ca5feaa3852675f18c309f57fcb73725972d4aa87b7da92667efffa16e203f4cd1362cb8bb03a116636a 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 +}