From 7c9edb38c7b52cbc29b8bbe7aa88da8e1cf3acf5c1e7917589ff24ec2b390955 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Mon, 18 Mar 2019 18:17:15 +0000 Subject: [PATCH] Accepting request 686183 from home:jengelh:branches:network - Do not hide errors from useradd. - Add %systemd_ordering for %service_*. OBS-URL: https://build.opensuse.org/request/show/686183 OBS-URL: https://build.opensuse.org/package/show/network/syncthing?expand=0&rev=160 --- syncthing.changes | 6 ++++++ syncthing.spec | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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