Skip to content

Install and use sysusers.d/tmpfiles.d config files#8

Open
bluca wants to merge 2 commits into
daradib:debian/masterfrom
bluca:sysusers
Open

Install and use sysusers.d/tmpfiles.d config files#8
bluca wants to merge 2 commits into
daradib:debian/masterfrom
bluca:sysusers

Conversation

@bluca

@bluca bluca commented Jun 24, 2026

Copy link
Copy Markdown

sysusers.d/tmpfiles.d config files allow a package to use declarative configuration instead of manually written maintainer scripts. This also allows image-based systems to be created with /usr/ only, and also allows for factory resetting a system and recreating /etc/ on boot. https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html Note that this does not require a hard dependency on systemd, debhelper generates depetencies correctly so that they work out of the box on non-systemd and non-linux Debian builds seamlessly.

bluca added 2 commits June 24, 2026 21:39
This is widely considered bad practice, as the kernel recycles UIDs/GIDs.
So any potential leftover file/directory can then become owned by the next
user/group that gets added, with unpredictable consequences.
sysusers.d/tmpfiles.d config files allow a package to use declarative
configuration instead of manually written maintainer scripts. This also
allows image-based systems to be created with /usr/ only, and also
allows for factory resetting a system and recreating /etc/ on boot.

https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html
https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html

Note that this does not require a hard dependency on systemd,
debhelper generates depetencies correctly so that they work out
of the box on non-systemd and non-linux Debian builds seamlessly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant