From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/xtables-addons/
Date: Tue, 30 May 2023 11:02:04 +0000 (UTC) [thread overview]
Message-ID: <1685444433.c89a9679b994da91dbbc71d3ec5b6a8f45b54229.ionen@gentoo> (raw)
commit: c89a9679b994da91dbbc71d3ec5b6a8f45b54229
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue May 30 08:06:41 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue May 30 11:00:33 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c89a9679
net-firewall/xtables-addons: rewrite with linux-mod-r1 migration
Originally meant to do a quick migration, but it had lingering
issues and felt near unmaintainable as-is. Maybe not entirely
correct (I don't use this) but it should be easier for future
maintainers to go from here.
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
.../xtables-addons/xtables-addons-3.24-r1.ebuild | 107 +++++++++++++++++++++
1 file changed, 107 insertions(+)
diff --git a/net-firewall/xtables-addons/xtables-addons-3.24-r1.ebuild b/net-firewall/xtables-addons/xtables-addons-3.24-r1.ebuild
new file mode 100644
index 000000000000..2dda3fb4d224
--- /dev/null
+++ b/net-firewall/xtables-addons/xtables-addons-3.24-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 2023 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
+}
next reply other threads:[~2023-05-30 11:02 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 11:02 Ionen Wolkens [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-23 15:25 [gentoo-commits] repo/gentoo:master commit in: net-firewall/xtables-addons/ Sam James
2024-11-23 15:25 Sam James
2024-02-20 5:06 Sam James
2023-10-10 5:42 Joonas Niilola
2023-10-09 16:21 Arthur Zamarin
2023-06-01 17:14 Arthur Zamarin
2023-06-01 17:07 Arthur Zamarin
2023-05-01 13:36 Sam James
2023-05-01 3:48 Sam James
2023-02-25 18:28 Arthur Zamarin
2023-02-25 18:20 Arthur Zamarin
2023-01-13 10:13 Arthur Zamarin
2023-01-13 8:22 Sam James
2023-01-13 7:51 Sam James
2023-01-13 7:25 Sam James
2022-07-16 12:32 Sam James
2022-07-16 12:31 Sam James
2022-07-15 17:16 Anthony G. Basile
2022-04-19 6:12 Jakov Smolić
2022-04-19 6:12 Jakov Smolić
2022-04-18 18:44 Sam James
2021-03-27 15:34 Anthony G. Basile
2021-03-27 15:29 Anthony G. Basile
2021-03-13 14:31 Anthony G. Basile
2021-03-11 21:23 Anthony G. Basile
2021-03-11 21:23 Anthony G. Basile
2021-01-30 14:30 Sam James
2021-01-28 19:47 Sam James
2020-12-07 17:27 Anthony G. Basile
2020-08-08 12:18 Mikle Kolyada
2020-03-07 14:04 Anthony G. Basile
2019-12-17 17:38 Anthony G. Basile
2019-06-17 16:05 Anthony G. Basile
2019-06-17 16:05 Anthony G. Basile
2019-03-15 13:03 Anthony G. Basile
2018-10-08 6:18 Thomas Deutschmann
2018-09-12 21:23 Anthony G. Basile
2018-09-06 7:36 Sven Wegener
2018-02-18 22:46 Anthony G. Basile
2018-02-18 7:17 Anthony G. Basile
2017-11-24 0:33 Anthony G. Basile
2017-10-02 21:16 Anthony G. Basile
2017-10-02 21:16 Anthony G. Basile
2017-07-31 5:59 Anthony G. Basile
2017-07-31 5:59 Anthony G. Basile
2017-07-25 19:47 Anthony G. Basile
2017-01-28 16:34 Anthony G. Basile
2017-01-28 16:30 Anthony G. Basile
2016-12-29 17:46 Göktürk Yüksek
2016-05-26 19:16 Anthony G. Basile
2016-05-26 19:16 Anthony G. Basile
2015-11-27 16:44 Anthony G. Basile
2015-10-24 17:14 Anthony G. Basile
2015-10-24 16:45 Mikle Kolyada
2015-10-23 9:05 Agostino Sarubbo
2015-10-22 8:19 Anthony G. Basile
2015-08-22 0:23 Anthony G. Basile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1685444433.c89a9679b994da91dbbc71d3ec5b6a8f45b54229.ionen@gentoo \
--to=ionen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox