The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Ruby-kit"
Line 26: | Line 26: | ||
* {{c|ruby-single.eclass}} | * {{c|ruby-single.eclass}} | ||
* {{c|ruby-utils.eclass}} | * {{c|ruby-utils.eclass}} | ||
The most notable changes are in the following files: | |||
;{{c|ruby-single.eclass}}: Aggressively mask {{c|USE_RUBY}} based on our {{c|RUBY_TARGETS}} settings. If we mask all implementations, add {{c|BACKUP_RUBY}} as backup implementation (currently 2.6). | |||
;{{c|ruby-ng.eclass}}: In {{c|_ruby_get_all_impls()}}, aggressively mask {{c|USE_RUBY}} ebuild settings based on our {{c|RUBY_TARGETS}} settings. Implement {{c|BACKUP_RUBY}} logic. Also change {{c|IUSE}} calculation to *not* aggressively mask {{c|IUSE}} settings, since the ebuild could have some logic based on some of the Ruby targets we masked out, and not having these targets in {{c|IUSE}} will cause Portage to complain. | |||
The eclass changes, taken as a whole, allow Funtoo to set the Ruby implementation(s) active | The eclass changes, taken as a whole, allow Funtoo to set the Ruby implementation(s) active |
Revision as of 02:43, January 5, 2021
Ruby-kit is a Funtoo kit (see FAQ:What Are Funtoo Kits) which contains the Ruby language itself as well as Ruby modules.
Status
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 2.7-prime
are:
ruby-2.7
- 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.
ruby-2.6
- 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.
ruby-3.0
- 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
gem
.
Funtoo Changes
Ruby-kit 2.7-prime
has a number of important Funtoo changes which are documented here.
The 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:
ruby-fakegem.eclass
ruby-ng.eclass
ruby-ng-gnome2.eclass
ruby-single.eclass
ruby-utils.eclass
The most notable changes are in the following files:
ruby-single.eclass
- Aggressively mask
USE_RUBY
based on ourRUBY_TARGETS
settings. If we mask all implementations, addBACKUP_RUBY
as backup implementation (currently 2.6).
ruby-ng.eclass
- In
_ruby_get_all_impls()
, aggressively maskUSE_RUBY
ebuild settings based on ourRUBY_TARGETS
settings. ImplementBACKUP_RUBY
logic. Also changeIUSE
calculation to *not* aggressively maskIUSE
settings, since the ebuild could have some logic based on some of the Ruby targets we masked out, and not having these targets inIUSE
will 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) RUBY_TARGETS="ruby27 ruby26"
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.