Bug 1117025 - Review Request: rubygem-joiner - Builds ActiveRecord joins from association paths
Summary: Review Request: rubygem-joiner - Builds ActiveRecord joins from association p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: František Dvořák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1090025
TreeView+ depends on / blocked
 
Reported: 2014-07-07 20:28 UTC by Ken Dreyer
Modified: 2014-11-01 17:07 UTC (History)
3 users (show)

Fixed In Version: rubygem-joiner-0.3.3-1.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-01 17:07:12 UTC
Type: ---
Embargoed:
valtri: fedora-review+
kevin: fedora-cvs+


Attachments (Terms of Use)

Description Ken Dreyer 2014-07-07 20:28:15 UTC
Spec URL: http://ktdreyer.fedorapeople.org/reviews/rubygem-joiner.spec
SRPM URL: http://ktdreyer.fedorapeople.org/reviews/rubygem-joiner-0.3.0-1.fc21.src.rpm
Description: Builds ActiveRecord outer joins from association paths and provides references to table aliases
Fedora Account System Username: ktdreyer

F21 scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=7114324

Comment 1 František Dvořák 2014-10-10 10:49:09 UTC
Issues or changes for consideration:

1) new version of joiner is available (0.3.3)

2) (cosmetic) you can consider using unified way of excluding files (replacing "rm .%{gem_instdir}/%{gem_name}.gemspec" by %exclude macro?)

3) (cosmetic) you can consider using %license macro for license file

4) (future work) I think combustion gem requires bundler. Removing bundler from spec_helper.rb may break things, or there will be needed some way of disabling bundler in combustion?

  But it is not used now anyway, so it is not needed neither for build nor passing the review. :-)

5) (question) there is not used "require 'active_record'" anywere in joiner sources, but I guess it's OK (developers using joiner will require rails or activerecord anyway?)

<mock-chroot>[root@forkys /]# ruby -e "require 'joiner'"
/usr/share/gems/gems/joiner-0.3.0/lib/joiner/joins.rb:2:in `<class:Joins>': uninitialized constant ActiveRecord (NameError)
	from /usr/share/gems/gems/joiner-0.3.0/lib/joiner/joins.rb:1:in `<top (required)>'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/gems/gems/joiner-0.3.0/lib/joiner.rb:6:in `<top (required)>'

Comment 2 Ken Dreyer 2014-10-10 19:56:14 UTC
(In reply to František Dvořák from comment #1)
> Issues or changes for consideration:
> 
> 1) new version of joiner is available (0.3.3)

Thanks, I've updated the gem to 0.3.3.

* Fri Oct 10 2014 Ken Dreyer <ktdreyer> - 0.3.3-1
- Update to joiner 0.3.3 (RHBZ #1117025)
- Use %%license macro (RHBZ #1117025)

Spec URL: http://ktdreyer.fedorapeople.org/reviews/rubygem-joiner.spec
SRPM URL: http://ktdreyer.fedorapeople.org/reviews/rubygem-joiner-0.3.3-1.fc22.src.rpm

Exact changes in Git: https://fedorapeople.org/cgit/ktdreyer/public_git/rubygem-joiner.git/commit/?id=8f874b22823e7912fd2ed550810be24213c48c69

F22 scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=7825913

> 2) (cosmetic) you can consider using unified way of excluding files
> (replacing "rm .%{gem_instdir}/%{gem_name}.gemspec" by %exclude macro?)

In the case of rm %{gem_name}.gemspec, I consider that to be a bug in the upstream project. I don't see a point to shipping the gemspec file in the gem itself. Plenty of gems avoid doing this (eg rugged). See https://lists.fedoraproject.org/pipermail/ruby-sig/2013-December/001471.html for a discussion on this (that unfortunately didn't reach resolution.)

> 3) (cosmetic) you can consider using %license macro for license file

Thanks for pointing this out. When this guideline first came out I didn't see a backwards-compatible way to introduce this, but after reading https://fedorahosted.org/fpc/ticket/411#comment:11 I see there is an easy solution for backwards compatibility. I've changed this in my package.

> 4) (future work) I think combustion gem requires bundler. Removing bundler
> from spec_helper.rb may break things, or there will be needed some way of
> disabling bundler in combustion?
> 
>   But it is not used now anyway, so it is not needed neither for build nor
> passing the review. :-)

Yeah, I'm typically able to strip out Bundler where possible. I'll be sure to check if we need to do that with combustion.

> 5) (question) there is not used "require 'active_record'" anywere in joiner
> sources, but I guess it's OK (developers using joiner will require rails or
> activerecord anyway?)

Interesting, I guess upstream thinks it's fine to just require it in the gemspec and not in the actual library.

In the RPM case, since we Require: rubygem(activerecord) I think it's ok, but your point is valid that upstream probably needs to think about the non-Bundler case.

When you were testing in your chroot, did rubygem-activerecord get installed there? Or did you install the package with --nodeps? It's weird that it would break like that for you, since the dependency is in the RPM.

Comment 3 František Dvořák 2014-10-10 21:44:13 UTC
(In reply to Ken Dreyer from comment #2)
> 
> > 5) (question) there is not used "require 'active_record'" anywere in joiner
> > sources, but I guess it's OK (developers using joiner will require rails or
> > activerecord anyway?)
> 
> Interesting, I guess upstream thinks it's fine to just require it in the
> gemspec and not in the actual library.
> 
> In the RPM case, since we Require: rubygem(activerecord) I think it's ok,
> but your point is valid that upstream probably needs to think about the
> non-Bundler case.
> 
> When you were testing in your chroot, did rubygem-activerecord get installed
> there? Or did you install the package with --nodeps? It's weird that it
> would break like that for you, since the dependency is in the RPM.

Yes, rubygem-activerecord were installed (with the rubygem-rails).

The command:
  ruby -e "require 'active_record'; require 'joiner'"
works fine.

It is not problem with packaging, and using ActiveRecord already is probably expected.

Anyway, package can be approved. I'll create the final report yet.

Comment 4 František Dvořák 2014-10-10 22:11:36 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "Unknown or generated".
[x]: License file installed when any subpackage combination is installed.
[x]: Package must own all directories that it creates.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package do not use a name that already exist
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Ruby:
[-]: Platform dependent files must all go under %{gem_extdir_mri}, platform
     independent under %{gem_dir}.
[x]: Gem package must not define a non-gem subpackage
[x]: Macro %{gem_extdir} is deprecated.
[x]: Gem package is named rubygem-%{gem_name}
[x]: Package contains BuildRequires: rubygems-devel.
[x]: Gem package must define %{gem_name} macro.
[x]: Pure Ruby package must be built as noarch
[x]: Package does not contain Requires: ruby(abi).
[x]: Package contains Requires: ruby(release).

===== SHOULD items =====

Generic:
[x]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[-]: If the source package does not include license text(s) as a separate file
     from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: Dist tag is present (not strictly required in GL).
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

Ruby:
[x]: Gem should use %gem_install macro.
[x]: Specfile should use macros from rubygem-devel package.
[x]: Gem package should exclude cached Gem.
[x]: Test suite should not be run by rake.
[x]: Test suite of the library should be run.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: rubygem-joiner-0.3.3-1.fc22.noarch.rpm
          rubygem-joiner-doc-0.3.3-1.fc22.noarch.rpm
          rubygem-joiner-0.3.3-1.fc22.src.rpm
3 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint rubygem-joiner-doc rubygem-joiner
2 packages and 0 specfiles checked; 0 errors, 0 warnings.
# echo 'rpmlint-done:'



Requires
--------
rubygem-joiner-doc (rpmlib, GLIBC filtered):
    rubygem-joiner

rubygem-joiner (rpmlib, GLIBC filtered):
    ruby(rubygems)
    rubygem(activerecord)



Provides
--------
rubygem-joiner-doc:
    rubygem-joiner-doc

rubygem-joiner:
    rubygem(joiner)
    rubygem-joiner



Source checksums
----------------
https://rubygems.org/gems/joiner-0.3.3.gem :
  CHECKSUM(SHA256) this package     : ca75cd0635f5d3bbc11eba199d06c57b3d8b504f37670ace80bd2d87790495cb
  CHECKSUM(SHA256) upstream package : ca75cd0635f5d3bbc11eba199d06c57b3d8b504f37670ace80bd2d87790495cb


Generated by fedora-review 0.5.2 (63c24cb) last change: 2014-07-14
Command line :/usr/bin/fedora-review -m fedora-rawhide-x86_64 -b 1117025
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Ruby, Shell-api
Disabled plugins: Java, C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, EPEL5, BATCH, DISTTAG

Package approved!

Comment 5 Ken Dreyer 2014-10-10 22:21:44 UTC
(In reply to František Dvořák from comment #3)
> Yes, rubygem-activerecord were installed (with the rubygem-rails).
> 
> The command:
>   ruby -e "require 'active_record'; require 'joiner'"
> works fine.
> 
> It is not problem with packaging, and using ActiveRecord already is probably
> expected.

Oh, my bad, I got really confused there. Sorry about that. I've submitted a patch for this upstream, at https://github.com/pat/joiner/pull/4

Thanks very much for the review.

Comment 6 Ken Dreyer 2014-10-12 20:10:44 UTC
New Package SCM Request
=======================
Package Name: rubygem-joiner
Short Description: Builds ActiveRecord joins from association paths
Upstream URL: https://github.com/pat/joiner
Owners: ktdreyer
Branches: f19 f20 f21

Comment 7 Kevin Fenzi 2014-10-13 23:15:31 UTC
Git done (by process-git-requests).

Comment 8 Vít Ondruch 2014-10-20 07:57:23 UTC
Ken, can you proceed to get rid of one broken dependency in F21? Thanx.

Comment 9 Fedora Update System 2014-10-21 19:05:43 UTC
rubygem-joiner-0.3.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/rubygem-joiner-0.3.3-1.fc21

Comment 10 Fedora Update System 2014-10-21 19:06:15 UTC
rubygem-joiner-0.3.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rubygem-joiner-0.3.3-1.fc20

Comment 11 Fedora Update System 2014-10-21 19:08:05 UTC
rubygem-joiner-0.3.3-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/rubygem-joiner-0.3.3-1.fc19

Comment 12 Ken Dreyer 2014-10-21 19:09:52 UTC
(In reply to Vít Ondruch from comment #8)
> Ken, can you proceed to get rid of one broken dependency in F21? Thanx.

I just returned from vacation so I've pushed this to updates-testing today. That broken dependency has been bugging me for a good while.

Comment 13 Vít Ondruch 2014-10-22 07:42:44 UTC
I hope you enjoyed your vacation and thanks :)

Comment 14 Fedora Update System 2014-10-22 08:51:09 UTC
rubygem-joiner-0.3.3-1.fc20 has been pushed to the Fedora 20 testing repository.

Comment 15 Ken Dreyer 2014-10-22 18:52:00 UTC
I failed to notice the Rails 4.1 dependency so I've un-pushed the update for F19 and F20. I'm not *entirely* sure if Rails 4.1 is a hard dep or if 4.0 would be ok and upstream could loosen their gemspec... at any rate, it's unpushed for F19 and F20.

Comment 16 Fedora Update System 2014-11-01 17:07:12 UTC
rubygem-joiner-0.3.3-1.fc21 has been pushed to the Fedora 21 stable repository.


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