Red Hat Bugzilla – Bug 1308003
rubygem-ammeter: FTBFS in rawhide
Last modified: 2016-04-07 08:07:30 EDT
Your package rubygem-ammeter failed to build from source in current rawhide.
For details on mass rebuild see https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
Created attachment 1126069 [details]
Created attachment 1126070 [details]
Created attachment 1126071 [details]
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.
More information and reason for this action is here:
Created attachment 1141328 [details]
Update to v1.1.3. Fix test suite for Ruby 2.3 compatibility.
I updated rpm spec file to fix test suite for Ruby 2.3.
*The reason of the test failure
File#read is re-defined in spec/spec_helpr.rb#stub_file,
and File#read is also used in 'require': specification.rb#load.
If the first "require" for on library is called after the stub definition,
it is failed.
On upstream, its test was succeeded.
Though I am not sure its reason clearly, when I did run "rspec spec/" by ruby 2.2.4p230, putting debuglog in kernel_require.rb#require, "rubygems/requirement" was called from somewhere, and 'haml' was called, before rspec and the stub definition were run.
But On mock environment, its "rubygems/requirement" was not called. And a "require" after the stub definition, causes the error.
So, I did put "require haml" as a rspec argument.
Also updated to ammeter latest version as I supposed it might fix this issue, but actually the result was same.
2 errors about the shebang.
rubygem-ammeter-doc.noarch: E: non-executable-script /usr/share/gems/gems/ammeter-1.1.3/features/templates/my_rails_gem/Rakefile 644 /usr/bin/env
rubygem-ammeter-doc.noarch: E: non-executable-script /usr/share/gems/gems/ammeter-1.1.3/features/templates/my_railties_gem/Rakefile 644 /usr/bin/env
Its Rakefile are used as a template.
So, I though I could not modify this for the compatibility of original gem.
But I did pull-request for issue, to fix this for next version.
*Dependency of ammeter.
1) Runtime dependencies:
$ dnf repoquery --enablerepo=rawhide --whatrequires 'rubygem(ammeter)'
=> no result.
$ dnf repoquery --enablerepo=rawhide --whatrequires 'rubygem-ammeter'
2) As well as development dependencies:
$ dnf repoquery --enablerepo=rawhide-source --arch src --whatrequires 'rubygem(ammeter)'
=> gemspec file OK.
=> ammeter is specified as a 1.1.2 in gemspec file.
As the test of rspec-rails was passed with latest ammter versoin 1.1.3, I sent pull-request.
Also rspec-rails rpm spec file is ok.
$ dnf repoquery --enablerepo=rawhide-source --arch src --whatrequires 'rubygem-ammeter'
=> no result
jaruga's rubygem-ammeter-1.1.3-1.fc25 completed http://koji.fedoraproject.org/koji/buildinfo?buildID=749895
rubygem-ammeter-1.1.3-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e6902a0f26
rubygem-ammeter-1.1.3-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e6902a0f26
rubygem-ammeter-1.1.3-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.