fix(swig,libcap): adapt Go dependents to the Microsoft Go toolchain - #18361
Draft
Nan Liu (liunan-ms) wants to merge 1 commit into
Draft
fix(swig,libcap): adapt Go dependents to the Microsoft Go toolchain#18361Nan Liu (liunan-ms) wants to merge 1 commit into
Nan Liu (liunan-ms) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adapts SWIG and libcap to Azure Linux’s Microsoft Go toolchain.
Changes:
- Removes SWIG’s unavailable
golang-shareddependency. - Forces cgo for libcap’s Go tests.
- Refreshes component definitions, locks, and rendered specs.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
base/comps/swig/swig.comp.toml |
Adds the SWIG dependency overlay. |
base/comps/libcap/libcap.comp.toml |
Adds the libcap cgo test overlay. |
base/comps/components.toml |
Removes obsolete inline entries. |
specs/s/swig/swig.spec |
Renders the SWIG dependency removal. |
specs/l/libcap/libcap.spec |
Renders cgo-enabled tests. |
locks/swig.lock |
Refreshes SWIG’s fingerprint. |
locks/libcap.lock |
Refreshes libcap’s fingerprint. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…olchain Azure Linux's golang is now the Microsoft build of Go, built with `%global shared 0` and a baseline systemcrypto (OpenSSL) backend that requires cgo. That breaks two golang dependents: - swig: drop the unsatisfiable `BuildRequires: golang-shared`. Microsoft build of Go ships no golang-shared subpackage, and SWIG's Go examples build with plain cgo-enabled `go build` and never link the shared stdlib, so the tag is both unsatisfiable and unnecessary. - libcap: force `CGO_REQUIRED=1` in %check. libcap's go/cgo-required.sh returns 0 on Go >= 1.16, making `make test` run the psx/cap Go tests with CGO_ENABLED=0; Microsoft build of Go's systemcrypto backend requires cgo, so those compiles fail. A command-line make variable overrides the makefile's ':=' value and propagates to the go/ sub-make. Give both components dedicated *.comp.toml files and define each overlay as a per-file overlays/*.overlay.toml document (carrying [metadata]) that azldev auto-discovers, rather than inlining the overlays in the comp.toml.
Nan Liu (liunan-ms)
force-pushed
the
liunan/golang-dependent-fixes
branch
from
August 10, 2026 23:19
e04afdb to
4c0029b
Compare
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
Adapts two golang dependents to the Microsoft build of Go toolchain that Azure Linux 4.0 is moving to (see #18360). Microsoft build of Go is built with
%global shared 0and a baselinesystemcrypto(OpenSSL) backend that requires cgo, which breaksswigandlibcap.Changes
swigBuildRequires: golang-shared(spec-remove-tag)golang-sharedsubpackage; SWIG's Go examples build with plain cgo-enabledgo buildand never link the shared stdlib, so the tag is unsatisfiable and unused.libcap%check:make test→make test CGO_REQUIRED=1(spec-search-replace)go/cgo-required.shreturns0on Go ≥ 1.16, running the psx/cap Go tests withCGO_ENABLED=0; Microsoft build of Go's systemcrypto backend requires cgo, so those compiles fail. A command-line make variable overrides the makefile's:=value and propagates to thego/sub-make.Both components move from inline stubs in
components.tomlto dedicated*.comp.tomlfiles and define each overlay as a per-file overlays/*.overlay.toml.Validation
%checkpasses;libcap-2.76-5.azl4produced, and the psx/cap Go self-tests build and run with cgo enabled.golang-sharedremoved; the Go example test-suite builds against Microsoft build of Go (validated during toolchain bring-up).Check Rendered Specs/Update Locksclean).Related