Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

build: strip signature from compiled macOS base binary#179

Merged
jesec merged 1 commit intomasterfrom
pr/strip-macos-sig
May 10, 2021
Merged

build: strip signature from compiled macOS base binary#179
jesec merged 1 commit intomasterfrom
pr/strip-macos-sig

Conversation

@jesec
Copy link
Contributor

@jesec jesec commented May 10, 2021

Newer versions of Apple Clang automatically ad-hoc sign the compiled
executable, due to the new mandatory code signing requirement 1.

However, for final executable to be signable, base binary MUST NOT
have an existing signature.

This change strips the ad-hoc signature from compiled macOS base binary.

Refs: vercel/pkg#1164
Bug: vercel/pkg#1023

Newer versions of Apple Clang automatically ad-hoc sign the compiled
executable, due to the new mandatory code signing requirement [1].

However, for final executable to be signable, base binary MUST NOT
have an existing signature.

This change strips the ad-hoc signature from compiled macOS base binary.

[1]: https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-universal-apps-release-notes

Refs: vercel/pkg#1164
Bug: vercel/pkg#1023
@jesec jesec requested review from leerob and robertsLando May 10, 2021 15:10
@jesec
Copy link
Contributor Author

jesec commented May 10, 2021

With this PR and vercel/pkg#1164, it is now possible to build a working executable for macos-arm64 platform (Apple M1).

Unfortunately, while it is possible to compile x86 Node binaries on arm64 Macs, it is not possible at the moment to compile arm64 Node binaries on x86 Macs due to issues of Node build system.

As Github Actions only provide x86 Macs, we can't provide binaries for macos-arm64 platform at the moment.

@jesec
Copy link
Contributor Author

jesec commented May 10, 2021

However, I can build binaries on my personal arm64 Mac, and upload them to the repo.

Shall I? @leerob @robertsLando

Copy link
Contributor

@robertsLando robertsLando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Also I think that the temporary solution you proposed is fine

@jesec jesec merged commit a062bb4 into master May 10, 2021
@jesec jesec deleted the pr/strip-macos-sig branch May 10, 2021 15:58
@jesec
Copy link
Contributor Author

jesec commented May 10, 2021

Great. I will build Node 14 and 16 macos-arm64 binaries then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants