Skip to content

Make unsigned macOS deploy tool builds deterministic - #102

Merged
arrdalan merged 6 commits into
mainfrom
feat/deterministic-unsigned-macos-deploy
May 30, 2026
Merged

Make unsigned macOS deploy tool builds deterministic#102
arrdalan merged 6 commits into
mainfrom
feat/deterministic-unsigned-macos-deploy

Conversation

@jkaczman

@jkaczman jkaczman commented May 18, 2026

Copy link
Copy Markdown
Collaborator

There are two changes here:

The first is that now two macOS unsigned builds are deterministic (byte for byte equal). However, they can no longer be opened without ad-hoc or official signatures (which the build used to do). This was stripped, so that we could have GitHub Actions emit a deterministic hash to check against a local build to check for reproducibility. See discussion on what this means in my comments in the image below.
Screenshot 2026-05-30 at 11 04 44 AM

In addition to that change, the way GitHub Actions emits the hash is via hashing the macOS .app folder (see https://askubuntu.com/questions/1091335/create-checksum-sha256-of-all-files-and-directories for discussion on this). Essentially, it takes a hashes of all the files in the folder (recursively), and then takes a hash of the list of those hashes. After which, we can compare to a local build, make sure it matches, and then sign it. If we were to try to zip it beforehand and hash the zip, there would be nondeterministic metadata, which is why this was done the way it is, and it works quite well.

Relevant to issue #94

@jkaczman
jkaczman requested a review from arrdalan May 30, 2026 15:07
@jkaczman
jkaczman marked this pull request as ready for review May 30, 2026 15:07
@jkaczman

Copy link
Copy Markdown
Collaborator Author

Please squash and merge after reviewing!

@arrdalan arrdalan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good.

@arrdalan
arrdalan merged commit 1080964 into main May 30, 2026
10 checks passed
@jkaczman
jkaczman deleted the feat/deterministic-unsigned-macos-deploy branch May 31, 2026 00:52
@jkaczman jkaczman moved this to Done in v1.2 Release Jun 26, 2026
@jkaczman jkaczman removed this from v1.2 Release Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants