From ec56178fa1a7b260afe3d818c6b14a432613ad44 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Thu, 18 May 2017 16:46:27 +0200 Subject: [PATCH] Bump to Syncthing 0.14.28 et Syncthing-Inotify master. --- Makefile | 3 ++- scripts/get-syncthing.sh | 30 +++++++----------------------- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 8295b4a..5f522fb 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,10 @@ VERSION := 0.0.1 # Syncthing version to install -SYNCTHING_VERSION = 0.14.27 +SYNCTHING_VERSION = 0.14.28 # FIXME: use patched version while waiting integration of #165 #SYNCTHING_INOTIFY_VERSION = 0.8.5 +SYNCTHING_INOTIFY_VERSION = master diff --git a/scripts/get-syncthing.sh b/scripts/get-syncthing.sh index 6eb9c5b..54ca7e1 100755 --- a/scripts/get-syncthing.sh +++ b/scripts/get-syncthing.sh @@ -1,11 +1,11 @@ #!/bin/bash # Configurable variables -[ -z "$SYNCTHING_VERSION" ] && SYNCTHING_VERSION=0.14.25 +[ -z "$SYNCTHING_VERSION" ] && SYNCTHING_VERSION=0.14.28 # FIXME: temporary HACK while waiting merge of #165 #[ -z "$SYNCTHING_INOTIFY_VERSION" ] && SYNCTHING_INOTIFY_VERSION=0.8.5 -[ -z "$SYNCTHING_INOTIFY_VERSION" ] && SYNCTHING_INOTIFY_VERSION=master_and_patch165 +[ -z "$SYNCTHING_INOTIFY_VERSION" ] && { SYNCTHING_INOTIFY_VERSION=master; SYNCTHING_INOTIFY_CMID=af6fbf9d63f95a0; } [ -z "$DESTDIR" ] && DESTDIR=/usr/local/bin [ -z "$TMPDIR" ] && TMPDIR=/tmp @@ -33,33 +33,17 @@ tarball="syncthing-linux-amd64-v${SYNCTHING_VERSION}.tar.gz" \ && tar -xvf "$tarball" --strip-components=1 "$(basename "$tarball" .tar.gz)"/syncthing \ && mv syncthing ${DESTDIR}/syncthing || exit 1 - echo "Get Syncthing-inotify..." -if [ "$SYNCTHING_INOTIFY_VERSION" = "master_and_patch165" ]; then +if [ "$SYNCTHING_INOTIFY_VERSION" = "master" ]; then mkdir -p ${TEMPDIR}/syncthing-inotify-build/src/github.com/syncthing || exit 1 cd ${TEMPDIR}/syncthing-inotify-build/src/github.com/syncthing git clone https://github.com/syncthing/syncthing || exit 1 git clone https://github.com/syncthing/syncthing-inotify || exit 1 cd syncthing-inotify - cat < 165.patch - diff --git a/syncwatcher.go b/syncwatcher.go -index c36b034..5175c12 100644 ---- a/syncwatcher.go -+++ b/syncwatcher.go -@@ -677,7 +677,10 @@ func accumulateChanges(debounceTimeout time.Duration, - if flushTimerNeedsReset { - flushTimerNeedsReset = false - if !flushTimer.Stop() { -- <-flushTimer.C -+ select { -+ case <-flushTimer.C: -+ default: -+ } - } - flushTimer.Reset(currInterval) - } -EOF - git apply 165.patch || exit 1 + if [ "$SYNCTHING_INOTIFY_CMID" != "" ]; then + git checkout -q $SYNCTHING_INOTIFY_CMID || exit 1 + fi + git status export GOPATH=$(realpath `pwd`/../../../..) version=$(git describe --tags --always | sed 's/^v//')__patch_165 go build -v -i -ldflags "-w -X main.Version=$version" -o ${DESTDIR}/syncthing-inotify || exit 1 -- 2.16.6