os/mac/keg.rb: rename to codesign_patched_binary

This commit is contained in:
danielnachun 2022-03-03 17:35:16 -08:00
parent 39fc386253
commit 57e3e62edb
No known key found for this signature in database
GPG Key ID: 7343CCAD07E2D0FB

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?