-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from rake-compiler/flavorjones-sigtool
`strip` does ad-hoc code signatures on darwin
- Loading branch information
Showing
5 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# Stripping a signed Mach-O binary will invalidate the signature. To mimic what strip does on native | ||
# Darwin, we install this wrapper to re-sign the binary after stripping it. | ||
|
||
files = ARGV.reject { |f| f=~/^-/ } | ||
|
||
strip = "#{File.basename($0)}.bin" | ||
strip_options = ARGV.select{|f| f=~/^-/ } | ||
strip_arguments = [strip] + strip_options + files | ||
|
||
codesign = "codesign" # installed into /usr/bin by mk_osxcross.sh | ||
codesign_options = ["-f", "-s-"] | ||
codesign_arguments = [codesign] + codesign_options + files | ||
|
||
system(*strip_arguments, exception: true) | ||
system(*codesign_arguments, exception: true) |
File renamed without changes.
This file contains 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