x/vuln: govulncheck expects a go binary #73634
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
vulncheck or vulndb
Issues for the x/vuln or x/vulndb repo
Milestone
govulncheck version
I'm working on a port for govulncheck for FreeBSD ports.
One thing I've had problems with, is that govulncheck expects a
go
binary to exist on the machine, and calls it often.In FreeBSD ports, there is a meta-port, lang/go, which installs the current default go version 1.21 and links
go
togo121
. Unfortunately, the Go team in FreeBSD is having second thoughts about how that is done, and until they have a new solution in place, they've stopped letting maintainers put a runtime dependency on the metaport lang/go.When writing a FreeBSD port that uses go, you can add the following to the Makefile:
The syntax of that can be found at https://github.com/freebsd/freebsd-ports/blob/main/Mk/Uses/go.mk
adding
run
to the USES line signals that this port needs go installed at runtime, as well as for building, but it only creates a dependency on the current default go version port, i.e.go121
, not thego
metaport. This means there is nogo
binary.For the govulncheck port, I've added patches to replace "go" with $GO_CMD, which the ports framework will resolve to the current default go binary. Before the port gets accepted we wanted to know if it is possible to modify govulncheck so that a) it can discover the default go binary or b) make the go binary configurable?
The issue for adding govulncheck to freebsd ports is here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285627
Does this issue reproduce at the latest version of golang.org/x/vuln?
yes
Output of
go env
in your module/workspace:What did you do?
Ran
govulncheck ./...
What did you see happen?
What did you expect to see?
The text was updated successfully, but these errors were encountered: