Red Hat Bugzilla – Bug 182064
Review Request: facter
Last modified: 2013-04-30 19:40:02 EDT
Spec Name or Url: http://people.redhat.com/dlutter/yum/spec/facter.spec
SRPM Name or Url: http://people.redhat.com/dlutter/yum/SRPMS/facter-1.1.1-3.src.rpm
Description: Facter is a module for collecting simple facts about a host Operating system.
This (together with bz180571) is my first request and I need to be sponsored
$ rpmls facter
It has a direct dependency on "ruby-libs", which owns the
/usr/lib/*ruby/1.8 directory tree. That "ruby" requires "ruby-libs"
already, well, ugh.
* The facter.rb script should not be executable. Gives ugly errors
without a ruby shebang.
* The install location of the script (/usr/lib/site_ruby/1.8/) looks
wrong. IMHO, it should be
$ ruby -rrbconfig -e 'puts Config::CONFIG["rubylibdir"]'
instead, just like we install Perl modules into vendor locations,
as site locations take precendence in search path list.
* "Source0" tag should include full URL of tarball:
* Repeating the program name in the "Summary" is commonly considered
bad taste/style, since what counts and is most interesting is what the
stuff in the package does, not its name.
Summary: Ruby module for collecting simple facts about a host operating system
The package description can expand on that, and at least the
%description hould explain that this is a module written in "Ruby".
* facter 1.1.3 has been released.
* I uppdated the spec/srpm and made changes according to the comments above
* The only thing I did not change is the install location: upstream ruby does
not provide a real distinction between vendor and site install locations.
Python, which is in a similar situation, uses site-packages for both rpm and
local installs. We are trying (as part of the Ruby SIG) to get this rectified,
but in the meantime I would like to stick with site_ruby
Ville SkyttÃ¤ pointed out on fedora-extras-list _ that ruby packages currently
can't be noarch. Until this is fixed in Core's ruby package you have to remove
the BuildArch: noarch.
Removed the BuildArch line for now.
md5sum of source tarball in srpm does not match URL in Source0. srpm one seems
to have additional Rakefile stuff. Link to a matching archive or include patches.
46ad9c6f1432c4d579eaa768338769be facter-1.1.4.tgz (Source0 URL)
b20eb00ab240df97f0f9be27dd380f43 facter-1.1.4.tgz (in srpm)
It appears the tarball was changed upstream after the release (look at the
timestamps on the tarball included in the srpm and the timestamp upstream)
In any event, the Rakefile is not used during building of the srpm .. or did it
cause you problems ?
To facilitate the review, here is the output I get from rpmlint and why I think
* No output for the SRPM
* For facter-1.1.4-3.i386.rpm:
E: facter no-binary
E: facter only-non-binary-in-usr-lib
Both should be ok; the package should be noarch, but because of bz184199 it's
not possible to build ruby noarch packages right now. Once 181499 has been
fixed, I'll switch to building this as noarch
The source in the srpm must match the URL in the source tag.
I can sponsor if still needed. Apply for cvsextras.
* Rebuilt RPM with tarball from upstream
* Applied for cvsextras in account system (user 'lutter')
Doesn't work on x86_64 by simply entering facter.
/usr/bin/facter:9:in `require': no such file to load -- facter (LoadError)
which is the require 'factor' line. Works by specifying load path:
ruby -I /usr/lib64/ruby/site_ruby/1.8/ /usr/bin/facter
I just tried it on an x86_64 box (albeit under RHEL4, haven't found a x86_64 FC5
one yet) and it seems to work. The directory /usr/lib64/ruby/site_ruby/1.8/
should be on the ruby load path $:, assuming you installed the x86_64 version of
ruby. If you only have the i386 version, things will be slightly more icky -
does that need to be supported (using a x86_64 facter package with a i386 ruby ?)
To investigate this further, could you give me the following:
* The version of ruby and FC you are running
* The output of "ruby -e 'puts $:'"
* The output of "ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]'"
* The output of "rpm -qlp facter-1.1.4-4.x86_64.rpm" (the one you installed on
$ ruby -e 'puts $:'
$ ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]'
$ rpm -qlp facter-1.1.4-4.x86_64.rpm
Strange .. it looks like the rpm was built on a machine that had
Config::CONFIG["sitelibdir"] set to /usr/lib64/ruby/site_ruby/1.8. Are you sure
the rpm wasn't built against a newer ruby package (e.g., the new 1.8.4-4 test
packages that Akira Tagoh has put out) ? Those moved site_ruby from %_libdir to
(In reply to comment #13)
> Strange .. it looks like the rpm was built on a machine that had
> Config::CONFIG["sitelibdir"] set to /usr/lib64/ruby/site_ruby/1.8. Are you sure
> the rpm wasn't built against a newer ruby package (e.g., the new 1.8.4-4 test
> packages that Akira Tagoh has put out) ? Those moved site_ruby from %_libdir to
That's what I get for building rawhide on a FC5 box. My mock logs actually show
Building for FC5 works, on FC5.
So the review:
- rpmlint checks return:
E: facter no-binary
E: facter only-non-binary-in-usr-lib
because of the mentioned bug 184199
- package meets naming guidelines
- package meets packaging guidelines
- license (GPL) OK, text in %doc, matches source
- spec file legible, in am. english
- source matches upstream
- package compiles on FC5 (x86_64)
- no missing BR
- no unnecessary BR
- no locales
- not relocatable
- owns all directories that it creates
- no duplicate files
- permissions ok
- %clean ok
- macro use consistent
- code, not content
- no need for -docs
- nothing in %doc affects runtime
- no need for .desktop file
Thanks for reviewing and approving hte package. I will hold off on importing it
until the Ruby packaging guidelines
(http://fedoraproject.org/wiki/Packaging/Ruby) have been approved, or spot says
Imported and built successfully as job 12478