public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [oe-core][PATCH] iptables: Use update alternatives for "ebtables"
@ 2026-04-02 13:49 Zhang Xiao
  2026-04-02 17:39 ` Mathieu Dubois-Briand
  0 siblings, 1 reply; 4+ messages in thread
From: Zhang Xiao @ 2026-04-02 13:49 UTC (permalink / raw)
  To: openembedded-core; +Cc: xiao.zhang

The ebtables utility can be provided by both ebtables and iptables
packages. Set higher priority for the version provided by iptables
to prefer it.

Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
---
 meta/recipes-extended/iptables/iptables_1.8.13.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/iptables/iptables_1.8.13.bb b/meta/recipes-extended/iptables/iptables_1.8.13.bb
index 11b287ed3b..6319f3e520 100644
--- a/meta/recipes-extended/iptables/iptables_1.8.13.bb
+++ b/meta/recipes-extended/iptables/iptables_1.8.13.bb
@@ -21,7 +21,7 @@ SYSTEMD_SERVICE:${PN} = "\
     ${@bb.utils.contains('PACKAGECONFIG', 'ipv6', 'ip6tables.service', '', d)} \
 "
 
-inherit autotools pkgconfig systemd
+inherit autotools pkgconfig systemd update-alternatives
 
 EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR}"
 
@@ -122,3 +122,7 @@ ALLOW_EMPTY:${PN}-modules = "1"
 INSANE_SKIP:${PN}-module-xt-conntrack = "dev-so"
 INSANE_SKIP:${PN}-module-xt-ct = "dev-so"
 INSANE_SKIP:${PN}-module-xt-nat = "dev-so"
+
+ALTERNATIVE:${PN} = "ebtables"
+ALTERNATIVE_LINK_NAME[ebtables] = "${sbindir}/ebtables"
+ALTERNATIVE_PRIORITY[ebtables] = "100"
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [oe-core][PATCH] iptables: Use update alternatives for "ebtables"
  2026-04-02 13:49 [oe-core][PATCH] iptables: Use update alternatives for "ebtables" Zhang Xiao
@ 2026-04-02 17:39 ` Mathieu Dubois-Briand
  2026-04-03  0:50   ` Zhang, Xiao
  2026-04-03  6:21   ` Zhang, Xiao
  0 siblings, 2 replies; 4+ messages in thread
From: Mathieu Dubois-Briand @ 2026-04-02 17:39 UTC (permalink / raw)
  To: xiao.zhang, openembedded-core

On Thu Apr 2, 2026 at 3:49 PM CEST, ZhangXiao via lists.openembedded.org wrote:
> The ebtables utility can be provided by both ebtables and iptables
> packages. Set higher priority for the version provided by iptables
> to prefer it.
>
> Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
> ---

Hi Zhang,

Thanks for your patch.

We can see this warning on the autobuilder:

WARNING: iptables-1.8.13-r0 do_package: iptables: alternative target (/usr/sbin/ebtables or /usr/sbin/ebtables.iptables) does not exist, skipping...
...
WARNING: iptables-1.8.13-r0 do_package: iptables: NOT adding alternative provide /usr/sbin/ebtables: /usr/sbin/ebtables.iptables does not exist
WARNING: iptables-1.8.13-r0 do_package: iptables: alt_link == alt_target: /usr/sbin/ebtables == /usr/sbin/ebtables

https://autobuilder.yoctoproject.org/valkyrie/#/builders/11/builds/3484
https://autobuilder.yoctoproject.org/valkyrie/#/builders/50/builds/3548

Can you have a look at the issue?

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe-core][PATCH] iptables: Use update alternatives for "ebtables"
  2026-04-02 17:39 ` Mathieu Dubois-Briand
@ 2026-04-03  0:50   ` Zhang, Xiao
  2026-04-03  6:21   ` Zhang, Xiao
  1 sibling, 0 replies; 4+ messages in thread
From: Zhang, Xiao @ 2026-04-03  0:50 UTC (permalink / raw)
  To: Mathieu Dubois-Briand, openembedded-core


On 4/3/2026 1:39 AM, Mathieu Dubois-Briand wrote:
> On Thu Apr 2, 2026 at 3:49 PM CEST, ZhangXiao via lists.openembedded.org wrote:
>> The ebtables utility can be provided by both ebtables and iptables
>> packages. Set higher priority for the version provided by iptables
>> to prefer it.
>>
>> Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
>> ---
> Hi Zhang,
>
> Thanks for your patch.
>
> We can see this warning on the autobuilder:
>
> WARNING: iptables-1.8.13-r0 do_package: iptables: alternative target (/usr/sbin/ebtables or /usr/sbin/ebtables.iptables) does not exist, skipping...
> ...
> WARNING: iptables-1.8.13-r0 do_package: iptables: NOT adding alternative provide /usr/sbin/ebtables: /usr/sbin/ebtables.iptables does not exist
> WARNING: iptables-1.8.13-r0 do_package: iptables: alt_link == alt_target: /usr/sbin/ebtables == /usr/sbin/ebtables
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/11/builds/3484
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/50/builds/3548
>
> Can you have a look at the issue?

iptables will not always build out ebtables, "--enable-nftables" will 
make it.

... iptables_1.8.13.bb...

  36 # libnftnl recipe is in meta-networking layer(previously known as 
libnftables)
  37 PACKAGECONFIG[libnftnl] = 
"--enable-nftables,--disable-nftables,libnftnl"
...


Add two lines below into local.conf to reproduce this conflict:

... conf/local.conf ...

IMAGE_INSTALL:append = " iptables ebtables"

PACKAGECONFIG:append:pn-iptables = " libnftnl"

...


Thanks

Xiao

> Thanks,
> Mathieu
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe-core][PATCH] iptables: Use update alternatives for "ebtables"
  2026-04-02 17:39 ` Mathieu Dubois-Briand
  2026-04-03  0:50   ` Zhang, Xiao
@ 2026-04-03  6:21   ` Zhang, Xiao
  1 sibling, 0 replies; 4+ messages in thread
From: Zhang, Xiao @ 2026-04-03  6:21 UTC (permalink / raw)
  To: Mathieu Dubois-Briand, openembedded-core


On 4/3/2026 1:39 AM, Mathieu Dubois-Briand wrote:
> On Thu Apr 2, 2026 at 3:49 PM CEST, ZhangXiao via lists.openembedded.org wrote:
>> The ebtables utility can be provided by both ebtables and iptables
>> packages. Set higher priority for the version provided by iptables
>> to prefer it.
>>
>> Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
>> ---
> Hi Zhang,
>
> Thanks for your patch.
>
> We can see this warning on the autobuilder:
>
> WARNING: iptables-1.8.13-r0 do_package: iptables: alternative target (/usr/sbin/ebtables or /usr/sbin/ebtables.iptables) does not exist, skipping...
> ...
> WARNING: iptables-1.8.13-r0 do_package: iptables: NOT adding alternative provide /usr/sbin/ebtables: /usr/sbin/ebtables.iptables does not exist
> WARNING: iptables-1.8.13-r0 do_package: iptables: alt_link == alt_target: /usr/sbin/ebtables == /usr/sbin/ebtables
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/11/builds/3484
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/50/builds/3548
>
> Can you have a look at the issue?

Patch V2 sent, thank you for your kindly remind!


Thanks

Xiao

> Thanks,
> Mathieu
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-03  6:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 13:49 [oe-core][PATCH] iptables: Use update alternatives for "ebtables" Zhang Xiao
2026-04-02 17:39 ` Mathieu Dubois-Briand
2026-04-03  0:50   ` Zhang, Xiao
2026-04-03  6:21   ` Zhang, Xiao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox