swtpm: install sysusers.d and tmpfiles.d configs#1056
swtpm: install sysusers.d and tmpfiles.d configs#1056stefanberger merged 2 commits intostefanberger:masterfrom
Conversation
These configuration files will create the required user, group and data directory on first boot/factory reset/package installation, without requiring manual scripts or actions. This is very important for image-based OSes, but it is useful in other cases to, to allow using declarative configuration instead of scripts. RPM now has built-in support for sysusers.d too. https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Use sysusers and tmpfiles Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
a546c58 to
3f687bd
Compare
|
@stefanberger lgtm |
|
It will not cause any issues to just ship these, that I do know, so it should be safe to ship as-is. To make use of it from RPM directly though I am not sure, I guess it might depend on the distro, @keszybz do you know if you need to change a spec file to make RPM use the sysusers.d file? |
|
@stefanberger looks good to me too, should work fine for Debian + Ubuntu |
| Rules-Requires-Root: no | ||
| Build-Depends: debhelper (>= 10), | ||
| dh-apparmor, | ||
| dh-sequence-installsysusers, |
There was a problem hiding this comment.
this script will cause that the contents of the two new config files will be read?
There was a problem hiding this comment.
The tmpfiles.d is used automatically, this is needed for sysusers.d to be used - and by used I mean the autogenerated snippets will be created automatically in the postinst files at build time
|
Thanks! |
These configuration files will create the required user, group and
data directory on first boot/factory reset/package installation,
without requiring manual scripts or actions. This is very important
for image-based OSes, but it is useful in other cases to, to allow
using declarative configuration instead of scripts.
RPM now has built-in support for sysusers.d too.
https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html
https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html