diff mbox series

[meta-networking,kirkstone,03/20] networkmanager: fix iptables and nft paths

Message ID 20250926141919.2010846-4-skandigraun@gmail.com
State New
Headers show
Series Cherry-picks from Master Batch D | expand

Commit Message

Gyorgy Sarvari Sept. 26, 2025, 2:19 p.m. UTC
From: Jim Broadus <jbroadus@gmail.com>

The NetworkManager meson.build is searching for iptables and nft by
passing absolute paths to meson's find_program. The result is that it
locates tools on the host machine when they exist at those locations. If
they don't, it uses default locations. This often works out, but in some
cases, such as when the host uses a merged usr scheme and the build
target does not, the paths will be incorrect and the tools won't be
found at runtime.

These could be PACKAGECONFIG options, but since they have fallback
values, completely disabling the use of either iptables or nft would
require patching the meson.build or setting a bogus location.

Note that this meson.build file follows the same pattern elsewhere, but
most cases are already covered by PACKAGECONFIG options.

Signed-off-by: Jim Broadus <jim@thruwave.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 7c440945326db26c3ff2b413956bb3dad223891a)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 .../networkmanager/networkmanager_1.36.2.bb                     | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.36.2.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.36.2.bb
index e3b1296a6b..da856622bf 100644
--- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.36.2.bb
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.36.2.bb
@@ -51,6 +51,8 @@  EXTRA_OEMESON = "\
     -Dconfig_dns_rc_manager_default=${NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT} \
     -Dconfig_dhcp_default=${NETWORKMANAGER_DHCP_DEFAULT} \
     -Ddhcpcanon=false \
+    -Diptables=${sbindir}/iptables \
+    -Dnft=${sbindir}/nft \
 "
 
 # stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template