SHA256
1
0
forked from pool/syncthing

Update to v1.27.12

OBS-URL: https://build.opensuse.org/package/show/network/syncthing?expand=0&rev=314
This commit is contained in:
Marius Kittler 2024-09-06 09:15:48 +00:00 committed by Git OBS Bridge
commit 6c430ac2b3
16 changed files with 2837 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,20 @@
Index: syncthing/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service
===================================================================
--- syncthing.orig/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service
+++ syncthing/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service
@@ -17,6 +17,15 @@ NoNewPrivileges=true
PrivateTmp=true
PrivateDevices=true
ProtectHome=true
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
SystemCallArchitectures=native
MemoryDenyWriteExecute=true

View File

@ -0,0 +1,22 @@
Index: syncthing/etc/linux-systemd/system/syncthing@.service
===================================================================
--- syncthing.orig/etc/linux-systemd/system/syncthing@.service
+++ syncthing/etc/linux-systemd/system/syncthing@.service
@@ -16,6 +16,17 @@ RestartForceExitStatus=3 4
# Hardening
ProtectSystem=full
PrivateTmp=true
+# 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
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true

View File

@ -0,0 +1,3 @@
# Type Name ID GECOS Home directory Shell
u strelaysrv - "Syncthing Relay Server" /var/lib/syncthing-relaysrv -
m strelaysrv -

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d34ca078653ceb3c54d1475929dd1b19e0c2d6601ab6a7ffe48c88d79b90c4dc
size 15431543

View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEN8hFVOfgomHk924e0m5u0ABlSj4FAmaxwRgACgkQ0m5u0ABl
Sj7YOQgAov03nVdlcOuswm/6Qme4c8V5Suu9wqVUIFyuvgf41qO6WFTYipOMBgCC
DPE/MAuR6DcwGWVThHDu+SXqFUubDGQsCZygQ/HPWZXsG4G9VfrI+VlSGbnoiSpo
Ot09ZXFCV6APHcK9ukz4JgT1K/T9HLw8Yok1TwBdX1EgBIpAYSmpDDAoWlfKzZUw
Y00CaY/2NNvORuJ6/tdeumO0D8RTZmcHvBgS3KopJNlNJrmQNlNdOFrMN0g2s4k7
L7qDBu87XDqPcl3TYSLskpqN3oQJ0qUCYVTWo5J0E6syUbXkw11+l8fRK6fdHNUn
Djew+B5DrhmmLZesYEXobdk2cXf2yA==
=XF3B
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4678aef131f8df49708a73ed0effeb5642085cbdc08bdc29158ad50f6aece140
size 15559927

View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEN8hFVOfgomHk924e0m5u0ABlSj4FAmbWuQEACgkQ0m5u0ABl
Sj5sHwf+PaXSCFNnlYhUOfKPbtSp8RVfmTPGdf7xs+DbD4ug5B1fFGnnuWSiCEYF
9F7atEJlEtGAx/ZZsOOhxG7zEufwqo5ze+YEgf6qFmjf3PThSf/YCDGp45B8NiLn
G/oAzNUK+ALQkb6yqAJv279JBmfYQFRktBnpNFj9+1uvfqKGct18wWPARrBoKDdf
BmMJZiinglpyhFdJY5XL1uTfXfthIvr626lPJQhJ8wU70ELJ9+rXE4TJ2Kpsh6BM
8YLTieJ2aZpgu68PfrlgELTfsoF6+fkwWZAbe0SjtHKz73e12aE+z/7x0ZX/vnM3
+l832sXIZTpd8yY4oBESldzmH3A7nQ==
=JHM1
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5531f0e1bb81b824a2ab62f070e745c142e1328a15229de47b0cb596b5bae417
size 15553432

View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEN8hFVOfgomHk924e0m5u0ABlSj4FAmbar3AACgkQ0m5u0ABl
Sj5ZpQf/b8mRUmXKvClFzqFllNkpSxOL27irPY3gPvVbg3Sn+ruwCmB4l9y2qVo3
jZltVKs9csBlBC4GhwKe2Pg3EgqmG4jJ7lKFePCCTfZRBGheA9DgEeEUgL+HBJ6T
dacRB5/yk6+JgkCWLjYBFSS134VN31wYCDEJypDm0+OobC1Jw3OHoTf/+2dVD+fx
QmOAriGoN+VLkEJd21qU5/Jb/gYtv0S4NB5ug6FeLotSC9TS/9wb7RLbXi6Dnvyl
PMTRrqOAFY2ned+Q+gNGPBfHuz70OojlKlvs9s23sHn6dLGoQlEhzrGIEvFv9A3s
aGAje40ntgCeVvqjKasUuE2+IzM16Q==
=R8nG
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:82364794e5dfc912128dd47bd1da3304396bc8a0cae3d1fdb15d9a86a51085e9
size 15394317

View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEN8hFVOfgomHk924e0m5u0ABlSj4FAmaD3WIACgkQ0m5u0ABl
Sj5ErQgAmyCTWexSggGR0ZRtzlvY2Zni4eNwgjPHOfcmSy4f/LrieZTFtm4Nrch6
RI7KJ89SjWbXkDmjZFrTkGGUwVyzJ9V3vQ3wYWwBTMsi688P48J40cWwoZnkp1WR
ynbi4qzriXcxUU6tCB9QdTFpz8LRDic4Mpa/TrGz/RDyHVzqnZDUvlsf3Pu0rOIB
+cXaifY3ftMLYCAbDfd347DIpD+Cab4wi9PiaKGJpf8Nzq6HkThPtUxFxgTtELlW
GVfvuIRRGYC0CGAisDuoaT7vusqtYQEo0ukoanprOm0M1P87G6JARzqORxrIycsf
h6x/kECBP2vkKJwKuUSgXsOmVyZveQ==
=F4wT
-----END PGP SIGNATURE-----

2506
syncthing.changes Normal file

File diff suppressed because it is too large Load Diff

48
syncthing.keyring Normal file
View File

@ -0,0 +1,48 @@
pub rsa2048/00654A3E 2014-12-29 [SC]
Key fingerprint = 37C8 4554 E7E0 A261 E4F7 6E1E D26E 6ED0 0065 4A3E
uid [ unknown] Syncthing Release Management <release@syncthing.net>
sub rsa2048/F614F575 2014-12-29 [E]
sub rsa4096/37C86D31 2015-05-11 [S] [expires: 2025-05-08]
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFShF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tO+n+9tT5JWIqKoP4kWFUBHKT7RBI3ubFxwaGwV1IGpItvukOa4XbDAWR3Ya
TL+fbNhHegwae/3xX+T4+Ik40UnFtrJiHkbu3RmEzO38n5xJY+hG/lHQrsErQAUa
kEEm5vqw/veVl3L88VnOWHhD3GxvPvtuN/RTxmwhlQ9rte/G6U/R0HDYFqrHDAns
LlHRAP8U8Ozk3ll45SR12Zf2
=rVev
-----END PGP PUBLIC KEY BLOCK-----

158
syncthing.spec Normal file
View File

@ -0,0 +1,158 @@
#
# spec file for package syncthing
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: syncthing
Version: 1.27.12
Release: 0
Summary: Continuous File Synchronisation
License: MPL-2.0
Group: Productivity/Networking/File-Sharing
URL: https://syncthing.net/
Source: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-source-v%{version}.tar.gz
Source1: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-source-v%{version}.tar.gz.asc
Source2: %{name}.keyring
Source3: %{name}-relaysrv-user.conf
Patch0: harden_strelaysrv.service.patch
Patch1: harden_syncthing@.service.patch
BuildRequires: systemd-rpm-macros
BuildRequires: sysuser-tools
BuildRequires: update-desktop-files
BuildRequires: golang(API) >= 1.14
BuildRequires: pkgconfig(systemd)
%{?systemd_ordering}
%description
Syncthing is an application that synchronises files across multiple
devices. This means the creation, modification or deletion of files
on one machine will automatically be replicated to other devices.
%package relaysrv
Summary: Relay server for syncthing
Group: Productivity/Networking/File-Sharing
Requires(pre): pwdutils
%{?systemd_ordering}
%sysusers_requires
%description relaysrv
Syncthing requires relay servers for NAT traversal. This package
contains the necessary files for setting up a relay server, either
joined to the syncthing relay pool or private.
%prep
%autosetup -n %{name} -p1
%build
# move source archive which is extracted as "syncthing" to be "src/github.com/syncthing/syncthing"
pushd ..
install -d "src/github.com/syncthing/"
mv %{name} "src/github.com/syncthing/"%{name}
mkdir syncthing
cd "$PWD/src/github.com/syncthing/"%{name}
# set build environment, in particular use "-mod=vendor" to use the Go modules from the source archive's vendor dir
export BUILD_USER=abuild BUILD_HOST=openSUSE
export CGO_CPPFLAGS="${CPPFLAGS}" CGO_CFLAGS="${CFLAGS}" CGO_CXXFLAGS="${CXXFLAGS}" CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-trimpath -mod=vendor"
# build and install syncthing without automatic updates
go run build.go -no-upgrade -version v%{version} install
# build and install strelaysrv without automatic updates
go run build.go -no-upgrade -version v%{version} install strelaysrv
popd
%sysusers_generate_pre %{SOURCE3} %{name}-strelaysrv %{name}-strelaysrv-user.conf
%install
st_dir=$PWD
cd ../src/github.com/syncthing/%{name}
mv LICENSE AUTHORS CONDUCT.md CONTRIBUTING.md README.md "$st_dir"
install -Dpm 0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
install -Dpm 0755 bin/strelaysrv %{buildroot}%{_bindir}/strelaysrv
install -dm 0750 %{buildroot}/%{_localstatedir}/lib/syncthing-relaysrv
install -Dpm 0644 cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
%{buildroot}%{_unitdir}/strelaysrv.service
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/syncthing-relaysrv,' \
%{buildroot}%{_unitdir}/strelaysrv.service
install -Dpm 0644 etc/linux-systemd/system/%{name}@.service \
%{buildroot}%{_unitdir}/%{name}@.service
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
install -Dpm 0644 etc/linux-systemd/user/%{name}.service \
%{buildroot}%{_userunitdir}/%{name}.service
%endif
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}-relaysrv.conf
%suse_update_desktop_file -i "syncthing-ui"
%pre
%pre relaysrv -f %{name}-strelaysrv.pre
%service_add_pre strelaysrv.service
%post
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
%systemd_user_post %{name}.service
%endif
%post relaysrv
%service_add_post strelaysrv.service
%preun
%service_del_preun %{name}@.service
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
%systemd_user_preun %{name}.service
%endif
%preun relaysrv
%service_del_preun strelaysrv.service
%postun
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
%systemd_user_postun %{name}.service
%endif
%postun relaysrv
%service_del_postun strelaysrv.service
%files
%license LICENSE
%doc AUTHORS CONDUCT.md CONTRIBUTING.md README.md
%{_bindir}/%{name}
%{_datadir}/applications/syncthing-ui.desktop
%{_unitdir}/%{name}@.service
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} > 120300
%{_userunitdir}/%{name}.service
%endif
%files relaysrv
%license LICENSE
%{_bindir}/strelaysrv
%{_unitdir}/strelaysrv.service
%dir %attr(750,strelaysrv,strelaysrv) %{_localstatedir}/lib/syncthing-relaysrv
%{_sysusersdir}/%{name}-relaysrv.conf
%changelog