Bug 540996 - Review Request: rubygem-ffi - Foreign Function Interface package for Ruby
Summary: Review Request: rubygem-ffi - Foreign Function Interface package for Ruby
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 533291 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-24 17:06 UTC by Bryan Kearney
Modified: 2015-02-17 13:44 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-02-22 14:47:28 UTC
Type: ---
Embargoed:
mtasaka: fedora-review+


Attachments (Terms of Use)

Description Bryan Kearney 2009-11-24 17:06:35 UTC
SRPM: http://bkearney.fedorapeople.org/rubygem-ffi-0.5.2-1.fc11.src.rpm
Spec File: http://bkearney.fedorapeople.org/rubygem-ffi.spec  
Description: Ruby-ffi is a package which allows for ruby code to access C
libraries without the need for writing messy ext code. The website for the
library is http://wiki.github.com/ffi/ffi.

[bkearney@localhost ~]$ rpmlint
rpmbuild/RPMS/i586/rubygem-ffi-0.5.2-1.fc11.i586.rpm 
rubygem-ffi.i586: W: hidden-file-or-dir
/usr/lib/ruby/gems/1.8/gems/ffi-0.5.2/.require_paths
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

* clean koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1802185

I am copying over bug 533291 since the name of the package has changed.

Comment 1 Bryan Kearney 2009-11-24 17:07:24 UTC
*** Bug 533291 has been marked as a duplicate of this bug. ***

Comment 2 Mamoru TASAKA 2010-01-31 14:54:59 UTC
Well, currently newest ffi seems 0.5.4. Would you upgrade
your srpm first?

Comment 3 Bryan Kearney 2010-02-01 13:02:11 UTC
Happy to. Updated spec file and SRPM can be found at:

http://bkearney.fedorapeople.org/rubygem-ffi.spec
http://bkearney.fedorapeople.org/rubygem-ffi-0.5.4-1.fc12.src.rpm

rpmlint output is below:

[bkearney@localhost rpmbuild]$ rpmlint SPECS/rubygem-ffi.spec 0 packages and 1 specfiles checked; 0 errors, 0 warnings.
[bkearney@localhost rpmbuild]$ rpmlint SRPMS/rubygem-ffi-0.5.4-1.fc12.src.rpm 1 packages and 0 specfiles checked; 0 errors, 0 warnings.
[bkearney@localhost rpmbuild]$ 


Koji build can be found at:

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

Comment 4 Mamoru TASAKA 2010-02-01 16:37:09 UTC
Some notes:

* %define -> %global
  - We now prefer to use %global %instead of %define
    https://fedoraproject.org/wiki/Packaging/Guidelines#.25global_preferred_over_.25define


* Requires
  - Please use "Requires: rubygem(rake-compiler)" style, ref:
    https://fedoraproject.org/wiki/Packaging/Perl#Perl_Requires_and_Provides

* strip / debuginfo rpm
  - Don't use ELF binary by yourself and create debuginfo rpm correctly.
    ! Note
      To create debuginfo rpm correctly, you have to compile C source
      under %_builddir
      ( i.e. when rubygem contains C extention library, you cannot install
        gem file into %buildroot directly. You have to once install gem file
        under directory created by %setup and then copy the whole tree
        to %buildroot for correct debuginfo rpm creation:
        https://fedoraproject.org/wiki/Packaging/Ruby#Ruby_Gem_with_extension_libraries_written_in_C )

    ! Note 2
      Also, build log shows that compilation of C source to create
      libffi_c.so is executed both under %_builddir and %buildroot, this
      is just redundant.

* macro usage
  - %ruby_sitelib macro seems to be used nowhere and unneeded.

  - Please use the defined %geminstdir also in %files

  - You should not use %buildroot vs $RPM_BUILD_ROOT, %optflags vs $RPM_OPT_FLAGS
    with mixed style and should choose one style.
    https://fedoraproject.org/wiki/Packaging/Guidelines#Using_.25.7Bbuildroot.7D_and_.25.7Boptflags.7D_vs_.24RPM_BUILD_ROOT_and_.24RPM_OPT_FLAGS

* Documents location
--------------------------------------------------------------
%doc README.rdoc LICENSE History.txt
--------------------------------------------------------------
  - These files should be installed under %geminstdir (in fact
    2 of them are already installed).
    Also document files under %geminstdir should be marked
    as %doc properly.

Comment 5 Mamoru TASAKA 2010-02-12 15:49:02 UTC
ping?

Comment 6 Bryan Kearney 2010-02-15 16:28:43 UTC
Sorry.. $DAYJOB took over. I have updated the spec file. Latest files:

SRPM: http://bkearney.fedorapeople.org/rubygem-ffi-0.5.4-1.fc12.src.rpm
SPEC File: http://bkearney.fedorapeople.org/rubygem-ffi.spec

rpmlint output:
[bkearney@localhost i686]$ rpmlint *
rubygem-ffi.i686: W: hidden-file-or-dir /usr/lib/ruby/gems/1.8/gems/ffi-0.5.4/.require_paths
2 packages and 0 specfiles checked; 0 errors, 1 warnings.


koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1988494

Specific comments:


(In reply to comment #4)
> Some notes:
> 
> * %define -> %global
>   - We now prefer to use %global %instead of %define
>    
> https://fedoraproject.org/wiki/Packaging/Guidelines#.25global_preferred_over_.25define

Done.

> 
> 
> * Requires
>   - Please use "Requires: rubygem(rake-compiler)" style, ref:
>     https://fedoraproject.org/wiki/Packaging/Perl#Perl_Requires_and_Provides
> 
> * strip / debuginfo rpm
>   - Don't use ELF binary by yourself and create debuginfo rpm correctly.
>     ! Note
>       To create debuginfo rpm correctly, you have to compile C source
>       under %_builddir
>       ( i.e. when rubygem contains C extention library, you cannot install
>         gem file into %buildroot directly. You have to once install gem file
>         under directory created by %setup and then copy the whole tree
>         to %buildroot for correct debuginfo rpm creation:
>        
> https://fedoraproject.org/wiki/Packaging/Ruby#Ruby_Gem_with_extension_libraries_written_in_C
> )

I will be honest, I do not understand the value here. But I believe the new spec file to be in line with these requirements.

> 
>     ! Note 2
>       Also, build log shows that compilation of C source to create
>       libffi_c.so is executed both under %_builddir and %buildroot, this
>       is just redundant.

Should only be done in %_builddir

> 
> * macro usage
>   - %ruby_sitelib macro seems to be used nowhere and unneeded.

removed.

> 
>   - Please use the defined %geminstdir also in %files

done.

> 
>   - You should not use %buildroot vs $RPM_BUILD_ROOT, %optflags vs
> $RPM_OPT_FLAGS
>     with mixed style and should choose one style.
>    
> https://fedoraproject.org/wiki/Packaging/Guidelines#Using_.25.7Bbuildroot.7D_and_.25.7Boptflags.7D_vs_.24RPM_BUILD_ROOT_and_.24RPM_OPT_FLAGS

done

> 
> * Documents location
> --------------------------------------------------------------
> %doc README.rdoc LICENSE History.txt
> --------------------------------------------------------------
>   - These files should be installed under %geminstdir (in fact
>     2 of them are already installed).
>     Also document files under %geminstdir should be marked
>     as %doc properly.    
updated.

Thank you for the review.

Comment 7 Mamoru TASAKA 2010-02-16 17:30:28 UTC
Well,

* Latest version
  - $ gem list -r ffi returns that the latest version is 0.6.2.

* Duplicate files
  - build.log shows:
-----------------------------------------------------------------------
  6047  warning: File listed twice: /usr/lib/ruby/gems/1.8/gems/ffi-0.5.4/LICENSE
  6048  warning: File listed twice: /usr/lib/ruby/gems/1.8/gems/ffi-0.5.4/README.rdoc
-----------------------------------------------------------------------
    Please fix these (note that these files should be marked
    as %doc , so %doc %{geminstdir}/README.rdoc line (and so on)
    should not be removed)

! Note
  - Please change the release number every time you modify your srpm
    (when version number does not change) to avoid confusion.

Comment 8 Bryan Kearney 2010-02-16 19:19:11 UTC
Latest files and build:

Spec: http://bkearney.fedorapeople.org/rubygem-ffi.spec
SRPM: http://bkearney.fedorapeople.org/rubygem-ffi-0.5.4-2.fc12.src.rpm
Koji Build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1991591

Comments below:

(In reply to comment #7)
> Well,
> 
> * Latest version
>   - $ gem list -r ffi returns that the latest version is 0.6.2.

There is some discussion on the mailing list as to if 0.6.0 is released. There is some discussion if it runs on all platforms. Given that, I would like to go with the 0.5.4 until upstream resolves the release.

> 
> * Duplicate files
>   - build.log shows:
> -----------------------------------------------------------------------
>   6047  warning: File listed twice:
> /usr/lib/ruby/gems/1.8/gems/ffi-0.5.4/LICENSE
>   6048  warning: File listed twice:
> /usr/lib/ruby/gems/1.8/gems/ffi-0.5.4/README.rdoc
> -----------------------------------------------------------------------
>     Please fix these (note that these files should be marked
>     as %doc , so %doc %{geminstdir}/README.rdoc line (and so on)
>     should not be removed)

Fixed.

> 
> ! Note
>   - Please change the release number every time you modify your srpm
>     (when version number does not change) to avoid confusion.    
Done. they earlier one was a change in major version (0.5.2 -> 0.5.3) so I bumped the release back to 1.

Comment 9 Mamoru TASAKA 2010-02-17 16:58:32 UTC
Well,

- "Requires: libffi >= 3.0.5" is not needed because libffi in currently
  supported Fedora branch (i.e. F-11/12/13/14) all satisfy this version,
  and libffi.so.X dependency is automatically detected.
  (see the last sentence of below:
   https://fedoraproject.org/wiki/Packaging/Guidelines#Explicit_Requires )

- %dir %{geminstdir} is also needed
  https://fedoraproject.org/wiki/Packaging/UnownedDirectories#Common_Mistakes

- The first %defattr(-,root,root,-) is enough. The second %defattr
  is redundant.

Please fix these when importing this package into Fedora CVS.
---------------------------------------------------------------
    This package (rubygem-ffi) is APPROVED by mtasaka
---------------------------------------------------------------

Comment 10 Bryan Kearney 2010-02-17 18:23:58 UTC
New Package CVS Request
=======================
Package Name: rubygem-ffi 
Short Description: Foreign Function Interface package for Ruby
Owners: bkearney
Branches: devel, F-13, F-12, F-11
InitialCC:

Comment 11 Jason Tibbitts 2010-02-19 18:57:47 UTC
CVS done (by process-cvs-requests.py).

Comment 12 Miroslav Suchý 2012-11-26 11:34:25 UTC
Bryan,
can you please create EPEL6 build?

Comment 13 Bryan Kearney 2012-11-26 14:12:49 UTC
Package Change Request
======================
Package Name: rubygem-ffi
New Branches: el6
Owners: bkearney vondruch 	
InitialCC: msuchy

Comment 14 Gwyn Ciesla 2012-11-26 14:53:14 UTC
Git done (by process-git-requests).

Comment 15 Tomas Hrcka 2015-02-17 08:30:10 UTC
Package Change Request
======================
Package Name: rubygem-ffi
New Branches: epel7
Owners: bkearney vondruch humaton

Comment 16 Gwyn Ciesla 2015-02-17 13:44:11 UTC
Branch exists?


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