Skip to content

fix(nodejs): resolve OpenSSL through macOS rpaths#682

Open
100yenadmin wants to merge 1 commit into
LadybugDB:mainfrom
100yenadmin:fix/macos-openssl-rpaths
Open

fix(nodejs): resolve OpenSSL through macOS rpaths#682
100yenadmin wants to merge 1 commit into
LadybugDB:mainfrom
100yenadmin:fix/macos-openssl-rpaths

Conversation

@100yenadmin

Copy link
Copy Markdown

Summary

  • rewrite macOS Node addon OpenSSL dependencies to @rpath
  • search the standard Homebrew ARM, Homebrew Intel, and MacPorts OpenSSL roots
  • verify the packaged Mach-O dependencies and load the relocated addon in CI

Root cause

The published macOS Node addons inherit absolute install names from the OpenSSL
dylibs available on the build runner. Current artifacts therefore reference
/opt/homebrew/opt/openssl@3/... directly and fail to load for MacPorts users
even when a maintained OpenSSL 3 installation is present at /opt/local/lib.

Security and packaging

This does not bundle or statically link OpenSSL. Consumers still provide a
separately maintained OpenSSL 3 installation. The packaging step replaces the
build-machine-specific dependency names with @rpath and embeds only these
search roots:

  • /opt/homebrew/opt/openssl@3/lib
  • /usr/local/opt/openssl@3/lib
  • /opt/local/lib

The modified addon is ad-hoc signed after install_name_tool changes it.

Validation

  • verifier failed against the published 0.18.1 addon before relocation
  • relocation and verification pass on a fresh copy of that addon
  • relocation is idempotent when run twice
  • the relocated addon loads successfully through Node.js
  • bash -n and ShellCheck pass for both scripts
  • git diff --check passes
  • the workflow runs relocation, Mach-O verification, and addon loading on both
    macOS matrix entries before artifact upload

Full macOS ARM and Intel build proof remains delegated to this PR's remote CI.

Closes #681

@100yenadmin

Copy link
Copy Markdown
Author

Validation note for maintainers: the ordinary PR checks do not invoke .github/workflows/nodejs-workflow.yml; that workflow is dispatch/reuse-only and requires a precompiled-run artifact ID.

Local packaging proof is included in the PR body and is green. Before marking this ready, the downstream reconciliation gate still requires the authoritative macOS ARM and Intel Node artifact jobs. Please advise the preferred maintainer-dispatch route for this fork PR, or dispatch the equivalent no-publish build after reviewing the workflow change. No npm publication is requested.

@100yenadmin

Copy link
Copy Markdown
Author

Authoritative artifact proof is now complete.

The Node run uses evidence-only commit b4ca280b, whose sole difference from this PR head is one workflow environment line selecting the fork as the artifact source. That line is not part of this PR. The underlying fork-dispatch defect is tracked separately in #683.

No package was published and no deployment occurred. With ordinary PR checks and both artifact matrices green, this PR is ready for maintainer review.

@100yenadmin 100yenadmin marked this pull request as ready for review July 13, 2026 07:06
@100yenadmin

Copy link
Copy Markdown
Author

@coderabbitai review

@100yenadmin

Copy link
Copy Markdown
Author

Additional Homebrew-independence proof is green:

The additional probe exists only on evidence branch commit a2862f27; PR
#682 remains unchanged at d61f8590. All ordinary fork workflows were
disabled again after the run, and no package or deployment action occurred.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: darwin-arm64 prebuilt lbugjs.node hardcodes Homebrew OpenSSL paths — dlopen fails on Macs without Homebrew (regression from 0.15.3)

1 participant