SHA256
1
0
forked from pool/syncthing

Remove resume service as it was removed upstream

OBS-URL: https://build.opensuse.org/package/show/network/syncthing?expand=0&rev=309
This commit is contained in:
Marius Kittler 2024-08-06 08:31:42 +00:00 committed by Git OBS Bridge
parent a274e8da32
commit 4f2c09b4a3
3 changed files with 3 additions and 31 deletions

View File

@ -1,22 +0,0 @@
Index: syncthing/etc/linux-systemd/system/syncthing-resume.service
===================================================================
--- syncthing.orig/etc/linux-systemd/system/syncthing-resume.service
+++ syncthing/etc/linux-systemd/system/syncthing-resume.service
@@ -4,6 +4,17 @@ Documentation=man:syncthing(1)
After=sleep.target
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+PrivateDevices=true
+ProtectHostname=true
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
Type=oneshot
ExecStart=-/usr/bin/pkill -HUP -x syncthing

View File

@ -5,6 +5,7 @@ Tue Aug 6 08:22:39 UTC 2024 - Marius Kittler <marius.kittler@suse.com>
* Bugfixes: * Bugfixes:
#9455: lib/api tests unreliable, failing ~50% of the time on Fedora Linux #9455: lib/api tests unreliable, failing ~50% of the time on Fedora Linux
#9499: Data race in fakeFS (testing) #9499: Data race in fakeFS (testing)
* Remove resume service as it was removed upstream
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 2 11:45:07 UTC 2024 - Marius Kittler <marius.kittler@suse.com> Tue Jul 2 11:45:07 UTC 2024 - Marius Kittler <marius.kittler@suse.com>

View File

@ -28,8 +28,7 @@ Source1: https://github.com/%{name}/%{name}/releases/download/v%{version}
Source2: %{name}.keyring Source2: %{name}.keyring
Source3: %{name}-relaysrv-user.conf Source3: %{name}-relaysrv-user.conf
Patch0: harden_strelaysrv.service.patch Patch0: harden_strelaysrv.service.patch
Patch1: harden_syncthing-resume.service.patch Patch1: harden_syncthing@.service.patch
Patch2: harden_syncthing@.service.patch
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
BuildRequires: sysuser-tools BuildRequires: sysuser-tools
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
@ -101,8 +100,6 @@ sed -i 's,^ReadWritePaths=.*,ReadWritePaths=/var/lib/syncthing-relaysrv,' \
%{buildroot}%{_unitdir}/strelaysrv.service %{buildroot}%{_unitdir}/strelaysrv.service
install -Dpm 0644 etc/linux-systemd/system/%{name}@.service \ install -Dpm 0644 etc/linux-systemd/system/%{name}@.service \
%{buildroot}%{_unitdir}/%{name}@.service %{buildroot}%{_unitdir}/%{name}@.service
install -Dpm 0644 etc/linux-systemd/system/%{name}-resume.service \
%{buildroot}%{_unitdir}/%{name}-resume.service
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300 %if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
install -Dpm 0644 etc/linux-systemd/user/%{name}.service \ install -Dpm 0644 etc/linux-systemd/user/%{name}.service \
%{buildroot}%{_userunitdir}/%{name}.service %{buildroot}%{_userunitdir}/%{name}.service
@ -112,13 +109,11 @@ install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}-relaysrv.conf
%suse_update_desktop_file -i "syncthing-ui" %suse_update_desktop_file -i "syncthing-ui"
%pre %pre
%service_add_pre %{name}-resume.service
%pre relaysrv -f %{name}-strelaysrv.pre %pre relaysrv -f %{name}-strelaysrv.pre
%service_add_pre strelaysrv.service %service_add_pre strelaysrv.service
%post %post
%service_add_post %{name}-resume.service
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300 %if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
%systemd_user_post %{name}.service %systemd_user_post %{name}.service
%endif %endif
@ -127,7 +122,7 @@ install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}-relaysrv.conf
%service_add_post strelaysrv.service %service_add_post strelaysrv.service
%preun %preun
%service_del_preun %{name}@.service %{name}-resume.service %service_del_preun %{name}@.service
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300 %if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
%systemd_user_preun %{name}.service %systemd_user_preun %{name}.service
%endif %endif
@ -136,7 +131,6 @@ install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}-relaysrv.conf
%service_del_preun strelaysrv.service %service_del_preun strelaysrv.service
%postun %postun
%service_del_postun %{name}-resume.service
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300 %if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
%systemd_user_postun %{name}.service %systemd_user_postun %{name}.service
%endif %endif
@ -150,7 +144,6 @@ install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}-relaysrv.conf
%{_bindir}/%{name} %{_bindir}/%{name}
%{_datadir}/applications/syncthing-ui.desktop %{_datadir}/applications/syncthing-ui.desktop
%{_unitdir}/%{name}@.service %{_unitdir}/%{name}@.service
%{_unitdir}/%{name}-resume.service
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300 %if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
%{_userunitdir}/%{name}.service %{_userunitdir}/%{name}.service
%endif %endif