From e65e432c0bef40088fd30a689531666da3983fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Wed, 28 Feb 2024 21:36:36 +0100 Subject: [PATCH] make the rpm packaging more robust --- rpms/SPECS/kiosk-config.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpms/SPECS/kiosk-config.spec b/rpms/SPECS/kiosk-config.spec index 1e1ba10..1682805 100644 --- a/rpms/SPECS/kiosk-config.spec +++ b/rpms/SPECS/kiosk-config.spec @@ -19,6 +19,7 @@ Requires: accountsservice Requires(post): crudini Requires(preun): crudini BuildRequires: systemd-rpm-macros +%systemd_requires ExclusiveArch: x86_64 %description @@ -71,14 +72,14 @@ install -m 0755 -D kiosk-app %{buildroot}/usr/bin/kiosk-app %attr(0755, root, root) /usr/bin/kiosk-app %pre -getent group kiosk >/dev/null 2>&1 || groupadd kiosk +getent group kiosk >/dev/null 2>&1 || groupadd -r kiosk getent passwd kiosk >/dev/null 2>&1 || useradd -r -N -g kiosk -d /home/kiosk -m kiosk %post %systemd_user_post com.redhat.Kiosk.SampleApp.service crudini --set /etc/gdm/custom.conf daemon AutomaticLoginEnable True crudini --set /etc/gdm/custom.conf daemon AutomaticLogin kiosk -systemctl set-default graphical.target +/usr/bin/systemctl set-default graphical.target %preun %systemd_user_preun com.redhat.Kiosk.SampleApp.service