Ruby-kit is a Funtoo kit (see FAQ:What Are Funtoo Kits) which contains the Ruby language itself as well as Ruby modules.
The currently-active branch of Ruby-kit is
2.7-prime, created in early January 2021 by Funtoo, and is based on a snapshot of Gentoo Ruby ebuilds from late December 2020. It is an auto-generated kit which will allow more frequent updates.
At the time
2.7-prime was created, the Gentoo Ruby Team was focusing on integrating support for Ruby 3.0 into Gentoo. Another notable event happening at around this time was the deprecation of Ruby 2.5 by the Ruby team itself, as it is currently in maintenance mode and nearing EOL. These events were factored into the plan for Ruby-kit related to supported versions.
The Ruby versions available in
- This is the Funtoo OS "preferred" Ruby for satisfying system dependencies. This is the Ruby version that applications will try to use if 2.7 support is actually available in ebuilds and dependencies.
- This is the Funtoo OS "compatible" Ruby for satisfying system dependencies. This is the version that all applications are likely to support and is more universally supported in ebuilds. 2.6 is also our **backup** version of Ruby that is used by our eclass logic.
- This version of Ruby is being made available but is not currently used for resolving dependencies for Funtoo systems. It can be installed by Ruby developers and Ruby modules can be installed via
2.7-prime has a number of important Funtoo changes which are documented here.
ruby-*.eclass eclasses have been forked and are stored in our
kit-fixups repository, in
core-kit/curated/eclasses, so they will end up on end-user systems inside Core-kit and will be available to all kits.
The forked eclasses are:
The most notable changes are in the following files:
- Aggressively mask
USE_RUBYbased on our
RUBY_TARGETSsettings. If we mask all implementations, add
BACKUP_RUBYas backup implementation (currently 2.6).
_ruby_get_all_impls(), aggressively mask
USE_RUBYebuild settings based on our
BACKUP_RUBYlogic. Also change
IUSEcalculation to *not* aggressively mask
IUSEsettings, since the ebuild could have some logic based on some of the Ruby targets we masked out, and not having these targets in
IUSEwill cause Portage to complain.
The eclass changes, taken as a whole, allow Funtoo to set the Ruby implementation(s) active
in Funtoo more easily. Traditionally, in Gentoo, Ruby implementations are set based on
RUBY_TARGETS, which is defined in the profiles and set to something like this:
make.defaults(bash source code)
In addition, Ruby-using ebuilds that leverage the Ruby eclasses will set something like this:
ruby-using.ebuild(bash source code)
USE_RUBY="ruby25 ruby26 ruby27 ruby30"
The Funtoo changes cause the
USE_RUBY settings in ebuilds to be more aggressively masked based on the Funtoo OS settings for
RUBY_TARGETS. In addition, if our more aggressive masking causes a Ruby module or package to not have any valid Ruby implementations, a "backup" typically safe Ruby implementation will be enabled automatically.