* [Buildroot] [PATCH 1/1] package/network-manager: remove initrd specific service files
@ 2026-06-06 2:40 TIAN Yuanhao
2026-06-15 11:17 ` yann.morin
0 siblings, 1 reply; 2+ messages in thread
From: TIAN Yuanhao @ 2026-06-06 2:40 UTC (permalink / raw)
To: buildroot; +Cc: TIAN Yuanhao
NetworkManager upstream added initrd-specific service files in 1.54:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2089
These services are intended for use inside an initrd, not a rootfs.
When present in a rootfs, they conflict with the main NetworkManager
service since both claim the same D-Bus name
org.freedesktop.NetworkManager, leading to confusing error messages:
systemd[1]: Failed to put bus name to hashmap: File exists
systemd[1]: NetworkManager-initrd.service: Two services allocated
for the same bus name org.freedesktop.NetworkManager, refusing
operation.
Remove them to avoid these issues.
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
---
package/network-manager/network-manager.mk | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/package/network-manager/network-manager.mk b/package/network-manager/network-manager.mk
index 301c1ad43e..2dd40980e7 100644
--- a/package/network-manager/network-manager.mk
+++ b/package/network-manager/network-manager.mk
@@ -191,4 +191,12 @@ define NETWORK_MANAGER_INSTALL_INIT_SYSTEMD
endef
+define NETWORK_MANAGER_REMOVE_INITRD_SERVICES
+ $(RM) $(TARGET_DIR)/usr/lib/systemd/system/NetworkManager-config-initrd.service
+ $(RM) $(TARGET_DIR)/usr/lib/systemd/system/NetworkManager-initrd.service
+ $(RM) $(TARGET_DIR)/usr/lib/systemd/system/NetworkManager-wait-online-initrd.service
+endef
+
+NETWORK_MANAGER_POST_INSTALL_TARGET_HOOKS += NETWORK_MANAGER_REMOVE_INITRD_SERVICES
+
$(eval $(meson-package))
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/network-manager: remove initrd specific service files
2026-06-06 2:40 [Buildroot] [PATCH 1/1] package/network-manager: remove initrd specific service files TIAN Yuanhao
@ 2026-06-15 11:17 ` yann.morin
0 siblings, 0 replies; 2+ messages in thread
From: yann.morin @ 2026-06-15 11:17 UTC (permalink / raw)
To: TIAN Yuanhao; +Cc: buildroot
On 2026-06-05 19:40 -0700, TIAN Yuanhao spake thusly:
> NetworkManager upstream added initrd-specific service files in 1.54:
> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2089
>
> These services are intended for use inside an initrd, not a rootfs.
> When present in a rootfs, they conflict with the main NetworkManager
> service since both claim the same D-Bus name
> org.freedesktop.NetworkManager, leading to confusing error messages:
>
> systemd[1]: Failed to put bus name to hashmap: File exists
> systemd[1]: NetworkManager-initrd.service: Two services allocated
> for the same bus name org.freedesktop.NetworkManager, refusing
> operation.
>
> Remove them to avoid these issues.
I've sent another similar patch, which only removes the NM initrd
services when systemd does not have support for initrd; otherwise, the
NM initrd services are left untouched (someone that uses such a setup
will have to test what's appropriate and fix anything as needed):
https://lore.kernel.org/buildroot/27c081656fb5af84e1919390565641af37485d91.1781521565.git.yann.morin@orange.com/T/
Regards,
Yann E. MORIN.
> Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
> ---
> package/network-manager/network-manager.mk | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/package/network-manager/network-manager.mk b/package/network-manager/network-manager.mk
> index 301c1ad43e..2dd40980e7 100644
> --- a/package/network-manager/network-manager.mk
> +++ b/package/network-manager/network-manager.mk
> @@ -191,4 +191,12 @@ define NETWORK_MANAGER_INSTALL_INIT_SYSTEMD
>
> endef
>
> +define NETWORK_MANAGER_REMOVE_INITRD_SERVICES
> + $(RM) $(TARGET_DIR)/usr/lib/systemd/system/NetworkManager-config-initrd.service
> + $(RM) $(TARGET_DIR)/usr/lib/systemd/system/NetworkManager-initrd.service
> + $(RM) $(TARGET_DIR)/usr/lib/systemd/system/NetworkManager-wait-online-initrd.service
> +endef
> +
> +NETWORK_MANAGER_POST_INSTALL_TARGET_HOOKS += NETWORK_MANAGER_REMOVE_INITRD_SERVICES
> +
> $(eval $(meson-package))
> --
> 2.53.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
____________
.-----------------.--------------------: _ :------------------.
| Yann E. MORIN | Real-Time Embedded | __/ ) | /"\ ASCII RIBBON |
| | Software Designer | _/ - /' | \ / CAMPAIGN |
| +33 638.411.245 '--------------------: (_ `--, | X AGAINST |
| yann.morin (at) orange.com |_=" ,--' | / \ HTML MAIL |
'--------------------------------------:______/_____:------------------'
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-15 11:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-06 2:40 [Buildroot] [PATCH 1/1] package/network-manager: remove initrd specific service files TIAN Yuanhao
2026-06-15 11:17 ` yann.morin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox