[Bug 742189] Review Request: rubygem-webmock - Library for stubbing HTTP requests in Ruby

bugzilla at redhat.com bugzilla at redhat.com
Fri Sep 30 19:03:48 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=742189

James Laska <jlaska at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jlaska at redhat.com
         AssignedTo|nobody at fedoraproject.org    |jlaska at redhat.com
               Flag|                            |fedora-review?

--- Comment #1 from James Laska <jlaska at redhat.com> 2011-09-30 15:03:46 EDT ---
Taking review ownership.  This is my first rubygem package review.  I've done
my best to apply the ruby packaging guidelines
(https://fedoraproject.org/wiki/Packaging:Ruby).  However, I'm not the
authority on rubygem's, so we can certainly work through any issues raised.


> [ WARN ] MUST: rpmlint must be run on every package

rubygem-webmock.noarch: W: doc-file-dependency
/usr/lib/ruby/gems/1.8/gems/webmock-1.7.6/Rakefile /usr/bin/env

>From rpmlint source ... '''An included file marked as %doc creates a possible
additional dependency in the package.  Usually, this is not wanted and may be
caused by eg. example scripts with executable bits set included in the
package's documentation.'''

rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestSignature/eql%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HeadersPattern/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/Curl/WebMockCurlEasy/put_data_with_webmock%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/NetHttpAdapter/const_defined%3f-c.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/allow_net_connect%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/Curl/WebMockCurlEasy/delete_with_webmock%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/WebMockMatcher/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestPatternMatcher/does_not_match%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/URIStringPattern/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/Curl/WebMockCurlEasy/post_body_with_webmock%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/CallbackRegistry/any_callbacks%3f-c.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/Curl/WebMockCurlEasy/head%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/net_connect_allowed%3f-c.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/StubRegistry/reset%21-i.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/Curl/WebMockCurlEasy/delete%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/Curl/WebMockCurlEasy/head_with_webmock%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/TyphoeusAdapter/enable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/CurbAdapter/enable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/StubRegistry/registered_request%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestExecutionVerifier/does_not_match%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/MethodPattern/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/URIRegexpPattern/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/HTTPClientAdapter/disable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/Curl/WebMockCurlEasy/post_body%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestRegistry/reset%21-i.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/Response/exception%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestStub/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestSignature/url_encoded%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/Response/body%3d-i.yaml %3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/NetHttpAdapter/enable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestStub/has_responses%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/Response/%3d%3d-i.yaml %3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/Response/%3d%3d-i.yaml %3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/TyphoeusAdapter/disabled%3f-c.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/TyphoeusAdapter/disable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/BodyPattern/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/NetHttpAdapter/disable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestPattern/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestPatternMatcher/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/CurbAdapter/disable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/disable%21-c.yaml %21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/Response/headers%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/EmHttpRequestAdapter/enable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/registered_request%3f-c.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestSignature/headers%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/PatronAdapter/enable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/WebMockMatcher/does_not_match%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/disable_net_connect%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/Util/HashKeysStringifier/stringify_keys%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/EmHttpRequestAdapter/disable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/ResponsesSequence/end%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/Response/options%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/HTTPClientAdapter/enable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/is_uri_localhost%3f-c.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/HttpLibAdapters/PatronAdapter/disable%21-c.yaml
%21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/RequestExecutionVerifier/matches%3f-i.yaml
%3f
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/reset%21-c.yaml %21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/enable%21-c.yaml %21
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/WebMock/Response/status%3d-i.yaml
%3d
rubygem-webmock-doc.noarch: W: unexpanded-macro
/usr/lib/ruby/gems/1.8/doc/webmock-1.7.6/ri/Curl/WebMockCurlEasy/put_data%3d-i.yaml
%3d
3 packages and 1 specfiles checked; 0 errors, 61 warnings.

>From rpmlint source ... '''This package contains a file whose path contains
something that looks like an unexpanded macro; this is often the sign of a
misspelling. Please check your specfile.'''


> [  OK  ] MUST: The package must be named according to the Package Naming 
>          Guidelines
> [  OK  ] MUST: The spec file name must match the base package %{name} [...]
> [  OK  ] MUST: The package must meet the Packaging Guidelines
> [  OK  ] MUST: The package must be licensed with a Fedora approved license
>          and meet the Licensing Guidelines
> [ FAIL ] MUST: The License field in the package spec file must match the 
>          actual license

The upstream LICENSE file seems to indicate MIT, does this need to be updated?

https://github.com/bblimke/webmock/blob/master/LICENSE
https://secure.wikimedia.org/wikipedia/en/wiki/MIT_License#License_terms

> [ 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 %doc

Note, there are too many files listed as %doc.  For example, the Rakefile
probably shouldn't be a %doc.  Maybe the same with other source code?

%exclude %{geminstdir}/Rakefile

> [  OK  ] MUST: The spec file must be written in American English.
> [  OK  ] MUST: The spec file for the package MUST be legible.
> [  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 Source URL Guidelines for how to deal with this.

5ff10679f8e2865471fc9f9ae80dd2c5  webmock-1.7.6.gem
5ff10679f8e2865471fc9f9ae80dd2c5  webmock-rpm-1.7.6.gem

> [  OK  ] MUST: The package MUST successfully compile and build into binary 
>          rpms on at least one primary architecture

Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=3394322

> [  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 ExcludeArch. Each architecture listed in ExcludeArch 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 ExcludeArch line
> [  OK  ] MUST: All build dependencies must be listed in BuildRequires, except 
>          for any that are listed in the exceptions section of the Packaging 
>          Guidelines ; inclusion of those as BuildRequires is optional. Apply 
>          common sense.
> [  NA  ] MUST: The spec file MUST handle locales properly. This is done by 
>          using the %find_lang macro. Using %{_datadir}/locale/* is strictly 
>          forbidden
> [  NA  ] 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 %post and %postun.
> [  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.
> [  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.
> [  OK  ] MUST: A package must not contain any duplicate files in the %files 
>          listing.
> [ FAIL ] MUST: Permissions on files must be set properly. Executables should 
>          be set with executable permissions, for example. Every %files section 
>          must include a %defattr(...) line.
> [  NA  ] MUST: Each package must have a %clean section, which contains rm -rf
>          %{buildroot} (or $RPM_BUILD_ROOT).

No longer applies for F13 or newer

> [  OK  ] MUST: Each package must consistently use macros.
> [  OK  ] MUST: The package must contain code, or permissable content.
> [  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).
> [  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.
> [  OK  ] MUST: Header files must be in a -devel package.
> [  OK  ] MUST: Static libraries must be in a -static package.
> [  OK  ] MUST: Packages containing pkgconfig(.pc) files must 'Requires: 
>          pkgconfig' (for directory ownership and usability).
> [  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.
> [  NA  ] MUST: In the vast majority of cases, devel packages must require the 
>          base package using a fully versioned dependency: Requires: %{name} =
>          %{version}-%{release}
> [  NA  ] MUST: Packages must NOT contain any .la libtool archives, these must 
>          be removed in the spec if they are built.
> [  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.
> [  NA  ] 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 filesystem or man 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.
> [ FAIL ] MUST: At the beginning of %install, each package MUST run rm -rf
>          %{buildroot} (or $RPM_BUILD_ROOT).

Fixed, see http://fpaste.org/GNSM/

> [  OK  ] MUST: All filenames in rpm packages must be valid UTF-8.


== Ruby requirements ==
> [  OK  ] - Each Ruby package must indicate the Ruby ABI version it depends on with a line like 
> [  OK  ] - Pure Ruby packages must be built as noarch packages. 
> [ WARN ] - 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"] ')}

The specfile is using a different method for locating /usr/lib/ruby/*.  Should
it be using %{ruby_sitelib} instead?  Or does this not apply since this is
providing a rubygem?

> [  NA  ] - For packages with binary content, e.g., database drivers or any other Ruby bindings to C libraries, the package must be architecture specific. 
> [  OK  ] - Packages that contain Ruby Gems must be called rubygem-%{gemname} where gemname is the name from the Gem's specification.
> [  OK  ] - 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

Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem

> [  OK  ] - The package must have a Requires and a BuildRequires on rubygems
> [  OK  ] - 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
> [ WARN ] - The %prep and %build sections of the specfile should be empty.

%build is empty, %prep is not ... I've adjusted per the ruby guidelines
slightly.  However this is a *should* requirement, not a *must*.  

> [  OK  ] - The Gem must be installed into %{gemdir} defined as %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
> [ FAIL ] - The install should be performed with the command 'gem install --local --install-dir %{buildroot}%{gemdir} --force %{SOURCE0}'

This command is currently used in the %prep.  I've adjusted slighty to
accommodate the *should* requirement.  Feel free to use if desired.

http://fpaste.org/GNSM/

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

> [  NA  ] - Architecture-specific content must not be installed into %{gemdir}
> [  OK  ] - 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

-- 
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