Skip to content

feat(golang): source Azure Linux golang from the Microsoft build of Go - #18360

Draft
Nan Liu (liunan-ms) wants to merge 1 commit into
4.0from
liunan/msft-golang
Draft

feat(golang): source Azure Linux golang from the Microsoft build of Go#18360
Nan Liu (liunan-ms) wants to merge 1 commit into
4.0from
liunan/msft-golang

Conversation

@liunan-ms

@liunan-ms Nan Liu (liunan-ms) commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Azure Linux 4.0 ships a single golang toolchain sourced from the Microsoft build of Go (1.26.5-2) instead of Fedora upstream. It is built with Fedora's golang packaging (F44, pinned 77411fa) to preserve the full subpackage split (golang, -bin, -src, -docs, -misc, -tests) and remain a drop-in for consumers that BuildRequire golang-bin / golang-src.

Changes

  • Source swap — replace the Fedora golang spec Source0 with the Microsoft Go release archive (go1.26.5-20260709.6.src.tar.gz, SHA256 52aafddac2d7c6245d7759e65021197dc385732d4a7aefb4f15f064d0e3babfe).
  • Compatibility — add Provides: msft-golang; keep the standard golang/go provides.
  • Crypto backend — build all tools on Microsoft Go's default systemcrypto (OpenSSL) backend with GOEXPERIMENT=nodwarf5 (Azure Linux debugedit compatibility), bootstrapping from the distro golang toolchain.
  • Runtime Requires (auto dep generation disabled via __find_requires) — add runtime dependencies: openssl, SymCrypt >= 103.6.0-1, SymCrypt-OpenSSL >= 1.6.1-1.
  • Test skips — crypto/rsa PSS and testing/cryptotest ML-KEM tests that fail under the OpenSSL backend with system OpenSSL 3.5.
  • Telemetry off by default — flip the Microsoft Go toolchain telemetry gate to opt-in (MS_GOTOOLCHAIN_TELEMETRY_ENABLED=1). The cmd/go script-test harness enables it for its go subprocesses so the telemetry suite still passes.

Validation

  • Full golang build passes with %check enabled — the entire Go + cmd/go test suite is green, including the 122 cmd/go TestScript cases affected by the telemetry change.
  • Produces golang{,-bin,-docs,-misc,-src,-tests}-1.26.5-3.azl4.
  • Runtime dependencies resolve against the in-repo openssl / SymCrypt / SymCrypt-OpenSSL packages; the toolchain reports go1.26.5-X:nodwarf5.
  • Locks and rendered specs are self-consistent (Check Rendered Specs and Update Locks clean).

Notes

  • Two dependents that break on the toolchain swap are being handled separately (not in this PR): swig (drop a vestigial BuildRequires: golang-shared) and libcap (%check needs CGO_REQUIRED=1).

Azure Linux 4.0 now ships a single golang toolchain sourced from Microsoft Go
instead of Fedora upstream. The golang component builds the Microsoft Go 1.26.5-2
source tree using Fedora's golang packaging (F44, pinned 77411fa), so it keeps the
full Fedora subpackage split (golang, -bin, -src, -docs, -misc, -tests) and remains
a drop-in for consumers that BuildRequire golang-bin / golang-src.

- Replace the Fedora golang spec source with the Microsoft Go release archive.
- Provide msft-golang for compatibility; keep the standard golang/go provides.
- Build every tool with GOEXPERIMENT=nodwarf5 (AzL debugedit compatibility) on top
  of Microsoft Go's default systemcrypto (OpenSSL) backend, bootstrapping from the
  distro golang toolchain.
- Skip crypto/rsa PSS and testing/cryptotest ML-KEM tests that fail under the
  OpenSSL backend with system OpenSSL 3.5.
- Add explicit runtime Requires (auto dep generation is disabled via
  __find_requires): openssl, SymCrypt >= 103.6.0-1, SymCrypt-OpenSSL >= 1.6.1-1.
- Disable the Microsoft Go toolchain telemetry by default (opt in with
  MS_GOTOOLCHAIN_TELEMETRY_ENABLED=1); enable it in the cmd/go test harness so
  the telemetry suite still passes.
Copilot AI balanced review requested due to automatic review settings August 7, 2026 23:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Switches Azure Linux’s Go toolchain to Microsoft Go 1.26.5-2 while retaining Fedora’s package layout.

Changes:

  • Pins Fedora 44 packaging and Microsoft Go sources.
  • Adds system-crypto dependencies and disables shared stdlib.
  • Adds DWARF, crypto-test, and telemetry patches.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
base/comps/golang/golang.comp.toml Defines source swap and overlays.
base/comps/golang/0001-Set-nodwarf5-in-go.env.patch Defaults to DWARF v4.
base/comps/golang/0002-Skip-openssl-incompatible-crypto-tests.patch Skips incompatible crypto tests.
base/comps/golang/0003-Disable-msft-go-telemetry-by-default.patch Makes Microsoft telemetry opt-in.
locks/golang.lock Pins Fedora 44 packaging inputs.
specs/g/golang/golang.spec Renders the updated package definition.
specs/g/golang/sources Records the Microsoft archive checksum.
specs/g/golang/0001-Set-nodwarf5-in-go.env.patch Renders the DWARF patch.
specs/g/golang/0002-Skip-openssl-incompatible-crypto-tests.patch Renders crypto-test exclusions.
specs/g/golang/0003-Disable-msft-go-telemetry-by-default.patch Renders telemetry changes.
specs/g/golang/0001-Modify-go.env.patch Removes the superseded Fedora patch.
specs/g/golang/0006-Default-to-ld.bfd-on-ARM64.patch Removes an upstream-obsolete patch.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

)

func TestSetGlobalRandom(t *testing.T) {
+ t.Skip("Azure Linux: skipped for the Microsoft Go OpenSSL crypto backend; ML-KEM key generation does not consume the deterministic test RNG")
Comment on lines +27 to +28
+ if os.Getenv("MS_GOTOOLCHAIN_TELEMETRY_ENABLED") != "1" {
+ // Azure Linux: Microsoft Go toolchain telemetry is off by default; opt in with MS_GOTOOLCHAIN_TELEMETRY_ENABLED=1.
Comment thread base/comps/golang/golang.comp.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants