Page MenuHomeFreeBSD

Introduce versioned Go ports
ClosedPublic

Authored by dmgk on May 29 2022, 10:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 9 2024, 7:07 PM
Unknown Object (File)
Jan 30 2024, 8:40 PM
Unknown Object (File)
Jan 12 2024, 12:28 AM
Unknown Object (File)
Jan 8 2024, 9:34 AM
Unknown Object (File)
Dec 23 2023, 9:02 AM
Unknown Object (File)
Dec 20 2023, 10:35 AM
Unknown Object (File)
Nov 23 2023, 10:36 PM
Unknown Object (File)
Nov 23 2023, 10:36 PM
Subscribers

Details

Summary

After Go 1.18 release, lang/go117 was added to the tree because some ports
weren't buildable with go118. I was hoping we can get rid of go117 before
go119 release, but it looks like it's not going to happen. Currently, about 25
ports fail to build with the current go master and it is unlikely that the
situation will improve. The main culprit is github.com/lucas-clemente/quic-go
which is tied to the Go version [1] and many upstreams are slow to update their
dependencies. It is very likely that even after go119 release, we will still
have ports that require go117 to build.

Given the above, I think it is time to introduce proper Go ports versioning
and this review:

  • adds support for selecting Go port version in USES=go;
  • sets default Go version (GO_DEFAULT) in Mk/bsd.default-versions.mk
  • converts lang/go-devel port to the master and lang/go{117,118} ports to simple slave ports;
  • convert lang/go to a meta-port that provides go and gofmt symlinks to the current default version.

Other changes in this review (which I will commit separately) are port build
fixes, they

  • add 1.17 to USES=go for ports that still need go117 and remove GO_PORT;
  • add missing ${SETENV} ${MAKE_ENV} to repair BINARY_ALIAS;
  • remove explicit dependencies on lang/go.

[1] https://github.com/lucas-clemente/quic-go/wiki/quic-go-and-Go-versions

Test Plan

exp-run

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dmgk requested review of this revision.May 29 2022, 10:48 PM
www/grafana8/Makefile
83 ↗(On Diff #106455)

It's no need to change. It isn't "go build". It's auxiliary utility.

www/grafana8/Makefile
83 ↗(On Diff #106455)

wire appears to be calling go, so it needs to know where to find it:

===>  Generating wire_gen.go
wire: err: go command required, not found: exec: "go": executable file not found in $PATH: stderr:
wire: generate failed
*** Error code 1
drtr0jan_yandex.ru added inline comments.
www/grafana8/Makefile
83 ↗(On Diff #106455)

You are right. Confirmed. Thx.

biology/ncbi-entrez-direct looks fine.

lang/go-devel/Makefile
3–7

in order to keep the "PORTNAME should be the software name" moto, you should probably change this, and then only set PKGNAMESUFFIX in the slave ports.

lang/go/Makefile
12–14

This could probably be replaced with something like this:

GO_SUFFIX=      ${GO_DEFAULT:Mdevel:?-devel:${GO_DEFAULT:S/.//}}

removing the need for the .pre/.post includes.

lang/go/pkg-descr
7

You should probably add lang/go to the depends_blacklist function in Mk/Scripts/qa.sh and then drop this line.

dmgk marked 3 inline comments as done.Jun 3 2022, 9:24 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 6 2022, 6:22 PM
This revision was automatically updated to reflect the committed changes.