[Rpm-maint] [rpm-software-management/rpm] Add a man page for rpm sysusers integration (PR #4126)

Michal Domonkos notifications at github.com
Mon Mar 2 10:38:06 UTC 2026


@dmnks commented on this pull request.



> +at installation time. This eliminates the need for the manual creation of such
+accounts in transaction scriptlets.
+
+This works implicitly if a package ships one or more files in this format under
+*%\_sysusersdir* (typically _/usr/lib/sysusers.d/_). RPM will then automatically
+invoke the *%\_\_systemd_sysusers* binary (typically *systemd-sysusers*(8)) with
+the correct arguments in order to create the user and/or group accounts when the
+package is installed. This is the recommended method on systemd native platforms
+and requires no intervention from the package beyond shipping those files.
+
+RPM also allows for declaring sysusers.d entries explicitly in the spec file
+with the *%add_sysuser* macro. This macro takes a sysusers.d line with its
+fields passed as separate arguments and must be declared in the (sub-)package
+context. This method is primarily intended for platforms without systemd where
+it is typically also coupled with a custom *%\_\_systemd_sysusers* binary (see
+*DECODING* for details).

Yep, coming back with a fresh mind after the weekend, I realize now that this feature is indeed about the sysusers.d format. It's also in the name of the man page itself, after all :smile: 

Both the *files* and the CLI tool are part of the format specification as well so it makes sense to document *the whole* as the primary use case. The `%add_sysuser` macro (and the other tunables, including the custom `sysusers.sh`) are just a way to integrate this RPM feature with non-systemd platforms.

I won't rewrite the whole thing from scratch, of course, but I'll make some adjustments with the above in mind :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4126#discussion_r2871682780
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4126/review/3875348708 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260302/61d9ae24/attachment.htm>


More information about the Rpm-maint mailing list