Commit f2f59860 authored by Carlo Landmeter's avatar Carlo Landmeter
Browse files

community/syncthing: upgrade to 0.14.35

* do not fetch whole sha256-simd tarball but just patch it (even if s390x is disabled).
* enable strip again: https://dominik.honnef.co/posts/2016/10/go-and-strip.
* update initd to support multiple instances and add logging.
* fix build by removing symlink project in builddir and just copy it.
parent e512d8df
......@@ -3,7 +3,7 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=syncthing
pkgver=0.14.30
pkgver=0.14.35
pkgrel=0
pkgdesc="Open Source Continuous File Synchronization"
url="http://syncthing.net/"
......@@ -14,37 +14,31 @@ pkggroups="$pkgname"
makedepends="go"
install="$pkgname.pre-install"
subpackages="$pkgname-utils"
options="!strip"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
sha256-simd-f3ec2e4d36d43c3a899ed4b7d9f62188edcf5afd.tar.gz::https://github.com/minio/sha256-simd/archive/f3ec2e4d36d43c3a899ed4b7d9f62188edcf5afd.tar.gz
$pkgname.confd
$pkgname.initd
only-test-with-race-when-provided.patch"
only-test-with-race-when-provided.patch
enable-generic-build-on-s390x.patch
"
builddir="$srcdir/src/github.com/$pkgname/$pkgname"
export GOPATH="$srcdir"
prepare() {
mkdir -p $(dirname "$builddir")
ln -s "$srcdir"/$pkgname-$pkgver "$builddir"
# update vendored sha256-simd dependency, remove when upstream
# dependency manifest is updated
rm -r "$builddir"/vendor/github.com/minio/sha256-simd
ln -s "$srcdir"/sha256-simd-* "$builddir"/vendor/github.com/minio/sha256-simd
default_prepare
mkdir -p ${builddir%/*}
mv "$srcdir"/$pkgname-$pkgver "$builddir"/
cd "$builddir"
default_prepare
}
build() {
cd "$builddir"
# recent syncthing tarballs have all deps in vendor dir
# no need to use a go dep tool like glide/godep
export GOPATH="$srcdir"
go run build.go -no-upgrade -version=v$pkgver
}
check() {
cd "$builddir"
export GOPATH="$srcdir"
go run build.go -no-upgrade test
}
......@@ -52,7 +46,6 @@ package() {
install -d -o $pkgname -g $pkgname "$pkgdir"/var/lib/$pkgname
install -D -m755 $builddir/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}
utils() {
......@@ -64,8 +57,7 @@ utils() {
done
}
sha512sums="fd2745595657f27f1ad157b685374b8671694ff9ab47a94e9c613aa1662146db78c31d93abf35b8c336948affb3dd2e3d54184b41996bfab9db204f380a6a3f0 syncthing-0.14.30.tar.gz
af88185d41e922c8c503fa5f2023f6bcdfa0ea59da9e7d67a746b14eb6c1635544abd430e09c3de2a5d5663ff22b27a0f13d61f3142261fc6e91652590c9d78a sha256-simd-f3ec2e4d36d43c3a899ed4b7d9f62188edcf5afd.tar.gz
b19cc3d802caa33f4d06852de590d2d984c12cf27d0540162cd7195da4f3f149c83c72e7a10f385b32b27fff6f39d33698e7402442a3f32a9da136c5d19059ae syncthing.confd
21fa7b0090e579ad0f02bb8cc9a78736eb99811613823bf12d477262da2281543d07b47ae0888e2e3876a687bf4cab3c89405447373a9c5ab2915989c5f9dce8 syncthing.initd
3fd2b699e07891ae16c67af56d516ba0fde13d5e5d067dd680fc59f9fc5b2f7c5f685b040841588cca6de1f7fb4b094572e5eb73dda8ab30d4b2994d3f526047 only-test-with-race-when-provided.patch"
sha512sums="2a3de76e7118be6e91b8bc6bc69b10e250755836b378fa762e0feaed280bb2206d2e4552f09fd230d51e246633108fd8cff343ac355742ebb1bd06c2145fe086 syncthing-0.14.35.tar.gz
7fe49210180827c28f3ee9a1a95da3884dbef34de9bdc643f4455c9a056adba81f16c1c6ac059e83bee360aea091ace98b8a6f4c4b26a32c450f61f15206d3f5 syncthing.initd
3fd2b699e07891ae16c67af56d516ba0fde13d5e5d067dd680fc59f9fc5b2f7c5f685b040841588cca6de1f7fb4b094572e5eb73dda8ab30d4b2994d3f526047 only-test-with-race-when-provided.patch
5dec62fc0555e298a1be4aede02dde3b407e8d4adbddc5d82d6dcd2f761f3b3eed7b71de51ab08efd185b84c9706fdb9e26a1086474623eb52b344cc793cf876 enable-generic-build-on-s390x.patch"
From c1b8c15f920f33755fece096e71338332bdef820 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Mon, 24 Apr 2017 14:08:56 +0200
Subject: [PATCH] enable generic build on s390x
---
cpuid_other.go | 2 +-
sha256block_other.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpuid_other.go b/cpuid_other.go
index 203588c..e26952a 100644
--- a/vendor/github.com/minio/sha256-simd/cpuid_other.go
+++ b/vendor/github.com/minio/sha256-simd/cpuid_other.go
@@ -13,7 +13,7 @@
// limitations under the License.
//
-// +build ppc64 ppc64le mips mipsle mips64 mips64le
+// +build ppc64 ppc64le mips mipsle mips64 mips64le s390x
package sha256
diff --git a/sha256block_other.go b/sha256block_other.go
index 00a3488..38e7403 100644
--- a/vendor/github.com/minio/sha256-simd/sha256block_other.go
+++ b/vendor/github.com/minio/sha256-simd/sha256block_other.go
@@ -13,7 +13,7 @@
// limitations under the License.
//
-// +build ppc64 ppc64le mips mipsle mips64 mips64le
+// +build ppc64 ppc64le mips mipsle mips64 mips64le s390x
package sha256
#!/sbin/openrc-run
name=syncthing
command=/usr/bin/$name
command_args=$syncthing_args
start_stop_daemon_args="--background --user $name --group $name"
name=$RC_SVCNAME
command=/usr/bin/syncthing
command_args="${SYNCTHING_ARGS:--no-browser}"
command_user="${SYNCTHING_USER:-syncthing}"
pidfile=/run/${RC_SVCNAME}.pid
command_background=yes
start_stop_daemon_args="--stdout /var/log/$RC_SVCNAME/${RC_SVCNAME}.log --stderr /var/log/$RC_SVCNAME/${RC_SVCNAME}.log"
depend() {
use logger dns
need net
after firewall
use logger dns
need net
after firewall
}
start_pre() {
checkpath --directory --owner $command_user --mode 0775 \
/var/log/$RC_SVCNAME
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment