Am 09.07.22 um 13:55 schrieb Markus Wipp:
Hi all,I’m the maintainer of step-certificates and currently face some issues with this. I updated the ports Makefile for the newest version (see below). When I now try to make this e.g. with “make clean makes stage” it fails with the following error: ===> Patching for step-certificates-0.21.0_1 ===> Applying FreeBSD patches for step-certificates-0.21.0_1 from /usr/ports/security/step-certificates/files ===> step-certificates-0.21.0_1 depends on package: pcsc-lite>0 - found ===> step-certificates-0.21.0_1 depends on file: /usr/local/bin/go - found ===> step-certificates-0.21.0_1 depends on shared library: libpcsclite.so - found (/usr/local/lib/libpcsclite.so) ===> Configuring for step-certificates-0.21.0_1 ===> Building for step-certificates-0.21.0_1 (cd /usr/ports/security/step-certificates/work/certificates-0.21.0; for t in ./cmd/step-ca:/usr/local/sbin/step-ca ./cmd/step-cloudkms-init ./cmd/step-awskms-init ./cmd/step-yubikey-init ./cmd/step-pkcs11-init; do out=$(/usr/bin/basename $(echo ${t} | /usr/bin/sed -Ee 's/^[^:]*:([^:]+).*$/\1/' -e 's/^\.$/step-certificates/')); pkg=$(echo ${t} | /usr/bin/sed -Ee 's/^([^:]*).*$/\1/' -e 's/^step-certificates$/./'); echo "===> Building ${out} from ${pkg}"; /usr/bin/env XDG_DATA_HOME=/usr/ports/security/step-certificates/work XDG_CONFIG_HOME=/usr/ports/security/step-certificates/work XDG_CACHE_HOME=/usr/ports/security/step-certificates/work/.cache HOME=/usr/ports/security/step-certificates/work PATH=/usr/ports/security/step-certificates/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/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="/usr/ports/distfiles/go/security_step-certificates" GOBIN="/usr/ports/security/step-certificates/work/bin" GO111MODULE=on GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GO_NO_VENDOR_CHECKS=1 GOPROXY=off /usr/local/bin/go build -ldflags "-w -X main.Version=0.21.0" -v -buildmode=exe -trimpath -mod=vendor -o /usr/ports/security/step-certificates/work/bin/${out} ${pkg}; done) ===> Building step-ca from ./cmd/step-ca cas/vaultcas/auth/approle/approle.go:8:2: import "github.com/hashicorp/vault/api/auth/approle" is a program, not an importable package cas/vaultcas/auth/kubernetes/kubernetes.go:8:2: import "github.com/hashicorp/vault/api/auth/kubernetes" is a program, not an importable package vendor/github.com/hashicorp/vault/api/auth/approle/main.go:6:2: cannot find package "." in: /usr/ports/security/step-certificates/work/certificates-0.21.0/vendor/github.com/hashicorp/vault/cli *** Error code 1 Stop. make: stopped in /usr/ports/security/step-certificates When I then go to WRKSRC and run “go mod vendor” there and go back and run “make stage” the port builds. I tried to put “modules.txt” to files and copy it over, but unfortunately this seems not to be sufficient. Any hints and help is highly appreciated! Thanks in advance Markus Makefile: ======= PORTNAME= step-certificates DISTVERSIONPREFIX= v DISTVERSION= 0.21.0 PORTREVISION= 1 CATEGORIES= security MAINTAINER= [email protected] COMMENT= Smallstep step-ca certificates server LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= pcsc-lite>0:devel/pcsc-lite LIB_DEPENDS= libpcsclite.so:devel/pcsc-lite RUN_DEPENDS= step:security/step-cli USES= go:modules
You have USES=go:modules. That lets me assume that there is a go.mod file that contains a module directive. But there is no GO_MODULE defition ... See my recent update of net/cloudquery (commit fd5b852a0e71) for an example of GO_MODULE and which parts of the current Makefile and distinfo file it obsoletes (e.g. all the GH_TUPLE definitions): GO_MODULE= github.com/cloudquery/cloudquery Gruß, STefan
OpenPGP_signature
Description: OpenPGP digital signature
