Closed Foxboron closed 6 months ago
Ah, never looked at systemd-sysusers. Going to have to do some testing to make sure it works properly on the older distros (Debian 11 / Ubuntu 20.04). If that works as expected, I'll merge that and remove the shell logic, I think it will need a small tweak to the workflow too to put the file in the right spot.
I suspect it's not widely used in Debian mostly because they still support non-systemd init systems which would possibly be a problem here, but I also didn't find anything in the Debian packaging policies that specifically says not to use systemd-sysusers.
@freeekanayaka are you aware of anything on the Debian front?
In Arch we have largely removed all of the post-install hooks creating directories or users in favour of sysusers.d
and tmpfiles.d
.
Mainly I'm including it here for reference so people can see what users and groups are needed, instead of reading the documentation or the debian packaging :)
I suspect it's not widely used in Debian mostly because they still support non-systemd init systems which would possibly be a problem here, but I also didn't find anything in the Debian packaging policies that specifically says not to use systemd-sysusers.
@freeekanayaka are you aware of anything on the Debian front?
Non-systemd init systems are supported on a best-effort basis, so I believe that it should be fine to use systemd-sysusers. However I'll need to double check this.
You should be able to use dh_installsysusers by moving the systemd/incus.sysusers
file in this PR directly to debian/incus.sysusers
.
Although probably there aren't many packages using this, it should be perfectly policy-compliant.
This file enables the creation of all incus groups and users during package installation without the need for programatic post install scripts.
Signed-off-by: Morten Linderud morten@linderud.pw