Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround apple silicon codesigning cache bug #2543

Merged
merged 1 commit into from
Jan 31, 2023

Commits on Jan 31, 2023

  1. Workaround apple silicon codesigning cache bug

    This is a hack to work around a codesigning problem on Apple Silicon where overwriting a binary that has already been executed doesn't cause the corresponding codesign entry in the OS cache to update. Mac then prevents the updated binary from running because the signature doesn't match. Removing the file first clears the cache so that we don't run into "zsh: killed ..."
    
    I've updated the magefile so that when we run the install target, the original binaries are removed before we copy. I considered fixing this directly in shx.Copy but lots of people use that and this is a bug in just regular old cp too. So I don't want shx.Copy to do stuff that even cp doesn't.
    
    See:
    * https://stackoverflow.com/questions/67378106/mac-m1-cping-binary-over-another-results-in-crash
    * https://openradar.appspot.com/FB8914231
    
    Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
    carolynvs committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    980bf68 View commit details
    Browse the repository at this point in the history