Skip to content

Conversation

@mman
Copy link

@mman mman commented Sep 25, 2025

To celebrate Server Side Swift Conference 2025 I am proposing a fix to the long-standing issue where import of Swift signing GPG keys fails.

As identified in multiple bug reports, the root cause is that downloadTool fetching the keys from the swift.org website actually stores gzipped file into a temporary directory, and gpg --import is unable to cope with that.

Some people suggested that this may be a problem with the CDN sending deflate encoding randomly, so I am proposing a robust fix that invokes zcat on the downloaded file and then pipes it into gpg --import via stdin.

Tried on couple runs in my private repositories and it seems to work reliably.

Narrator's edit: It did not work reliably. Turns out that sometimes the keys are in plaintext, and sometimes gzipped, we can only speculate why, so I added a more robust logic to handle both cases.

Closes #759, #739, #694, #591, #520, #419.

@techouse
Copy link

techouse commented Sep 26, 2025

Works like charm! ❤️

Copy link

@lemonlab lemonlab left a comment

Choose a reason for hiding this comment

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

Works perfectly, thanks 🙏

@willtemperley
Copy link

It would be great to get this reviewed. It's a real blocker on arrow-swift because PRs just can't get approved because swift-setup is failing randomly. I think only @slashmo can do this.

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.

Swift 5.10 on ubuntu-latest fails because of gpg

4 participants