Re: NEW: net/syncthing

2016-04-19 Thread Adam Wolk
On Wed, 20 Apr 2016 01:34:31 +0200
"Dmitrij D. Czarkoff"  wrote:

> Edd Barrett said:
> > > portcheck hardcoded paths detected in pkg/README, consider using
> > > SUBST_VARS and TRUEPREFIX/LOCALBASE/LOCALSTATEDIR/VARBASE
> > > net/syncthing
> > > 
> > > not sure what portcheck hates here but it does. Maybe the /var
> > > paths?  
> > 
> > Yeah, I think it's /var, for which (AFAIK) there is no variable
> > for.  
> 
> We have two of them:  VARBASE and LOCALSTATEDIR.  Former may be used
> here.
> 
> Adam Wolk said:
> > The port uses GH_* variables with are not preferred when upstream
> > provides release tarballs and syncthing does. I have been dumb
> > enough to try and switch the port to use a normal MASTER_SITES. I'm
> > attaching a new port plus a diff so you can see the pain I went
> > through to get it working. It's far more uglier than GH_* vars but
> > not subject to tag sliding if upstream decides to move it.  
> 
> Well, I actually switched my initial port draft to GH_* variables
> because it made port much cleaner (easier to maintain).  Upstream does
> not seem to practice tag sliding.
> 

I agree that this port is much cleaner with GH_* vars and that
upstream seems sensible. Just to be clear - still OK awolk@ even when
using GH_* vars.

> > Are we converging on something importable?  
> 
> OK czarkoff@.
> 



Re: NEW: net/syncthing

2016-04-19 Thread Dmitrij D. Czarkoff
Edd Barrett said:
> > portcheck hardcoded paths detected in pkg/README, consider using
> > SUBST_VARS and TRUEPREFIX/LOCALBASE/LOCALSTATEDIR/VARBASE net/syncthing
> > 
> > not sure what portcheck hates here but it does. Maybe the /var paths?
> 
> Yeah, I think it's /var, for which (AFAIK) there is no variable for.

We have two of them:  VARBASE and LOCALSTATEDIR.  Former may be used
here.

Adam Wolk said:
> The port uses GH_* variables with are not preferred when upstream
> provides release tarballs and syncthing does. I have been dumb enough
> to try and switch the port to use a normal MASTER_SITES. I'm attaching
> a new port plus a diff so you can see the pain I went through to get it
> working. It's far more uglier than GH_* vars but not subject to tag
> sliding if upstream decides to move it.

Well, I actually switched my initial port draft to GH_* variables
because it made port much cleaner (easier to maintain).  Upstream does
not seem to practice tag sliding.

> Are we converging on something importable?

OK czarkoff@.

-- 
Dmitrij D. Czarkoff



Re: NEW: net/syncthing

2016-04-19 Thread Adam Wolk
On Tue, 19 Apr 2016 18:17:53 +0100
Edd Barrett  wrote:

> Hi,
> 
> New tarball attached.
> 
> On Tue, Apr 19, 2016 at 12:48:25AM +0200, Adam Wolk wrote:
> > Some feedback.
> > 
> > 1.
> > 
> > $
> > portcheck hardcoded paths detected in pkg/README, consider using
> > SUBST_VARS and TRUEPREFIX/LOCALBASE/LOCALSTATEDIR/VARBASE
> > net/syncthing
> > 
> > not sure what portcheck hates here but it does. Maybe the /var
> > paths?  
> 
> Yeah, I think it's /var, for which (AFAIK) there is no variable for.
> 
> > 2.
> > 
> > The port uses GH_* variables with are not preferred when upstream
> > provides release tarballs and syncthing does. I have been dumb
> > enough to try and switch the port to use a normal MASTER_SITES. I'm
> > attaching a new port plus a diff so you can see the pain I went
> > through to get it working. It's far more uglier than GH_* vars but
> > not subject to tag sliding if upstream decides to move it.  
> 
> Good. Thanks.
> 
> > 3.
> > 
> > I added a note to README about the way I start up my syncthing
> > instances using crontab. I think it's a useful trick to pass on to
> > other people.  
> 
> Thanks. I tweaked it a bit.
> 
> > 4.
> > 
> > Now that I look at it, the -version ${GH_TAGNAME} should probably
> > be just replaced with ${V} but I ran out of time to test this.  
> 
> It needs to be v${V} or else we get:
> 18:07:12 FATAL: Invalid version string "0.12.22"; does not match
> regexp ^v\d+\.\d+\.\d+(-[a-z0-9]+)*(\+\d+-g[0-9a-f]+)?(-dirty)?$
> 
> Are we converging on something importable?
> 

I think it's clear to import in current state.

OK awolk@



Re: NEW: net/syncthing

2016-04-19 Thread Vadim Zhukov
2016-04-19 1:48 GMT+03:00 Adam Wolk :
> On Mon, 18 Apr 2016 22:01:24 +0100
> Edd Barrett  wrote:
>
>> Hi,
>>
>> pkg/DESCR:
>> ---8<---
>> Syncthing is an application that lets you synchronize your files
>> across multiple devices. This means the creation, modification or
>> deletion of files on one machine will automatically be replicated to
>> your other devices. We believe your data is your data alone and you
>> deserve to choose where it is stored. Therefore Syncthing does not
>> upload your data to the cloud but exchanges your data across your
>> machines as soon as they are online at the same time.
>> --->8---
>>
>> I've been using this to sync notes between my server, laptop, tablet
>> and phone. Seems to work nicely.
>>
>> It's a go app, but all the deps come bundled.
>>
>> This port is mostly by czarkoff@ from openbsd-wip. All I have done is
>> update to the latest version, add a README and test it. We agreed by
>> mail that I would take MAINTAINER.
>>
>> OK?
>>
>
> Some feedback.
>
> 1.
>
> $
> portcheck hardcoded paths detected in pkg/README, consider using
> SUBST_VARS and TRUEPREFIX/LOCALBASE/LOCALSTATEDIR/VARBASE net/syncthing
>
> not sure what portcheck hates here but it does. Maybe the /var paths?

Yes, this particular check tends to give some false positives. IMHO
it's useful (catched a few errors in foreign ports), but if anyone
have ideas how it could be improved - be my guest. :) Ideas are
enough.



Re: NEW: net/syncthing

2016-04-19 Thread Edd Barrett
Hi,

New tarball attached.

On Tue, Apr 19, 2016 at 12:48:25AM +0200, Adam Wolk wrote:
> Some feedback.
> 
> 1.
> 
> $
> portcheck hardcoded paths detected in pkg/README, consider using
> SUBST_VARS and TRUEPREFIX/LOCALBASE/LOCALSTATEDIR/VARBASE net/syncthing
> 
> not sure what portcheck hates here but it does. Maybe the /var paths?

Yeah, I think it's /var, for which (AFAIK) there is no variable for.

> 2.
> 
> The port uses GH_* variables with are not preferred when upstream
> provides release tarballs and syncthing does. I have been dumb enough
> to try and switch the port to use a normal MASTER_SITES. I'm attaching
> a new port plus a diff so you can see the pain I went through to get it
> working. It's far more uglier than GH_* vars but not subject to tag
> sliding if upstream decides to move it.

Good. Thanks.

> 3.
> 
> I added a note to README about the way I start up my syncthing
> instances using crontab. I think it's a useful trick to pass on to
> other people.

Thanks. I tweaked it a bit.

> 4.
> 
> Now that I look at it, the -version ${GH_TAGNAME} should probably
> be just replaced with ${V} but I ran out of time to test this.

It needs to be v${V} or else we get:
18:07:12 FATAL: Invalid version string "0.12.22"; does not match regexp
^v\d+\.\d+\.\d+(-[a-z0-9]+)*(\+\d+-g[0-9a-f]+)?(-dirty)?$

Are we converging on something importable?

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


syncthing_3.tgz
Description: application/tar-gz


Re: NEW: net/syncthing

2016-04-18 Thread Adam Wolk
On Mon, 18 Apr 2016 22:01:24 +0100
Edd Barrett  wrote:

> Hi,
> 
> pkg/DESCR:
> ---8<---
> Syncthing is an application that lets you synchronize your files
> across multiple devices. This means the creation, modification or
> deletion of files on one machine will automatically be replicated to
> your other devices. We believe your data is your data alone and you
> deserve to choose where it is stored. Therefore Syncthing does not
> upload your data to the cloud but exchanges your data across your
> machines as soon as they are online at the same time.
> --->8---  
> 
> I've been using this to sync notes between my server, laptop, tablet
> and phone. Seems to work nicely.
> 
> It's a go app, but all the deps come bundled.
> 
> This port is mostly by czarkoff@ from openbsd-wip. All I have done is
> update to the latest version, add a README and test it. We agreed by
> mail that I would take MAINTAINER.
> 
> OK?
> 

Some feedback.

1.

$
portcheck hardcoded paths detected in pkg/README, consider using
SUBST_VARS and TRUEPREFIX/LOCALBASE/LOCALSTATEDIR/VARBASE net/syncthing

not sure what portcheck hates here but it does. Maybe the /var paths?

2.

The port uses GH_* variables with are not preferred when upstream
provides release tarballs and syncthing does. I have been dumb enough
to try and switch the port to use a normal MASTER_SITES. I'm attaching
a new port plus a diff so you can see the pain I went through to get it
working. It's far more uglier than GH_* vars but not subject to tag
sliding if upstream decides to move it.


3.

I added a note to README about the way I start up my syncthing
instances using crontab. I think it's a useful trick to pass on to
other people.

4.

Now that I look at it, the -version ${GH_TAGNAME} should probably
be just replaced with ${V} but I ran out of time to test this.

Regards,
Adam

diff -u syncthing-eb/Makefile syncthing/Makefile
--- syncthing-eb/Makefile   Mon Apr 18 22:53:17 2016
+++ syncthing/Makefile  Tue Apr 19 00:21:55 2016
@@ -1,10 +1,11 @@
 # $OpenBSD$
 
-GH_ACCOUNT =   syncthing
-GH_PROJECT =   syncthing
-GH_TAGNAME =   v0.12.22
 COMMENT =  open decentralized synchronization utility
 
+V =0.12.22
+DISTNAME = syncthing-${V}
+DISTFILES =syncthing-source-v${V}${EXTRACT_SUFX}
+
 CATEGORIES =   net
 HOMEPAGE = https://syncthing.net/
 
@@ -15,12 +16,17 @@
 
 WANTLIB += c pthread
 
+MASTER_SITES = https://github.com/syncthing/syncthing/releases/download/v${V}/
+
+WRKSRC =   ${WRKDIR}/go/src/github.com/syncthing/syncthing
+
 MODULES =  lang/go
 MODGO_TYPE =   bin
+MODGO_SUBDIR = ${WRKDIR}/syncthing
 
 do-build:
cd ${WRKSRC} && ${MODGO_CMD} run build.go \
-   -version ${GH_TAGNAME} -no-upgrade
+   -no-upgrade
 
 do-test:
cd ${WRKSRC} && ${MODGO_CMD} run build.go test
diff -u syncthing-eb/distinfo syncthing/distinfo
--- syncthing-eb/distinfo   Sat Apr 16 15:02:13 2016
+++ syncthing/distinfo  Mon Apr 18 23:47:27 2016
@@ -1,2 +1,2 @@
-SHA256 (syncthing-0.12.22.tar.gz) = 
EEQC/NGi0CNE4yzr2fnWJJSUgn6H3dLH0B7kMUjILSo=
-SIZE (syncthing-0.12.22.tar.gz) = 4047399
+SHA256 (syncthing-source-v0.12.22.tar.gz) = 
pgsw/av5FxD0LVycLIIwhziyq20RIBTBs+IL/RLsjbg=
+SIZE (syncthing-source-v0.12.22.tar.gz) = 4816944
Common subdirectories: syncthing-eb/pkg and syncthing/pkg

syncthing-awolk.tar.gz
Description: application/gzip


NEW: net/syncthing

2016-04-18 Thread Edd Barrett
Hi,

pkg/DESCR:
---8<---
Syncthing is an application that lets you synchronize your files across
multiple devices. This means the creation, modification or deletion of
files on one machine will automatically be replicated to your other
devices. We believe your data is your data alone and you deserve to
choose where it is stored. Therefore Syncthing does not upload your data
to the cloud but exchanges your data across your machines as soon as
they are online at the same time.
--->8---

I've been using this to sync notes between my server, laptop, tablet and
phone. Seems to work nicely.

It's a go app, but all the deps come bundled.

This port is mostly by czarkoff@ from openbsd-wip. All I have done is
update to the latest version, add a README and test it. We agreed by
mail that I would take MAINTAINER.

OK?

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk


syncthing.tgz
Description: application/tar-gz