Merge pull request #12956 from danielnachun/rename_ad_hoc_signature
Rename apply_ad_hoc_signature
This commit is contained in:
		
						commit
						e12ce47976
					
				@ -214,6 +214,8 @@ class Keg
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def codesign_patched_binary(_binary_file); end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def lib
 | 
					  def lib
 | 
				
			||||||
    path/"lib"
 | 
					    path/"lib"
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,7 @@ class Keg
 | 
				
			|||||||
    @require_relocation = true
 | 
					    @require_relocation = true
 | 
				
			||||||
    odebug "Changing dylib ID of #{file}\n  from #{file.dylib_id}\n    to #{id}"
 | 
					    odebug "Changing dylib ID of #{file}\n  from #{file.dylib_id}\n    to #{id}"
 | 
				
			||||||
    file.change_dylib_id(id, strict: false)
 | 
					    file.change_dylib_id(id, strict: false)
 | 
				
			||||||
    apply_ad_hoc_signature(file)
 | 
					    codesign_patched_binary(file)
 | 
				
			||||||
  rescue MachO::MachOError
 | 
					  rescue MachO::MachOError
 | 
				
			||||||
    onoe <<~EOS
 | 
					    onoe <<~EOS
 | 
				
			||||||
      Failed changing dylib ID of #{file}
 | 
					      Failed changing dylib ID of #{file}
 | 
				
			||||||
@ -24,7 +24,7 @@ class Keg
 | 
				
			|||||||
    @require_relocation = true
 | 
					    @require_relocation = true
 | 
				
			||||||
    odebug "Changing install name in #{file}\n  from #{old}\n    to #{new}"
 | 
					    odebug "Changing install name in #{file}\n  from #{old}\n    to #{new}"
 | 
				
			||||||
    file.change_install_name(old, new, strict: false)
 | 
					    file.change_install_name(old, new, strict: false)
 | 
				
			||||||
    apply_ad_hoc_signature(file)
 | 
					    codesign_patched_binary(file)
 | 
				
			||||||
  rescue MachO::MachOError
 | 
					  rescue MachO::MachOError
 | 
				
			||||||
    onoe <<~EOS
 | 
					    onoe <<~EOS
 | 
				
			||||||
      Failed changing install name in #{file}
 | 
					      Failed changing install name in #{file}
 | 
				
			||||||
@ -40,7 +40,7 @@ class Keg
 | 
				
			|||||||
    @require_relocation = true
 | 
					    @require_relocation = true
 | 
				
			||||||
    odebug "Changing rpath in #{file}\n  from #{old}\n    to #{new}"
 | 
					    odebug "Changing rpath in #{file}\n  from #{old}\n    to #{new}"
 | 
				
			||||||
    file.change_rpath(old, new, strict: false)
 | 
					    file.change_rpath(old, new, strict: false)
 | 
				
			||||||
    apply_ad_hoc_signature(file)
 | 
					    codesign_patched_binary(file)
 | 
				
			||||||
  rescue MachO::MachOError
 | 
					  rescue MachO::MachOError
 | 
				
			||||||
    onoe <<~EOS
 | 
					    onoe <<~EOS
 | 
				
			||||||
      Failed changing rpath in #{file}
 | 
					      Failed changing rpath in #{file}
 | 
				
			||||||
@ -53,7 +53,7 @@ class Keg
 | 
				
			|||||||
  def delete_rpath(rpath, file)
 | 
					  def delete_rpath(rpath, file)
 | 
				
			||||||
    odebug "Deleting rpath #{rpath} in #{file}"
 | 
					    odebug "Deleting rpath #{rpath} in #{file}"
 | 
				
			||||||
    file.delete_rpath(rpath, strict: false)
 | 
					    file.delete_rpath(rpath, strict: false)
 | 
				
			||||||
    apply_ad_hoc_signature(file)
 | 
					    codesign_patched_binary(file)
 | 
				
			||||||
  rescue MachO::MachOError
 | 
					  rescue MachO::MachOError
 | 
				
			||||||
    onoe <<~EOS
 | 
					    onoe <<~EOS
 | 
				
			||||||
      Failed deleting rpath #{rpath} in #{file}
 | 
					      Failed deleting rpath #{rpath} in #{file}
 | 
				
			||||||
@ -61,7 +61,7 @@ class Keg
 | 
				
			|||||||
    raise
 | 
					    raise
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def apply_ad_hoc_signature(file)
 | 
					  def codesign_patched_binary(file)
 | 
				
			||||||
    return if MacOS.version < :big_sur
 | 
					    return if MacOS.version < :big_sur
 | 
				
			||||||
    return unless Hardware::CPU.arm?
 | 
					    return unless Hardware::CPU.arm?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user