diff --git a/gnome-initial-setup.spec b/gnome-initial-setup.spec index 1e0d565..86442e3 100644 --- a/gnome-initial-setup.spec +++ b/gnome-initial-setup.spec @@ -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 %if 0%{!?almalinux} # Downstream branding @@ -57,6 +58,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 @@ -70,7 +72,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) @@ -106,10 +108,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 diff --git a/gnome-initial-setup.sysusers.conf b/gnome-initial-setup.sysusers.conf new file mode 100644 index 0000000..b61480f --- /dev/null +++ b/gnome-initial-setup.sysusers.conf @@ -0,0 +1 @@ +u gnome-initial-setup - - /run/gnome-initial-setup/ /sbin/nologin