Fix user/group creation - the config file must be a package source

sddm user/group creation was broken since the build that dropped
the sysusers config file as a package source. We were still
trying to generate the %pre scriptlet from SOURCE18 even though
that didn't exist any more.

Unfortunately, there still appears to be no way to actually use
an upstream packaged config file as the target of the
%sysusers_create_compat macro. I posted to devel@ about this
back in 2021, which triggered an interesting thread, but no
immediate practical solution:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/TFDMAU7KLMSQTKPJELHSM6PFVXIZ56GK/
so the only workaround I know of is, unfortunately, to duplicate
the config file as a package source :(

So this commit takes the generated file from a broken 0.20.0
build and adds it back as a package source. With this change,
the %pre script is once again correct and the package provides
`user(sddm)` and `group(sddm)` as it should.
epel9
Adam Williamson 2 years ago
parent 3cc94d1b43
commit b2ece24fe8

@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
u sddm - "SDDM Greeter Account" /var/lib/sddm -

@ -20,7 +20,7 @@
Name: sddm Name: sddm
Version: 0.20.0%{?commitdate:^git%{commitdate}.%{shortcommit}} Version: 0.20.0%{?commitdate:^git%{commitdate}.%{shortcommit}}
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Summary: QML based desktop and login manager Summary: QML based desktop and login manager
@ -64,6 +64,12 @@ Source14: README.scripts
Source15: sddm.sysconfig Source15: sddm.sysconfig
# sddm x11 override config # sddm x11 override config
Source16: sddm-x11.conf Source16: sddm-x11.conf
# sysusers config file. note these are shipped in the upstream tarball
# but we cannot use the files from the tarball for %pre scriptlet
# generation, so we duplicate them as source files for that purpose;
# this is an ugly hack that should be removed if it becomes possible.
# see https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/TFDMAU7KLMSQTKPJELHSM6PFVXIZ56GK/
Source17: sddm-systemd-sysusers.conf
Provides: service(graphical-login) = sddm Provides: service(graphical-login) = sddm
@ -196,7 +202,7 @@ cp -a %{buildroot}%{_datadir}/sddm/scripts/* \
rm -fv %{buildroot}%{_sysconfdir}/sddm/Xsession rm -fv %{buildroot}%{_sysconfdir}/sddm/Xsession
%pre %pre
%sysusers_create_compat %{SOURCE18} %sysusers_create_compat %{SOURCE17}
%post %post
%systemd_post sddm.service %systemd_post sddm.service
@ -291,6 +297,9 @@ fi
%changelog %changelog
* Tue Jul 18 2023 Adam Williamson <awilliam@redhat.com> - 0.20.0-2
- Fix user/group creation - the config file *has* to be a package source
* Fri Jun 23 2023 Neal Gompa <ngompa@fedoraproject.org> - 0.20.0-1 * Fri Jun 23 2023 Neal Gompa <ngompa@fedoraproject.org> - 0.20.0-1
- Update to 0.20.0 final - Update to 0.20.0 final

Loading…
Cancel
Save