feat(golang): source Azure Linux golang from the Microsoft build of Go - #18360
Draft
Nan Liu (liunan-ms) wants to merge 1 commit into
Draft
feat(golang): source Azure Linux golang from the Microsoft build of Go#18360Nan Liu (liunan-ms) wants to merge 1 commit into
Nan Liu (liunan-ms) wants to merge 1 commit into
Conversation
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.
Contributor
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Azure Linux 4.0 ships a single
golangtoolchain sourced from the Microsoft build of Go (1.26.5-2) instead of Fedora upstream. It is built with Fedora's golang packaging (F44, pinned77411fa) to preserve the full subpackage split (golang,-bin,-src,-docs,-misc,-tests) and remain a drop-in for consumers thatBuildRequire golang-bin/golang-src.Changes
Source0with the Microsoft Go release archive (go1.26.5-20260709.6.src.tar.gz, SHA25652aafddac2d7c6245d7759e65021197dc385732d4a7aefb4f15f064d0e3babfe).Provides: msft-golang; keep the standardgolang/goprovides.systemcrypto(OpenSSL) backend withGOEXPERIMENT=nodwarf5(Azure Linux debugedit compatibility), bootstrapping from the distro golang toolchain.__find_requires) — add runtime dependencies:openssl,SymCrypt >= 103.6.0-1,SymCrypt-OpenSSL >= 1.6.1-1.MS_GOTOOLCHAIN_TELEMETRY_ENABLED=1). Thecmd/goscript-test harness enables it for itsgosubprocesses so the telemetry suite still passes.Validation
golangbuild passes with%checkenabled — the entire Go +cmd/gotest suite is green, including the 122cmd/goTestScriptcases affected by the telemetry change.golang{,-bin,-docs,-misc,-src,-tests}-1.26.5-3.azl4.openssl/SymCrypt/SymCrypt-OpenSSLpackages; the toolchain reportsgo1.26.5-X:nodwarf5.Check Rendered SpecsandUpdate Locksclean).Notes
swig(drop a vestigialBuildRequires: golang-shared) andlibcap(%checkneedsCGO_REQUIRED=1).