Skip to content

Commit

Permalink
[timed] Remove "timed" group setup from pre install. Fixes JB#48208
Browse files Browse the repository at this point in the history
Adding groups in package install phase via oneshot script is subject
to timing problems and can lead to timed service being unable to
change system default timezone.

As adding "timed" group is now handled in sailfish-setup, there is
no need to do it during timed package install.

Also, do not remove "timed" group on timed package uninstall.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Nov 25, 2019
1 parent 01946ba commit 69c9d8d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions rpm/timed-qt5.spec
Expand Up @@ -13,10 +13,8 @@ Requires: tzdata-timed
Requires: systemd
Requires: oneshot
Requires: statefs
Requires: sailfish-setup >= 0.1.8
%{_oneshot_groupadd_requires_pre}
Requires: sailfish-setup >= 0.1.10
%{_oneshot_requires_post}
%{_oneshot_groupadd_requires_post}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(libpcrecpp)
Expand Down Expand Up @@ -102,8 +100,6 @@ ln -sf /var/lib/timed/localtime %{buildroot}%{_sysconfdir}/localtime
%statefs_provider_install inout timed %{_sysconfdir}/timed-statefs.conf

%pre
groupadd -rf timed
groupadd-user timed
%statefs_pre

%post
Expand All @@ -130,7 +126,6 @@ fi
if [ "$1" -eq 0 ]; then
systemctl-user stop {%name}.service || :
systemctl-user daemon-reload || :
getent group time >/dev/null && groupdel timed || :
fi
%statefs_postun

Expand Down

0 comments on commit 69c9d8d

Please sign in to comment.