Split ruby-build
Summary
The ruby-build package will be split into a main package and several subpackages (ruby-build-jruby, ruby-build-truffleruby, ...). This allows users to install only the build dependencies required for their specific Ruby implementation, significantly reducing the default installation size and dependency footprint.
Owner
- Name: Mikel Olasagasti
- Email: mikel@olasagasti.info
Current status
- Targeted release: Fedora Linux 44
- Last updated: 2026-01-13
- Announced
- Discussion thread
- FESCo issue: #3527
- Tracker bug: #2429151
- Release notes tracker: <will be assigned by the Wrangler>
Detailed Description
Motivation
Currently, the ruby-build spec file utilizes a comprehensive list of Recommends to ensure all possible Ruby implementations can be built. This monolithic approach forces the package manager to pull in a massive dependency chain by default.
For example, a default installation of ruby-build (which is a 323 KiB package) currently results in a transaction of 146 packages, requiring 404 MiB of downloads and occupying 2 GiB of disk space.
# dnf install ruby-build Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: ruby-build x86_64 0:20251023-1.fc44 rawhide 323.4 KiB Installing dependencies: alsa-lib x86_64 0:1.2.15-4.fc44 rawhide 1.5 MiB avahi-libs x86_64 0:0.9~rc2-6.fc43 rawhide 171.6 KiB binutils x86_64 0:2.45.50-9.fc44 rawhide 27.0 MiB clang-libs x86_64 0:21.1.7-1.fc44 rawhide 114.9 MiB clang-resource-filesystem x86_64 0:21.1.7-1.fc44 rawhide 15.3 KiB cmake-filesystem x86_64 0:3.31.10-3.fc44 rawhide 0.0 B cpp x86_64 0:15.2.1-5.fc44 rawhide 38.0 MiB cups-filesystem noarch 1:2.4.16-4.fc44 rawhide 0.0 B cups-libs x86_64 1:2.4.16-4.fc44 rawhide 618.4 KiB dbus-libs x86_64 1:1.16.0-4.fc43 rawhide 345.5 KiB ed x86_64 0:1.22.3-1.fc44 rawhide 148.9 KiB elfutils-debuginfod-client x86_64 0:0.194-2.fc44 rawhide 84.0 KiB expat x86_64 0:2.7.3-1.fc44 rawhide 301.1 KiB gcc x86_64 0:15.2.1-5.fc44 rawhide 111.9 MiB gcc-c++ x86_64 0:15.2.1-5.fc44 rawhide 41.4 MiB glibc-devel x86_64 0:2.42.9000-16.fc44 rawhide 2.3 MiB groff-base x86_64 0:1.23.0-11.fc44 rawhide 3.8 MiB info x86_64 0:7.2-7.fc44 rawhide 357.9 KiB jansson x86_64 0:2.14-3.fc43 rawhide 89.1 KiB javapackages-filesystem noarch 0:6.4.1-4.fc44 rawhide 2.0 KiB kernel-headers x86_64 0:6.19.0-0.rc1.15.fc44 rawhide 6.9 MiB libedit x86_64 0:3.1-57.20251016cvs.fc44 rawhide 240.2 KiB libedit-devel x86_64 0:3.1-57.20251016cvs.fc44 rawhide 59.4 KiB libmpc x86_64 0:1.3.1-8.fc43 rawhide 160.6 KiB libpkgconf x86_64 0:2.3.0-3.fc43 rawhide 78.1 KiB libstdc++-devel x86_64 0:15.2.1-5.fc44 rawhide 37.2 MiB libxcrypt-devel x86_64 0:4.5.2-2.fc44 rawhide 31.0 KiB libzstd-devel x86_64 0:1.5.7-3.fc44 rawhide 217.6 KiB lksctp-tools x86_64 0:1.0.21-2.fc44 rawhide 251.0 KiB llvm x86_64 0:21.1.7-1.fc44 rawhide 89.3 MiB llvm-filesystem x86_64 0:21.1.7-1.fc44 rawhide 0.0 B llvm-googletest x86_64 0:21.1.7-1.fc44 rawhide 2.4 MiB llvm-libs x86_64 0:21.1.7-1.fc44 rawhide 138.6 MiB llvm-static x86_64 0:21.1.7-1.fc44 rawhide 377.5 MiB llvm-test x86_64 0:21.1.7-1.fc44 rawhide 2.3 MiB make x86_64 1:4.4.1-11.fc43 rawhide 1.8 MiB mpdecimal x86_64 0:4.0.1-2.fc43 rawhide 217.2 KiB ncurses x86_64 0:6.5-8.20250614.fc44 rawhide 609.8 KiB ncurses-c++-libs x86_64 0:6.5-8.20250614.fc44 rawhide 153.6 KiB nspr x86_64 0:4.38.2-1.fc44 rawhide 315.5 KiB nss x86_64 0:3.119.0-1.fc44 rawhide 1.9 MiB nss-softokn x86_64 0:3.119.0-1.fc44 rawhide 2.0 MiB nss-softokn-freebl x86_64 0:3.119.0-1.fc44 rawhide 990.8 KiB nss-sysinit x86_64 0:3.119.0-1.fc44 rawhide 18.1 KiB nss-util x86_64 0:3.119.0-1.fc44 rawhide 204.8 KiB perl-AutoLoader noarch 0:5.74-520.fc43 rawhide 20.6 KiB perl-B x86_64 0:1.89-520.fc43 rawhide 501.3 KiB perl-Carp noarch 0:1.54-520.fc43 rawhide 46.6 KiB perl-Class-Struct noarch 0:0.68-520.fc43 rawhide 25.4 KiB perl-Data-Dumper x86_64 0:2.191-521.fc43 rawhide 115.6 KiB perl-Digest noarch 0:1.20-520.fc43 rawhide 35.3 KiB perl-Digest-MD5 x86_64 0:2.59-520.fc43 rawhide 59.7 KiB perl-DynaLoader x86_64 0:1.57-520.fc43 rawhide 32.1 KiB perl-Encode x86_64 4:3.21-520.fc43 rawhide 4.7 MiB perl-Errno x86_64 0:1.38-520.fc43 rawhide 8.4 KiB perl-Exporter noarch 0:5.79-520.fc43 rawhide 54.3 KiB perl-Fcntl x86_64 0:1.20-520.fc43 rawhide 48.8 KiB perl-File-Basename noarch 0:2.86-520.fc43 rawhide 14.0 KiB perl-File-Path noarch 0:2.18-521.fc44 rawhide 63.5 KiB perl-File-Temp noarch 1:0.231.200-1.fc44 rawhide 163.7 KiB perl-File-stat noarch 0:1.14-520.fc43 rawhide 12.5 KiB perl-FileHandle noarch 0:2.05-520.fc43 rawhide 9.4 KiB perl-Getopt-Long noarch 1:2.58-520.fc43 rawhide 144.5 KiB perl-Getopt-Std noarch 0:1.14-520.fc43 rawhide 11.2 KiB perl-HTTP-Tiny noarch 0:0.090-521.fc43 rawhide 154.4 KiB perl-IO x86_64 0:1.55-520.fc43 rawhide 147.4 KiB perl-IO-Socket-IP noarch 0:0.43-521.fc43 rawhide 100.3 KiB perl-IO-Socket-SSL noarch 0:2.095-2.fc43 rawhide 714.5 KiB perl-IPC-Open3 noarch 0:1.24-520.fc43 rawhide 27.7 KiB perl-MIME-Base32 noarch 0:1.303-24.fc43 rawhide 30.7 KiB perl-MIME-Base64 x86_64 0:3.16-520.fc43 rawhide 42.0 KiB perl-Net-SSLeay x86_64 0:1.94-11.fc43 rawhide 1.3 MiB perl-POSIX x86_64 0:2.23-520.fc43 rawhide 231.4 KiB perl-PathTools x86_64 0:3.94-520.fc43 rawhide 180.0 KiB perl-Pod-Escapes noarch 1:1.07-520.fc43 rawhide 24.9 KiB perl-Pod-Perldoc noarch 0:3.28.01-521.fc43 rawhide 163.7 KiB perl-Pod-Simple noarch 1:3.47-3.fc43 rawhide 565.3 KiB perl-Pod-Usage noarch 4:2.05-520.fc43 rawhide 86.3 KiB perl-Scalar-List-Utils x86_64 5:1.70-1.fc43 rawhide 144.9 KiB perl-SelectSaver noarch 0:1.02-520.fc43 rawhide 2.2 KiB perl-Socket x86_64 4:2.040-2.fc43 rawhide 120.3 KiB perl-Storable x86_64 1:3.37-521.fc43 rawhide 231.2 KiB perl-Symbol noarch 0:1.09-520.fc43 rawhide 6.8 KiB perl-Term-ANSIColor noarch 0:5.01-521.fc43 rawhide 97.5 KiB perl-Term-Cap noarch 0:1.18-520.fc43 rawhide 29.3 KiB perl-Text-ParseWords noarch 0:3.31-520.fc43 rawhide 13.6 KiB perl-Text-Tabs+Wrap noarch 0:2024.001-520.fc43 rawhide 22.6 KiB perl-Time-Local noarch 2:1.350-520.fc43 rawhide 69.0 KiB perl-URI noarch 0:5.34-2.fc44 rawhide 268.0 KiB perl-base noarch 0:2.27-520.fc43 rawhide 12.6 KiB perl-constant noarch 0:1.33-521.fc43 rawhide 26.2 KiB perl-if noarch 0:0.61.000-520.fc43 rawhide 5.8 KiB perl-interpreter x86_64 4:5.42.0-520.fc43 rawhide 118.6 KiB perl-libnet noarch 0:3.15-521.fc43 rawhide 289.4 KiB perl-libs x86_64 4:5.42.0-520.fc43 rawhide 11.5 MiB perl-locale noarch 0:1.13-520.fc43 rawhide 6.1 KiB perl-mro x86_64 0:1.29-520.fc43 rawhide 41.6 KiB perl-overload noarch 0:1.40-520.fc43 rawhide 71.6 KiB perl-overloading noarch 0:0.02-520.fc43 rawhide 4.9 KiB perl-parent noarch 1:0.244-520.fc43 rawhide 10.3 KiB perl-podlators noarch 1:6.0.2-520.fc43 rawhide 317.5 KiB perl-vars noarch 0:1.05-520.fc43 rawhide 3.9 KiB pkgconf x86_64 0:2.3.0-3.fc43 rawhide 88.5 KiB pkgconf-m4 noarch 0:2.3.0-3.fc43 rawhide 14.4 KiB pkgconf-pkg-config x86_64 0:2.3.0-3.fc43 rawhide 989.0 B python-pip-wheel noarch 0:25.3-1.fc44 rawhide 1.2 MiB python3 x86_64 0:3.14.2-1.fc44 rawhide 28.9 KiB python3-libs x86_64 0:3.14.2-1.fc44 rawhide 43.1 MiB ruby-default-gems noarch 0:3.4.7-28.fc44 rawhide 66.1 KiB ruby-libs x86_64 0:3.4.7-28.fc44 rawhide 15.1 MiB rubygem-io-console x86_64 0:0.8.1-28.fc44 rawhide 33.2 KiB rubygem-irb noarch 0:1.14.3-28.fc44 rawhide 290.3 KiB rubygem-json x86_64 0:2.15.1-1.fc44 rawhide 222.3 KiB rubygem-psych x86_64 0:5.2.2-28.fc44 rawhide 132.6 KiB rubygem-rbs x86_64 0:3.8.0-28.fc44 rawhide 5.0 MiB rubygem-rdoc noarch 0:6.14.2-201.fc44 rawhide 1.9 MiB rubygems noarch 0:3.6.9-28.fc44 rawhide 1.4 MiB rubypick noarch 0:1.1.1-23.fc43 rawhide 4.4 KiB rust-std-static x86_64 0:1.92.0-1.fc44 rawhide 165.6 MiB tzdata-java noarch 0:2025c-1.fc44 rawhide 100.2 KiB Installing weak dependencies: clang x86_64 0:21.1.7-1.fc44 rawhide 65.5 MiB compiler-rt x86_64 0:21.1.7-1.fc44 rawhide 41.0 MiB gdbm-devel x86_64 1:1.23-10.fc43 rawhide 82.0 KiB java-25-openjdk-headless x86_64 1:25.0.1.0.8-1.fc44 rawhide 236.3 MiB libatomic x86_64 0:15.2.1-5.fc44 rawhide 36.7 KiB libffi-devel x86_64 0:3.5.2-1.fc44 rawhide 33.9 KiB libomp x86_64 0:21.1.7-1.fc44 rawhide 2.8 MiB libomp-devel x86_64 0:21.1.7-1.fc44 rawhide 1.5 MiB libyaml-devel x86_64 0:0.2.5-17.fc43 rawhide 1.1 MiB llvm-devel x86_64 0:21.1.7-1.fc44 rawhide 33.5 MiB ncurses-devel x86_64 0:6.5-8.20250614.fc44 rawhide 893.4 KiB openssl-devel x86_64 1:3.5.4-1.fc44 rawhide 4.6 MiB patch x86_64 0:2.8-3.fc44 rawhide 226.6 KiB perl-File-Compare noarch 0:1.100.800-520.fc43 rawhide 5.6 KiB perl-FindBin noarch 0:1.54-520.fc43 rawhide 6.8 KiB perl-NDBM_File x86_64 0:1.18-520.fc43 rawhide 28.5 KiB python-unversioned-command noarch 0:3.14.2-1.fc44 rawhide 23.0 B readline-devel x86_64 0:8.3-2.fc43 rawhide 595.8 KiB ruby x86_64 0:3.4.7-28.fc44 rawhide 85.5 KiB ruby-bundled-gems x86_64 0:3.4.7-28.fc44 rawhide 2.2 MiB rubygem-bigdecimal x86_64 0:3.1.8-28.fc44 rawhide 134.7 KiB rubygem-bundler noarch 0:2.6.9-28.fc44 rawhide 1.5 MiB rubygem-rake noarch 0:13.3.0-101.fc43 rawhide 134.1 KiB rust x86_64 0:1.92.0-1.fc44 rawhide 93.5 MiB zlib-ng-compat-devel x86_64 0:2.3.2-2.fc44 rawhide 107.0 KiB Transaction Summary: Installing: 146 packages Total size of inbound packages is 404 MiB. Need to download 404 MiB. After this operation, 2 GiB extra will be used (install 2 GiB, remove 0 B).
This includes heavy dependencies like java-headless, rust, llvm, and clang, even if the user only intends to build a standard MRI Ruby version.
This is the content of the spec that pulls all those dependencies:
# ruby-build can build various ruby interpreters from source, which in turn can # require additional dependencies Recommends: bzip2 Recommends: clang Recommends: gdbm-devel Recommends: java-headless Recommends: libffi-devel Recommends: libyaml-devel Recommends: llvm-devel Recommends: make Recommends: ncurses-devel Recommends: openssl-devel Recommends: patch Recommends: perl-File-Compare Recommends: perl-FindBin Recommends: readline-devel Recommends: ruby Recommends: rubygem-rake Recommends: rust Recommends: zlib-devel
Proposed Solution
The ruby-build package works by providing a collection of build definition files (simple text files) located in /usr/share/ruby-build. Each file defines how to download and compile a specific version of a Ruby interpreter like 3.2.2, jruby-9.4.0.0 or truffleruby-22.3.
This proposal changes the packaging structure to split ruby-build into modular subpackages based on these definition types. Each subpackage will provide the necessary build dependencies for a specific subset of definition files, matched by naming patterns. This ensures that if a user only intends to build standard MRI Ruby, they are not forced to install the build chain for JRuby or TruffleRuby.
The new package structure will be as follows:
- ruby-build (Main Package)
- Would be a meta-package requiring
ruby-build-coreand recommendingruby-build-ruby.
- Would be a meta-package requiring
- ruby-build-core
- Contains the core binary (
/usr/bin/ruby-build) and the man page. - All target subpackages require this package and not
ruby-buildmeta-package to avoid pullingruby-build-rubyand its dependencies as recommended package.
- Contains the core binary (
- ruby-build-ruby
- Targets standard MRI/CRuby versions (definitions matching
^[0-9]*). - Requires:
gcc,perl-interpreter,perl(FindBin),perl(lib),perl(IPC::Cmd),perl(File::Compare),perl(File::Copy),zlib-ng-compat-devel,libffi-devel,libyaml-devel.
- Targets standard MRI/CRuby versions (definitions matching
- ruby-build-jruby
- Targets JRuby versions (definitions matching
^jruby). - Requires:
java-latest-openjdk-headless,make,gcc-c++.
- Targets JRuby versions (definitions matching
- ruby-build-mruby
- Targets mruby versions (definitions matching
^mruby). - Requires:
ruby,rubygem-rake.
- Targets mruby versions (definitions matching
- ruby-build-picoruby
- Targets PicoRuby versions (definitions matching
^pico). - Requires:
ruby,rubygem-rake,gcc,git-core.
- Targets PicoRuby versions (definitions matching
- ruby-build-truffleruby
- Targets TruffleRuby versions (definitions matching
^truffle). - Requires:
gcc,libyaml-devel.
- Targets TruffleRuby versions (definitions matching
- ruby-build-others
- Targets less common implementations available via
rbenv install -L(such as rbx, ree, etc.). - Keeps the main dependency set clean.
- Targets less common implementations available via
- ruby-build-all
- Metapackage to install all subpackages
- ruby-build-rbenv
- Already exists
- Contains the ruby-build plugin for rbenv
The dependency lists are optimized for modern releases of these Ruby implementations.
Feedback
Benefit to Fedora
- Bloat Reduction: A default installation of
ruby-buildwill drop from ~2 GiB to a few megabytes, respecting user resources. - Modularity: Users and CI/CD systems can install exactly what they need without pulling in the entire Java ecosystem or Rust toolchain unnecessarily.
- Security: Reduces the attack surface on systems that do not need the JVM or legacy build tools.
Scope
- Proposal owners: Change the spec to create the subpackages.
- Other developers: Nothing
- Release engineering: Nothing
- Policies and guidelines: N/A (not needed for this Change)
- Trademark approval: N/A (not needed for this Change)
- Alignment with the Fedora Strategy:
Upgrade/compatibility impact
- The new package
ruby-build-rubywould be installed and multiple dependencies could be removed from the system automatically as nothing else may depend on them. - For users wanting to build a Ruby implementation other than CRuby would need to install the required subpackage to get the definitions.
Early Testing (Optional)
Test package available in Copr at https://copr.fedorainfracloud.org/coprs/mikelo2/split-ruby-build/ and code at https://src.fedoraproject.org/fork/mikelo2/rpms/ruby-build/commits/split-rubybuild
How To Test
1. Install the package:
dnf copr enable mikelo2/split-ruby-builddnf install ruby-build*Verify that it does NOT pull injava-headlessorrustby default.*
2. Test Standard Ruby:
dnf install rbenvrbenv install 3.4.8*This should work out of the box (viaruby-build-ruby).*
3. Test JRuby (Optional):
rbenv install jruby-9.4.0.0*This should fail initially.*dnf install ruby-build-jrubyrbenv install jruby-9.4.0.0*This should now succeed.*
User Experience
- Users will notice a significantly faster and smaller installation process for ruby-build.
- Advanced users may need to manually install specific subpackages (like ruby-build-truffleruby) if they are working with non-standard Ruby implementations, but the vast majority of users (MRI Ruby) will see no change in workflow, only in disk savings.
Dependencies
N/A
Contingency Plan
- Contingency mechanism: Revert the changes to the spec file to the monolithic dependency list
- Contingency deadline: Beta Freeze
- Blocks release? No
Documentation
N/A (not a System Wide Change)
