Bug 182064 - Review Request: facter
Review Request: facter
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: John Mahowald
Fedora Package Reviews List
:
Depends On:
Blocks: FE-ACCEPT 180571
  Show dependency treegraph
 
Reported: 2006-02-19 21:22 EST by David Lutterkort
Modified: 2013-04-30 19:40 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-11 21:00:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Lutterkort 2006-02-19 21:22:54 EST
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
Comment 1 Michael Schwendt 2006-02-27 11:04:53 EST
$ rpmls facter
-rwxr-xr-x  /usr/bin/facter
-rwxr-xr-x  /usr/lib/site_ruby/1.8/facter.rb
drwxr-xr-x  /usr/share/doc/facter-1.1.1
-rw-r--r--  /usr/share/doc/facter-1.1.1/CHANGELOG
-rw-r--r--  /usr/share/doc/facter-1.1.1/COPYING
-rw-r--r--  /usr/share/doc/facter-1.1.1/INSTALL
-rw-r--r--  /usr/share/doc/facter-1.1.1/LICENSE
-rw-r--r--  /usr/share/doc/facter-1.1.1/README

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"]'
  /usr/lib/ruby/1.8

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:
  http://reductivelabs.com/downloads/facter/facter-1.1.3.tgz

* 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.
Comment 2 David Lutterkort 2006-03-06 14:54:07 EST
* 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

Spec: http://people.redhat.com/dlutter/yum/spec/facter.spec
SRPM: http://people.redhat.com/dlutter/yum/SRPMS/facter-1.1.4-1.src.rpm

Comment 3 Toshio Kuratomi 2006-03-06 17:49:21 EST
Ville Skyttä pointed out on fedora-extras-list [1]_ that ruby packages currently
can't be noarch.  Until this is fixed in Core's ruby package you have to remove
the BuildArch: noarch.

[1]_ https://www.redhat.com/archives/fedora-extras-list/2006-March/msg00079.html
Comment 4 David Lutterkort 2006-03-13 16:37:11 EST
Removed the BuildArch line for now.

Spec: http://people.redhat.com/dlutter/yum/spec/facter.spec
SRPM: http://people.redhat.com/dlutter/yum/SRPMS/facter-1.1.4-2.src.rpm
Comment 5 John Mahowald 2006-03-18 21:23:31 EST
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)
Comment 6 David Lutterkort 2006-03-21 19:01:24 EST
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 ?
Comment 7 David Lutterkort 2006-03-30 15:01:34 EST
To facilitate the review, here is the output I get from rpmlint and why I think
that's ok:

* 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
Comment 8 John Mahowald 2006-04-08 15:16:26 EDT
The source in the srpm must match the URL in the source tag.
http://fedoraproject.org/wiki/Packaging/ReviewGuidelines


I can sponsor if still needed. Apply for cvsextras.
Comment 9 David Lutterkort 2006-04-17 17:33:41 EDT
* Rebuilt RPM with tarball from upstream
* Applied for cvsextras in account system (user 'lutter')

Spec: http://people.redhat.com/dlutter/yum/spec/facter.spec
SRPM: http://people.redhat.com/dlutter/yum/SRPMS/facter-1.1.4-4.src.rpm
Comment 10 John Mahowald 2006-04-18 23:17:11 EDT
Doesn't work on x86_64 by simply entering facter. 

/usr/bin/facter:9:in `require': no such file to load -- facter (LoadError)
        from /usr/bin/facter:9

which is the require 'factor' line. Works by specifying load path:

ruby -I /usr/lib64/ruby/site_ruby/1.8/ /usr/bin/facter
Comment 11 David Lutterkort 2006-04-19 15:52:44 EDT
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
the machine)
Comment 12 John Mahowald 2006-04-22 18:17:12 EDT
FC5
ruby-1.8.4-3.2

$ ruby -e 'puts $:'
/usr/lib64/site_ruby/1.8
/usr/lib64/site_ruby/1.8/x86_64-linux
/usr/lib64/site_ruby
/usr/lib64/ruby/1.8
/usr/lib64/ruby/1.8/x86_64-linux
.

$ ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]'
/usr/lib64/site_ruby/1.8

$ rpm -qlp facter-1.1.4-4.x86_64.rpm
/usr/bin/facter
/usr/lib64/ruby/site_ruby/1.8/facter.rb
/usr/share/doc/facter-1.1.4
/usr/share/doc/facter-1.1.4/CHANGELOG
/usr/share/doc/facter-1.1.4/COPYING
/usr/share/doc/facter-1.1.4/INSTALL
/usr/share/doc/facter-1.1.4/LICENSE
/usr/share/doc/facter-1.1.4/README
Comment 13 David Lutterkort 2006-04-22 21:14:37 EDT
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
%_libdir/ruby.
Comment 14 John Mahowald 2006-04-29 20:42:33 EDT
(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
> %_libdir/ruby.

That's what I get for building rawhide on a FC5 box. My mock logs actually show
1.8.4-4.fc6 
Comment 15 John Mahowald 2006-05-20 00:29:46 EDT
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 

APPROVED
Comment 16 David Lutterkort 2006-05-25 14:36:06 EDT
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
it's ok.
Comment 17 David Lutterkort 2006-07-11 21:00:06 EDT
Imported and built successfully as job 12478

Note You need to log in before you can comment on or make changes to this bug.