[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ A ] [ B ] [ C ] [ next ]

Debian Ruby Policy
Chapter 1 - Ruby Packaging


1.1 Versions

At any given time, the package ruby will represent the current default Debian Ruby version.

The default Debian Ruby version should alway be the latest stable upstream release that can be integrated in the distribution.

Apart from the default version, legacy versions of Ruby may be included as well in the distribution, as long as they are needed by other packages, or as long as it seems reasonable to provide them. (Note: For the scope of this document, Ruby versions are synonymous to feature releases, i.e. Ruby 1.6 and 1.6.8 are subminor versions of the same Ruby version 1.6, but Ruby 1.8 and 1.9 are indeed different versions.)

In addition, unstable/development version of Ruby may be included in the unstable distribution.

For any version, the main package must be called rubyX.Y. Names of related packages must include the rubyX.Y part.


1.2 Main package

For every Ruby version provided in the distribution, the package librubyX.Y shall comprise a complete distribution for deployment of Ruby modules and the package rubyX.Y shall comprise a complete distribution for deployment of Ruby scripts. Note that some ruby applications don't require ruby, instead these require mod_ruby or eruby. The librubyX.Y includes core modules of the upstream Ruby distribution and the rubyX.Y package includes the binary /usr/bin/rubyX.Y.

Some tools and files for the development of Ruby modules are split off in a separate package rubyX.Y-dev. Some modules in upstream Ruby distribution will be provided in separate packages. Documentation will be provided separately as well.

At any time, exactly one package, called ruby must contain a binary /usr/bin/ruby, which is symlink to the /usr/bin/rubyX.Y, the default version of Ruby.


1.3 Ruby Interpreter


1.3.1 Interpreter Name

Ruby scripts depending on the default Ruby version (see Main package, Section 1.2) or not depending on a specific Ruby version should use ruby (unversioned) as the interpreter name.

Ruby scripts that only work with a specific Ruby version must explicitly use the versioned interpreter name (rubyX.Y).


1.3.2 Interpreter Location

The path name for the Ruby interpreter is /usr/bin/ruby or /usr/bin/rubyX.Y.

If a maintainer would like to provide the user with the possibility to override the Debian Ruby interpreter, he may want to use /usr/bin/env ruby or /usr/bin/env rubyX.Y.


1.4 Ruby library

The Ruby library is provided by librubyX.Y. The package installs /usr/lib/librubyX.Y.so.X.Y.Z (soname is librubyX.Y.so.X.Y) and /usr/lib/librubyX.Y.so.X.Y.

Note that ruby version 1.6 used libruby.so.1.6.


1.5 Tools/files for Development of ruby modules

Some tools and files for development of ruby modules are packaged as rubyX.Y-dev. This package provides /usr/lib/ruby/X.Y/mkmf.rb, /usr/lib/librubyX.Y.so and header files, static library in Config::CONFIG['archdir'].

Note that ruby 1.6 (ruby1.6-dev) provides /usr/lib/libruby.so.

TODO: we should install header files in /usr/include/rubyX.Y/ ?


1.6 Module Path

The module search path ($LOAD_PATH or $:) is searched in the following order:

      /usr/local/lib/site_ruby/X.Y	 (Config::CONFIG['sitelibdir'])
      /usr/local/lib/site_ruby/X.Y/GNU-SYSTEM (Config::CONFIG['sitearchdir'])
      /usr/local/lib/site_ruby		 (Config::CONFIG['sitedir'])
      /usr/lib/ruby/X.Y	(Config::CONFIG['rubylibdir'])
      /usr/lib/ruby/X.Y/GNU-SYSTEM	(Config::CONFIG['archdir'])
      .

TODO: What about /usr/share/ruby/X.Y ?

System administrator can install ruby modules to /usr/local/lib/site_ruby/X.Y/ (for arch independent modules), /usr/local/lib/site_ruby/X.Y/GNU-SYSTEM/ (for arch dependent modules) or /usr/local/lib/site_ruby/ (for version independent modules). Note that ruby module packages MUST not use these directories.


1.7 Documentation

TODO: We should make some policy to use refe.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ A ] [ B ] [ C ] [ next ]

Debian Ruby Policy

version 0.0.1.4

Akira Yamada
Akira Tagoh
Fumitoshi UKAI