On Fri, Oct 29, 2021 at 10:31:42PM +0000, Ricardo wrote:
> On Friday, October 29th, 2021 at 5:51 PM, Stuart Henderson 
> <s...@spacehopper.org> wrote:
> 
> > On 2021/10/29 16:09, Klemens Nanni wrote:
> >
> > > On Fri, Oct 29, 2021 at 01:07:20PM +0000, Ricardo wrote:
> > >
> > > > Update to version 2.2.0 released this week.
> > > >
> > > > Tested on amd64. OK?
> > >
> > > Thanks, I committed the update.
> 
> Thanks kn@. :)
> 
> > >
> > > This ports needs further work, though:
> > >
> > > $ gh version
> > >
> > > gh version DEV
> > >
> > > https://github.com/cli/cli/releases/latest
> > >
> > > This used to print 1.4.0 prior to the update.
> > >
> 
> Opps. Forgot to add v2 to MODGO_LDFLAGS. Fixed:
> 
> RCS file: /cvs/ports/devel/github-cli/Makefile,v
> retrieving revision 1.4
> diff -u -p -u -p -r1.4 Makefile
> --- Makefile  29 Oct 2021 15:48:02 -0000      1.4
> +++ Makefile  29 Oct 2021 22:01:45 -0000
> @@ -8,6 +8,7 @@ MODGO_VERSION =               v$V
> 
>  DISTNAME =           cli-${MODGO_VERSION}
>  PKGNAME =            github-cli-$V
> +REVISION =           1

usually starts at 0 but it is no error as long as the overall package
version/revision/epoch/etc. gets higher.

> -MODGO_LDFLAGS +=     -X "github.com/cli/cli/internal/build.Version=$V"
> +MODGO_LDFLAGS +=     -X "github.com/cli/cli/v2/internal/build.Version=$V"

Will commit with ${V:R:R}, thanks.

> > > `make test' creates /tmp/go-build-<hash> and executes from there, which 
> > > fails on at least my machine where /tmp is mounted with` noexec'.
> > >
> > > That, but also for containment/cleanup, this stuff should land under
> > >
> > > ${WRKDIR}/.
> >
> > Not really bothered about noexec /tmp as it breaks too much to be used
> >
> > on a general purpose system anyway, but it would be nice to stop using
> >
> > /tmp/go-build - it's not just during test, it compiles things there as
> >
> > well.
> 
> I agree - WRKDIR/WRKBUILD should be used instead of /tmp/go-build*.
> I tried to set PORTHOME, GOROOT and
> 
> cd ${WRKBUILD} && ${MODGO_BUILD_CMD} ./...
> 
> under do-build without any success. Go completely ignores it and uses /tmp/ 
> anyway. :|

Hm..  since `do-test' uses MODGO_TEST_CMD which uses `go test' I checked
the output of `go help test' which showed nothing but referred to the
build command.

`go help build' shows `-work', so `make test MODGO_TEST_FLAGS+=-work'
prints this before failing as before:

        WORK=/tmp/go-build513679090

Sadly, go does not seem to have an option to specify that WORK variable.

I added WORK, GOTMPDIR (read about that on the internet) and the ones
you mentioned to TEST_ENV, set to ${WRKDIR}, but with no avail.

Any go porter/hacker that knows how to tweak this?

Reply via email to