Your message dated Tue, 30 Jun 2009 12:50:16 -0400
with message-id <[email protected]>
and subject line Re: Bug#535139: lintian: false positive on
ruby-script-but-no-ruby-dep
has caused the Debian Bug report #535139,
regarding lintian: false positive on ruby-script-but-no-ruby-dep
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
535139: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535139
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lintian
Version: 2.2.12
Severity: normal
Lintian is complaining:
E: facter: ruby-script-but-no-ruby-dep ./usr/bin/facter
Although it can clearly be seen in the control file:
Depends: ruby (>= 1.8), net-tools, host | bind9-host, pciutils,
libopenssl-ruby1.8, ${misc:Depends}
Perhaps it is saying this because there is a versioned depends on Ruby
>= 1.8 and it should be listed as ruby1.8, ruby1.9 or just plain ruby
if there is no version specific criteria? If that is true, then the
description doesn't clearly indicate that.
thanks!
micah
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-vserver-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages lintian depends on:
ii binutils 2.19.1-1 The GNU assembler, linker and bina
ii diffstat 1.47-1 produces graph of changes introduc
ii dpkg-dev 1.15.3 Debian package development tools
ii file 5.03-1 Determines file type using "magic"
ii gettext 0.17-6 GNU Internationalization utilities
ii intltool-debian 0.35.0+20060710.1 Help i18n of RFC822 compliant conf
ii libapt-pkg-perl 0.1.23 Perl interface to libapt-pkg
ii libipc-run-perl 0.82-1 Perl module for running processes
ii libparse-debianchangel 1.1.1-2 parse Debian changelogs and output
ii libtimedate-perl 1.1600-9 Time and date functions for Perl
ii liburi-perl 1.37+dfsg-1 Manipulates and accesses URI strin
ii man-db 2.5.5-2 on-line manual pager
ii perl [libdigest-sha-pe 5.10.0-23 Larry Wall's Practical Extraction
lintian recommends no packages.
Versions of packages lintian suggests:
pn binutils-multiarch <none> (no description available)
ii libtext-template-perl 1.45-1 Text::Template perl module
ii man-db 2.5.5-2 on-line manual pager
-- no debconf information
--- End Message ---
--- Begin Message ---
* Russ Allbery <[email protected]> [2009-06-29 23:53-0400]:
> Micah Anderson <[email protected]> writes:
>
> > Lintian is complaining:
> >
> > E: facter: ruby-script-but-no-ruby-dep ./usr/bin/facter
> >
> > Although it can clearly be seen in the control file:
> >
> > Depends: ruby (>= 1.8), net-tools, host | bind9-host, pciutils,
> > libopenssl-ruby1.8, ${misc:Depends}
> >
> > Perhaps it is saying this because there is a versioned depends on Ruby
> > >= 1.8 and it should be listed as ruby1.8, ruby1.9 or just plain ruby
> > if there is no version specific criteria? If that is true, then the
> > description doesn't clearly indicate that.
>
> There may be a bug, but the way that this is *supposed* to work is that
> scripts that explicitly give a Ruby version on the #! line
> (/usr/bin/ruby1.8, for instance) have to depend on the ruby1.8 package,
> whereas scripts that use #!/usr/bin/ruby have to depend on the ruby
> package. Depending on ruby (>= 1.8) is not correct if you use
> #!/usr/bin/ruby1.8, sice ruby 1.9 may not provide that path.
>
> Does that fit what the package is doing?
In fact it does... facter uses install.rb which seems to want to alter
the shebang to use 1.8 specifically. I've solved that, and am closing
the bug, if you are interested in that solution, read on:
# Install file(s) from ./bin to Config::CONFIG['bindir']. Patch it on the way
# to insert a #! line; on a Unix install, the command is named as expected
# (e.g., bin/rdoc becomes rdoc); the shebang line handles running it.
...
ruby = File.join(Config::CONFIG['bindir'],
Config::CONFIG['ruby_install_name'])
File.open(from) do |ip|
File.open(tmp_file, "w") do |op|
ruby = File.join(Config::CONFIG['bindir'],
Config::CONFIG['ruby_install_name'])
op.puts "#!#{ruby}"
contents = ip.readlines
if contents[0] =~ /^#!/
contents.shift
end
op.write contents.join()
end
end
Which takes a perfectly fine shebang in the source:
#!/usr/bin/env ruby
it looks at whatever /usr/bin/ruby is (on my build system ruby1.8), and
then munges that line into:
#!/usr/bin/ruby1.8
during build time.
In the case of puppet, the work hasn't finished to get it to work
properly with ruby1.9, so that seems fine, but facter has had that work
done so both ruby1.8 and ruby1.9 work fine.
I'm not well versed in the differences between install.rb and setup.rb,
the two most common ruby scripts used for doing installations, but from
a brief look around, it seems like setup.rb replaced install.rb some
years ago (by the same author), and setup.rb has the more configurable
option of doing:
--shebang=(all|ruby|never)
Shenbang line (#!) rewriting mode.
all: replace all shebang lines.
ruby: replace shebang lines which invokes ruby.
never: never rewrite shebang.
So... since facter can support both ruby1.8 and ruby1.9, I'm switching
the package to use the Debian Ruby standardized CDBS classes that
provide a functioning setup.rb which allows me to override this problem
in build-time, thus solving this lintian error.
Micah
signature.asc
Description: Digital signature
--- End Message ---