From b2ece24fe88889c3c1d64e84d214614ed1c58a1e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 18 Jul 2023 16:17:11 -0700 Subject: [PATCH 1/2] 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. --- sddm-systemd-sysusers.conf | 2 ++ sddm.spec | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 sddm-systemd-sysusers.conf diff --git a/sddm-systemd-sysusers.conf b/sddm-systemd-sysusers.conf new file mode 100644 index 0000000..05fcb1c --- /dev/null +++ b/sddm-systemd-sysusers.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u sddm - "SDDM Greeter Account" /var/lib/sddm - diff --git a/sddm.spec b/sddm.spec index a78ac1f..89b4a61 100644 --- a/sddm.spec +++ b/sddm.spec @@ -20,7 +20,7 @@ Name: sddm Version: 0.20.0%{?commitdate:^git%{commitdate}.%{shortcommit}} -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Summary: QML based desktop and login manager @@ -64,6 +64,12 @@ Source14: README.scripts Source15: sddm.sysconfig # sddm x11 override config 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 @@ -196,7 +202,7 @@ cp -a %{buildroot}%{_datadir}/sddm/scripts/* \ rm -fv %{buildroot}%{_sysconfdir}/sddm/Xsession %pre -%sysusers_create_compat %{SOURCE18} +%sysusers_create_compat %{SOURCE17} %post %systemd_post sddm.service @@ -291,6 +297,9 @@ fi %changelog +* Tue Jul 18 2023 Adam Williamson - 0.20.0-2 +- Fix user/group creation - the config file *has* to be a package source + * Fri Jun 23 2023 Neal Gompa - 0.20.0-1 - Update to 0.20.0 final From c90e21177082096f8fd1b0b1634feef64fa269f8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 01:17:00 +0000 Subject: [PATCH 2/2] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- sddm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sddm.spec b/sddm.spec index 89b4a61..e144af7 100644 --- a/sddm.spec +++ b/sddm.spec @@ -20,7 +20,7 @@ Name: sddm Version: 0.20.0%{?commitdate:^git%{commitdate}.%{shortcommit}} -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Summary: QML based desktop and login manager @@ -297,6 +297,9 @@ fi %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 0.20.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 18 2023 Adam Williamson - 0.20.0-2 - Fix user/group creation - the config file *has* to be a package source