[packages/syncthing] Up to 2.1.6

arekm arekm at pld-linux.org
Tue Oct 20 22:37:14 CEST 2026


commit 875c6e1a032318368ae9e40dbcb5dde351730d1f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Oct 20 22:36:43 2026 +0200

    Up to 2.1.6

 syncthing.spec | 48 +++++++++++++++++++++++++++---------------------
 1 file changed, 27 insertions(+), 21 deletions(-)
---
diff --git a/syncthing.spec b/syncthing.spec
index 9eba560..c8f9253 100644
--- a/syncthing.spec
+++ b/syncthing.spec
@@ -1,11 +1,10 @@
 #
 # Conditional build:
-%bcond_with	tests		# build with tests
-%bcond_without	tests		# build without tests
+%bcond_without	tests		# upstream test suite
 
 Summary:	Open Source Continuous File Synchronization
 Name:		syncthing
-Version:	1.21.0
+Version:	2.1.6
 Release:	1
 # syncthing (MPLv2.0) bundles
 # - angular, bootstrap, daterangepicker, fancytree, jQuery, moment (MIT),
@@ -16,16 +15,17 @@ Group:		Applications/Networking
 # Use official release tarball (contains vendored dependencies)
 # https://github.com/syncthing/syncthing/releases/
 Source0:	https://github.com/syncthing/syncthing/releases/download/v%{version}/%{name}-source-v%{version}.tar.gz
-# Source0-md5:	4cec3f1ff8da9d62c8918aca70bc9ff3
+# Source0-md5:	e617c921f026ab2028415d3a6822eae5
 URL:		https://syncthing.net/
-BuildRequires:	golang >= 1.14
-ExclusiveArch:	%{ix86} %{x8664} %{arm} aarch64 mips64 mips64le ppc64 ppc64le s390x
+# go.mod requires Go 1.26.2
+BuildRequires:	golang >= 1.26.2
+BuildRequires:	rpmbuild(macros) >= 2.009
+# SQLite support comes from modernc.org/libc, which supports neither
+# big-endian ppc64 nor the mips family
+ExclusiveArch:	%{ix86} %{x8664} %{armv5} %{armv6} %{armv7} aarch64 ppc64le riscv64 s390x
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_enable_debug_packages 0
-%define		gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
-%define		gopath		%{_libdir}/golang
-%define		import_path	github.com/syncthing/syncthing
+%undefine	_debugsource_packages
 
 %description
 Syncthing replaces proprietary sync and cloud services with something
@@ -34,25 +34,31 @@ you deserve to choose where it is stored, if it is shared with some
 third party and how it's transmitted over the Internet.
 
 %prep
-%setup -qc
-
-install -d build/src/$(dirname %{import_path})
-mv %{name}/{AUTHORS,*.md} .
-mv %{name} build/src/%{import_path}
+%setup -q -n %{name}
 
 %build
-export GOPATH=$(pwd)/build
-cd build/src/%{import_path}
+%{__mkdir_p} .go-cache
+
+# -no-upgrade: syncthing is updated from packages, not by itself
+%__go run -mod=vendor build.go -no-upgrade -version "v%{version}" build
 
-go run build.go -version "v%{version}" -no-upgrade build
-go run build.go -version "v%{version}" -no-upgrade install
+%if %{with tests}
+# upstream's build.go caps the tests at 120 s, which a cold, parallel
+# build host overruns
+%ifarch %{x8664}
+%__go test -mod=vendor -race -short -timeout 600s \
+	./internal/... ./lib/... ./cmd/...
+%else
+%__go test -mod=vendor -short -timeout 600s \
+	./internal/... ./lib/... ./cmd/...
+%endif
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man{1,5,7}}
 
-cd build/src/%{import_path}
-install -p bin/* $RPM_BUILD_ROOT%{_bindir}
+install -p syncthing $RPM_BUILD_ROOT%{_bindir}
 cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
 cp -p man/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
 cp -p man/*.7 $RPM_BUILD_ROOT%{_mandir}/man7
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/syncthing.git/commitdiff/875c6e1a032318368ae9e40dbcb5dde351730d1f



More information about the pld-cvs-commit mailing list