All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH 1/2] mctp: refine user creation
@ 2026-11-23  5:55 James Lee
  2026-11-23  5:55 ` [meta-networking][PATCH 2/2] mctp: add mctp-admin group James Lee
  0 siblings, 1 reply; 2+ messages in thread
From: James Lee @ 2026-11-23  5:55 UTC (permalink / raw)
  To: openembedded-devel; +Cc: jk

The current recipe does not handle user creation when upgrading.
Add mctpd user to sysusers.d to ensure it is created if needed.

Current useradd params unintentionally set the home directory to
/home/mctpd which does not exist and would conflict with the user
definition in sysusers.d. Update useradd params to set the home
directory to "/".

Signed-off-by: James Lee <james@codeconstruct.com.au>
---
 meta-networking/recipes-support/mctp/mctpd_2.7.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta-networking/recipes-support/mctp/mctpd_2.7.bb b/meta-networking/recipes-support/mctp/mctpd_2.7.bb
index b8b3719c9e..a75f76be20 100644
--- a/meta-networking/recipes-support/mctp/mctpd_2.7.bb
+++ b/meta-networking/recipes-support/mctp/mctpd_2.7.bb
@@ -15,13 +15,15 @@ do_install:append () {
     install -d ${D}${datadir}/dbus-1/system.d
     install -m 0644 ${S}/conf/mctpd-dbus.conf \
             ${D}${datadir}/dbus-1/system.d/mctpd.conf
+    install -d ${D}${nonarch_libdir}/sysusers.d
+    printf 'u! mctpd - "mctpd daemon" / /bin/false\n' > ${D}${nonarch_libdir}/sysusers.d/mctpd.conf
 }
-FILES:${PN} += "${datadir}/dbus-1/system.d/mctpd.conf"
+FILES:${PN} += "${datadir}/dbus-1/system.d/mctpd.conf ${nonarch_libdir}/sysusers.d/mctpd.conf"
 
 SYSTEMD_SERVICE:${PN} = "mctpd.service mctp.target mctp-local.target"
 
 USERADD_PACKAGES = "${PN}"
-USERADD_PARAM:${PN} = "-r -U -s /bin/false mctpd"
+USERADD_PARAM:${PN} = "-r -U -d / -s /bin/false mctpd"
 
 DEPENDS += "systemd"
 REQUIRED_DISTRO_FEATURES = "systemd"
-- 
2.47.3


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

* [meta-networking][PATCH 2/2] mctp: add mctp-admin group
  2026-11-23  5:55 [meta-networking][PATCH 1/2] mctp: refine user creation James Lee
@ 2026-11-23  5:55 ` James Lee
  0 siblings, 0 replies; 2+ messages in thread
From: James Lee @ 2026-11-23  5:55 UTC (permalink / raw)
  To: openembedded-devel; +Cc: jk

The mctpd D-Bus config relies on a "mctp-admin" group to allow users to
send messages to mctpd's interfaces. Create that group.

Signed-off-by: James Lee <james@codeconstruct.com.au>
---
 meta-networking/recipes-support/mctp/mctpd_2.7.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-support/mctp/mctpd_2.7.bb b/meta-networking/recipes-support/mctp/mctpd_2.7.bb
index a75f76be20..0e32f523a6 100644
--- a/meta-networking/recipes-support/mctp/mctpd_2.7.bb
+++ b/meta-networking/recipes-support/mctp/mctpd_2.7.bb
@@ -16,7 +16,7 @@ do_install:append () {
     install -m 0644 ${S}/conf/mctpd-dbus.conf \
             ${D}${datadir}/dbus-1/system.d/mctpd.conf
     install -d ${D}${nonarch_libdir}/sysusers.d
-    printf 'u! mctpd - "mctpd daemon" / /bin/false\n' > ${D}${nonarch_libdir}/sysusers.d/mctpd.conf
+    printf 'u! mctpd - "mctpd daemon" / /bin/false\ng mctp-admin\n' > ${D}${nonarch_libdir}/sysusers.d/mctpd.conf
 }
 FILES:${PN} += "${datadir}/dbus-1/system.d/mctpd.conf ${nonarch_libdir}/sysusers.d/mctpd.conf"
 
@@ -24,6 +24,7 @@ SYSTEMD_SERVICE:${PN} = "mctpd.service mctp.target mctp-local.target"
 
 USERADD_PACKAGES = "${PN}"
 USERADD_PARAM:${PN} = "-r -U -d / -s /bin/false mctpd"
+GROUPADD_PARAM:${PN} = "-r mctp-admin"
 
 DEPENDS += "systemd"
 REQUIRED_DISTRO_FEATURES = "systemd"
-- 
2.47.3


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

end of thread, other threads:[~2026-11-23  5:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  5:55 [meta-networking][PATCH 1/2] mctp: refine user creation James Lee
2026-11-23  5:55 ` [meta-networking][PATCH 2/2] mctp: add mctp-admin group James Lee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.