Use systemd sysusers config to create user and group

Resolves: RHEL-82252

forgoten %
This commit is contained in:
Tomas Pelka 2025-03-07 13:20:49 +01:00 committed by David King
parent 2cae757ea6
commit 85fa06331e
2 changed files with 6 additions and 5 deletions

View File

@ -22,6 +22,7 @@ License: GPL-2.0-or-later
URL: https://wiki.gnome.org/Design/OS/InitialSetup
Source0: https://download.gnome.org/sources/%{name}/46/%{name}-%{tarball_version}.tar.xz
Source1: vendor.conf
Source2: gnome-initial-setup.sysusers.conf
# Downstream branding
Patch: 0001-RHEL10-style-illustrations.patch
@ -55,6 +56,7 @@ BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(polkit-gobject-1)
BuildRequires: pkgconfig(pwquality)
BuildRequires: pkgconfig(rest-1.0)
BuildRequires: systemd-rpm-macros
%if %{with webkitgtk}
BuildRequires: pkgconfig(webkitgtk-6.0)
%endif
@ -68,7 +70,7 @@ Requires: gnome-desktop4%{?_isa} >= %{gnome_desktop_version}
Requires: polkit-js-engine
Requires: /usr/bin/tecla
Requires(pre): shadow-utils
%{?sysusers_requires_compat}
Provides: user(%name)
@ -104,10 +106,8 @@ cp %{SOURCE1} %{buildroot}%{_datadir}/gnome-initial-setup/
%find_lang %{name}
%pre
# we do not use sysusers yet because we need /var/lib/gnome-initial-setup
# to be owned by the gnome-initial-setup user. please do not convert
# to sysusers without making sure this is handled, maybe by tmpfiles
useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} &>/dev/null || :
%sysusers_create_compat %{SOURCE2}
%files -f %{name}.lang
%license COPYING

View File

@ -0,0 +1 @@
u gnome-initial-setup - - /run/gnome-initial-setup/ /sbin/nologin