diff --git a/syncthing.changes b/syncthing.changes index 9954f87..0bc456b 100644 --- a/syncthing.changes +++ b/syncthing.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 18 17:21:23 UTC 2019 - Jan Engelhardt + +- Do not hide errors from useradd. +- Add %systemd_ordering for %service_*. + ------------------------------------------------------------------- Tue Feb 26 11:11:02 UTC 2019 - Bernd Wachter diff --git a/syncthing.spec b/syncthing.spec index a806896..c4ad6c8 100644 --- a/syncthing.spec +++ b/syncthing.spec @@ -30,6 +30,7 @@ Source3: %{name}.firewall BuildRequires: go >= 1.8 BuildRequires: systemd BuildRequires: systemd-rpm-macros +%{?systemd_ordering} %description Syncthing is an application that synchronises files across multiple @@ -40,6 +41,7 @@ on one machine will automatically be replicated to other devices. Summary: Relay server for syncthing Group: Productivity/Networking/File-Sharing Requires(pre): pwdutils +%{?systemd_ordering} %description relaysrv Syncthing requires relay servers for NAT traversal. This package @@ -95,8 +97,10 @@ install -Dpm 0644 %{name}.firewall \ %pre relaysrv %service_add_pre strelaysrv.service -/usr/sbin/groupadd -r strelaysrv &>/dev/null ||: -/usr/sbin/useradd -g strelaysrv -s /bin/false -r -c "User for syncthing relay server" -d /var/lib/strelaysrv strelaysrv &>/dev/null ||: +getent group strelaysrv >/dev/null || /usr/sbin/groupadd -r strelaysrv +getent passwd strelaysrv >/dev/null || \ + /usr/sbin/useradd -g strelaysrv -s /bin/false -r \ + -c "User for syncthing relay server" -d /var/lib/strelaysrv strelaysrv %post %service_add_post %{name}-resume.service