Yup. I don't fancy reimplementing user/group management in rpm
directly,
I'm thinking more about integrating with existing solutions one way or
the other. Sysusers is a good candidate since, as you point out, it has
a declarative syntax already. The biggest problems with any approach
tend to be with bootstrapping, when installing into an empty chroot
it'll be a good while until any user management tools are present there,
yet the early packages need file ownerships just as much as the latter
ones do. So you'd need to run the tools from outside the chroot and
that'd basically have to happen before the transaction really starts,
which has the slight problem that the filesystem isn't populated. Etc.
Hello Panu, Zbyszek,
Thank you for the pointer but you spoiled all the fun I expected for
next Monday's RTFM session ;-(
That being said, I still have more research to do because while this
works fine in Fedora, I'll need to get it working across more systemd
distributions, most of them not of the Fedora lineage... So I guess I
still have a big lump of "fun" ahead of me.
Happy new year and thanks again!
Dridi