Bug 674544

Summary: Review Request: rubygem-searchlogic - ruby library making ActiveRecord named scopes easier
Product: [Fedora] Fedora Reporter: Lukas Zapletal <lzap>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bkabrda, fedora-package-review, notting, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-03 15:05:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Zapletal 2011-02-02 12:49:38 UTC
Spec URL: http://static.zapletalovi.com/fedora/rpm/rubygem-searchlogic/2.4.27-1/rubygem-searchlogic.spec
SRPM URL: http://static.zapletalovi.com/fedora/rpm/rubygem-searchlogic/2.4.27-1/rubygem-searchlogic-2.4.27-1.fc14.src.rpm
Description:

Searchlogic makes using ActiveRecord named scopes easier and less repetitive.

$ rpmlint /home/lzap/rpmbuild/SRPMS/rubygem-searchlogic-2.4.27-1.fc14.src.rpm
rubygem-searchlogic.src: W: no-%prep-section
rubygem-searchlogic.src: W: no-%build-section
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

$ rpmlint /root/rpmbuild/RPMS/noarch/rubygem-searchlogic-2.4.27-1.fc14.noarch.rpm
rubygem-searchlogic.noarch: I: enchant-dictionary-not-found en_US
rubygem-searchlogic.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/searchlogic-2.4.27/ri/Searchlogic/NamedScopes/Conditions/condition%3f-i.yaml %3f
rubygem-searchlogic.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/searchlogic-2.4.27/ri/Searchlogic/Search/Conditions/conditions%3d-i.yaml %3d
rubygem-searchlogic.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/searchlogic-2.4.27/ri/Searchlogic/Search/MethodMissing/respond_to%3f-i.yaml %3f
rubygem-searchlogic.noarch: W: unexpanded-macro /usr/lib/ruby/gems/1.8/doc/searchlogic-2.4.27/ri/Searchlogic/Search/DateParts/conditions%3d-i.yaml %3d
1 packages and 0 specfiles checked; 0 errors, 4 warnings.

Comment 1 Bohuslav "Slavek" Kabrda 2011-09-07 12:14:19 UTC
Unofficial review:
* Should have Requires: ruby; BuildRequires: ruby
* Use BuildRequires: ruby(rubygems) instead of just rubygems.
* Use %prep section (useful when applying patches later) and %build section (rpmlint complains about that).
* Consider excluding .gitignore files in %files section with %exclude rather than removing them in %install.
* You don't need to use %defattr in %files, since it is a default (see https://fedoraproject.org/wiki/Packaging:Guidelines#File_Permissions).
* Instead of listing %{gemdir}/gems/%{gemname}-%{version}/ in %files, you can just list %{geminstdir} (macro that you defined).
* Also, you should rather use %dir %{geminstdir}, which will make rpmbuild stop warning about files listed twice.
* Consider adding a doc subpackage for the documentation (see https://fedoraproject.org/wiki/How_to_create_an_RPM_package#Subpackages).
* Use %check section to run spec tests (see hhttps://fedoraproject.org/wiki/Packaging_talk:Ruby#RSpec). For this, you will also need BuildRequires: rubygem(rspec).
* Did you test with Rails 3?
* Koji task link: https://koji.fedoraproject.org/koji/taskinfo?taskID=3332223

Comment 2 Bohuslav "Slavek" Kabrda 2011-09-07 12:41:17 UTC
Errata:
* Use BR: rubygem(rspec-core) rather than rubygem(rspec) (the rspec-core is version 2.x, while rspec is 1.3 - see http://lists.fedoraproject.org/pipermail/ruby-sig/2011-July/000535.html)

Additional comments:
* Get the newest version from upstream (currently 2.5.8).
* You can remove the first two macro definitions (ruby_sitelib, ruby_sitearch), since you don't use them.

Comment 3 Lukas Zapletal 2012-08-03 15:05:50 UTC
Since many things changed in the Ruby packaging I am closing this one for now. We will make brand new gem2rpm round. I apologize for not reacting.