[Bug 746079] Review Request: rubygem-grit library for extracting info from a git repository in Ruby

bugzilla at redhat.com bugzilla at redhat.com
Wed Oct 26 15:00:19 UTC 2011


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=746079

--- Comment #2 from James Laska <jlaska at redhat.com> 2011-10-26 11:00:18 EDT ---
Based on my review feedback, I would approve this package.  I believe we just
need to find a sponsor to review my findings and sponsor you.

== MUST requirements ==

> [ WARN ] MUST: rpmlint must be run on the source rpm and all binary rpms the
>          build produces. The output should be posted in the review.(refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint)

rubygem-grit.noarch: W: no-documentation

The .spec linked in comment#0 is not the same .spec used to build the .src.rpm.
 The .spec linked includes the LICENSE file in the base package (and the -doc
subpackage).  The .spec included in the provided .src.rpm does not.  I'd
suggest using the .spec linked instead.

> diff -u rubygem-grit.src.spec rubygem-grit.spec 
> --- rubygem-grit.src.spec	2011-10-26 10:40:27.096819597 -0400
> +++ rubygem-grit.spec	2011-10-13 15:42:36.000000000 -0400
> @@ -65,6 +65,7 @@
>  %{geminstdir}/lib
>  %{gemdir}/cache/%{gemname}-%{version}.gem
>  %{gemdir}/specifications/%{gemname}-%{version}.gemspec
> +%doc %{geminstdir}/LICENSE
>  
>  %files doc
>  %doc %{gemdir}/doc/%{gemname}-%{version}

rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Config/%5b%5d%3d-i.yaml %5b
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Config/%5b%5d%3d-i.yaml %5d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Config/%5b%5d%3d-i.yaml %3d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Internal/LooseStorage/%5b%5d-i.yaml
%5b
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Internal/LooseStorage/%5b%5d-i.yaml
%5d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Tree/%2f-i.yaml %2f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Repository/files_changed%3f-i.yaml
%3f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Repository/object_exists%3f-i.yaml
%3f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Git/object_exists%3f-i.yaml %3f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Repo/alternates%3d-i.yaml %3d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Tree/%3c%3d%3e-i.yaml %3c
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Tree/%3c%3d%3e-i.yaml %3d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Tree/%3c%3d%3e-i.yaml %3e
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Process/success%3f-i.yaml %3f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/DirectoryEntry/type%3d-i.yaml
%3d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Internal/FileWindow/%5b%5d-i.yaml
%5b
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Internal/FileWindow/%5b%5d-i.yaml
%5d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Repository/in_loose%3f-i.yaml
%3f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Repo/is_head%3f-i.yaml %3f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Status/%5b%5d-i.yaml %5b
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Status/%5b%5d-i.yaml %5d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Repository/in_packs%3f-i.yaml
%3f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Git/exist%3f-i.yaml %3f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Config/%5b%5d-i.yaml %5b
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Config/%5b%5d-i.yaml %5d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Blob/%3c%3d%3e-i.yaml %3c
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Blob/%3c%3d%3e-i.yaml %3d
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Blob/%3c%3d%3e-i.yaml %3e
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/Git/fs_exist%3f-i.yaml %3f
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Internal/PackStorage/%5b%5d-i.yaml
%5b
rubygem-grit-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/grit-2.4.1/ri/Grit/GitRuby/Internal/PackStorage/%5b%5d-i.yaml
%5d

The "unexpanded-macro" warnings are safe to ignore

3 packages and 1 specfiles checked; 0 errors, 32 warnings.


> [  OK  ] MUST: The package must be named according to the
>          http://fedoraproject.org/wiki/Packaging/NamingGuidelines
> [  OK  ] MUST: The spec file name must match the base package
>          <code>%{name}</code>, in the format <code>%{name}.spec</code> unless your
>          package has an exemption. (refer to
>          http://fedoraproject.org/wiki/Packaging/NamingGuidelines#Spec_file_name).
> [  OK  ] MUST: The package must meet the
>          http://fedoraproject.org/wiki/Packaging/Guidelines.
> [  OK  ] MUST: The package must be licensed with a Fedora approved license and
>          meet the http://fedoraproject.org/wiki/Packaging/LicensingGuidelines.
> [  OK  ] MUST: The License field in the package spec file must match the actual
>          license. (refer to
>          http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#ValidLicenseShortNames)
> [ WARN ] MUST: If (and only if) the source package includes the text of the
>          license(s) in its own file, then that file, containing the text of the
>          license(s) for the package must be included in <code>%doc</code>.(refer to
>          http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License Text)

I'm trying to get clarification on whether the LICENSE file *must* exist in the
base package.  The guidelines discuss requirements on when you need to include
the LICENSE in subpackages, but there are no criteria for including the LICENSE
in *only* a subpackage (as is the case currently with rubygem-grit).

> [  OK  ] MUST: The spec file must be written in American English. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#summary)
> [ WARN ] MUST: The spec file for the package '''MUST''' be legible. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#Spec_Legibility)

Not a failure, but more a nit.  Please ....

 1) Consistently space RPM % sections (either use two spaces or one)
 2) Remove trailing whitespace before newlines (see
http://vim.wikia.com/wiki/Highlight_unwanted_spaces)

> [  OK  ] MUST: The sources used to build the package must match the upstream
>          source, as provided in the spec URL. Reviewers should use md5sum for this task.
>          If no upstream URL can be specified for this package, please see the
>          http://fedoraproject.org/wiki/Packaging/SourceURL for how to deal with
>          this.

# md5sum *.gem
c8bee515d6eace9aec7336e0ac6b0768  grit-2.4.1.downstream.gem
c8bee515d6eace9aec7336e0ac6b0768  grit-2.4.1.upstream.gem

> [  OK  ] MUST: The package '''MUST''' successfully compile and build into
>          binary rpms on at least one primary architecture. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#Architecture_Support)

http://koji.fedoraproject.org/koji/taskinfo?taskID=3461511

> [  NA  ] MUST: If the package does not successfully compile, build or work on
>          an architecture, then those architectures should be listed in the spec in
>          <code>ExcludeArch</code>. Each architecture listed in <code>ExcludeArch</code>
>          '''MUST''' have a bug filed in bugzilla, describing the reason that the package
>          does not compile/build/work on that architecture. The bug number '''MUST''' be
>          placed in a comment, next to the corresponding <code>ExcludeArch</code> line.
>          (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#Architecture_Build_Failures)
> [  OK  ] MUST: All build dependencies must be listed in
>          <code>BuildRequires</code>, except for any that are listed in the
>          http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2 section of the
>          Packaging Guidelines ; inclusion of those as <code>BuildRequires</code> is
>          optional. Apply common sense.
> [  OK  ] MUST: The spec file MUST handle locales properly. This is done by
>          using the <code>%find_lang</code> macro. Using
>          <code>%{_datadir}/locale/*</code> is strictly forbidden.(refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#Handling_Locale_Files)
> [  OK  ] MUST: Every binary RPM package (or subpackage) which stores shared
>          library files (not just symlinks) in any of the dynamic linker's default paths,
>          must call ldconfig in <code>%post</code> and <code>%postun</code>. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#Shared_Libraries)
> [  OK  ] MUST: Packages must NOT bundle copies of system libraries.(refer to
>          http://fedoraproject.org/wiki/Packaging:Guidelines#Duplication_of_system_libraries)
> [  NA  ] MUST: If the package is designed to be relocatable, the packager must
>          state this fact in the request for review, along with the rationalization for
>          relocation of that specific package. Without this, use of Prefix: /usr is
>          considered a blocker. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#RelocatablePackages)
> [  OK  ] MUST: A package must own all directories that it creates. If it does
>          not create a directory that it uses, then it should require a package which
>          does create that directory.  (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#FileAndDirectoryOwnership)
> [  OK  ] MUST: A Fedora package must not list a file more than once in the spec
>          file's %files listings. (Notable exception: license texts in specific
>          situations)(refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#DuplicateFiles)
> [  OK  ] MUST: Permissions on files must be set properly. Executables should be
>          set with executable permissions, for example. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#FilePermissions)
> [  OK  ] MUST: Each package must consistently use macros. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#macros)
> [  OK  ] MUST: The package must contain code, or permissable content. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#CodeVsContent)
> [  OK  ] MUST: Large documentation files must go in a -doc subpackage. (The
>          definition of large is left up to the packager's best judgement, but is not
>          restricted to size. Large can refer to either size or quantity). (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation)
> [  OK  ] MUST: If a package includes something as %doc, it must not affect the
>          runtime of the application. To summarize: If it is in %doc, the program must
>          run properly if it is not present. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation)
> [  NA  ] MUST: Header files must be in a -devel package. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages)
> [  NA  ] MUST: Static libraries must be in a -static package. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#StaticLibraries)
> [  NA  ] MUST: If a package contains library files with a suffix (e.g.
>          libfoo.so.1.1), then library files that end in .so (without suffix) must go in
>          a -devel package. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages)
> [  NA  ] MUST: In the vast majority of cases, devel packages must require the
>          base package using a fully versioned dependency: <code>Requires:
>          %{name}%{?_isa} = %{version}-%{release} </code> (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#RequiringBasePackage)
> [  NA  ] MUST: Packages must NOT contain any .la libtool archives, these must
>          be removed in the spec if they are built.(refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#StaticLibraries)
> [  NA  ] MUST: Packages containing GUI applications must include a
>          %{name}.desktop file, and that file must be properly installed with
>          desktop-file-install in the %install section. If you feel that your packaged
>          GUI application does not need a .desktop file, you must put a comment in the
>          spec file with your explanation. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#desktop)
> [  OK  ] MUST: Packages must not own files or directories already owned by
>          other packages. The rule of thumb here is that the first package to be
>          installed should own the files or directories that other packages may rely
>          upon. This means, for example, that no package in Fedora should ever share
>          ownership with any of the files or directories owned by the
>          <code>filesystem</code> or <code>man</code> package. If you feel that you have
>          a good reason to own a file or directory that another package owns, then please
>          present that at package review time. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#FileAndDirectoryOwnership)
> [  OK  ] MUST: All filenames in rpm packages must be valid UTF-8. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#FilenameEncoding)

== SHOULD requirements ==

> [  NA  ] SHOULD: If the source package does not include license text(s) as a
>          separate file from upstream, the packager SHOULD query upstream to include it.
>          (refer to
>          http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License_Text)
> [ WARN ] SHOULD: The description and summary sections in the package spec file
>          should contain translations for supported Non-English languages, if available.
>          (refer to http://fedoraproject.org/wiki/Packaging/Guidelines#summary)

I'd recommend the following Summary (taken from upstream github repo summary)
instead:

    Summary: Grit gives you object oriented read/write access to Git
repositories via Ruby

Additionally, I'd recommend the following description

    %description
    Grit gives you object oriented read/write access to Git repositories via
Ruby.
    The main goals are stability and performance. To this end, some of the
    interactions with Git repositories are done by shelling out to the system's
git
    command, and other interactions are done with pure Ruby reimplementations
of
    core Git functionality. This choice, however, is transparent to end users,
and
    you need not know which method is being used.

    This software was developed to power GitHub, and should be considered
    production ready. An extensive test suite is provided to verify its
    correctness.

Just personal preference, not a requirement for this review.

> [  OK  ] SHOULD: The reviewer should test that the package builds in mock.
>          (refer to http://fedoraproject.org/wiki/PackageMaintainers/MockTricks)
> [  OK  ] SHOULD: The package should compile and build into binary rpms on all
>          supported architectures. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#ArchitectureSupport)
> [ WARN ] SHOULD: The reviewer should test that the package functions as
>          described. A package should not segfault instead of running, for example.

I know very little about running ruby ... I tried running some of the examples
included in -doc ... but no luck.  I assume this works :

> [  NA  ] SHOULD: If scriptlets are used, those scriptlets must be sane. This is
>          vague, and left up to the reviewers judgement to determine sanity. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#Scriptlets)
> [  OK  ] SHOULD: Usually, subpackages other than devel should require the base
>          package using a fully versioned dependency. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#RequiringBasePackage)
> [  NA  ] SHOULD: The placement of pkgconfig(.pc) files depends on their
>          usecase, and this is usually for development purposes, so should be placed in a
>          -devel pkg.  A reasonable exception is that the main pkg itself is a devel tool
>          not installed in a user runtime, e.g. gcc or gdb. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#PkgconfigFiles)
> [  NA  ] SHOULD: If the package has file dependencies outside of /etc, /bin,
>          /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the
>          file instead of the file itself. (refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#FileDeps)
> [ FAIL ] SHOULD: your package should contain man pages for binaries/scripts. If
>          it doesn't, work with upstream to add them where they make sense.(refer to
>          http://fedoraproject.org/wiki/Packaging/Guidelines#Man_pages)

Man pages don't seem to be common for rubygems, however there is plenty of
documentation on usage included in -doc

== RUBY requirements ==

> [  OK  ] MUST: The name of a ruby extension/library package must be of the
>          form ruby-UPSTREAM
> [  NA  ] MUST: A ruby extension/library package must indicate what it provides
>          with a Provides: ruby(LIBRARY) = VERSION declaration in the spec file
> [  OK  ] MUST: Pure Ruby packages must be built as noarch packages.
> [  NA  ] MUST: The Ruby library files in a pure Ruby package must be placed
>          into Config::CONFIG["sitelibdir"] . The specfile must get that path
>          using %{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e
>          'puts Config::CONFIG["sitelibdir"] ')}
> [  NA  ] MUST: For packages with binary content, e.g., database drivers or any
>          other Ruby bindings to C libraries, the package must be architecture
>          specific.
> [  NA  ] MUST: The binary files in a Ruby package with binary content must be
>          placed into Config::CONFIG["sitearchdir"]
> [  OK  ] MUST: Packages that contain Ruby Gems must be called
>          rubygem-%{gemname} where gemname is the name from the Gem's specification.
> [  OK  ] MUST: The Source of the package must be the full URL to the released
>          Gem archive; the version of the package must be the Gem's version
> [  OK  ] MUST: The package must have a Requires and a BuildRequires on
>          rubygems

The following is used:
    Requires: ruby(rubygems)
    BuildRequires: ruby(rubygems)

And is perfectly fine since:
    $ repoquery -q --whatprovides "ruby(rubygems)"
    rubygems-0:1.7.2-3.fc15.noarch

> [  OK  ] MUST: The package must provide rubygem(%{gemname}) where gemname is
>          the name from the Gem's specification. For every dependency on a Gem named
>          gemdep, the package must contain a Requires on rubygem(%{gemdep}) with the same
>          version constraints as the Gem

    Provides: rubygem(%{gemname}) = %{version}

> [  OK  ] MUST: The Gem must be installed into %{gemdir} defined as "%global
>          gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)"

    %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)

> [  OK  ] MUST: The package must own the following files and directories:
>            %{gemdir}/gems/%{gemname}-%{version}/
>            %{gemdir}/cache/%{gemname}-%{version}.gem
>            %{gemdir}/specifications/%{gemname}-%{version}.gemspec

    %{geminstdir}/lib
                 ^^^^ ---> probably sufficient to leave off the lib dirname?
    %{gemdir}/cache/%{gemname}-%{version}.gem
    %{gemdir}/specifications/%{gemname}-%{version}.gemspec

> [  OK  ] MUST: Architecture-specific content must not be installed into %{gemdir}
> [  OK  ] MUST: If the Gem only contains pure Ruby code, it must be marked as
>          BuildArch: noarch. If the Gem contains binary content (e.g., for a database
>          driver), it must be marked as architecture specific, and all architecture
>          specific content must be moved from the %{gemdir} to the [#ruby_sitearch
>          %{ruby_sitearch} directory] during %install

    BuildArch: noarch

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the package-review mailing list