Skip to content

ci: install Linux helper deps from bottles#43

Merged
jdx merged 1 commit into
mainfrom
fix-ci-bzip2-bottle
Jun 4, 2026
Merged

ci: install Linux helper deps from bottles#43
jdx merged 1 commit into
mainfrom
fix-ci-bzip2-bottle

Conversation

@jdx

@jdx jdx commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • install Linux helper dependencies from bottles during jdx-package dependency setup
  • currently covers bzip2, unzip, and python@...
  • avoids source-building helper formulae that do not affect portable Ruby linkage

Context

Open Renovate PRs were failing in the Linux matrix while brew jdx-package ran a large brew install --build-bottle ... dependency install. The first observed failure was bzip2:

Errno::EACCES: Permission denied @ rb_sysopen - /home/linuxbrew/.linuxbrew/Cellar/bzip2/1.0.8/lib/libbz2.so.1.0.8

After moving bzip2 to bottle installs, CI moved forward and exposed source-build failures in unzip, then python@3.14 during ensurepip/pip setup. These are helper/tooling dependencies for the build path, not dependencies we need to force-build for portable Ruby linkage.

This keeps the workaround scoped to the packaging dependency policy instead of changing the formulae themselves.

Testing

  • git diff --check
  • attempted ruby -c cmd/jdx-package.rb, but Ruby is not installed locally and mise x ruby@3.4.1 failed to build due to missing psych prerequisites in this environment
  • GitHub CI is the real validation for the Linux packaging path

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR expands the bottled_dep_allowlist to include bzip2 and unzip, and adds comments explaining that selected build dependencies are installed from bottles to reduce compilation time and to avoid source-building Linux helper formulae that don’t affect portable Ruby linkage.

Changes

Bottled Dependency Configuration

Layer / File(s) Summary
Bottled dependency allowlist configuration
cmd/jdx-package.rb
The bottled_dep_allowlist regex is updated to include bzip2 and unzip, with added comments explaining the bottled-deps selection behavior and noting avoidance of source-building certain Linux helper formulae.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I nibble on changes, neat and clear,
bzip2 and unzip hop into the beer,
Bottles keep builds swift and spry,
No needless source, just watch them fly! 🐇🍃

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main change: updating the bottled dependency allowlist to install Linux helper deps (bzip2 and unzip) from bottles instead of source-building them.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ci-bzip2-bottle

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

@greptile-apps

greptile-apps Bot commented Jun 4, 2026

Copy link
Copy Markdown

Greptile Summary

Extends the bottled_dep_allowlist regex in jdx-package so that bzip2, unzip, and python@ are installed from prebuilt bottles instead of being built from source, and updates the inline comment accordingly.

  • bzip2 and unzip are added to avoid the EACCES permission error when building libbz2.so.1.0.8 on Linux; this is the stated motivation for the PR.
  • python@ is also added to the allowlist but is not mentioned in the PR title or description — worth confirming whether this was intentional and what failure drove it.

Confidence Score: 5/5

Safe to merge; the change only affects which CI packaging dependencies are installed from bottles versus built from source, with no impact on runtime behavior or the shipped artifact's contents.

The diff is a one-line regex change scoped entirely to the packaging helper's dependency setup step. The bzip2 and unzip additions directly address the documented Linux failure. The only open question is the undocumented python@ addition, which is low-risk but worth confirming before merging.

cmd/jdx-package.rb — specifically the python@ allowlist entry that lacks a description in the PR.

Important Files Changed

Filename Overview
cmd/jdx-package.rb Adds bzip2, unzip, and python@ to the bottled-dependency allowlist to avoid source builds on Linux; comment also updated. The python@ addition is not mentioned in the PR description.

Fix All in Claude Code

Reviews (3): Last reviewed commit: "ci: install bzip2 from bottle during pac..." | Re-trigger Greptile

@jdx
jdx force-pushed the fix-ci-bzip2-bottle branch from 99b54b7 to 21c7e37 Compare June 4, 2026 17:02
@jdx
jdx force-pushed the fix-ci-bzip2-bottle branch from 21c7e37 to 6636055 Compare June 4, 2026 17:37
@jdx jdx changed the title ci: install bzip2 from bottle during packaging ci: install Linux helper deps from bottles Jun 4, 2026
@jdx
jdx merged commit 43ceb68 into main Jun 4, 2026
11 checks passed
@jdx
jdx deleted the fix-ci-bzip2-bottle branch June 4, 2026 18:08
narze pushed a commit to eventpop/ruby that referenced this pull request Jun 11, 2026
Source-building the helper toolchain (glibc, gmp, gcc, ...) with
--build-bottle fails under Homebrew 6 on both Linux architectures: once
the glibc bottle is poured, gmp's configure cannot run its compiled
test programs. Only this tap's portable-* formulae need source builds -
their outputs are what get statically linked into Ruby, and the brew
linkage check verifies nothing else leaks in - so partition on that
instead of an ever-growing allowlist, finishing what "ci: install Linux
helper deps from bottles" (jdx#43) started. Also cuts Linux build times.

Drop `make extract-gems` for ruby 2.7: its target runs via RUNRUBY
(./miniruby, which does not exist before `make`; 3.x uses BASERUBY),
and 2.7's rbinstall installs bundled gems from gems/*.gem directly
(tool/rbinstall.rb:902), so extraction is unnecessary.

https://claude.ai/code/session_015m4jwUW8kgyeWx6XkVvxeV
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.

1 participant