-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an environment variable to always build openssl/libssl #2466
Conversation
eregon
commented
Nov 9, 2024
- This is useful when one wants to avoid depending e.g. on which openssl version is installed in Homebrew, notably for libssl.1.1.dylib not found for Ruby 3.0 and TruffleRuby on macos-14 ruby/setup-ruby#668
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for suggesting! Would you add a note about the new option to the README too?
bin/ruby-build
Outdated
@@ -1122,6 +1122,8 @@ normalize_semver() { | |||
# If a compatible Homebrew-installed OpenSSL version is found during | |||
# checking, Ruby will be linked to it and the check will return false. | |||
needs_openssl() { | |||
[ "$RUBY_BUILD_BUILD_OPENSSL" = "true" ] && return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Would a better name be "RUBY_BUILD_VENDOR_OPENSSL" so that it's clear that openssl will be vendored and to avoid saying "build" twice?
- We generally allow any non-blank string to be a truthy value for an environment variable, so I would rewrite this check as:
[ "$RUBY_BUILD_BUILD_OPENSSL" = "true" ] && return 0 | |
[ -z "$RUBY_BUILD_VENDOR_OPENSSL" ] || return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks
For posterity: this adds an opt-out mechanism first requested in #2275 (comment) |
* This is useful when one wants to avoid depending e.g. on which openssl version is installed in Homebrew, notably for ruby/setup-ruby#668
b83405a
to
3ddd768
Compare
I documented it in the README, it should be good to go |