diff mbox series

[scarthgap] iptables: remove /etc/ethertypes

Message ID 20251021190242.414127-1-u.kleine-koenig@baylibre.com
State New
Headers show
Series [scarthgap] iptables: remove /etc/ethertypes | expand

Commit Message

Uwe Kleine-König Oct. 21, 2025, 7:02 p.m. UTC
From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

When building an image including iptable built with the libnftnl
PACKAGECONFIG, one hits

Downloading file:.../oe-rootfs-repo/armv8a/libkmod2 * check_data_file_clashes: Package iptables wants to install file .../rootfs/etc/ethertypes
        But that file is already provided by package  * netbase

This used to be handled by
0003-Makefile.am-do-not-install-etc-ethertypes.patch, but that patch
got removed with the 1.8.9->1.8.10 upgrade (commit 4616ada82e70).

I think the rationale for dropping the patch was wrong; the commit log
talks about xtables.conf, which is indeed gone from upstream, but said
patch didn't change anything about xtables.conf, it did

-dist_conf_DATA        = etc/ethertypes etc/xtables.conf
+dist_conf_DATA        = etc/xtables.conf

However, instead of patching iptables to not install ethertypes, and
having to forward-port that patch, it is much simpler to just remove
the file in this do_install:append.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
Hello,

this is a trivial cherry-pick of commit 3b9c8d5c26a4 ("iptables: remove
/etc/ethertypes"). This fixes building Scarthgap with

	PACKAGECONFIG:append:pn-iptables = " libnftnl"
	CORE_IMAGE_EXTRA_INSTALL = "netbase iptables"

.

Best regards
Uwe

 meta/recipes-extended/iptables/iptables_1.8.10.bb | 2 ++
 1 file changed, 2 insertions(+)


base-commit: 7af6b75221d5703ba5bf43c7cd9f1e7a2e0ed20b
diff mbox series

Patch

diff --git a/meta/recipes-extended/iptables/iptables_1.8.10.bb b/meta/recipes-extended/iptables/iptables_1.8.10.bb
index f1ee1efe2884..8a1f823dc13c 100644
--- a/meta/recipes-extended/iptables/iptables_1.8.10.bb
+++ b/meta/recipes-extended/iptables/iptables_1.8.10.bb
@@ -78,6 +78,8 @@  do_install:append() {
         ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables 
         ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables-save
         ln -sf ${sbindir}/xtables-nft-multi ${D}${sbindir}/iptables-restore
+        # ethertypes is provided by the netbase package
+        rm -f ${D}${sysconfdir}/ethertypes
     fi
 }