Bug 1332928

Summary: Fails to require namespaced gem names, e.g. net-ssh
Product: [Fedora] Fedora Reporter: Dominic Cleal <dominic>
Component: rubygem-bundler_extAssignee: Jun Aruga <jaruga>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 24CC: jaruga, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-bundler_ext-0.4.1-1.fc25 rubygem-bundler_ext-0.4.1-1.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-30 21:21:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Update to bundler_ext 0.4.1, and fix the issue. none

Description Dominic Cleal 2016-05-04 11:40:56 UTC
Description of problem:
bundler_ext fails to require gems such as "net-ssh" correctly, it raises an error when `require "net-ssh"` fails and doesn't try the net/ssh variant. This worked in bundler_ext 0.3.0.

Version-Release number of selected component (if applicable):
rubygem-bundler_ext-0.4.0-3.fc24

How reproducible:
Always

Steps to Reproduce:
1. yum -y install rubygem-bundler_ext rubygem-net-ssh
2. echo 'gem "net-ssh"' > Gemfile
3. ruby -rbundler_ext -e "BundlerExt.system_require('`pwd`/Gemfile', :all)" -e 'puts Net::SSH::Version::STRING'

Actual results:
/usr/share/gems/gems/bundler_ext-0.4.0/lib/bundler_ext/output.rb:12:in `strict_err': Gem loading error: cannot load such file -- net-ssh (RuntimeError)
        from /usr/share/gems/gems/bundler_ext-0.4.0/lib/bundler_ext/runtime.rb:50:in `rescue in block in system_require'
        from /usr/share/gems/gems/bundler_ext-0.4.0/lib/bundler_ext/runtime.rb:39:in `block in system_require'
        from /usr/share/gems/gems/bundler_ext-0.4.0/lib/bundler_ext/runtime.rb:37:in `each'
        from /usr/share/gems/gems/bundler_ext-0.4.0/lib/bundler_ext/runtime.rb:37:in `system_require'
        from /usr/share/gems/gems/bundler_ext-0.4.0/lib/bundler_ext.rb:19:in `block in system_require'
        from /usr/share/gems/gems/bundler_ext-0.4.0/lib/bundler_ext.rb:14:in `each'
        from /usr/share/gems/gems/bundler_ext-0.4.0/lib/bundler_ext.rb:14:in `system_require'
        from -e:1:in `<main>'

Expected results:
2.9.1 (net-ssh version)

Additional info:
https://github.com/bundlerext/bundler_ext/pull/18 is an upstream patch that remains unmerged, tested and it works.  Could this patch be included in the Fedora package?

Comment 1 Dominic Cleal 2016-05-26 07:16:32 UTC
> https://github.com/bundlerext/bundler_ext/pull/18 is an upstream patch that remains unmerged, tested and it works.  Could this patch be included in the Fedora package?

Now released in 0.4.1 (bug #1339844).

Comment 2 Jun Aruga 2016-05-26 09:24:15 UTC
Let me check it!

Comment 3 Jun Aruga 2016-05-26 11:58:00 UTC
Created attachment 1161939 [details]
Update to bundler_ext 0.4.1, and fix the issue.

Hi, I updated the version to 0.4.1 to fix this issue.

Right now I could not do mock build for rawhide because of Fedora infra issue (? I am asking it in Fedora Infra team).

However Koji build for rawhide was ok
http://koji.fedoraproject.org/koji/taskinfo?taskID=14259956

I checked updated version worked on f24.

$ mock -r fedora-24-x86_64 --shell

[mockbuild@unused-4-164 mytest]$ echo 'gem "net-ssh"' > Gemfile
[mockbuild@unused-4-164 mytest]$ ruby -rbundler_ext -e "BundlerExt.system_require('`pwd`/Gemfile', :all)" -e 'puts Net::SSH::Version::STRING'
2.9.1

- Package dependency is ok
- License is ok.

Could you check this?

Comment 4 Dominic Cleal 2016-05-26 12:00:07 UTC
Looks correct to me!

Comment 5 Vít Ondruch 2016-05-26 12:03:58 UTC
(In reply to Jun Aruga from comment #3)
LGTM. Please go ahead.

Comment 6 Fedora Update System 2016-05-26 12:34:23 UTC
rubygem-bundler_ext-0.4.1-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-57035e1a53

Comment 7 Jun Aruga 2016-05-26 12:39:27 UTC
(In reply to Dominic Cleal from comment #4)
> Looks correct to me!

My modification is going to be testing. [1]
After 3 or 4 days, you must get this new version.

[1] https://bodhi.fedoraproject.org/updates/rubygem-bundler_ext-0.4.1-1.fc24

Comment 8 Fedora Update System 2016-05-26 23:28:19 UTC
rubygem-bundler_ext-0.4.1-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-57035e1a53

Comment 9 Fedora Update System 2016-05-30 21:21:16 UTC
rubygem-bundler_ext-0.4.1-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.