Repository navigation
fix(macos): bundle OpenSSL so PostgreSQL starts without Homebrew - #51
Merged
Merged
Conversation
The theseus-rs macOS PostgreSQL binaries load libssl/libcrypto from /opt/homebrew/opt/openssl@3, so pg0 cannot start PostgreSQL on a Mac without Homebrew (theseus-rs/postgresql-binaries#30). For the apple-darwin targets, build.rs now copies libssl.3.dylib and libcrypto.3.dylib from a pinned, checksummed conda-forge OpenSSL 3.5.9 package into the bundle's lib/, rewrites every reference to @loader_path/../lib/, re-signs the changed files ad-hoc and fails the build if any Mach-O still references /opt/homebrew or /usr/local. An install extracted by an earlier pg0 is re-extracted once. Linux and Windows builds are unchanged.
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.
This is #42 by @vadimcomanescu, rebased onto
main(author kept). The libxml2 commit is dropped because #47/#50 already fixed that. I couldn't push to the original branch since it lives in an organization fork.The macOS PostgreSQL binaries load OpenSSL from
/opt/homebrew/opt/openssl@3, sopg0 startfails on Macs without Homebrew. This bundles conda-forge's OpenSSL 3.5.9 (pinned by URL and sha256), rewrites every reference to@loader_path, re-signs ad hoc, and fails the build if any Homebrew or/usr/localpath is left. Existing broken installs get re-extracted on the next start. See #42 for the full write-up.Verified locally (arm64): 127 Mach-O files with 0 Homebrew/
/usr/localreferences,libpqloads@loader_path/../lib/libssl.3.dylib,SHOW ssl_libraryreturnsOpenSSL, andCREATE EXTENSION vectorworks.