Project:Ruby/Adding new ruby versions

From Gentoo Wiki
Jump to: navigation, search

These notes are aimed at the Gentoo ruby team to describe all the things that need to be done for a new, major, ruby release. Notes are written with dev-lang/ruby in mind but should for the most part also apply for other ruby targets.

Determine ruby target identifier

Ruby target identifiers should always be versioned so incompatibly updates can be distinguished and added to USE_RUBY in ebuilds separately.

Package Policy Example
dev-lang/ruby "ruby" followed by major and minor version concatenated ruby25

Preparations

These preparations should be done before the new version is added, based on information in the upstream release candidates.

eselect module

Not all versions of ruby that we provide are included in eselect, but if the new version is going to be supported then a new version of the ruby eselect module must be created to accomodate for the new binary name.[1]

Update eclass

ruby-utils.eclass has a hardcoded list of ruby versions. This eclass must be updated to include the new ruby target identifier and its mapping on a package and slot.

Update the profile

The new target should be described in desc/ruby_targets.desc. It should also be masked in stable in base/use.stable.mask.

Add the new ruby version and the core ruby packages

Currently the following packages must all be added at the same time. Ruby bundles some packages that we provide unbundled, so in order to ensure the same experience for our users we should also provide these packages when dev-lang/ruby is installed.

  • dev-lang/ruby
  • dev-ruby/rubygems
  • dev-ruby/json
  • dev-ruby/rake
  • dev-ruby/rdoc
  • dev-ruby/racc
  • dev-ruby/minitest
  • virtuals/ruby-{ssl,rdoc,threads,rubygems,minitest}