Keg: apply ad-hoc signature on 10.15 or later#9041
Closed
mistydemeo wants to merge 1 commit intoHomebrew:masterfrom
Closed
Keg: apply ad-hoc signature on 10.15 or later#9041mistydemeo wants to merge 1 commit intoHomebrew:masterfrom
mistydemeo wants to merge 1 commit intoHomebrew:masterfrom
Conversation
b73d9b6 to
99527b6
Compare
This is an alternative to Homebrew#9040. In that case, we rely on ruby-macho to apply code signatures after changing ID or install_name. Here, we instead do that ourselves so that we can choose what OS to apply it on. Like in that PR, we swallow any failures so that we don't inadvertently break more exotic packages like OpenJDK (which caused issues in Homebrew#8922).
99527b6 to
14a07e1
Compare
MikeMcQuaid
reviewed
Nov 4, 2020
| @require_relocation = true | ||
| odebug "Changing dylib ID of #{file}\n from #{file.dylib_id}\n to #{id}" | ||
| MachO::Tools.change_dylib_id(file, id, strict: false) | ||
| apply_ad_hoc_signature(file) |
Member
There was a problem hiding this comment.
I think it would be nice to keep this logic in ruby-macho with MachO::Tools.codesign or similar which would allow replacing it with a native (i.e. not shelling out to codesign) version at some point in the future. See also: #9040 (comment)
Member
|
Linking to discussion in #9082 |
Merged
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew stylewith your changes locally?brew testswith your changes locally?brew manlocally and committed any changes?This is an alternative to #9040. In that case, we rely on ruby-macho to apply code signatures after changing ID or install_name. Here, we instead do that ourselves so that we can choose what OS to apply it on. Like in that PR, we swallow any failures so that we don't inadvertently break more exotic packages like OpenJDK (which caused issues in #8922).
cc @MikeMcQuaid, who had suggested this as an alternate to the other path.