diff mbox series

[meta-networking,scarthgap] chrony: use inherit_defer for conditional inherit of useradd

Message ID 734619d4-d127-4d6d-804c-ba56d3c552ef@gmail.com
State New
Headers show
Series [meta-networking,scarthgap] chrony: use inherit_defer for conditional inherit of useradd | expand

Commit Message

Clayton Casciato May 23, 2025, 3:16 a.m. UTC
[ Upstream commit 63df976d8eec0fa714e8da30f4333f8af23c57d3 ]

conditionnal inherit is missed when PACKAGECONFIG privdrop is
activated after this inherit, eg in .bbappend.

Signed-off-by: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Clayton Casciato <majortomtosourcecontrol@gmail.com>
---
 meta-networking/recipes-support/chrony/chrony_4.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/chrony/chrony_4.5.bb b/meta-networking/recipes-support/chrony/chrony_4.5.bb
index ae46ef1fd4..dbea406233 100644
--- a/meta-networking/recipes-support/chrony/chrony_4.5.bb
+++ b/meta-networking/recipes-support/chrony/chrony_4.5.bb
@@ -48,7 +48,7 @@  DEPENDS = "pps-tools"
 inherit update-rc.d systemd pkgconfig
 
 # Add chronyd user if privdrop packageconfig is selected
-inherit ${@bb.utils.contains('PACKAGECONFIG', 'privdrop', 'useradd', '', d)}
+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 /bin/nologin chronyd;', '', d)}"