pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/syncthing



Module Name:    pkgsrc
Committed By:   gdt
Date:           Thu Aug  4 19:28:03 UTC 2016

Modified Files:
        pkgsrc/net/syncthing: Makefile distinfo

Log Message:
Update to 0.14.3 and rearrange GOPATH and build layout

Update to 0.14.3; this is a new major version with an incompatible
protocol.  It has been tested with syncthing-android 0.8.1.

Redo build layout, so that the sources are placed at the path
recommended by upstream.  Reduce the number of symlinks used to get go
building to work.

Upstream changes:

v0.14.3: 3 bugfixes
v0.14.2: 1 bugfix
v0.14.1: 1 bugfix and
  This release includes "delta indexes", a backwards compatible protocol
  enhancement. Prior to delta indexes being implemented, full index
  information was exchanged at every connection start. With delta
  indexes, only index information that has changed since last contact is
  transferred. Delta indexes are enabled automatically between 0.14.1+
  devices.
v0.14.0: many bugfixes and
  This is a new major release, incompatible with Syncthing v0.13 and
  earlier.  This release introduces a new, extensible sync protocol
  and corresponding changes to local discovery and the database.  The
  sync protocol, local discovery protocol and database format is now
  based on protocol buffers.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 pkgsrc/net/syncthing/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/net/syncthing/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/syncthing/Makefile
diff -u pkgsrc/net/syncthing/Makefile:1.23 pkgsrc/net/syncthing/Makefile:1.24
--- pkgsrc/net/syncthing/Makefile:1.23  Mon Jul  4 13:43:22 2016
+++ pkgsrc/net/syncthing/Makefile       Thu Aug  4 19:28:03 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2016/07/04 13:43:22 abs Exp $
+# $NetBSD: Makefile,v 1.24 2016/08/04 19:28:03 gdt Exp $
 
 # Upstream regularly breaks protocol compatibility.  While users of
 # pkgsrc syncthing on multiple systems can update synchronously, an
@@ -13,7 +13,7 @@
 # Note that the android versioning is disconnected from syncthing versioning;
 # see https://github.com/syncthing/syncthing-android/issues/652 for
 # a fuller explanation.
-DISTNAME=      syncthing-0.13.10
+DISTNAME=      syncthing-0.14.3
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=syncthing/}
 
@@ -36,8 +36,31 @@ NO_CONFIGURE=                yes
 
 INSTALLATION_DIRS=     bin
 
-MAKE_ENV+=             GOPATH=${WRKDIR}/gopath
-INSTALL_UNSTRIPPED=    yes     # XXX for Mac OS?
+# Go has very strong notions of how building is supposed to work, and
+# paths.  Until 0.14, syncthing had symlink workarounds to have
+# sources be found via a gopath directory.  Then, building failed
+# because the sources are not a subdirectory of a component of GOPATH..
+# See the following discussion for some hints.
+# http://stackoverflow.com/questions/18149601/go-install-always-fails-no-install-directory-outside-gopath#18164310
+
+# Upstream's build instructions say to place tarball contents under a
+# particular named subdirectory of gopath:
+# https://docs.syncthing.net/dev/building.html
+# We attempt to follow their instructions as closely as possible.
+
+# We set up a gopath directory, and a directory where we will place
+# the tarball contents.  We use the non-standard variable name
+# WRKPLACE so that we can let WRKSRC refer to where pkgsrc naturally
+# unpacked the tarball.
+GOPATH=                        ${WRKDIR}/gopath
+WRKPLACEP=             ${GOPATH}/src/github.com/syncthing
+WRKPLACE=              ${WRKPLACEP}/syncthing
+
+MAKE_ENV+=             GOPATH=${GOPATH}
+
+# This used to be set; there seems to be no reason any longer.  To be
+# pruned on 2016-11-04.
+# INSTALL_UNSTRIPPED= yes
 
 SUBST_CLASSES+=                version
 SUBST_STAGE.version=   pre-build
@@ -46,19 +69,20 @@ SUBST_FILES.version=        build.go
 SUBST_SED.version=     -e 's|runError("git", "describe", "--always", "--dirty")|runError("echo","v${PKGVERSION_NOREV}")|'
 SUBST_SED.version+=    -e 's|runError("git", "show", "-s", "--format=%ct")|runError("false")|'
 
-# The following is more complicated than the build documenation says,
-# but appears necessary to link in both syncthing sources and the
-# included sources.
+# Create WRKPLACE's parent, but not WRKPLACE.  Move the contents of
+# the distribution tarball to the directory name desired by upstream's
+# build instructions.  Make a symlink so that the rest of the pkgsrc
+# machinery that expects ${WRKSRC} to contain the tarball contents
+# works.
 post-extract:
-       ${MKDIR} ${WRKDIR}/gopath/src/github.com/syncthing
-       ${MKDIR} ${WRKDIR}/gopath/src/golang.org
-       ${LN} -s ${WRKSRC} ${WRKDIR}/gopath/src/github.com/syncthing/syncthing
-       ${LN} -s ${WRKSRC}/vendor/github.com/* ${WRKDIR}/gopath/src/github.com
-       ${LN} -s ${WRKSRC}/vendor/golang.org/* ${WRKDIR}/gopath/src/golang.org
+       ${MKDIR} ${GOPATH}/src/github.com/syncthing/
+       ${MV} ${WRKSRC} ${WRKPLACE}
+       ${LN} -s ${WRKPLACE} ${WRKSRC}
 
 do-build:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/go run build.go
 
+# Binaries other than syncthing proper should perhaps be installed.
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/bin/syncthing ${DESTDIR}/${PREFIX}/bin
 

Index: pkgsrc/net/syncthing/distinfo
diff -u pkgsrc/net/syncthing/distinfo:1.19 pkgsrc/net/syncthing/distinfo:1.20
--- pkgsrc/net/syncthing/distinfo:1.19  Mon Jul  4 13:43:22 2016
+++ pkgsrc/net/syncthing/distinfo       Thu Aug  4 19:28:03 2016
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.19 2016/07/04 13:43:22 abs Exp $
+$NetBSD: distinfo,v 1.20 2016/08/04 19:28:03 gdt Exp $
 
-SHA1 (syncthing-0.13.10.tar.gz) = 66326e97d6d955588f97ad04d828c34bf02e1597
-RMD160 (syncthing-0.13.10.tar.gz) = a8aa1b2937133eec0469336be520a885f226a442
-SHA512 (syncthing-0.13.10.tar.gz) = 199c38644a7e5d43777ca2e497d5304d8e77485d21aeed9a00efc74dd98bfb0c473dd0bf3230b8e1e9742315915419f198bb8d0a9b294d2f6fe918b6e0175812
-Size (syncthing-0.13.10.tar.gz) = 4292039 bytes
+SHA1 (syncthing-0.14.3.tar.gz) = 2415491dc0b91c080276e6a26fe4936a377dd91e
+RMD160 (syncthing-0.14.3.tar.gz) = 696826bc06959e47d9af091acf521cc43ba33f93
+SHA512 (syncthing-0.14.3.tar.gz) = f9586013253ad031e1940e73f01f8ca398820e9ffeef0978fcd51079c535c04957c0be1314ecc635251ae06300c6b4141077ac5c3c8e7e9741d58e4545a7f3ba
+Size (syncthing-0.14.3.tar.gz) = 6380761 bytes
 SHA1 (patch-lib_config_optionsconfiguration.go) = 341c1c032c9551e17c86a6fb5d3552b1d79041c8



Home | Main Index | Thread Index | Old Index