Skip to content

Conversation

tklauser
Copy link
Member

The first commit removes the unused GOLANGVERSION make variable.

The second commit fixes Cilium to report GOOS/GOARCH of the target, not the build system. Quoting its commit message:

When cross-building Cilium, like we do for the ARM64 image,
version.Version reports the GOOS/GOARCH of the build system (i.e.
linux/amd64) because it is set to the value of go version as run on
the build system.

Instead, report the Go version properties of the proper target system by
using the corresponding information from Go's runtime package. Mimic the
go version format to keep Cilium's version format backwards-compatible.

Fixes #13122

Marking for backport to 1.8 since this is the first Cilium version that we support ARM64.

@tklauser tklauser added release-note/bug This PR fixes an issue in a previous release of Cilium. needs-backport/1.8 labels Sep 11, 2020
@tklauser tklauser requested review from a team as code owners September 11, 2020 14:20
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
When cross-building Cilium, like we do for the ARM64 image,
version.Version reports the GOOS/GOARCH of the build system (i.e.
linux/amd64) because it is set to the value of `go version` as run on
the build system.

Instead, report the Go version properties of the proper target system by
using the corresponding information from Go's runtime package. Mimic the
`go version` format to keep Cilium's version format backwards-compatible.

Fixes #13122

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
@tklauser tklauser force-pushed the pr/tklauser/make-go-version branch from dc5ab32 to fdebde6 Compare September 11, 2020 14:22
@tklauser
Copy link
Member Author

test-me-please

Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 💯

@aanm aanm merged commit 3fb4d15 into master Sep 11, 2020
@aanm aanm deleted the pr/tklauser/make-go-version branch September 11, 2020 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ARM64 cross-build cilium binaries report platform as AMD64
4 participants