dmgk/modules2tuple

the latest code still does not generate correct GH_TUPLE

trombik opened this issue · 1 comments

after installing the latest modules2tuple, the build process still tries to download files. even when M2T_GITHUB is used.

> go/bin/modules2tuple -v
devel

here is my WIP port in question:

https://github.com/trombik/freebsd-ports-concourse-devel-concourse

here is the log from poudriere:

 =======================<phase: build          >============================
 ===>  Building for concourse-6.0.0
 (cd /wrkdirs/usr/ports/devel/concourse/work/concourse-6.0.0/cmd/concourse && /usr/bin/env XDG_DATA_HOME=/wrkdirs/usr/ports/devel/concourse/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/devel/concourse/work  HOME=/wrkdirs/usr/ports/devel/concourse/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/devel/concourse/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/nonexistent/bin NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe  -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS=""  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  "  MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" CGO_ENABLED=1  CGO_CFLAGS="-I/usr/local/include"  CGO_LDFLAGS="-L/usr/local/lib"  GOARM= GOPATH=""  GOBIN="/wrkdirs/usr/ports/devel/concourse/work/bin"  GO_NO_VENDOR_CHECKS=1 /usr/local/bin/go build -v -o /wrkdirs/usr/ports/devel/concourse/work/bin/concourse )
 go: code.cloudfoundry.org/clock@v0.0.0-20180518195852-02e53af36e6c: Get "https://proxy.golang.org/code.cloudfoundry.org/clock/@v/v0.0.0-20180518195852-02e53af36e6c.mod": dial tcp: lookup proxy.golang.org on 192.168.99.251:53: write udp 127.0.0.1:13336->192.168.99.251:53: write: can't assign requested address
*** Error code 1
dmgk commented

Thanks for the report, but this doesn't have anything to do with modules2tuple.

Looking at the port Makefile, the do-build target doesn't seem correct. ${WRKSRC}/cmd/${PORTNAME} is the wrong dir to build in and ${GO_CMD} build invocation is wrong - it is missing ${GO_BUILDFLAGS}.

I'm not sure why you'd need a custom do-build because USES=go:modules already provides default do-build target that handles all the gory details. I suggest to just remove do-build and see what happens. There's also a section in the Porter's Handbook [1] dedicated to porting Go applications.

Edit: [1] https://www.freebsd.org/doc/en/books/porters-handbook/book.html#using-go