Hello Stefan,
On 30 Mar 2023, at 07:52, Stefan Schantl stefan.schantl@ipfire.org wrote:
This macros works very similar than the tmpfiles one but handles sysusers files.
Signed-off-by: Stefan Schantl stefan.schantl@ipfire.org
macros/systemd.macro | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/macros/systemd.macro b/macros/systemd.macro index 9dc74ff0..1453db95 100644 --- a/macros/systemd.macro +++ b/macros/systemd.macro @@ -1,5 +1,6 @@
SYSTEMD_TMPFILES_DIR = /usr/lib/tmpfiles.d +SYSTEMD_SYSUSERS_DIR = /usr/lib/sysusers.d
Is there a particular reason you are not using %{sysusersdir} here?
MACRO_INSTALL_SYSTEMD_FILES for file in %{DIR_SOURCE}/systemd/*; do @@ -19,3 +20,12 @@ MACRO_INSTALL_SYSTEMD_TMPFILES done unset file end
+MACRO_INSTALL_SYSTEMD_SYSUSERS
- for file in %{DIR_SOURCE}/*.sysusers; do
- [ -e "${file}" ] || continue
- mkdir -p %{BUILDROOT}/%{SYSTEMD_SYSUSERS_DIR}
- cp -vf ${file} %{BUILDROOT}/%{SYSTEMD_SYSUSERS_DIR}/$(basename ${file%*.sysusers}).conf
- done
- unset file
+end
Should the command not be “install” with a specific file mode set? Probably 0644?
-- 2.30.2