This page describes the various changes to Ruby packaging that are planned for Wheezy.

Planned changes

Changes to interpreter packaging

Use alternatives to switch between Ruby implementations

There is a huge demand (see #548917) for using alternatives to switch between Ruby implementations. This would provide a way to mimic what RVM provides in a cleaner way, and will help the Ruby community with moving to 1.9.x or other implementations.

Of course, it is clear that some libraries will not work with Ruby 1.9.x or Rubinius or JRuby. The plan is to do something similar to what is done for Java:

Each ruby implementation will provide ruby-interpreter. Pure-ruby packages must depend on ruby-interpreter.

Switch to 1.9 as default

Once we use alternatives, it is quite easy to switch to 1.9 as default. But that decision can probably wait.

Package other interpreters

It would be nice to make progress towards having the same support for Rubinius and JRuby.

Changes to third-party libraries and software packaging

Naming of ruby packages

The current libfoo-ruby naming, inspired for perl, is not really great. It would be better to move to the python naming, with ruby-foo or ruby1.8-foo. Since all packages will have to be modified anyway, it is the perfect time to do that.

The guidelines are the following:

Handling dependencies between Ruby binary packages

Renaming existing packages

Existing packages must be renamed to the new scheme. This renaming must be done using the standard Debian practices (i.e. Debian Developers' Reference, section 5.9.3). In our case, this means:

Handling of shebangs

gem2deb as the preferred packaging tool for ruby software

gem2deb is a replacement for our current cdbs-based packaging suite. It:

To test it:

git clone git://github.com/ln/gem2deb.git
cd gem2deb
rake install
then, cd to some temporary place, and do:
gem fetch rdiscount # a native gem
gem2deb rdiscount<TAB>
or:
gem fetch i18n # a pure ruby gem
gem2deb i18n<TAB>

It serves two goals:

Prerequisites for migrations:

Generation of ri and rdoc documentation

Is it worth it? Some people like to use ri, and having a local copy of rdocs is sometimes helpful, even if there are services like rdoc.info.

Changes to rubygems packaging

How do we proceed?

  1. Update ruby1.8, ruby1.9.1 and rubygems:
    • Update to their latest versions
    • Make changes outlined above (rubygems changes, switch to alternatives)
  2. Upload gem2deb to Debian
  3. Make the necessary changes to pkg-ruby-extras infrastructure (prepare git repo)
  4. package or repackage software with gem2deb
    • Start with "core" software: required by other libraries to build, etc. good targets are stuff involved in test suites.

Success metrics