Skip to content

Keep the macOS OpenSSL search paths out of /tmp - #528

Merged
mtrojnar merged 1 commit into
masterfrom
ci/macos-openssl-prefix
Nov 5, 2026
Merged

mtrojnar merged 1 commit into
masterfrom
ci/macos-openssl-prefix

Conversation

@mtrojnar

@mtrojnar mtrojnar commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Problem

OpenSSL compiles its installation prefix in as the directory it searches for engines and providers loaded by name. Since #523, the macOS release job installs OpenSSL with --prefix=/tmp/opensslinstall. The resulting binary would therefore look for -engine pkcs11, for example, in /tmp/opensslinstall/lib/engines-3, a directory any local user can create. No release has shipped with this yet.

Fix

Keep OpenSSL's default /usr/local prefix and stage the installation with DESTDIR, as #527 does on Windows with that platform's default prefix. The build now fails if the binary refers to the staging directory. The cache key changes because the installed layout does.

Validation

I ran the macOS jobs via workflow_dispatch from a temporary branch (42083460974). Both binaries now embed ENGINESDIR: "/usr/local/lib/engines-3" and MODULESDIR: "/usr/local/lib/ossl-modules", where the build from #523 had /tmp/opensslinstall/.... All 391 tests passed on both architectures.

OpenSSL compiles its installation prefix in as the directory it
searches for engines and providers loaded by name. The macOS release
job installed OpenSSL with --prefix=/tmp/opensslinstall, so the binary
would look for, say, "-engine pkcs11" in /tmp/opensslinstall, which any
local user can create.

Keep OpenSSL's default /usr/local prefix and stage the installation
with DESTDIR, as the Windows job does with its default prefix. Fail the
build if the binary refers to the staging directory. The cache key
changes because the installed layout does.
@mtrojnar
mtrojnar merged commit bcdbdd3 into master Nov 5, 2026
10 checks passed
@mtrojnar
mtrojnar deleted the ci/macos-openssl-prefix branch November 5, 2026 19:10
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.

1 participant