Skip to content

ruby@2.7: switch to openssl@3#134420

Merged
BrewTestBot merged 2 commits into
Homebrew:masterfrom
carlocab:ruby27-openssl3
Jun 26, 2023
Merged

ruby@2.7: switch to openssl@3#134420
BrewTestBot merged 2 commits into
Homebrew:masterfrom
carlocab:ruby27-openssl3

Conversation

@carlocab

Copy link
Copy Markdown
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

Bo98 commented Jun 21, 2023

Copy link
Copy Markdown
Member

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

carlocab commented Jun 21, 2023

Copy link
Copy Markdown
Member Author

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

@mchoo7

mchoo7 commented Jun 25, 2023

Copy link
Copy Markdown
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

Bo98 commented Jun 25, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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

carlocab commented Jun 26, 2023

Copy link
Copy Markdown
Member Author

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

Bo98 commented Jun 26, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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 enabled auto-merge June 26, 2023 16:42
@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
Copy Markdown

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