Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2014 17:39:30 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r364859 - in head: . net net/syncthing net/syncthing/files
Message-ID:  <201408141739.s7EHdUCZ010719@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Thu Aug 14 17:39:29 2014
New Revision: 364859
URL: http://svnweb.freebsd.org/changeset/ports/364859
QAT: https://qat.redports.org/buildarchive/r364859/

Log:
  net/syncthing: add port for syncthing
  
  Syncthing replaces proprietary sync and cloud services with something open,
  trustworthy and decentralized.
  
  WWW: http://syncthing.net/

Added:
  head/net/syncthing/
  head/net/syncthing/Makefile   (contents, props changed)
  head/net/syncthing/distinfo   (contents, props changed)
  head/net/syncthing/files/
  head/net/syncthing/files/patch-build.sh   (contents, props changed)
  head/net/syncthing/files/patch-upgrade__upgrade_supported.go   (contents, props changed)
  head/net/syncthing/files/syncthing.in   (contents, props changed)
  head/net/syncthing/pkg-descr   (contents, props changed)
Modified:
  head/GIDs
  head/UIDs
  head/net/Makefile

Modified: head/GIDs
==============================================================================
--- head/GIDs	Thu Aug 14 17:19:59 2014	(r364858)
+++ head/GIDs	Thu Aug 14 17:39:29 2014	(r364859)
@@ -289,5 +289,6 @@ ums:*:979:
 hbase:*:980:
 uvncrep:*:981:
 bro:*:982:
+syncthing:*:983:
 nogroup:*:65533:
 nobody:*:65534:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Thu Aug 14 17:19:59 2014	(r364858)
+++ head/UIDs	Thu Aug 14 17:39:29 2014	(r364859)
@@ -295,4 +295,5 @@ ums:*:979:979::0:0:Universal Media Serve
 hbase:*:980:980::0:0:HBase user:/nonexistent:/usr/sbin/nologin
 uvncrep:*:981:981::0:0:UltraVNC Repeater daemon:/nonexistent:/usr/sbin/nologin
 bro:*:982:982::0:0:Bro Network Security Monitor:/nonexistent:/usr/sbin/nologin
+syncthing:*:983:983::0:0:Syncthing Daemon:/var/tmp/syncthing:/usr/sbin/nologin
 nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin

Modified: head/net/Makefile
==============================================================================
--- head/net/Makefile	Thu Aug 14 17:19:59 2014	(r364858)
+++ head/net/Makefile	Thu Aug 14 17:39:29 2014	(r364859)
@@ -1150,6 +1150,7 @@
     SUBDIR += suckblow
     SUBDIR += sup
     SUBDIR += svnup
+    SUBDIR += syncthing
     SUBDIR += tableutil
     SUBDIR += tac_plus-libradius
     SUBDIR += tac_plus4

Added: head/net/syncthing/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/syncthing/Makefile	Thu Aug 14 17:39:29 2014	(r364859)
@@ -0,0 +1,77 @@
+# Created by: Steve Wills <swills@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	syncthing
+PORTVERSION=	0.9.4
+CATEGORIES=	net
+MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/archive/v${PORTVERSION}.tar.gz?dummy=/:group1 \
+		https://bitbucket.org/kardianos/osext/get/:group2 \
+		https://crypto.go.googlecode.com/archive/:group3 \
+		https://text.go.googlecode.com/archive/:group4 \
+		https://snappy-go.googlecode.com/archive/:group5 \
+		https://codeload.github.com/bkaradzic/go-lz4/legacy.tar.gz/77e2ba8?dummy=/:group6 \
+		https://codeload.github.com/calmh/xdr/legacy.tar.gz/e1714bb?dummy=/:group7 \
+		https://codeload.github.com/juju/ratelimit/legacy.tar.gz/f9f36d1?dummy=/:group8 \
+		https://codeload.github.com/syndtr/goleveldb/legacy.tar.gz/2b4cbca?dummy=/:group9 \
+		https://codeload.github.com/vitrun/qart/legacy.tar.gz/ccb109c?dummy=/:group10
+DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:group1 \
+		5d3ddcf53a50${EXTRACT_SUFX}:group2 \
+		f3cebac2bd11c2bf03c15bfa4c66688ad02a0a40${EXTRACT_SUFX}:group3 \
+		d65bffbc88a153d23a6d2a864531e6e7c2cde59b${EXTRACT_SUFX}:group4 \
+		12e4b4183793ac4b061921e7980845e750679fd0${EXTRACT_SUFX}:group5 \
+		bkaradzic-go-lz4-77e2ba8${EXTRACT_SUFX}:group6 \
+		calmh-xdr-e1714bb${EXTRACT_SUFX}:group7 \
+		juju-ratelimit-f9f36d1${EXTACT_SUFX}:group8 \
+		syndtr-goleveldb-2b4cbca${EXTRACT_SUFX}:group9 \
+		vitrun-qart-ccb109c${EXTRACT_SUFX}:group10
+
+MAINTAINER=	swills@FreeBSD.org
+COMMENT=	Encrypted file sync tool
+
+BUILD_DEPENDS=	${LOCALBASE}/bin/go:${PORTSDIR}/lang/go \
+		bash:${PORTSDIR}/shells/bash
+
+USE_RC_SUBR=	syncthing
+PLIST_FILES=	bin/syncthing bin/stindex bin/stevents
+PORTDOCS=	*
+
+USERS=		syncthing
+GROUPS=		syncthing
+
+post-patch:
+	${REINPLACE_CMD} -e 's|%%PORTVERSION%%|${PORTVERSION}|g' ${WRKSRC}/build.sh
+	cd ${WRKSRC} ; \
+		${MKDIR} src/code.google.com/p \
+			src/bitbucket.org/kardianos \
+			src/github.com/bkaradzic \
+			src/github.com/calmh \
+			src/github.com/juju \
+			src/github.com/syndtr \
+			src/github.com/vitrun \
+			src/github.com/syncthing/syncthing ; \
+		${MV} ${WRKDIR}/kardianos-osext-5d3ddcf53a50 ${WRKSRC}/src/bitbucket.org/kardianos/osext ; \
+		${MV} ${WRKDIR}/crypto.go-f3cebac2bd11/ src/code.google.com/p/go.crypto ; \
+		${MV} ${WRKDIR}/snappy-go-12e4b4183793 src/code.google.com/p/snappy-go ; \
+		${MV} ${WRKDIR}/text.go-d65bffbc88a1 src/code.google.com/p/go.text ; \
+		${MV} ${WRKDIR}/bkaradzic-go-lz4-77e2ba8 src/github.com/bkaradzic/go-lz4 ; \
+		${MV} ${WRKDIR}/calmh-xdr-e1714bb src/github.com/calmh/xdr ; \
+		${MV} ${WRKDIR}/juju-ratelimit-f9f36d1 src/github.com/juju/ratelimit ; \
+		${MV} ${WRKDIR}/syndtr-goleveldb-2b4cbca src/github.com/syndtr/goleveldb ; \
+		${MV} ${WRKDIR}/vitrun-qart-ccb109c src/github.com/vitrun/qart ; \
+		${CP} -r lamport luhn beacon scanner versioner files \
+		protocol auto config discover events logger model osutil \
+		upgrade upnp src/github.com/syncthing/syncthing
+
+do-build:
+	cd ${WRKSRC} ; ${SETENV} GOPATH=${WRKSRC} bash ./build.sh
+
+do-install:
+.for x in stevents stindex syncthing
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/${x} ${STAGEDIR}${PREFIX}/bin
+.endfor
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for x in CONTRIBUTORS LICENSE README.md
+	${INSTALL_MAN} ${WRKSRC}/${x} ${STAGEDIR}${DOCSDIR}
+.endfor
+
+.include <bsd.port.mk>

Added: head/net/syncthing/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/syncthing/distinfo	Thu Aug 14 17:39:29 2014	(r364859)
@@ -0,0 +1,20 @@
+SHA256 (syncthing-0.9.4.tar.gz) = e1cfbc3055ca26662d9f3664bd236357f84f6523360cc2aa4c3e83fcd74fcfad
+SIZE (syncthing-0.9.4.tar.gz) = 1814400
+SHA256 (5d3ddcf53a50.tar.gz) = d39ed6aa63c76b62d6cd5850128f7205f0d983ffbb78f121afbd4a3c85937587
+SIZE (5d3ddcf53a50.tar.gz) = 3060
+SHA256 (f3cebac2bd11c2bf03c15bfa4c66688ad02a0a40.tar.gz) = 288fa9ba282c7f7bb9680a922063f08cc3924315baa0ca980b45877a00133b04
+SIZE (f3cebac2bd11c2bf03c15bfa4c66688ad02a0a40.tar.gz) = 326179
+SHA256 (d65bffbc88a153d23a6d2a864531e6e7c2cde59b.tar.gz) = 8cbaccd3eda3eb7d191839158cbcedaa03b3b5ffd10c4267adb990408114b397
+SIZE (d65bffbc88a153d23a6d2a864531e6e7c2cde59b.tar.gz) = 3238701
+SHA256 (12e4b4183793ac4b061921e7980845e750679fd0.tar.gz) = 9125379be11ac96241a5ad5801c81f27028b181c658ed42cfd385db04fcee6f2
+SIZE (12e4b4183793ac4b061921e7980845e750679fd0.tar.gz) = 7772
+SHA256 (bkaradzic-go-lz4-77e2ba8.tar.gz) = 8d6a3f73bb2e21a64292d14af1a8466707c14f71b70d48fde317746cd2ac8d0e
+SIZE (bkaradzic-go-lz4-77e2ba8.tar.gz) = 232876
+SHA256 (calmh-xdr-e1714bb.tar.gz) = 354133594fc70dac499a44ffd6d857f1f730345f8db3d07def4e38daec5ec791
+SIZE (calmh-xdr-e1714bb.tar.gz) = 9250
+SHA256 (juju-ratelimit-f9f36d1) = d2117682d9ef68764cfdd4de51b4d150cd2c6c0b6a9fcaa50d5891443b42285a
+SIZE (juju-ratelimit-f9f36d1) = 7382
+SHA256 (syndtr-goleveldb-2b4cbca.tar.gz) = aa0c0917c51de5fa5bf6bd7a2a410bdbc7f27d72146ffb2bf7376273c02275c5
+SIZE (syndtr-goleveldb-2b4cbca.tar.gz) = 106774
+SHA256 (vitrun-qart-ccb109c.tar.gz) = 6daeaea6334827e56daa82d601df9bca1bb48dd9b1deb2f8708ffb3867afd112
+SIZE (vitrun-qart-ccb109c.tar.gz) = 23243

Added: head/net/syncthing/files/patch-build.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/syncthing/files/patch-build.sh	Thu Aug 14 17:39:29 2014	(r364859)
@@ -0,0 +1,25 @@
+--- build.sh.orig	2014-08-12 22:35:37.000000000 +0000
++++ build.sh	2014-08-14 15:44:43.884147180 +0000
+@@ -5,11 +5,9 @@
+ 
+ distFiles=(README.md LICENSE CONTRIBUTORS) # apart from the binary itself
+ 
+-# replace "...-12-g123abc" with "...+12-g123abc" to remain semver compatible-ish
+-version=$(git describe --always --dirty)
+-version=$(echo "$version" | sed 's/-\([0-9]\{1,3\}-g[0-9a-f]\{5,10\}\)/+\1/')
++version=v%%PORTVERSION%%
+ 
+-date=$(git show -s --format=%ct)
++date=$(date +%Y%m%d%H%M%S)
+ user=$(whoami)
+ host=$(hostname)
+ host=${host%%.*}
+@@ -169,7 +167,7 @@
+ 	"")
+ 		shift
+ 		export GOBIN=$(pwd)/bin
+-		godep go install $* -ldflags "$ldflags" ./cmd/...
++		go install $* -ldflags "$ldflags" ./cmd/...
+ 		;;
+ 
+ 	clean)

Added: head/net/syncthing/files/patch-upgrade__upgrade_supported.go
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/syncthing/files/patch-upgrade__upgrade_supported.go	Thu Aug 14 17:39:29 2014	(r364859)
@@ -0,0 +1,10 @@
+--- ./upgrade/upgrade_supported.go.orig	2014-08-14 02:03:33.321542734 +0000
++++ ./upgrade/upgrade_supported.go	2014-08-14 02:03:37.807542195 +0000
+@@ -70,6 +70,7 @@
+ 
+ // Returns the latest release, including prereleases or not depending on the argument
+ func LatestRelease(prerelease bool) (Release, error) {
++	return Release{}, ErrVersionUnknown
+ 	resp, err := http.Get("https://api.github.com/repos/syncthing/syncthing/releases?per_page=10")
+ 	if err != nil {
+ 		return Release{}, err

Added: head/net/syncthing/files/syncthing.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/syncthing/files/syncthing.in	Thu Aug 14 17:39:29 2014	(r364859)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: syncthing
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# syncthing_enable (bool):	Set to NO by default.
+#				Set it to YES to enable syncthing.
+# syncthing_user (user):        Set user to run syncthing.
+#                               Default is "syncthing".
+# syncthing_group (group):      Set group to run syncthing.
+#                               Default is "syncthing".
+# syncthing_dir (dir):          Set dir to run syncthing in.
+#                               Default is "/var/tmp/syncthing".
+
+. /etc/rc.subr
+
+name=syncthing
+rcvar=syncthing_enable
+
+load_rc_config $name
+
+: ${syncthing_enable:="NO"}
+: ${syncthing_user:="syncthing"}
+: ${syncthing_group:="syncthing"}
+: ${syncthing_dir:="/var/tmp/syncthing"}
+
+export STNORESTART=true
+export HOME=${syncthing_dir} 
+
+pidfile=/var/run/syncthing.pid
+procname="%%PREFIX%%/bin/syncthing"
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} ${procname} -home=${syncthing_dir} -no-browser ${syncthing_flags}"
+
+start_precmd=syncthing_startprecmd
+
+syncthing_startprecmd()
+{
+        if [ ! -e ${pidfile} ]; then
+                install -o ${syncthing_user} -g ${syncthing_group} /dev/null ${pidfile};
+        fi
+
+        if [ ! -d ${syncthing_dir} ]; then
+                install -d -o ${syncthing_user} -g ${syncthing_group} ${syncthing_dir}
+        fi
+
+}
+
+run_rc_command "$1"

Added: head/net/syncthing/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/syncthing/pkg-descr	Thu Aug 14 17:39:29 2014	(r364859)
@@ -0,0 +1,6 @@
+Syncthing replaces proprietary sync and cloud services with something open,
+trustworthy and decentralized. Your data is your data alone and you deserve to
+choose where it is stored, if it is shared with some third party and how it's
+transmitted over the Internet.
+
+WWW: http://syncthing.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408141739.s7EHdUCZ010719>