Skip to content
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

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

eregon
Copy link
Member

@eregon eregon commented Nov 9, 2024

@eregon eregon requested a review from mislav November 9, 2024 16:22
Copy link
Member

@mislav mislav left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 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?
  2. We generally allow any non-blank string to be a truthy value for an environment variable, so I would rewrite this check as:
Suggested change
[ "$RUBY_BUILD_BUILD_OPENSSL" = "true" ] && return 0
[ -z "$RUBY_BUILD_VENDOR_OPENSSL" ] || return 0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks

@mislav
Copy link
Member

mislav commented Nov 11, 2024

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
@eregon eregon force-pushed the env-var-to-always-build-openssl branch from b83405a to 3ddd768 Compare November 11, 2024 21:37
@eregon
Copy link
Member Author

eregon commented Nov 11, 2024

I documented it in the README, it should be good to go

@eregon eregon merged commit 6c937c8 into rbenv:master Nov 13, 2024
4 checks passed
@eregon eregon deleted the env-var-to-always-build-openssl branch November 13, 2024 13:27
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.

2 participants