On 2019/06/04 12:14, Klemens Nanni wrote:
> On Tue, Jun 04, 2019 at 10:42:44AM +0100, Stuart Henderson wrote:
> > Any OKs to import this?
> The MODGO_* handling is duplicate effort, see attached Makefile for a
> much simpler and cleaner version.

Ah thanks, that's much tidier.

> Regardless of this, there is another issue since the port writes outside
> of ${WRKDIR} as noticed on my machine where /tmp/ is mounted `noexec':

There's no restriction on writing to /tmp during builds, all sorts of
things will break if that is blocked.

Seems go does this as standard, so it's probably a good idea to figure
out how to tell it to place the go-build directory inside WRKDIR (maybe
it's possible to use WRKBUILD) but that said, it shouldn't block an
individual port when pretty much all the go ports in-tree already do
this.

exec is less common but it is something that is likely to be done at times.
I've definitely seen it in tests (I used to mount /tmp noexec but stopped
doing so after wasting too long chasing a bogus failure), and it wouldn't
surprise me at all if other things in tree need that during build.


> ===> dnscontrol-2.9 depends on: go-=1.12.5 -> go-1.12.5
> ===>  Verifying specs:  c pthread
> ===>  found c.95.1 pthread.26.1
> ===>  Checking files for dnscontrol-2.9
> `/tmp/distfiles/dnscontrol-2.9.tar.gz' is up to date.
> >> (SHA256) dnscontrol-2.9.tar.gz: OK
> ===>  Extracting for dnscontrol-2.9
> ===>  Patching for dnscontrol-2.9
> ===>  Compiler link: clang -> /usr/bin/clang
> ===>  Compiler link: clang++ -> /usr/bin/clang++
> ===>  Compiler link: cc -> /usr/bin/cc
> ===>  Compiler link: c++ -> /usr/bin/c++
> ===>  Generating configure for dnscontrol-2.9
> ===>  Configuring for dnscontrol-2.9
> ===>  Building for dnscontrol-2.9
> fork/exec /tmp/go-build041594962/b001/exe/generate: permission denied
> main.go:14: running "go": exit status 1
> *** Error 1 in . (Makefile:24 'do-build': cd 
> /usr/ports/pobj/dnscontrol-2.9/go/src/github.com/StackExchange/dnscontrol && 
> /usr/bin/env -i GO...)
> *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2811 
> '/usr/ports/pobj/dnscontrol-2.9/build-amd64/.build_done')
> *** Error 1 in /usr/ports/mystuff/net/dnscontrol 
> (/usr/ports/infrastructure/mk/bsd.port.mk:2481 'build')
> 
> 
> Also, SEPARATE_BUILD is set, but WRKBUILD is not used at all.  I think
> you should either disable it or make use of it.

> # $OpenBSD$
> 
> COMMENT =             manage DNS configuration across any number of DNS hosts
> 
> GH_ACCOUNT =          StackExchange
> GH_PROJECT =          dnscontrol
> GH_TAGNAME =          v2.9
> 
> CATEGORIES =          net
> 
> HOMEPAGE =            https://stackexchange.github.io/dnscontrol/
> 
> # MIT
> PERMIT_PACKAGE_CDROM =        Yes
> 
> WANTLIB =             c pthread
> 
> MODULES =             lang/go
> 
> MODGO_FLAGS +=                -tags nosystemd
> MODGO_TEST_FLAGS +=   -provider BIND
> 
> do-build:
>       cd ${WRKSRC} && ${MODGO_CMD} generate
>       cd ${WRKSRC} && ${MODGO_CMD} build
>       cd ${WRKSRC}/cmd/convertzone && ${MODGO_CMD} build
> 
> do-install:
>       ${MODGO_INSTALL_TARGET}
> 
> do-test:
>       cd ${WRKSRC}/integrationTest && ${MODGO_TEST_CMD}
> 
> .include <bsd.port.mk>

Reply via email to