Bug 703248

Summary: Review Request: rubygem-foreigner - Foreign keys for Rails
Product: [Fedora] Fedora Reporter: Darryl L. Pierce <dpierce>
Component: Package ReviewAssignee: Daiki Ueno <dueno>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dueno, fedora-package-review, notting, tross
Target Milestone: ---Flags: dueno: fedora-review+
j: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-12 18:49:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Darryl L. Pierce 2011-05-09 18:03:00 UTC
Spec URL: http://mcpierce.fedorapeople.org/rpms/rubygem-foreigner.spec
SRPM URL: http://mcpierce.fedorapeople.org/rpms/rubygem-foreigner-0.9.2-1.fc14.src.rpm
Description: Adds helpers to migrations and correctly dumps foreign keys to schema.rb.

Comment 1 Daiki Ueno 2011-05-10 06:44:42 UTC
I'm taking the review.  You could check:

http://lukas.zapletalovi.com/2011/01/how-to-prepare-gemfile-package-for.html

if you use rubygem-gem2rpm in F-14.

1. Use %global instead of %define

2. Add "Requires: ruby(abi) = 1.8" as described in the Ruby packaging guideline

https://fedoraproject.org/wiki/Packaging:Ruby#Ruby_Packaging_Guidelines

3. I get "File listed twice" warning when building

 warning: File listed twice: /usr/lib/ruby/gems/1.8/gems/foreigner-0.9.2/README.rdoc

This is because of the following lines in %files:

 %{gemdir}/gems/%{gemname}-%{version}/
 %doc %{geminstdir}/README.rdoc

where %{geminstdir} == %{gemdir}/gems/%{gemname}-%{version}/.  You could work around this by listing files/dirs under %{geminstdir} individually.

4. You can drop preparing/cleaning buildroot

5. License is MIT (not GPLv2+ and Ruby)

6. It is recommended to run test suite in %check

Comment 2 Darryl L. Pierce 2011-05-10 12:35:00 UTC
(In reply to comment #1)
> I'm taking the review.  You could check:
> 
> http://lukas.zapletalovi.com/2011/01/how-to-prepare-gemfile-package-for.html
> 
> if you use rubygem-gem2rpm in F-14.

Following the steps about removing the build and prep sections results in additional warnings from rpmlint, so I'm leaving them in for now. Otherwise, I've followed the suggestions. Thanks. :)

> 1. Use %global instead of %define

Done

> 2. Add "Requires: ruby(abi) = 1.8" as described in the Ruby packaging guideline
> 
> https://fedoraproject.org/wiki/Packaging:Ruby#Ruby_Packaging_Guidelines

Done.

> 3. I get "File listed twice" warning when building
> 
>  warning: File listed twice:
> /usr/lib/ruby/gems/1.8/gems/foreigner-0.9.2/README.rdoc
> 
> This is because of the following lines in %files:
> 
>  %{gemdir}/gems/%{gemname}-%{version}/
>  %doc %{geminstdir}/README.rdoc
> 
> where %{geminstdir} == %{gemdir}/gems/%{gemname}-%{version}/.  You could work
> around this by listing files/dirs under %{geminstdir} individually.

Fixed.

> 4. You can drop preparing/cleaning buildroot

Done.

> 5. License is MIT (not GPLv2+ and Ruby)

Corrected.

> 6. It is recommended to run test suite in %check

I'm working with the upstream to fix his tests, which are currently not working correctly.

Updated SPEC: http://mcpierce.fedorapeople.org/rpms/rubygem-foreigner.spec
Updated SRPM: http://mcpierce.fedorapeople.org/rpms/rubygem-foreigner-0.9.2-2.fc14.src.rpm

Comment 3 Daiki Ueno 2011-05-11 01:39:55 UTC
Thanks for quick update.  Now it looks fine.  APPROVED.

Minor suggestion related to 3 is that now README.rdoc is not marked as %doc.  Perhaps you might want to do something like the following in %files, if you don't think it's too much :)

%dir %{geminstdir}
%{geminstdir}/lib
%doc %{geminstdir}/MIT-LICENSE
%doc %{geminstdir}/README.rdoc
%{geminstdir}/Rakefile
%{geminstdir}/test

Comment 4 Darryl L. Pierce 2011-05-11 11:27:20 UTC
(In reply to comment #3)
> Thanks for quick update.  Now it looks fine.  APPROVED.

My pleasure, and thank you for reviewing the package so quickly. :)
 
> Minor suggestion related to 3 is that now README.rdoc is not marked as %doc. 
> Perhaps you might want to do something like the following in %files, if you
> don't think it's too much :)
> 
> %dir %{geminstdir}
> %{geminstdir}/lib
> %doc %{geminstdir}/MIT-LICENSE
> %doc %{geminstdir}/README.rdoc
> %{geminstdir}/Rakefile
> %{geminstdir}/test

Not too much at all. I won't claim to be an expert at packaging, so appreciate the tip I've added those changes as part of the first official release. :)

Comment 5 Darryl L. Pierce 2011-05-11 11:31:08 UTC
New Package SCM Request
=======================
Package Name: rubygem-foreigner
Short Description: Adds helpers to migrations and correctly dumps foreign keys to schema.rb.
Owners: mcpierce
Branches: f14 f15
InitialCC: mcpierce

Comment 6 Jason Tibbitts 2011-05-12 16:41:06 UTC
Git done (by process-git-requests).

Comment 7 Darryl L. Pierce 2011-05-12 18:49:45 UTC
(In reply to comment #6)
> Git done (by process-git-requests).

Thanks, Jason.