Skip to content

Codesigning on macOS 11 on Apple Silicon #9082

@mistydemeo

Description

@mistydemeo

Feature suggestion

A detailed description of the proposed feature

On macOS 11 on Apple Silicon, codesigning will be mandatory for binaries to run. This applies to both executables and dylibs. An ad-hoc signature is sufficient, and the linker will automatically apply one when a binary is created. However, our tooling (such as ruby-macho) will break existing code signatures and it's necessary to reapply a signature in order to ensure it will continue to run properly.

I've opened a PR in #9040 to automatically apply code signatures whenever we alter a binary using ruby-macho. Failures in that code signature process are currently ignored. A few details we need to discuss here:

  1. Should we unconditionally apply code signing, or only resign binaries that were already signed when we altered then? We're currently doing the former, which has been suggested to us as the right path. This should not be harmful on other OSs even though it's only required on macOS 11 on Apple Silicon.
  2. Should we ignore codesigning failures, or treat them as fatal? We've encountered a few programs where we are unable to correctly resign their dylibs; from @fxcoudert's research, this appears to be a bug in the system codesign utility.

The motivation for the feature

This is needed to future-proof Homebrew.

How the feature would be relevant to at least 90% of Homebrew users

Code signatures are necessary to run code. 100% of Homebrew users, eventually, will need this.

What alternatives to the feature have been considered

There are no alternatives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionInput solicited from othersoutdatedPR was locked due to age

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions