On Sat, 2021-11-27 at 09:01 -0500, Frank Ch. Eigler wrote:
Adam Williamson <adamwill(a)fedoraproject.org> writes:
> [...]
>
>
https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/...
>
> say:
>
> "Create a <package-name>.sysusers file with the user definition and add
> where usr/lib/sysusers.d/geekotest.conf is the path to one of the
> sysusers config file within the upstream source, but it doesn't seem to
> work. [...]
One problem with these sysusers rpm macros is that they expand to the
scriptlets very early: before even the main source tarball is extracted.
Yeah, I figured that was probably the issue. I could not find any
documentation of exactly when macro expansion happens, but I probably
didn't look hard enough.
This is why the fedora packaging guideline more or less forces them
to
be first-class spec sources.
In the case of systemtap, we worked around this by moving the sysusers
config files right into the spec file - out of the source tarball - and
feed them to %pre and %install scripts by hand.
https://src.fedoraproject.org/rpms/systemtap/blob/rawhide/f/systemtap.spe...
https://src.fedoraproject.org/rpms/systemtap/blob/rawhide/f/systemtap.spe...
https://src.fedoraproject.org/rpms/systemtap/blob/rawhide/f/systemtap.spe...
IMO this is ugly and unfortunate.
I agree. I'd really like a less icky solution to this :(
--
Adam Williamson
Fedora QA
IRC: adamw | Twitter: adamw_ha
https://www.happyassassin.net