Skip to content

Change PGP signature file extension from .sig to .asc#2348

Open
gdams wants to merge 2 commits into
microsoft/mainfrom
dev/gadams/sig
Open

Change PGP signature file extension from .sig to .asc#2348
gdams wants to merge 2 commits into
microsoft/mainfrom
dev/gadams/sig

Conversation

@gdams
Copy link
Copy Markdown
Member

@gdams gdams commented Jun 4, 2026

Align with upstream Go's convention of using .asc for detached PGP signature files.

Fixes #181

The sign tool now always produces .asc files and additionally produces .sig for go1.26 and earlier for backward compatibility.

Changes

  • sign tool (archive.go): Always produce .asc, plus legacy .sig copy for ≤1.26
  • sign tool (sign.go): Test mode handles both .asc and .sig files
  • updatelinktable: Use .asc as signature suffix for all versions (takes effect when regenerated for a future release)

Companion PR

Align with upstream Go's convention of using .asc for detached PGP
signature files. Fixes #181.

- sign tool: Always produce .asc, additionally produce .sig for
  go1.26 and earlier for backward compatibility
- sign tool: Test mode handles both .asc and .sig files
- updatelinktable: Use .asc as signature suffix for all versions
@gdams gdams requested a review from a team as a code owner June 4, 2026 14:32
Copilot AI review requested due to automatic review settings June 4, 2026 14:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Microsoft Go’s release tooling to use .asc as the detached PGP signature file extension (matching upstream Go), while keeping .sig available for older toolchains/artifacts for backward compatibility.

Changes:

  • Update updatelinktable to generate signature links ending in .asc.
  • Update sign tool test mode to treat both .asc and .sig as signature files.
  • Update sign tool archive signing to generate .asc signatures and optionally emit a legacy .sig copy for older releases.
Show a summary per file
File Description
eng/_util/cmd/updatelinktable/updatelinktable.go Switch signature URL suffix from .sig to .asc when generating download/link tables.
eng/_util/cmd/sign/sign.go In test signing mode, treat both .sig and .asc outputs as signature placeholders.
eng/_util/cmd/sign/archive.go Generate .asc signature artifacts and conditionally also produce legacy .sig copies.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment thread eng/_util/cmd/sign/archive.go
@gdams gdams force-pushed the dev/gadams/sig branch from a6a3989 to f453087 Compare June 4, 2026 14:52
// Archive names look like "go1.27.linux-amd64.tar.gz" or "go1.26.3.src.tar.gz".
if after, ok := strings.CutPrefix(a.name, "go1."); ok {
if dot := strings.IndexByte(after, '.'); dot > 0 {
if minor, err := strconv.Atoi(after[:dot]); err == nil && minor <= 26 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We're in microsoft/go, so we know what version we're building based on what branch we're in. It isn't necessary to parse the version, and simplifying it leaves the intent clearer.

func (a *archive) sigPath() string {
return filepath.Join(a.workDir, a.name+".sig")
// legacySigNeeded reports whether this archive needs a legacy .sig file
// in addition to the .asc file, for backward compatibility with go1.26 and earlier.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So the plan here is to break it in 1.27? Note that this breaks download tools, not only individual users' workflows. I don't think we should do this break, especially without already establishing simultaneous publishing for a while to allow for time to move.

Copy link
Copy Markdown
Member

@dagood dagood Jun 4, 2026

Choose a reason for hiding this comment

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

To be clear: I think that publishing both .sig and .asc makes sense. We can then use .asc in our own infra to reduce patching. I don't know if it ever makes sense to stop publishing .sig, though.

.sig is actually a more intuitive extension to slap on our download URLs to get a signature. It might actually be better to treat .asc as a "compatibility" signature, not even the main one.

Users of Go don't even necessarily know about .asc from upstream (my old note on #181):

If I knew Go provided .asc files, I would have followed the naming, but they aren't advertised on the download page. I found out about them because the official golang Dockerfiles use the .asc files to verify the download.

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.

Rename .sig files to .asc: match upstream Go

3 participants