On Fri, Jun 23, 2023 at 08:20:58PM +0200, Michal Domonkos wrote:
On Thu, Jun 22, 2023 at 01:18:27PM +0300, Panu Matilainen wrote:
Now that the initial hurdle of getting rpm 4.19 into rawhide is over, it's time to start looking towards enabling the sysusers integration: https://rpm-software-management.github.io/rpm/manual/users_and_groups.html
[...]
- The various %sysuser_()* macros in systemd-rpm-macros need to be phased
out. As it'll be a long time before the sysusers feature is in all Fedora versions, it needs a longer term plan. One simple possibility is do what was done with all those ldconfig from %post back then: change the %sysusers_() macros to no-ops in rawhide to let rpm handle it, and only actually bother updating packages once all relevant versions have the sysusers feature.
This proposal would effectively move all existing packages that create users or groups from useradd/groupadd (called by those %sysuser* macros underneath) to systemd-sysusers(8).
I wonder if we shouldn't first just move those macros over to systemd-sysusers to test-drive this utility at a larger scale and catch any potential bugs or issues before actually proceeding with the remaining steps as outlined in the email.
I don't think so. Either way, the actual implementation is going to be a call to systemd-sysusers. But the rpm-internal approach is quite different in how the call is constructed from the macro-based approach, so the failure modes are likely to be different. If were to switch to the macro-based approach temporarily, we'd create quite a lot of churn and _different_ failure modes. So I think that if we're switching to sysusers as the implementation, we should go for the intended final approach immediately.
Zbyszek