fix: build darwin-arm64 release binaries with GOOS=darwin#2618
Open
martijnwalraven wants to merge 1 commit into
Open
fix: build darwin-arm64 release binaries with GOOS=darwin#2618martijnwalraven wants to merge 1 commit into
martijnwalraven wants to merge 1 commit into
Conversation
The auth-darwin-arm64 make target sets GOOS=linux — a copy-paste of the auth-arm64 recipe above it, introduced when supabase#2436 restructured the inline release builds into per-target rules. Every darwin-arm64 release asset since rc2.189.0-rc.1 has therefore contained a Linux ELF binary under the darwin name (v2.188.x, built before the restructure, shipped real Mach-O). The archive name comes from the target stem while its content comes from the recipe env, and the release-notes checksums are computed over the same wrong binary, so nothing in the pipeline could catch the divergence: a new verify-release target now fails the release when a staged binary's format contradicts its platform.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every
auth-v*-darwin-arm64.tar.gzrelease asset sincerc2.189.0-rc.1contains a Linux ELF binary under the darwin name, so it can never execute on macOS:The cause is one token in the Makefile — the
auth-darwin-arm64recipe setsGOOS=linux, a copy-paste of theauth-arm64recipe above it:This PR changes it to
GOOS=darwinand adds averify-releasetarget so a name/content divergence fails the release instead of shipping.Timeline
GOOS=darwin, merged 2026-03-02); v2.188.0/v2.188.1 shipped genuine Mach-O binaries.auth-darwin-arm64rule was written withGOOS=linux.rc2.189.0-rc.1onward ships the mislabeled binary — verified withfile(1)againstv2.188.1(Mach-O, the pre-regression control),v2.189.0,v2.191.0,v2.192.0,v2.192.1-rc.2, andv2.193.0-rc.3(all ELF).Why nothing caught it
The archive name comes from the make target stem, while the archive content comes from the recipe's env vars — nothing checks that they agree. The release-notes checksums are computed over the same wrong binary, so checksum verification can't catch it either. Downstream, the consumer this asset appears to have been added for (the local stack's native mode in supabase/cli) restart-loops the un-executable binary with no diagnostic, so the failure never surfaced as a report.
The new
verify-releasetarget closes that structural gap. It hooks into the existingreleasetarget, so it runs inside the currentmake releaseCI step — no workflow change needed:Verification
make release-darwin-arm64/auth && make verify-releasepasses,filereportsMach-O 64-bit executable arm64, and the binary executes on a darwin-arm64 host (prints usage).GOOStoken and rebuilding makesmake verify-releasefail the build (make: *** [verify-release] Error 1).CGO_ENABLED=0) — only the env var was wrong.Existing release assets can't be fixed retroactively; the first release after this lands ships the first working darwin-arm64 binary since v2.188.1.