This macro can be called inside a build file and easily allows to apply any kind of users/groups specified in a sysusers file.
Signed-off-by: Stefan Schantl stefan.schantl@ipfire.org --- macros/systemd.macro | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/macros/systemd.macro b/macros/systemd.macro index 7a40cff6..0da90468 100644 --- a/macros/systemd.macro +++ b/macros/systemd.macro @@ -1,3 +1,14 @@ +MACRO_APPLY_SYSTEMD_SYSUSERS + mkdir -pv %{sysusersdir} + + for file in %{DIR_SOURCE}/*.sysusers; do + [ -e "${file}" ] || continue + cat ${file} | \ + systemd-sysusers --replace=%{sysusersdir}/$(basename ${file%*.sysusers}).conf - + done + unset file +end + MACRO_INSTALL_SYSTEMD_FILES for file in %{DIR_SOURCE}/systemd/*; do [ -e "${file}" ] || continue