networkmanager: Do not ship initrd specific services into rootfs
PATCH 1/1 networkmanager: Do not ship initrd specific services into rootfs
Those systemd services were added in 1.54 upstream
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2089
According the comments we can see they are meant for the inird other than using for rootfs. They will conflict with the main services and can lead to potentially confusing error messages. So remove them for now to avoid the following issue.
Quoted 2 lines
$systemd-analyze --man=false verify \
/lib/systemd/system/NetworkManager-wait-online-initrd.service
Failed to put bus name to hashmap: File exists NetworkManager-initrd.service: Two services allocated for the \
same bus name org.freedesktop.NetworkManager, refusing operation.
Test:
PASS: bitbake core-image-minimal
PASS: runqemu qemux86-64
PASS: systemd-analyze --man=false verify \
/lib/systemd/system/NetworkManager.service
--- .../networkmanager/networkmanager_1.56.0.bb | 5 +++++ 1 file changed, 5 insertions(+)
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.56.0.bb +5 -0
@@ -311,4 +311,9 @@ do_install:append() { if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then install -Dm 0644 ${UNPACKDIR}/enable-dhcpcd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-dhcpcd.conf fi + + # Don't ship initrd specific services into rootfs to avoid the conflict with the main services + rm -f ${D}${systemd_system_unitdir}/NetworkManager-config-initrd.service + rm -f ${D}${systemd_system_unitdir}/NetworkManager-initrd.service + rm -f ${D}${systemd_system_unitdir}/NetworkManager-wait-online-initrd.service }
Signature · 1 line
2.53.0