Skip to content

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented Jan 21, 2026

3.0 LTS version will be EOL at Sep, 2026. We should move 3.5.x version at next stable version.

I'm not sure we also migrate OpenSSL 3.5 for Ruby 3.3-4.0 yet. I will consider that in this year.

hsbt added 2 commits January 21, 2026 10:27
3.0 LTS version will be EOL at 2026. We should move 3.5.x version at next stable version.
Copilot AI review requested due to automatic review settings January 21, 2026 01:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the OpenSSL dependency from version 3.0.18 (which reaches end-of-life in September 2026) to the newer 3.5.4 LTS version for Ruby's next stable development versions. The update includes an enhancement to the update-openssl script that automates SHA256 checksum computation by downloading the tarball directly from GitHub releases.

Changes:

  • Updated OpenSSL version from 3.0.18 to 3.5.4 for ruby-dev and 4.1-dev build definitions
  • Enhanced update-openssl script to automatically download and compute SHA256 checksums instead of requiring them as input
  • Added necessary Ruby requires (open-uri, digest/sha2, tempfile) to support automatic checksum computation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
share/ruby-build/ruby-dev Updated OpenSSL dependency to version 3.5.4 with new SHA256 checksum
share/ruby-build/4.1-dev Updated OpenSSL dependency to version 3.5.4 with new SHA256 checksum
script/update-openssl Modified to automatically download OpenSSL tarball and compute SHA256 instead of requiring manual input

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to +17
URI.open(url) do |remote_file|
IO.copy_stream(remote_file, tmpfile)
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

Using URI.open to download content from the internet without explicit error handling could result in unclear error messages if the download fails (network issues, 404 errors, SSL certificate problems). Consider wrapping this in a begin-rescue block to provide more user-friendly error messages, especially since this changes the script from requiring a pre-computed SHA256 to automatically downloading and computing it.

Suggested change
URI.open(url) do |remote_file|
IO.copy_stream(remote_file, tmpfile)
begin
URI.open(url) do |remote_file|
IO.copy_stream(remote_file, tmpfile)
end
rescue OpenURI::HTTPError => e
abort "Failed to download #{url}: #{e.message}"
rescue SocketError, IOError, SystemCallError => e
abort "Network error while downloading #{url}: #{e.class}: #{e.message}"

Copilot uses AI. Check for mistakes.

raise "Usage: #{$0} NEW_VERSION" unless ARGV.size == 1
new_version = ARGV[0]

Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The open-uri library enables Kernel.open to automatically open URIs, which can be a security concern. While the URL is constructed from a version parameter and targets a specific GitHub pattern, consider using URI.open explicitly (which you are doing) and potentially adding validation that the version parameter only contains expected characters (digits and dots) to prevent any potential URL manipulation.

Suggested change
unless new_version.match?(/\A\d+(?:\.\d+)*[a-z]?\z/)
raise "Invalid OpenSSL version: #{new_version.inspect}"
end

Copilot uses AI. Check for mistakes.
@hsbt hsbt merged commit 10ea767 into master Jan 21, 2026
12 checks passed
@hsbt hsbt deleted the openssl-3-5 branch January 21, 2026 02:14
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