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

ruby@2.7: switch to openssl@3 #134420

Merged
merged 2 commits into from
Jun 26, 2023
Merged

Conversation

carlocab
Copy link
Member

See #134251.

@carlocab carlocab added openssl-3-migration Related to switching to an OpenSSL 3 dependency staging-branch-pr This pull request targets a *-staging branch. labels Jun 21, 2023
@github-actions github-actions bot added legacy Relates to a versioned @ formula formula deprecated Formula deprecated labels Jun 21, 2023
@Bo98
Copy link
Member

Bo98 commented Jun 21, 2023

I think OpenSSL 3 support was never backported to Ruby 3.0 and earlier, so worth watching out for that (Ruby build is notorious for just skipping modules if it fails).

Ruby 2.7 could be disabled by the time OpenSSL 1.1 is EOL should we choose. Though we'll need to do something for Ruby 3.0 anyway.

An option is backporting the OpenSSL gem (3.0.2?). Upstream thought about doing this themselves (https://bugs.ruby-lang.org/issues/18658) but declined to do so since they wanted to retain OpenSSL 1.0.x compatibility. There are some other compatibility concerns however: https://github.com/ruby/openssl/blob/master/History.md#compatibility-notes

LibreSSL is an option but one I'm unsure of the consequences of, and is something we've generally not used (except movgrab apparently).

@carlocab
Copy link
Member Author

carlocab commented Jun 21, 2023

Yea, looks like it just refuses to build:
/private/tmp/rubyA2.7-20230621-82680-e453l8/ruby-2.7.8/ext/openssl/extconf.rb:111: OpenSSL >= 1.0.1, < 3.0.0 or LibreSSL >= 2.5.0 is required

@fel1x-developer
Copy link
Contributor

Yea, looks like it just refuses to build: /private/tmp/rubyA2.7-20230621-82680-e453l8/ruby-2.7.8/ext/openssl/extconf.rb:111: OpenSSL >= 1.0.1, < 3.0.0 or LibreSSL >= 2.5.0 is required

Then can we replace openssl@1.1 with libressl?

@Bo98
Copy link
Member

Bo98 commented Jun 25, 2023

I reckon we either offer a similar fix as we did to ruby@3.0. If that doesn't work, Ruby 2.7 is already EOL anyway.

@carlocab carlocab changed the base branch from openssl-migration-staging to master June 26, 2023 05:17
@carlocab carlocab removed the staging-branch-pr This pull request targets a *-staging branch. label Jun 26, 2023
@carlocab
Copy link
Member Author

  /private/tmp/rubyA2.7-20230625-34024-17cmb8z/ruby-2.7.8/ext/digest/digest_conf.rb:68:in `require': cannot load such file -- /private/tmp/rubyA2.7-20230625-34024-17cmb8z/ruby-2.7.8/ext/openssl/deprecation (LoadError)
  	from /private/tmp/rubyA2.7-20230625-34024-17cmb8z/ruby-2.7.8/ext/digest/digest_conf.rb:68:in `digest_conf'
  	from /private/tmp/rubyA2.7-20230625-34024-17cmb8z/ruby-2.7.8/ext/digest/md5/extconf.rb:13:in `<top (required)>'
  	from ./ext/extmk.rb:214:in `load'
  	from ./ext/extmk.rb:214:in `block in extmake'
  	from /private/tmp/rubyA2.7-20230625-34024-17cmb8z/ruby-2.7.8/lib/mkmf.rb:331:in `open'
  	from ./ext/extmk.rb:210:in `extmake'
  	from ./ext/extmk.rb:575:in `block in <main>'
  	from ./ext/extmk.rb:571:in `each'
  	from ./ext/extmk.rb:571:in `<main>'
  make[1]: *** [ext/digest/exts.mk] Error 1

Let's see if an older openssl gem works.

@carlocab carlocab force-pushed the ruby27-openssl3 branch 2 times, most recently from 9cfcab1 to a3fb695 Compare June 26, 2023 12:28
We need to update the openssl gem to do this.
@carlocab
Copy link
Member Author

carlocab commented Jun 26, 2023

Dependent failure is spurious: https://github.com/Homebrew/homebrew-core/actions/runs/5380336644/jobs/9763600018?pr=134420#step:4:35

In any case, the only dependent is deprecated.

@carlocab carlocab added ready to merge PR can be merged once CI is green CI-skip-dependents Pass --skip-dependents to brew test-bot. labels Jun 26, 2023
@carlocab carlocab requested a review from Bo98 June 26, 2023 16:34
@Bo98
Copy link
Member

Bo98 commented Jun 26, 2023

Dependent failure is spurious: https://github.com/Homebrew/homebrew-core/actions/runs/5380336644/jobs/9763600018?pr=134420#step:4:35

This is because of its use in caveats.

@github-actions
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Jun 26, 2023
@BrewTestBot BrewTestBot added this pull request to the merge queue Jun 26, 2023
Merged via the queue into Homebrew:master with commit 490567a Jun 26, 2023
@carlocab carlocab deleted the ruby27-openssl3 branch June 26, 2023 17:00
@joshcooper
Copy link

Hi, I didn't understand why ruby 2.7 was bumped to openssl@3? As mentioned in the comments and the ruby bug tracker that combination is not supported.

@github-actions github-actions bot added the outdated PR was locked due to age label Aug 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. CI-skip-dependents Pass --skip-dependents to brew test-bot. formula deprecated Formula deprecated legacy Relates to a versioned @ formula openssl-3-migration Related to switching to an OpenSSL 3 dependency outdated PR was locked due to age ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants