Debian/Ruby Extras - Position on RubyGems
Common Position on RubyGems
RubyGems
RubyGems is a packaging system for Ruby applications and libraries (similar to CPAN for Perl). It is widely used inside the Ruby community (especially inside the Ruby on Rails community), and solves lots of issue regarding packaging and distribution of Ruby software on operating systems that don’t provide a package manager. Rubygems will be included in Ruby’s standard library in Ruby 1.9.1, and chances are high that it will become the de-facto standard for packaging and distributing Ruby libraries.
However, the Debian/Ruby Extras team fear that Rubygems will make it much more difficult to package and distribute Ruby software in Debian (similar concerns have been raised by other individuals and GNU/Linux distributions):
- Rubygems packages are not compatible with the FHS. Rubygems follows the “one directory per package and version” rule.
- It is not possible to do “normal” (FHS-compatible) installations of rubygems, and some ruby software developers have started to distribute their software as gems only.
- Rubygems is source-intrusive. The require instruction is replaced by a require_gem instruction to allow for versioned dependencies. Debian and most other systems think that dealing with versioned dependencies outside of the source is a better idea.
- There are currently no plans to improve RubyGems to ease the work of Debian and RPM packagers. Some RubyGems developers have also showed hostility towards Debian.
Position of the Debian/Ruby Extras Team
- We do not oppose Ruby having a packaging system. However, since Debian has its own system already, we feel that it is important that Debian users can install all software using the same tools, and that all software installed that way follows the same policies.
- Since we have to follow the FHS, the current RubyGems way of installing the gem’s contents in one directory is incompatible with our setup (and toolchain) and thus cannot be used.
- For the moment we will continue to package Ruby applications and libraries as Debian packages from (preferably pristine) upstream sources as it always has been done (using setup.rb or install.rb for example). Users could then continue to install their apps the way they are used to (using apt-get), since most of them do not care about the language their apps are written in or about other ways this application/library is made available.
- For Ruby developers requiring bleeding edge library versions or libraries that haven’t been packaged (yet), a rubygems package will be made available. This package provides the gem command to be able to install/remove gems at the developer’s own discretion and risk. The gems will be installed using the normal gem installation procedure, in /usr/lib/ruby/gems.
- No package in Debian shall use the gem command during package installation or build.
- No package in Debian should require that the user install software as gems. This would make it impossible to support (security-wise and quality-wise) such software.
- Other utilities are written to couple the packaging process to the RubyGem system, i.e. utilities to help convert a gem to a Debian source package. These utilites would not solve any problems, just ease the initial (re)packaging work a bit.
For Reference: file system layout of the rmail package
Content of /usr/lib/ruby/gems added after the execution of gem install rmail
/usr/lib/ruby
/usr/lib/ruby/gems/
/usr/lib/ruby/gems/1.8
/usr/lib/ruby/gems/1.8/cache
/usr/lib/ruby/gems/1.8/cache/rmail-0.17.gem
/usr/lib/ruby/gems/1.8/doc
/usr/lib/ruby/gems/1.8/doc/rmail-0.17
/usr/lib/ruby/gems/1.8/doc/rmail-0.17/rdoc
/usr/lib/ruby/gems/1.8/doc/rmail-0.17/rdoc/created.rid
/usr/lib/ruby/gems/1.8/doc/rmail-0.17/rdoc/rdoc-style.css
/usr/lib/ruby/gems/1.8/doc/rmail-0.17/rdoc/files
/usr/lib/ruby/gems/1.8/doc/rmail-0.17/rdoc/files/lib
/usr/lib/ruby/gems/1.8/doc/rmail-0.17/rdoc/files/lib/rmail_rb.html
[ ... this directory contains all the rdoc documentation provided by the librmail-ruby-doc on Debian ]
/usr/lib/ruby/gems/1.8/gems/rmail-0.17
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/NEWS
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/TODO
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/NOTES
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/README
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/THANKS
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/install.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/rmail.gemspec
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/parser.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/message.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/header.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/address.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/mailbox.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/serialize.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/utils.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/mailbox/mboxreader.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/parser/multipart.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/lib/rmail/parser/pushbackreader.rb
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/guide/MIME.txt
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/guide/TableOfContents.txt
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/guide/Intro.txt
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/tests/addrgrammar.txt
/usr/lib/ruby/gems/1.8/gems/rmail-0.17/tests/testmboxreader.rb
[ ... this directory contains all rmail’s unit tests, which are packaged as examples in librmail-ruby-doc in Debian ]
/usr/lib/ruby/gems/1.8/specifications/rmail-0.17.gemspec
/usr/lib/ruby/gems/1.8/source_cache
Files in the Debian package librmail-ruby1.8
/usr/lib/ruby/1.8/rmail.rb
/usr/lib/ruby/1.8/rmail/parser.rb
/usr/lib/ruby/1.8/rmail/message.rb
/usr/lib/ruby/1.8/rmail/header.rb
/usr/lib/ruby/1.8/rmail/address.rb
/usr/lib/ruby/1.8/rmail/mailbox.rb
/usr/lib/ruby/1.8/rmail/serialize.rb
/usr/lib/ruby/1.8/rmail/utils.rb
/usr/lib/ruby/1.8/rmail/mailbox/mboxreader.rb
/usr/lib/ruby/1.8/rmail/parser/multipart.rb
/usr/lib/ruby/1.8/rmail/parser/pushbackreader.rb
/usr/share/doc/librmail-ruby1.8/NOTES
/usr/share/doc/librmail-ruby1.8/README
/usr/share/doc/librmail-ruby1.8/THANKS
/usr/share/doc/librmail-ruby1.8/TODO
/usr/share/doc/librmail-ruby1.8/copyright
/usr/share/doc/librmail-ruby1.8/NEWS.gz
/usr/share/doc/librmail-ruby1.8/changelog.Debian.gz
rubygems package
The rubygems package Daigo Moriwaki created has now reached the
debian archive. Gems are stored in the
/var/lib/gem/rubyversion directory, as this is the only way to comply
to the FHS.