Files
brew/Library
Mike McQuaid 0a88a9467d Use codesign to sign patched binaries on Intel
- Since the switch to `MachO.codesign!` in ruby-macho 6.0, Intel macOS
  rejects the ad-hoc signatures on larger relocated binaries (e.g.
  `libruby`, the Python framework) and kills hardened-runtime programs
  such as MacVim's `vim` at launch with `CODESIGNING, Invalid Page`:
  https://github.com/Homebrew/brew/issues/23418
- The signatures have correct page hashes and pass `codesign --verify`
  on newer macOS, so this looks like an Intel macOS verifier quirk
  rather than simple corruption.
- Restore the pre-6.0 behaviour on Intel: leave unsigned binaries
  unsigned and use `codesign` to re-sign only the binaries whose
  existing signature our modifications have just broken, e.g. MacVim's
  Xcode-ad-hoc-signed hardened-runtime `vim`.
- Restore the fatal preinstall developer tools check, now skipped on
  Apple Silicon rather than gated to it, as `codesign` requires the
  Command Line Tools while ruby-macho does not.
- Keep `MachO.codesign!` on Apple Silicon, where it is required,
  proven and avoids a `codesign` subprocess per relocated file.
2026-08-04 13:12:07 +01:00
..

Library

This directory contains all the code run by the official brew command in Homebrew and all formulae (package descriptions) in taps (repositories containing formulae) in Taps subdirectories.