feat(golang): source Azure Linux golang from the Microsoft build of Go - #18360
feat(golang): source Azure Linux golang from the Microsoft build of Go#18360Nan Liu (liunan-ms) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Switches Azure Linux’s Go toolchain to Microsoft build of Go 1.26.5-2 while retaining Fedora’s package layout.
Changes:
- Pins Fedora 44 packaging and Microsoft build of 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.
|
/azp run |
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. |
7411d8f to
f897256
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.
Suppressed comments (2)
base/comps/golang/golang.comp.toml:22
- These non-trivial compatibility, test-suppression, and telemetry overlays lack overlay metadata. Add
categoryandupstream-status/drop-condition metadata (or move related entries into overlay documents with shared metadata) so future Fedora/Go updates can determine why each divergence exists and when it can be removed.
{ description = "Retain Azure Linux's DWARF compatibility setting in Microsoft build of Go", type = "patch-add", source = "0001-Set-nodwarf5-in-go.env.patch" },
{ description = "Skip crypto/rsa PSS and testing/cryptotest ML-KEM tests that fail under the Microsoft build of Go OpenSSL crypto backend", type = "patch-add", source = "0002-Skip-openssl-incompatible-crypto-tests.patch" },
{ description = "Disable Microsoft build of Go toolchain telemetry by default (opt in with MS_GOTOOLCHAIN_TELEMETRY_ENABLED=1)", type = "patch-add", source = "0003-Disable-msft-go-telemetry-by-default.patch" },
specs/g/golang/golang.spec:565
- This generated changelog still records
Local changes (uncommitted)and resolves the package as1.26.5-4, contradicting the PR's claim that rendered specs are clean and that the RPM is1.26.5-3. A clean CI render will replace this entry and differ from the checked-in spec. Re-render after committing and amend the generated files; then update the validation version if-4is the intended final release.
* Mon Aug 10 2026 azldev <azldev@local> - 1.26.5-4
- Local changes (uncommitted)
f897256 to
9a449d4
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.
Suppressed comments (3)
base/comps/golang/0002-Skip-openssl-incompatible-crypto-tests.patch:32
- This top-level skip suppresses every
TestSetGlobalRandomsubtest, including therand.Read,rand.Reader, ECDSA, andcryptocustomrandchecks; only the nestedmlkem.GenerateKey768case is described as incompatible. Keep the other coverage by moving the skip into that ML-KEM subtest (or adapting only its expectation).
+ t.Skip("Azure Linux: skipped for the Microsoft build of Go OpenSSL crypto backend; ML-KEM key generation does not consume the deterministic test RNG")
base/comps/golang/0003-Disable-msft-go-telemetry-by-default.patch:28
- The telemetry suite is forced onto the opt-in path below, so it never verifies the newly introduced default-off policy. Add a test with this variable unset (and preferably with non-
1values) that asserts no App Insights request is recorded; otherwise a later regression back to default-on would still leave the suite green.
+ if os.Getenv("MS_GOTOOLCHAIN_TELEMETRY_ENABLED") != "1" {
+ // Azure Linux: Microsoft build of Go toolchain telemetry is off by default; opt in with MS_GOTOOLCHAIN_TELEMETRY_ENABLED=1.
base/comps/golang/golang.comp.toml:6
- These non-trivial overlays do not include the
categoryandupstream-statusmetadata required by the repository overlay guidance (.agents/skills/azldev-overlays/SKILL.md). Add per-overlay metadata, or group related changes into overlay files with shared metadata, so platform adaptations and test skips have explicit provenance and removal criteria.
overlays = [
Azure Linux 4.0 now ships a single golang toolchain sourced from Microsoft build of Go instead of Fedora upstream. The golang component builds the Microsoft build of 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 build of 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 build of 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 build of 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.
9a449d4 to
4f5fd12
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated no new comments.
Suppressed comments (4)
base/comps/golang/overlays/0005-build-against-microsoft-build-of-go.overlay.toml:9
- Go 1.26 requires Go 1.24.6 or later as its bootstrap toolchain, so this lower bound also admits 1.24.0–1.24.5 even though
make.bashrejects them. Encode the actual minimum to keep dependency resolution from selecting an unsupported bootstrap compiler.
replacement = "BuildRequires: golang >= 1.24"
base/comps/golang/golang.comp.toml:11
- The replacement archive vendors Microsoft-specific telemetry code such as
github.com/microsoft/go-infra/telemetry, which is MIT-licensed, while the rendered spec still declares only BSD-3-Clause and Fedora Public Domain. Audit the replacement archive's added vendored licenses and update theLicensetag through an overlay (and ensure the corresponding license texts are packaged), otherwise the RPM metadata is incomplete.
origin = { type = "download", uri = "https://github.com/microsoft/go/releases/download/v1.26.5-2/go1.26.5-20260709.6.src.tar.gz" }
specs/g/golang/golang.spec:148
- These bundled-module Provides still omit the Microsoft source's direct
github.com/microsoft/go-infra/telemetrymodules, even though the App Insights code imports and vendors them. Regenerate the bundled dependency metadata from the replacement archive and carry the Microsoft modules (with their exact versions) through component overlays so RPM vulnerability tracking reflects the shipped code.
Provides: bundled(golang(github.com/google/pprof)) = 0.0.0.20251114195745.4902fdda35c8
base/comps/golang/0007-Disable-msft-go-telemetry-by-default.patch:28
- The new privacy-sensitive default is not exercised: the same patch forces
MS_GOTOOLCHAIN_TELEMETRY_ENABLED=1for every script test, so%checkonly validates the opt-in path. Add a test that runsgo build/install/runwith the variable unset (and ideally a non-1value) and verifies that the fake App Insights server receives no new request, while retaining coverage for explicit opt-in.
+ if os.Getenv("MS_GOTOOLCHAIN_TELEMETRY_ENABLED") != "1" {
+ // Azure Linux: Microsoft build of Go toolchain telemetry is off by default; opt in with MS_GOTOOLCHAIN_TELEMETRY_ENABLED=1.
|
/azp run |
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. |
| type = "spec-add-tag" | ||
| tag = "Requires" | ||
| value = "openssl" |
There was a problem hiding this comment.
question(blocking): Does this really require openssl, or can it rely just on openssl-libs?
| [[overlays]] | ||
| description = "Skip crypto/rsa PSS and testing/cryptotest ML-KEM tests that fail under the Microsoft build of Go OpenSSL crypto backend" | ||
| type = "patch-add" | ||
| source = "../0006-Skip-openssl-incompatible-crypto-tests.patch" |
There was a problem hiding this comment.
issue(blocking): I think that the version of SymCrypt-OpenSSL we have supports ML-KEM.
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 build of 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).