Bug 497640

Summary: Review Request: rubygem-RedCloth - Textile parser for Ruby.
Product: [Fedora] Fedora Reporter: Darryl L. Pierce <dpierce>
Component: Package ReviewAssignee: Dan Horák <dan>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, mtasaka, notting, tross
Target Milestone: ---Flags: dan: fedora-review+
dennis: 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: 2009-05-01 20:55:12 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:
Bug Depends On:    
Bug Blocks: 476530    
Attachments:
Description Flags
patch for compliance with guidelines none

Description Darryl L. Pierce 2009-04-25 13:11:10 UTC
Spec URL: http://mcpierce.fedorapeople.org/rpms/rubygem-RedCloth.spec
SRPM URL: http://mcpierce.fedorapeople.org/rpms/rubygem-RedCloth-4.1.9-1.fc10.src.rpm
Description: Textile parser for Ruby.

Comment 1 Dan Horák 2009-04-30 08:36:09 UTC
first notes:
- the license is MIT (see COPYING and README from inside of the gem)
- it doesn't build in mock for both F-10 and Rawhide on x86_64

+ gem install --local --install-dir /builddir/build/BUILDROOT/rubygem-RedCloth-4.1.9-1.fc11.x86_64/usr/lib/ruby/gems/1.8 --force --rdoc /builddir/build/SOURCES/RedCloth-4.1.9.gem
ERROR:  Error installing /builddir/build/SOURCES/RedCloth-4.1.9.gem:
	ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install --local --install-dir /builddir/build/BUILDROOT/rubygem-RedCloth-4.1.9-1.fc11.x86_64/usr/lib/ruby/gems/1.8 --force --rdoc /builddir/build/SOURCES/RedCloth-4.1.9.gem
can't find header files for ruby.
Gem files will remain installed in /builddir/build/BUILDROOT/rubygem-RedCloth-4.1.9-1.fc11.x86_64/usr/lib/ruby/gems/1.8/gems/RedCloth-4.1.9 for inspection.

- is it possible to run the included testsuite during the build (using the %check section)?

Comment 2 Darryl L. Pierce 2009-04-30 14:08:45 UTC
(In reply to comment #1)
> first notes:
> - the license is MIT (see COPYING and README from inside of the gem)

Fixed.

> - it doesn't build in mock for both F-10 and Rawhide on x86_64

Fixed that. Added BuildRequires: ruby-devel >= 1.8

> - is it possible to run the included testsuite during the build (using the
> %check section)?  

Running them will require someone to submit echoe <http://www.workingwithrails.com/rubygem/4726-echoe> as a package for Fedora. If somebody does that, I'll add running the tests to the spec.

Updated spec URL: http://mcpierce.fedorapeople.org/rpms/rubygem-RedCloth.spec
Updated SRPM URL: http://mcpierce.fedorapeople.org/rpms/rubygem-RedCloth-4.1.9-2.fc10.src.rpm

Comment 3 Dan Horák 2009-04-30 16:05:43 UTC
> > - is it possible to run the included testsuite during the build (using the
> > %check section)?  
> 
> Running them will require someone to submit echoe
> <http://www.workingwithrails.com/rubygem/4726-echoe> as a package for Fedora.
> If somebody does that, I'll add running the tests to the spec.

OK

I have found another issues
- because there is a library written in C, the %build and %install sections need to be handled differently - https://fedoraproject.org/wiki/Packaging/Ruby#Ruby_Gem_with_extension_libraries_written_in_C and I have seen some inspiration in rubygem-gettext (http://cvs.fedoraproject.org/viewvc/rpms/rubygem-gettext/devel/rubygem-gettext.spec?revision=1.6&view=markup)

- rpmbuild complains that COPYING, CHANGELOG and README are listed twice, probably they don't need to be explicitly specified with %doc

- and rpmlint complains about "summary ended with dot"

Comment 4 Darryl L. Pierce 2009-04-30 17:23:17 UTC
(In reply to comment #3)
> > > - is it possible to run the included testsuite during the build (using the
> > > %check section)?  
> > 
> > Running them will require someone to submit echoe
> > <http://www.workingwithrails.com/rubygem/4726-echoe> as a package for Fedora.
> > If somebody does that, I'll add running the tests to the spec.
> 
> OK
> 
> I have found another issues
> - because there is a library written in C, the %build and %install sections
> need to be handled differently -
> https://fedoraproject.org/wiki/Packaging/Ruby#Ruby_Gem_with_extension_libraries_written_in_C
> and I have seen some inspiration in rubygem-gettext
> (http://cvs.fedoraproject.org/viewvc/rpms/rubygem-gettext/devel/rubygem-gettext.spec?revision=1.6&view=markup)
> 
> - rpmbuild complains that COPYING, CHANGELOG and README are listed twice,
> probably they don't need to be explicitly specified with %doc

Removed the duplicate listings.

> - and rpmlint complains about "summary ended with dot"  

Fixed that.

Updated spec URL: http://mcpierce.fedorapeople.org/rpms/rubygem-RedCloth.spec
Updated SRPM URL: http://mcpierce.fedorapeople.org/rpms/rubygem-RedCloth-4.1.9-3.fc10.src.rpm

Comment 5 Dan Horák 2009-04-30 19:31:04 UTC
Created attachment 341984 [details]
patch for compliance with guidelines

This patch should make the spec compliant with guidelines, but there is still a problem with the debuginfo package because it doesn't include the sources.

Comment 6 Dan Horák 2009-04-30 19:35:16 UTC
formal review is here, see the notes below:

OK	source files match upstream:
	    0d47a2b72b160bc7c94a0cab4d8e96702aee3e61  RedCloth-4.1.9.gem
OK	package meets naming and versioning guidelines.
OK	specfile is properly named, is cleanly written and uses macros consistently.
OK	dist tag is present.
OK	license field matches the actual license.
OK	license is open source-compatible (MIT). License text included in package.
OK	latest version is being packaged.
OK	BuildRequires are proper.
OK	compiler flags are appropriate.
OK	%clean is present.
OK	package builds in mock (Rawhide/x86_64).
??	debuginfo package looks complete.
OK	rpmlint is silent.
OK	final provides and requires look sane.
N/A	%check is present and all tests pass.
OK	no shared libraries are added to the regular linker search paths.
OK	owns the directories it creates.
OK	doesn't own any directories it shouldn't.
OK	no duplicates in %files.
OK*	file permissions are appropriate.
OK	no scriptlets present.
OK	code, not content.
OK	documentation is small, so no -docs subpackage is necessary.
OK	%docs are not necessary for the proper functioning of the package.
OK	no headers.
OK	no pkgconfig files.
OK	no libtool .la droppings.
OK	not a GUI app.

- the issue with the source files missing in debuginfo package opened on fedora-packaging, running strip on the library is IMHO wrong
- the shared library should have 0755 permissions instead of 0775

Both issues are not blockers, but should be resolved before importing the package. This package is APPROVED.

Comment 7 Darryl L. Pierce 2009-04-30 20:38:40 UTC
New Package CVS Request
=======================
Package Name: rubygem-RedCloth
Short Description: Textile parser for Ruby
Owners: mcpierce
Branches: F-10 F-11 EL-5
InitialCC:

Comment 8 Mamoru TASAKA 2009-05-01 04:06:43 UTC
Some notes:

* About shebang or so related rpmlint warning
------------------------------------------------------------
find %{buildroot}%{geminstdir} -name "*.rb" | xargs chmod a+x

for script in \
    /lib/case_sensitive_require/RedCloth.rb \
....
....
    /extras/ragel_profiler.rb;
do
    chmod +x %{installroot}/$script
    sed -i -e '1i #!/usr/bin/ruby' %{installroot}/$script
done
------------------------------------------------------------
  - No, this is not right. If these ruby scripts are not
    meant to be executed directly from user, these script
    should not have shebang and should have 0644 permission.
    Rather the following is correct:
------------------------------------------------------------
find %{buildroot}%{geminstdir}/test -type f -name \*.rb | \
	xargs grep -l "^#!%{_bindir}/env" | xargs chmod 0755
------------------------------------------------------------

* About copying files into ruby_sitelib
------------------------------------------------------------
cp %{installroot}/lib/redcloth.rb %{buildroot}%{ruby_sitelib}/redcloth.rb
------------------------------------------------------------
  - What is this line for?

* Documents
  - IMO the following files/directories should be marked as
    %doc:
------------------------------------------------------------
%{geminstdir}/[A-Z]*
%{geminstdir}/test/
------------------------------------------------------------


* About missing files for debuginfo rpm:
  - I wrote a comment for this on fedora-packaging list.
    This is not rubygem specific issue.

Comment 9 Darryl L. Pierce 2009-05-01 13:05:59 UTC
(In reply to comment #8)
> Some notes:
> 
> * About shebang or so related rpmlint warning

Thanks for the feedback. I'll incorporate them into the first build for Fedora.

Comment 10 Dennis Gilmore 2009-05-01 20:50:05 UTC
CVS Done

Comment 11 Peter Lemenkov 2009-07-31 19:01:09 UTC
Correct reason for closing this ticket is NEXTRELEASE.