This reverts commit 8d38ba4971.
It doesn't work, because of a chicken-and-egg problem: we need
to create the user account in %pre, but the configuration file
is obviously not present on the filesystem when %pre runs.
This is a fairly well-known gotcha that's been discussed on
devel@ a few times, e.g.:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/EXUGSSEMY2MVVGOFZIK4NBMQB5PWWWNGhttps://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/HFAB4HY2J66367V5HR7XSCFGIIV5ZOVY
In the second thread, Rathann and zbyszek recommend using
tmpfiles.d snippets for this kind of purpose (needing something
in /var owned by a user you want to have created by sysusers),
but that's a bit more of a complex change, so I think it makes
sense to just revert first then maybe attempt that later.
This causes a practical problem: on current Rawhide Workstation
live the first two steps of g-i-s are repeated on first boot
after install. The way we try to avoid this is by having
/var/lib/gnome-initial-setup/state copied to the installed
system, but because of this problem, /var/lib/gnome-initial-setup
is owned by root.root and g-i-s cannot write to it, so the file
is not there to be copied.
Note I edited the reversion not to add back the line:
BuildRequires: gnome-desktop4 >= %{gnome_desktop_version}
because it looks like the removal of that line wasn't really a
part of this sysusers change. I also added a comment warning
that this problem needs to be handled if anyone attempts to
convert to sysusers again.
This path is now the upstream default location since:
https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/85
so we don't need to specify it manually. Doing so has an undesirable
side effect: it disables the search path feature, so I cannot override
the configuration in /usr/share by creating an
/etc/gnome-initial-setup/vendor.conf as I would expect.