[Bug 614451] Review Request: rubygem-gherkin - A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.

bugzilla at redhat.com bugzilla at redhat.com
Mon Jul 19 13:34:25 UTC 2010


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=614451

--- Comment #4 from Michal Fojtik <mfojtik at redhat.com> 2010-07-19 09:34:24 EDT ---
Spec URL: http://mifo.sk/RPMS/rubygem-gherkin.spec
SRPM URL: http://mifo.sk/RPMS/rubygem-gherkin-2.1.5-1.fc13.src.rpm

KOJI: http://koji.fedoraproject.org/koji/taskinfo?taskID=2328910

rpmlint:

RPM: No errors. Just some warnings about macros and devel files.
RPMS: Clean.

(In reply to comment #3)
> Initial notes:
> 
> * Macros
>   - %ruby_sitelib macro seems used nowhere.
>   - %rubyabi is defined nowhere.

Fixed.

> * Version
>   - Latest seems 2.1.4

For today, latest is 2.1.5 ;-) 

> * BuildRoot
>   - BuildRoot tag is no longer used on Fedora.
>     (BuildRoot tag is still needed on EPEL)

I kept that in this spec file. Will be removed for Fedora and present in EPEL
branch.

> * Compiler flags
>   - Fedora specific compiler flags are not correctly
>     honored.
> -------------------------------------------------------------
>    292  Building native extensions.  This could take a while...
>    293  /usr/bin/ruby extconf.rb
>    294  checking for main() in -lc... yes
>    295  creating Makefile
>    296  make
>    297  gcc -I. -I. -I/usr/lib/ruby/1.8/i386-linux -I. -D_FILE_OFFSET_BITS=64
> -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
> -fasynchronous-unwind-tables -O0 -Wall -Werror  -c gherkin_lexer_ar.c
>    298  gcc -shared -o gherkin_lexer_ar.so gherkin_lexer_ar.o -L. -L/usr/lib
> -L.  -rdynamic -Wl,-export-dynamic    -lruby -lc  -lpthread -lrt -ldl -lcrypt
> -lm   -lc
>    299  make install
>    300  /usr/bin/install -c -m 0755 gherkin_lexer_ar.so
> /builddir/build/BUILD/rubygem-gherkin-2.1.3/usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/lib
> -------------------------------------------------------------
>     - Here Fedora uses optimization level "-O2" for gcc, which
>       is overwritten by the latter "-O0".
>       This is because extconf.rb files included in gem override CFLAGS.
>       For example, ./ext/gherkin_lexer_ar/extconf.rb says:
> -------------------------------------------------------------
>      3  $CFLAGS << ' -O0 -Wall -Werror' if CONFIG['CC'] =~ /gcc/
> -------------------------------------------------------------
> 
>       Unfortunately extconf.rb is in gem file and this cannot be modified
>       until gem is once installed (i.e. compilation is once done).
>       Unless you have an idea, you have to
>       - Once install gem file under %_builddir (like now)
>       - modify extconf.rb
>       - and recompile C codes again.

I tried to figure this out, but I end up with your solution.
So I install everything in ussual way, then modify extconf.rb
and recompile it using Fedora CFLAGS.


> * ext/ directory / C extension .so files
>   - Files under ext/ directory are usually for compiling C extension .so
>     files and should not be needed once .so files are created.
>   - Arch-dependent C extension .so files should be installed under
>     %ruby_sitearch:
>    
> https://fedoraproject.org/wiki/Packaging/Ruby#Ruby_packages_with_binary_content.2Fshared_libraries

Fixed.

> 
> * Directory ownership issue
>   - The following directories are not owned by any packages:
> -------------------------------------------------------------
> %{geminstdir}
> %{geminstdir}/bin

Fixed.

> -------------------------------------------------------------
> 
> * rpmlint issue
>   - Please check your srpm and rebuilt binary rpms with rpmlint:
> --------------------------------------------------------------
> rubygem-gherkin-debuginfo.i686: E: debuginfo-without-sources
>     - Please create debuginfo rpm correctly
>       ! Note
>         build.log says many warnings when creating debuginfo rpm
>         like:
> --------------------------------------------------------------
>    918  cpio:
> rubygem-gherkin-2.1.3/usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/ext/gherkin_lexer_ar/ext/gherkin_lexer_ar/gherkin_lexer_ar.c:
> Cannot stat: No such file or directory
>    919  cpio:
> rubygem-gherkin-2.1.3/usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/ext/gherkin_lexer_bg/ext/gherkin_lexer_bg/gherkin_lexer_bg.c:
> Cannot stat: No such file or directory
>    920  cpio:
> rubygem-gherkin-2.1.3/usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/ext/gherkin_lexer_ca/ext/gherkin_lexer_ca/gherkin_lexer_ca.c:
> Cannot stat: No such file or directory
> --------------------------------------------------------------
>         Note that "ext/gherkin_lexer_ar" is repeated here. You may have to
>         create some symlinks so that /usr/lib/rpm/find-debuginfo.sh can find
>         the corresponding source files properly.
> 
> rubygem-gherkin.i686: W: no-soname
> /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/lib/gherkin_lexer_ar.so
> rubygem-gherkin.i686: W: no-soname
> /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/lib/gherkin_lexer_bg.so
> (and others)
>     - As far as I checked rpmlint codes to see why these rpmlint warnings
> arose,
>       these rpmlint warnings can be ignored. However anyway these .so files
> must
>       be moved to under %ruby_sitearch.

I'm not getting these errors/warning using rpmlint, so I hope it's fixed.

> 
> rubygem-gherkin.i686: E: script-without-shebang
> /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/tasks/compile.rake
> rubygem-gherkin.i686: E: script-without-shebang
> /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/tasks/ragel_task.rb
>     - Usually permissions are incorrect. Please check if these files have 0644
> permission.

Fixed.

> 
> rubygem-gherkin.i686: E: version-control-internal-file
> /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/ikvm/.gitignore
> rubygem-gherkin.i686: E: version-control-internal-file
> /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/java/.gitignore
> rubygem-gherkin.i686: E: version-control-internal-file
> /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/java/src/main/java/gherkin/lexer/.gitignore
> (and others)
>     - These files should be removed.

Removed.

> rubygem-gherkin.i686: W: wrong-file-end-of-line-encoding
> /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/spec/gherkin/fixtures/dos_line_endings.feature
> rubygem-gherkin.i686: W: wrong-file-end-of-line-encoding
> /usr/lib/ruby/gems/1.8/gems/gherkin-2.1.3/spec/gherkin/fixtures/with_bom.feature
>     - Usually dos2unix or 'sed -i -e "s|\r||"' fixes these.

Fixed using sed.

> 
> * gemspec specifications file
>   - Installed gherkin-2.1.3.gemspec contains:
> ----------------------------------------------------------------
>     28      if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
>     29        s.add_runtime_dependency(%q<trollop>, ["~> 1.16.2"])
>     30        s.add_development_dependency(%q<rspec>, ["~> 2.0.0.beta.15"])
>     31        s.add_development_dependency(%q<cucumber>, ["~> 0.8.4"])
>     32        s.add_development_dependency(%q<rake-compiler>, ["~> 0.7.0"])
>     33      else
> ----------------------------------------------------------------
>     However at least rspec ~> 2.0.0.beta.15 is not available, so
>     gherkin gem cannot work (at least "ruby -rubygems -e 'gem gherkin'" does
> not
>     work). Please modify installed gemspec file.    

File modified in %install section. I replaced beta with latest Fedora version.

-- Michal

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the package-review mailing list