[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#626210: lintian: check /usr/bin/ruby scripts for dependency on 'ruby | ruby-interpreter'

Package: lintian
Version: 2.5.0~rc4
Severity: wishlist
Tags: patch

Hello lintian maintainers,

As it was announced some time ago [1], the Debian Ruby team is working
on a new policy and a new packaging helper for Ruby software. The
changes are summarized in the Debian Wiki [2].

One of these changes is that we introduced a pseudo-package called
'ruby-interpreter', which is currently provided by ruby1.8 and
ruby1.9.1, and may be provided by other implementations in the future
(such as jruby, rubinius etc). Packages providing ruby-interpreter
should also include an alternatives entry for /usr/bin/ruby, so that
users can switch which interpreter is used by default when one runs
plain 'ruby' and not rubyX.Y explicitly.

This way, we concluded that packages that are supposed to work on any
reasonable Ruby implementation must depend on 'ruby | ruby-interpreter'
in order to make this work.

The attached patch changes this in lintian, and changes the description
of the corresponding tag to match the new status. Please consider
including this patch in the next lintian release: it will be very
usefull to the Ruby team to have this updated in lintian.

[1] http://lists.debian.org/debian-devel/2011/03/msg00210.html
[2] http://wiki.debian.org/Teams/Ruby/RubyInWheezy

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.37-2-686 (SMP w/1 CPU core)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lintian depends on:
ii  binutils     The GNU assembler, linker and bina
ii  diffstat              1.54-1             produces graph of changes introduc
ii  dpkg-dev               Debian package development tools
ii  file                  5.04-5+b1          Determines file type using "magic"
ii  gettext              GNU Internationalization utilities
ii  intltool-debian       0.35.0+20060710.1  Help i18n of RFC822 compliant conf
ii  libapt-pkg-perl       0.1.24+b2          Perl interface to libapt-pkg
ii  libclass-accessor-per 0.34-1             Perl module that automatically gen
ii  libemail-valid-perl   0.184-1            Perl module for checking the valid
ii  libipc-run-perl       0.89-1             Perl module for running processes
ii  libparse-debianchange 1.2.0-1            parse Debian changelogs and output
ii  libtimedate-perl      1.2000-1           collection of modules to manipulat
ii  liburi-perl           1.58-1             module to manipulate and access UR
ii  locales               2.13-2             Embedded GNU C Library: National L
ii  man-db                on-line manual pager
ii  perl [libdigest-sha-p 5.12.3-6           Larry Wall's Practical Extraction 
ii  unzip                 6.0-4              De-archiver for .zip files

lintian recommends no packages.

Versions of packages lintian suggests:
pn  binutils-multiarch            <none>     (no description available)
ii  libhtml-parser-perl           3.68-1+b1  collection of modules that parse H
ii  libtext-template-perl         1.45-2     Text::Template perl module
ii  man-db                on-line manual pager

-- no debconf information

Antonio Terceiro <terceiro@softwarelivre.org>

From b505ee89b74bb154a86f4d3d639ae45a7d703aa7 Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <terceiro@softwarelivre.org>
Date: Mon, 9 May 2011 12:43:44 -0700
Subject: [PATCH] Update Ruby scripts for new Ruby policy

 checks/scripts      |    2 +-
 checks/scripts.desc |   16 ++++++++++------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/checks/scripts b/checks/scripts
index e512031..2a49c86 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -95,7 +95,7 @@ our %interpreters =
      rep            => [ '/usr/bin' ],
      rexx	    => [ '/usr/bin', 'regina-rexx' ],
      rrdcgi	    => [ '/usr/bin', 'rrdtool' ],
-     ruby	    => [ '/usr/bin' ],
+     ruby	    => [ '/usr/bin', 'ruby | ruby-interpreter' ],
      runhaskell     => [ '/usr/bin', 'ghc | ghc6' ],
      runhugs	    => [ '/usr/bin', 'hugs | hugs98' ],
      sed	    => [ '/bin', '' ],
diff --git a/checks/scripts.desc b/checks/scripts.desc
index 19c8ec9..7e9d955 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -266,14 +266,18 @@ Info: Packages with Python scripts should depend on the package
 Tag: ruby-script-but-no-ruby-dep
 Severity: important
 Certainty: certain
-Info: Packages with Ruby scripts must depend on the package ruby. Those
- that have Ruby scripts that run under a specific version of Ruby need a
+Info: Packages with Ruby scripts must depend on a valid Ruby interpreter.
+ Those that have Ruby scripts that run under a specific version of Ruby need a
  dependency on the equivalent version of Ruby.
- For example, if a script in the package uses <tt>#!/usr/bin/ruby</tt>,
- the package needs a dependency on "ruby".  If a script uses
- <tt>#!/usr/bin/ruby1.9</tt>, then the package need a dependency on
- "ruby1.9".
+ If a script in the package uses <tt>#!/usr/bin/ruby</tt>, the package needs a
+ dependency on "ruby | ruby-interpreter". This allows users to choose which
+ interpreter to use by default. If the package is intended to be used with a
+ specific Ruby version, its scripts should use that version directly, such
+ as <tt>#!/usr/bin/ruby1.8</tt>
+ .
+ If a script uses <tt>#!/usr/bin/ruby1.9</tt>, then the package needs a
+ dependency on "ruby1.9".
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.

Attachment: signature.asc
Description: Digital signature

Reply to: