[Bug 258210] USES=go:modules make extract failures after port was updated

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 02 Sep 2021 13:19:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258210

            Bug ID: 258210
           Summary: USES=go:modules make extract failures after port was
                    updated
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: dinoex@FreeBSD.org
                CC: ports-bugs@FreeBSD.org

Environment:
Building ports in clean jails.
Shared and static /usr/ports/distfiles/

Problem:
After a port with USES=go:modules was updated, build fails in make extract
stage.

Logfiles:
[...]
go: finding module for package github.com/stretchr/testify/require
github.com/influxdata/influxdb/cmd/influx/cli imports
        github.com/influxdata/flux: cannot find module providing package
github.com/influxdata/flux: module lookup disabled by GOPROXY=off
[...]
*** Failed target:  post-extract
*** Failed command: (cd
/usr/obj/image/usr/ports/databases/influxdb/work/github.com/influxdata/influxdb@v1.8.6;
/usr/bin/env CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include"
CGO_LDFLAGS="-L/usr/local/lib" GOARM=
GOPATH="/usr/ports/distfiles/go/databases_influxdb"
GOBIN="/usr/obj/image/usr/ports/databases/influxdb/work/bin" GO111MODULE=on
GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GOPROXY=off /usr/local/bin/go mod
vendor)
*** Error code 1
[...]

[...]
go: finding module for package github.com/golang/protobuf/ptypes/empty
github.com/influxdata/telegraf/agent imports
        github.com/benbjohnson/clock: cannot find module providing package
github.com/benbjohnson/clock: module lookup disabled by GOPROXY=off
[...]
*** Failed target:  post-extract
*** Failed command: (cd
/usr/obj/image/usr/ports/net-mgmt/telegraf/work/github.com/influxdata/telegraf@v1.19.3;
/usr/bin/env CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include"
CGO_LDFLAGS="-L/usr/local/lib" GOARM=
GOPATH="/usr/ports/distfiles/go/net-mgmt_telegraf"
GOBIN="/usr/obj/image/usr/ports/net-mgmt/telegraf/work/bin" GO111MODULE=on
GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GOPROXY=off /usr/local/bin/go mod
vendor)
*** Error code 1
[...]


Finally I found a workaround by cleaning the old parts of distfiles:
# rm -rf /usr/ports/distfiles/go/net-mgmt_telegraf/telegraf-v1.19.2
# rm -rf /usr/ports/distfiles/go/databases_influxdb

The ports can be build sucessfully again.

-- 
You are receiving this mail because:
You are on the CC list for the bug.