If privdrop is enabled, the following error happens during the build process:
useradd: group chronyd exists - if you want to add this user to that group, use 
-g.

Several other recipes have added "-g $somegroup" to USERADD_PARAM, and as such,
chrony should follow suit.

Signed-off-by: Adam Duskett <[email protected]>
---
 meta-networking/recipes-support/chrony/chrony_4.8.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-networking/recipes-support/chrony/chrony_4.8.bb 
b/meta-networking/recipes-support/chrony/chrony_4.8.bb
index a7fc73e081..837f2e073f 100644
--- a/meta-networking/recipes-support/chrony/chrony_4.8.bb
+++ b/meta-networking/recipes-support/chrony/chrony_4.8.bb
@@ -47,7 +47,7 @@ inherit update-rc.d systemd pkgconfig
 # Add chronyd user if privdrop packageconfig is selected
 inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'useradd', '', 
d)}
 USERADD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', '${PN}', 
'', d)}"
-USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 
'--system -d / -M --shell /sbin/nologin chronyd;', '', d)}"
+USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 
'--system -d / -M -g chronyd --shell /sbin/nologin chronyd;', '', d)}"
 GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 
'--system chronyd', '', d)}"
 
 # Configuration options:
-- 
2.54.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#127049): 
https://lists.openembedded.org/g/openembedded-devel/message/127049
Mute This Topic: https://lists.openembedded.org/mt/119370370/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to