The guidelines for sysusers packaging:
https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/...
say:
"Create a <package-name>.sysusers file with the user definition and add
it to the specfile as a source...use the %sysusers_create_compat macro
to consume it in the %pre section:
%pre
%sysusers_create_compat %{SOURCE3}
"
but...what are you supposed to do if *upstream* ships the config files?
openQA recently added these to its upstream distribution, so it seems
wrong to replace the config files upstream ships with ones separately
packaged downstream. But if I don't package them as source files, how
can I set up the %pre macro? I tried this:
%pre
%sysusers_create_compat usr/lib/sysusers.d/geekotest.conf
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. The built package has no %pre script. However, that does work if
I eval it locally from an openQA source tree:
[adamw@xps13k openQA (master %)]$ rpm --eval "%sysusers_create_compat
usr/lib/sysusers.d/geekotest.conf"
# generated from geekotest.conf
getent group 'geekotest' >/dev/null || groupadd -r 'geekotest'
...etc...
so...help? Is there any way to make this work right? Thanks!
--
Adam Williamson
Fedora QA
IRC: adamw | Twitter: adamw_ha
https://www.happyassassin.net