From eb8d71641fadf9242033cc650a9e70406aa9ba239ecc2024c720d05ad4eb464e Mon Sep 17 00:00:00 2001 From: Marius Kittler Date: Sat, 29 May 2021 15:57:46 +0000 Subject: [PATCH] Accepting request 896096 from home:fniepelt The unit file for the strelaysrv references "syncthing-relaysrv" at a few points which makes the service not possible to start because opensuse uses "strelaysrv" for the user and group name and paths. This change adjusts the EnvironmentFile, User, Group and ReadWritePaths option in the unit file for the strelaysrv. OBS-URL: https://build.opensuse.org/request/show/896096 OBS-URL: https://build.opensuse.org/package/show/network/syncthing?expand=0&rev=216 --- syncthing.changes | 5 +++++ syncthing.spec | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/syncthing.changes b/syncthing.changes index 7a0a5a6..37ba1c3 100644 --- a/syncthing.changes +++ b/syncthing.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat May 29 12:40:56 UTC 2021 - Fabian Niepelt + +- Fix User, Group, EnvironmentFile and ReadWritePaths in systemd.service unit + ------------------------------------------------------------------- Fri May 14 08:02:12 UTC 2021 - Andreas Stieger diff --git a/syncthing.spec b/syncthing.spec index d90f2f2..2de8b36 100644 --- a/syncthing.spec +++ b/syncthing.spec @@ -81,6 +81,14 @@ sed -i '/Service\]/a EnvironmentFile=-\/etc\/default/strelaysrv' \ %{buildroot}%{_unitdir}/strelaysrv.service sed -i 's,^ExecStart=.*,ExecStart=/usr/bin/strelaysrv $OPTIONS,' \ %{buildroot}%{_unitdir}/strelaysrv.service +sed -i 's,EnvironmentFile=/etc/default/syncthing-relaysrv,EnvironmentFile=-/etc/default/syncthing-relaysrv,' \ + %{buildroot}%{_unitdir}/strelaysrv.service +sed -i 's/^User=.*/User=strelaysrv/' \ + %{buildroot}%{_unitdir}/strelaysrv.service +sed -i 's/^Group=.*/Group=strelaysrv/' \ + %{buildroot}%{_unitdir}/strelaysrv.service +sed -i 's,^ReadWritePaths=.*,ReadWritePaths=/var/lib/strelaysrv,' \ + %{buildroot}%{_unitdir}/strelaysrv.service install -Dpm 0644 etc/linux-systemd/system/%{name}@.service \ %{buildroot}%{_unitdir}/%{name}@.service install -Dpm 0644 etc/linux-systemd/system/%{name}-resume.service \