-
Notifications
You must be signed in to change notification settings - Fork 75
Fix GPG key import #772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix GPG key import #772
Conversation
e1038c1 to
bb9d928
Compare
|
Works like charm! ❤️ |
lemonlab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works perfectly, thanks 🙏
|
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. |
fwal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution @mman!
The functions `setupKeys` and `refreshKeys` have not been used since the transition to Swiftly in swift-actions#710. So the changes in swift-actions#772 are meaningless.
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
downloadToolfetching the keys from the swift.org website actually stores gzipped file into a temporary directory, andgpg --importis unable to cope with that.Some people suggested that this may be a problem with the CDN sending
deflateencoding randomly, so I am proposing a robust fix that invokeszcaton the downloaded file and then pipes it intogpg --importviastdin.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.