#709 Wiki:Packaging:Tmpfiles.d - Improvement suggestion
Opened 3 years ago by ricco. Modified 2 years ago

Guideline page needing clarification:

Wiki page for packagers working with tmpfiles.d doesn't mention systemd macro %tmpfiles_create


Recently I was submiting my first package for review using systemd with tmpfiles.d and I read through the wiki and liked the example, but it is missing one important piece of information.

In order to let systemd know to use the conf file command: systemd-tmpfiles --create has to be executed. This is not done in the example on the wiki page. I had to check the systemd source code to find this macro.

My suggestion is to update the example with macro %tmpfiles_create %{name}.conf. I am not entirely sure if the best practice is to put it in %post or directly in %install that was the reason I was looking at the wiki.

I think it would be also beneficial to add a similar explanation as %{_tmpfilesdir} has below the example.

Metadata Update from @tibbs:
- Issue tagged with: draftneeded

3 years ago

We are working on improving the tooling for systemd-sysusers and systemd-tmpfiles. systemd-238 that is in F28 has new macros that allow packages to execute their sysusers and tmpfiles configuration during package installation in a way that honours admin overrides and are intended to be used in Fedora. See https://github.com/systemd/systemd/commit/0f78fee8d0, https://github.com/systemd/systemd/commit/07a7d4a004. Those commits also describe the intended usage of those new macros.

@wwoods and @sgallagh had plans to promote the use of sysusers and tmpfiles, maybe they have some additional comments.

Login to comment on this ticket.