-
-
Notifications
You must be signed in to change notification settings - Fork 11k
[WIP] Activate GPG verification upon install #16090
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
Conversation
Nice work. Glad this is getting some love again. |
Thanks for taking up the patchset, @jawshooah. Beyond refactoring, it might be best to improve the CLI output —that is, hide the rather verbose one of GPG— in this PR, rather than postponing UX changes to a later date. |
A (rather simple) idea would just be to dump the output to |
Even simpler would be to set |
@ndr-qef I'm not very familiar with GPG, but should we be using |
Also should we just add |
I don't like adding that dependency to Casks, as gpg verification should be "best effort" - the notification that gpg verification was skipped (and to install gpg to activate it) should be enough |
GnuPG 1 is stable and maintained, as well as widely deployed — notably in the Debian package manager, where it is the standard version to this day. In any case, the |
Gotcha. Just wanted to make sure we weren't dating ourselves. I'll work on this more tonight. |
What's the plan for getting this merged? I'm looking forward to checking signatures without local patches on top. |
There's still a bit more work to be done before merging. I've been swamped for a while, but I'll try to get this out within the next few days. |
Awesome, thank you! |
@jawshooah Any update on this? |
@jawshooah ping |
Sorry for the huge delay on this. Life has been dropping a hammer on me the last few months. I should have some time this evening to work on this, though. |
and store the result in a field instead. Failure handling is delegated.
Specifically, handle cases where the most recent metadata folder was created by something other than GpgCheck, e.g. an `install --force`.
and associated support files: test Casks, binaries, signature.
@caskroom/maintainers Does anyone want to give any feedback here? |
Hadn’t noticed there were commits after the last comment. Is this ready @jawshooah? |
Should be functional, I've just been meaning to add more tests but haven't gotten around to it. Also needs a rebase. |
|
||
def initialize(cask, downloaded_path, command=Hbc::SystemCommand) | ||
def initialize(cask, downloaded_path, force_fetch=false, command=Hbc::SystemCommand) |
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.
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.
Since we now assume users are running Ruby >=2.0, why not use keyword arguments?
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.
@jawshooah Thanks for pointing that out. Those would be an even better choice!
One more issue that needs to be discussed before we merge is error handling. For example, as of right now is up, while at the same time returns a HTTP 500 status:
When I rebase this PR and then do I think it’s perfectly acceptable for the whole installation to fail when the signature is unavailable. However, this should result in a clear error message indicating what happened, rather than just bailing out with a stack trace. |
This needs a rebase. |
ping @jawshooah Any chance you could rebase and update the error handling? |
@fanquake Hopefully I can get to this later tonight. |
Leaving this open since there is still interest, I just haven't gotten around to cleaning it up yet. Will try to migrate to Homebrew/brew later this evening. |
Continued in Homebrew/brew#1335. |
Picking up where @ndr-qef left off with #8749.
This is still a work-in-progress, so please feel free to throw your feedback at me.