Merge pull request #12956 from danielnachun/rename_ad_hoc_signature

Rename apply_ad_hoc_signature
This commit is contained in:
Mike McQuaid 2022-03-04 14:41:31 +00:00 committed by GitHub
commit e12ce47976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -214,6 +214,8 @@ class Keg
end
end
def codesign_patched_binary(_binary_file); end
def lib
path/"lib"
end

View File

@ -8,7 +8,7 @@ class Keg
@require_relocation = true
odebug "Changing dylib ID of #{file}\n from #{file.dylib_id}\n to #{id}"
file.change_dylib_id(id, strict: false)
apply_ad_hoc_signature(file)
codesign_patched_binary(file)
rescue MachO::MachOError
onoe <<~EOS
Failed changing dylib ID of #{file}
@ -24,7 +24,7 @@ class Keg
@require_relocation = true
odebug "Changing install name in #{file}\n from #{old}\n to #{new}"
file.change_install_name(old, new, strict: false)
apply_ad_hoc_signature(file)
codesign_patched_binary(file)
rescue MachO::MachOError
onoe <<~EOS
Failed changing install name in #{file}
@ -40,7 +40,7 @@ class Keg
@require_relocation = true
odebug "Changing rpath in #{file}\n from #{old}\n to #{new}"
file.change_rpath(old, new, strict: false)
apply_ad_hoc_signature(file)
codesign_patched_binary(file)
rescue MachO::MachOError
onoe <<~EOS
Failed changing rpath in #{file}
@ -53,7 +53,7 @@ class Keg
def delete_rpath(rpath, file)
odebug "Deleting rpath #{rpath} in #{file}"
file.delete_rpath(rpath, strict: false)
apply_ad_hoc_signature(file)
codesign_patched_binary(file)
rescue MachO::MachOError
onoe <<~EOS
Failed deleting rpath #{rpath} in #{file}
@ -61,7 +61,7 @@ class Keg
raise
end
def apply_ad_hoc_signature(file)
def codesign_patched_binary(file)
return if MacOS.version < :big_sur
return unless Hardware::CPU.arm?