Hello Stefan,
Didn’t we decide on the phone call again doing this?
The downside is that this won’t work for any sysuser files that are in the tarball. So there is still the need to manually apply those?
It would be less consistent and potentially confusing?
-Michael
On 30 Mar 2023, at 07:52, Stefan Schantl stefan.schantl@ipfire.org wrote:
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 1453db95..27231094 100644 --- a/macros/systemd.macro +++ b/macros/systemd.macro @@ -2,6 +2,17 @@ SYSTEMD_TMPFILES_DIR = /usr/lib/tmpfiles.d SYSTEMD_SYSUSERS_DIR = /usr/lib/sysusers.d
+MACRO_APPLY_SYSTEMD_SYSUSERS
- mkdir -pv %{SYSTEMD_SYSUSERS_DIR}
- for file in %{DIR_SOURCE}/*.sysusers; do
- [ -e "${file}" ] || continue
- cat ${file} | \
- systemd-sysusers --replace=%{SYSTEMD_SYSUSERS_DIR}/$(basename ${file%*.sysusers}).conf -
- done
- unset file
+end
MACRO_INSTALL_SYSTEMD_FILES for file in %{DIR_SOURCE}/systemd/*; do [ -e "${file}" ] || continue -- 2.30.2