Skip to content

Fix OpenSSL version requirement in update-cruby for Ruby 4.x#2612

Merged
hsbt merged 1 commit into
masterfrom
fix-openssl-version
Mar 26, 2026
Merged

Fix OpenSSL version requirement in update-cruby for Ruby 4.x#2612
hsbt merged 1 commit into
masterfrom
fix-openssl-version

Conversation

@hsbt

@hsbt hsbt commented Mar 26, 2026

Copy link
Copy Markdown
Member

Followed up with #2608

Ruby >= 4.0 requires OpenSSL >= 1.1.1, but the script hardcoded
needs_openssl:1.0.2-3.x.x for all versions. Add version-based
condition to use needs_openssl:1.1.1-3.x.x for Ruby 4.x and later.

Ref: #2608

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 26, 2026 03:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the script/update-cruby generator so Ruby 4.x definitions use the correct OpenSSL compatibility gate when deciding whether to vendor-build OpenSSL.

Changes:

  • Derive Ruby major_version from the provided VERSION.
  • Select needs_openssl:1.1.1-3.x.x for Ruby 4+ (else keep needs_openssl:1.0.2-3.x.x).
  • Emit the selected needs_openssl condition in the generated definition file.

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

Comment thread script/update-cruby
Comment on lines +39 to +40
major_version=$(echo ${version} | cut -d '.' -f 1)
if [ "$major_version" -ge 4 ]; then

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

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

major_version=$(echo ${version} | cut -d '.' -f 1) introduces an unquoted expansion and relies on echo, which can mis-handle values starting with - and will trigger ShellCheck warnings (SC2086). Prefer a safer/cheaper parse (e.g., parameter expansion like ${version%%.*} or cut with a quoted here-string) so the major version extraction can’t be affected by word-splitting/echo semantics.

Copilot uses AI. Check for mistakes.
@hsbt hsbt merged commit b46653b into master Mar 26, 2026
10 checks passed
@hsbt hsbt deleted the fix-openssl-version branch March 26, 2026 03:59
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