networkmanager: fix dhcpcd PACKAGECONFIG
PATCH 1/2 networkmanager: fix dhcpcd PACKAGECONFIG
Without this patch, even if dhcpcd is enabled, the NetworkManager cannot find it. Below are the messages from NetworkMananger:
dhcp: init: DHCP client 'dhcpcd' not available
dhcp: init: Using DHCP client 'internal'
The problem is that dhcpcd needs to be specified as a path, otherwise NetworkManager tries to find it in /usr/sbin/dhcpcd.
--- .../networkmanager/networkmanager_1.40.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.40.0.bb +1 -1
@@ -104,7 +104,7 @@ PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson" PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no" PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux" PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false" -PACKAGECONFIG[dhcpcd] = "-Ddhcpcd=yes,-Ddhcpcd=no,,dhcpcd" +PACKAGECONFIG[dhcpcd] = "-Ddhcpcd=${base_sbindir}/dhcpcd,-Ddhcpcd=no,,dhcpcd" PACKAGECONFIG[dhclient] = "-Ddhclient=yes,-Ddhclient=no,,dhcp" PACKAGECONFIG[concheck] = "-Dconcheck=true,-Dconcheck=false"
Signature · 1 line
2.37.1
PATCH 2/2 networkmanager: install config files into correct place
The current location has no effect, because NetworkManager is not looking for config files there.
In meson.build, we have:
nm_pkglibdir = join_paths(nm_prefix, 'lib', nm_name)
config_extra_h.set_quoted('NMLIBDIR', nm_pkglibdir)
It's clear that the configuration directory should be nonarch_libdir instead of libdir.
--- .../networkmanager/networkmanager_1.40.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.40.0.bb +2 -2
@@ -287,11 +287,11 @@ do_install:append() { # Enable iwd if compiled if ${@bb.utils.contains('PACKAGECONFIG','iwd','true','false',d)}; then - install -Dm 0644 ${WORKDIR}/enable-iwd.conf ${D}${libdir}/NetworkManager/conf.d/enable-iwd.conf + install -Dm 0644 ${WORKDIR}/enable-iwd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-iwd.conf fi # Enable dhcpd if compiled if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then - install -Dm 0644 ${WORKDIR}/enable-dhcpcd.conf ${D}${libdir}/NetworkManager/conf.d/enable-dhcpcd.conf + install -Dm 0644 ${WORKDIR}/enable-dhcpcd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-dhcpcd.conf fi }
Signature · 1 line
2.37.1