Debian Patches
Status for golang-honnef-go-tools/2026.2.1-1
| Patch | Description | Author | Forwarded | Bugs | Origin | Last update |
|---|---|---|---|---|---|---|
| 0001-Fix-CheckAtomicAlignment-test-on-s390x.patch | Fix CheckAtomicAlignment test on s390x Updated by Anthony Fok on Sun, 12 Nov 2023 19:35:30 -0700 |
Shengjing Zhu <zhsj@debian.org> | no | 2022-06-20 | ||
| 0002-Add-local-copy-of-x-tools-go-expect.patch | Add local copy of x/tools/go/expect go-tools imports golang.org/x/tools/go/expect, a long-deprecated package that upstream only keeps around for the sake of analysistest. It was removed from golang.org/x/tools and therefore is not shipped by Debian's golang-golang-x-tools-dev, so the build fails to resolve the import. Copy internal/xtools-internal/expect to a new top-level golang-x-tools/ directory, which debian/rules rewrites the import path to. Because the copy is created from the upstream tree rather than maintained by hand, it has to be regenerated whenever upstream changes the expect API, which happened for 2026.2.1 where MatchBefore, parse and ExtractGo switched from taking a *token.File to taking a *token.FileSet. Not forwarding this upstream: the import path rewrite is specific to how Debian builds this package, and upstream has no reason to drop support for the deprecated x/tools/go/expect package. |
"Dr. Tobias Quathamer" <toddy@debian.org> | not-needed | 2026-09-30 | ||
| 0003-Skip-TestRmdirAfterGoList_Direct-in-sbuild-environme.patch | Skip TestRmdirAfterGoList_Direct in sbuild environments The test runs 'go list -json example.com/p' on a directory that is not part of any module, which only resolves outside of a build chroot with a writable GOPATH. In the sbuild chroot this fails with 'cannot find package example.com/p in any of: /usr/lib/go-1.27/src/example.com/p (from GOROOT)'. The _Runner variant of this test is already skipped upstream because it was found to be flaky (golang/go#73736), but the _Direct variant is not. The failure is an artefact of the build environment rather than a bug in the code under test, so it is not forwarded upstream. |
Reinhard Tartler <siretart@tauware.de> | not-needed | 2026-09-30 | ||
| 0004-Skip-TestCalls-in-typeindex-in-sbuild-environments.patch | Skip TestCalls in typeindex in sbuild environments The test uses packages.Load to load a package named 'foo' that it has just created in a temporary directory. In the sbuild chroot go list cannot resolve it, producing 'cannot find package foo in any of: /usr/lib/go-1.27/src/foo (from GOROOT)'. This is a constraint of the offline build environment rather than a bug in the code under test, so it is not forwarded upstream. |
Reinhard Tartler <siretart@tauware.de> | not-needed | 2026-09-30 | ||
| 0005-Skip-TestSyntax-and-remove-go-cmp-dependency-in-go-i.patch | Skip TestSyntax and remove go-cmp dependency in go/ir tests builder_test.go imports github.com/google/go-cmp/cmp. go-cmp is only used by TestSyntax, but because it is a file-level import the whole go/ir test package fails to build with '[setup failed]' when the module is not available. Debian does not want to pull golang-github-google-go-cmp-dev into Build-Depends just to compare a diff in a single test, so switch the comparison to reflect.DeepEqual, which needs no extra dependency, and skip TestSyntax as well. Not forwarded upstream: the dependency is available in a normal upstream build, so dropping the test there would lose coverage. |
Reinhard Tartler <siretart@tauware.de> | not-needed | 2026-09-30 | ||
| 0006-Replace-go-linkname-stubs-with-local-implementations.patch | Replace go:linkname stubs with local implementations classify_call.go reached into golang.org/x/tools/go/types/typeutil with //go:linkname to access the unexported functions usedIdent and interfaceMethod. Upstream x/tools removed both symbols in commit 6cbeeac ("internal/typesinternal: avoid linkname hacks"), which shipped in golang.org/x/tools v0.49.0, and instead moved the implementations into its own internal/typesinternal package. go-tools 2026.2.1 pins a development snapshot of x/tools via go.mod, so the stubs compile against upstream's tree but the release Debian actually ships no longer defines them. The typesinternal test binary therefore fails to link with: relocation target golang.org/x/tools/go/types/typeutil.usedIdent not defined relocation target golang.org/x/tools/go/types/typeutil.interfaceMethod not defined Replace the stubs with local copies of the implementations, taken from golang.org/x/tools/internal/typesinternal/classify_call.go as of v0.49.0. This keeps behaviour identical to the released upstream code and removes the dependence on another project's unexported symbols. |
Reinhard Tartler <siretart@tauware.de> | yes | upstream | 2026-09-30 |
All known versions for source package 'golang-honnef-go-tools'
- 2026.2.1-1 (sid)
- 2026.1-4 (forky)
- 2024.1-1 (trixie)
- 2023.1-1 (bookworm)
