8000 ruby-3.3, ruby-3.4: versioned Ruby lines + ruby-flavor guard (after #989) by bryan-minimal · Pull Request #992 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

ruby-3.3, ruby-3.4: versioned Ruby lines + ruby-flavor guard (after #989) - #992

Merged
bryan-minimal merged 3 commits into
mainfrom
split848-b-ruby3x
Oct 23, 2026
Merged

bryan-minimal merged 3 commits into
mainfrom
split848-b-ruby3x

Conversation

@bryan-minimal
@bryan-minimal bryan-minimal commented Oct 22, 2026 •
Copy link
Copy Markdown
Member

Split out of #848, as suggested in review. This PR is the versioned Ruby lines.

⚠ Depends on #989 (glibc-locale-c-utf8). These packages carry the same locale edge as ruby. The branch is built on #989's commit, so until #989 merges this diff also shows it. Merge #989 first; once it lands I'll merge main into this branch (no rebase, no force-push) so the diff shows only the Ruby lines.

What. ruby-3.3 (3.3.12) and ruby-3.4 (3.4.11) are drop-in copies of ruby pinned to each line. Each carries:

ruby-3.2 was dropped in review: upstream EOL on 2026-04-01.

Ruby-flavor guard (new, blocking). ruby, ruby-3.3 and ruby-3.4 install the same paths (usr/bin/ruby, usr/lib/ruby/**, libruby.so, usr/etc/gemrc), and closure members are hardlinked first-writer-wins per file. .github/workflows/ruby-flavor-guard.yml + .github/scripts/ruby_flavor_guard.py mirror node-runtime-guard: over both arches' mip dump it rejects

  1. flavor: a package that builds or runs on ruby-3.3/ruby-3.4 instead of ruby. The versioned lines are user opt-ins, like node (Current); exceptions go in VERSIONED_ALLOWED with a reason.
  2. closure: any package or stack whose runtime closure, or build closure (build deps plus their runtime closures), holds more than one Ruby line. A stack naming ruby-3.4 next to ruby-lsp fails.

Exit 2 (UNVERIFIED) on a missing or empty dump, as the node guard does. AGENTS.md gains a short "Ruby pattern" note next to the Node one.

Limit, stated plainly: like the node guard, this sees the pkgs catalog (packages and stacks), not a user's own minimal.toml loadout. A user who writes ruby-3.4 + ruby-lsp there still gets two rubies; rule 1 means that only happens when they name a versioned line themselves. Catching it at activation would be a minimal-side check.

Verification.

  • Guard on today's catalog: PASS (628 amd64 / 626 arm64 packages).
  • Guard on the same catalog with an injected stack (ruby-3.4 + ruby-lsp) and an injected package on ruby-3.3: exit 1, naming both (closure: runtime closure holds 2 Ruby lines: ruby, ruby-3.4; flavor: runtime_deps uses ruby-3.3).
  • Unit tests (.github/scripts/test_ruby_flavor_guard.py, run in the workflow): 8/8 pass. Negative control: with check stubbed to report nothing, exactly the 5 behaviour tests fail and the 3 controls pass.
  • Fresh remote session (pkgbuild loadout, activated after the last commit): min package build --rebuild --verbose of ruby-3.3 (2,136 log lines) and ruby-3.4 (1,965), then min check --packages ruby-3.3 ruby-3.4: every check Pass for both, standalone tests included, no Skip.
  • mip dump (amd64 and arm64) clean; ruby-3.2 is gone from both.

🤖 Generated with Claude Code

bryan-minimal and others added 2 commits October 22, 2026 12:10
…e it

Split out of #848. Sessions run with LANG=C.UTF-8, which glibc's
locale-archive lacks, so setlocale fails: initdb aborts and Ruby falls back
to US-ASCII. glibc-locale-c-utf8 ships the locale in directory form (no
glibc rebuild); ruby and postgres declare it, libidn's IDNA test uses it.

postgres's initdb test no longer passes on a locale-only fallback when it
cannot run initdb: no passwd entry and a read-only /etc/passwd now fails,
naming the reason. The TODO records that the package retires when glibc
itself ships C.UTF-8 (same usr/lib/locale/** paths).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split out of #848. Drop-in copies of `ruby` pinned to each line, with main's
ca-certificates trust store + test, the mkmf.log/gem_make.out cleanup, and
the C.UTF-8 locale (depends on the glibc-locale-c-utf8 PR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 22, 2026 19:32
@coderabbitai
coderabbitai Bot commented Oct 22, 2026 •
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 16 billable files and costs up to $4.00.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 6 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between befeac7 and c9acce8.

📒 Files selected for processing: 16
  • .github/scripts/ruby_flavor_guard.py
  • .github/scripts/test_ruby_flavor_guard.py
  • .github/workflows/ruby-flavor-guard.yml
  • AGENTS.md
  • packages/glibc-locale-c-utf8/build.ncl
  • packages/glibc-locale-c-utf8/build.sh
  • packages/libidn/build.ncl
  • packages/libidn/build.sh
  • packages/postgres/build.ncl
  • packages/ruby-3.3/build.ncl
  • packages/ruby-3.3/build.sh
  • packages/ruby-3.3/rubygems-bindir-mkdir-p.patch
  • packages/ruby-3.4/build.ncl
  • packages/ruby-3.4/build.sh
  • packages/ruby-3.4/rubygems-bindir-mkdir-p.patch
  • packages/ruby/build.ncl
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Going with your recommendations on both questions:

  1. Add a collision guard like the node/node-lts one. It should fail when a loadout's closure contains more than one of ruby, ruby-3.3 and ruby-3.4, for example ruby-3.4 plus ruby-lsp or bun. All of them install usr/bin/ruby, usr/lib/ruby/**, libruby.so and usr/etc/gemrc.
  2. Drop ruby-3.2. It went EOL upstream on 2026-04-01.

The rest is identical to what I reviewed in #848. Please keep this after #989, and note that a squash-merge of #989 will need a rebase here.


Generated by Claude Code

… two Ruby lines)

Review on #992. ruby-3.2 went EOL upstream on 2026-04-01, so it goes.

`ruby`, `ruby-3.3` and `ruby-3.4` install the same paths, and closure members
are hardlinked first-writer-wins per file. The new blocking
ruby-flavor-guard workflow mirrors node-runtime-guard: over both arches'
catalog dumps it rejects a package built or run on a versioned line
(those are user opt-ins), and any package or stack whose runtime or build
closure holds more than one Ruby line. AGENTS.md gains a Ruby pattern
note next to the Node one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal bryan-minimal changed the title ruby-3.2, ruby-3.3, ruby-3.4: versioned Ruby lines (after #989) ruby-3.3, ruby-3.4: versioned Ruby lines + ruby-flavor guard (after #989) Oct 22, 2026
@bryan-minimal
Copy link
Copy Markdown
Member Author

Thanks @norrietaylor. Both done in c9acce8:

  1. Collision guard. New blocking ruby-flavor-guard workflow (.github/scripts/ruby_flavor_guard.py), modelled on node-runtime-guard. Over both arches' catalog dumps it fails when (a) a package builds or runs on ruby-3.3/ruby-3.4 instead of ruby, or (b) any package's or stack's runtime or build closure holds more than one of ruby, ruby-3.3, ruby-3.4. On today's catalog it passes; with an injected ruby-3.4 + ruby-lsp stack it exits 1 and names it. 8 unit tests run in the workflow, with a negative control (stubbed check: the 5 behaviour tests fail).

    One correction to what I wrote in Ruby on Rails development support: chromedriver, Ruby 3.x, initdb locale fix, dev-loop tools #848: I said a guard would catch "every route, including loadouts we don't control". It doesn't. Like the node guard, it sees the pkgs catalog (packages and stacks), not a user's own minimal.toml. Rule (a) keeps every packaged tool on ruby, so two rubies there need the user to name a versioned line themselves; catching that at activation would be a minimal-side check. The PR body says so.

  2. ruby-3.2 dropped. No other package referenced it.

Re-verified in a fresh session: ruby-3.3 and ruby-3.4 rebuilt with --rebuild and min check is Pass across the board, standalone tests included, no Skip.

#989 is still open; once it merges I'll merge main into this branch (no rebase or force-push) so the diff shows only the Ruby lines.

🤖 Generated with Claude Code

@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit c033a65 Oct 23, 2026
13 checks passed
@bryan-minimal
bryan-minimal deleted the split848-b-ruby3x branch October 23, 2026 22:05
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

0