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.
Regardless of this, there is another issue since the port writes outside
of ${WRKDIR} as noticed on my machine where /tmp/ is mounted `noexec':
$ make -s 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>