llvm: fix code-signing certificate setup check

The LLVM formula checks if the LLDB code signing certificate is set up
correctly by trying to sign an empty text file. On certain versions of OS X,
this causes codesign to segfault. This "fixes" it in a hackish way by trying
to sign an actual binary instead.

Closes Homebrew/homebrew#49125.
Closes #680.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Gabriel Gironda 2016-02-12 16:17:02 -05:00 committed by Dominyk Tiller
parent 67ebc929b3
commit 535e2565f3

View file

@ -4,8 +4,8 @@ class CodesignRequirement < Requirement
satisfy(:build_env => false) do
mktemp do
touch "llvm_check.txt"
quiet_system "/usr/bin/codesign", "-s", "lldb_codesign", "--dryrun", "llvm_check.txt"
cp "/usr/bin/false", "llvm_check"
quiet_system "/usr/bin/codesign", "-f", "-s", "lldb_codesign", "--dryrun", "llvm_check"
end
end