Bug 1414789 - vagrant can't load "openssl/digest" and fails
Summary: vagrant can't load "openssl/digest" and fails
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-net-ssh
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1408686
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-19 12:54 UTC by Tomas Tomecek
Modified: 2017-02-09 10:24 UTC (History)
7 users (show)

Fixed In Version: rubygem-net-ssh-3.2.0-3.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-06 11:48:47 UTC
Type: Bug


Attachments (Terms of Use)

Description Tomas Tomecek 2017-01-19 12:54:40 UTC
$ vagrant up
/usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/hmac/abstract.rb:2:in `require': cannot load such file -- openssl/digest (LoadError)
        from /usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/hmac/abstract.rb:2:in `<top (required)>'
        from /usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/hmac/md5.rb:1:in `require'
        from /usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/hmac/md5.rb:1:in `<top (required)>'
        from /usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/hmac.rb:2:in `require'


vagrant-1.8.7-1.fc26.noarch
rubygem-openssl-2.0.2-74.fc26.x86_64
rubygem-net-ssh-3.2.0-1.fc26.noarch


Not sure if this is issue of net-ssh gem or vagrant.

Comment 1 Vít Ondruch 2017-01-19 12:57:43 UTC
OpenSSL was extracted into independent gem in Ruby 2.4, so it should be probably added into vagrant.gemspec. This workaround could help:

```
sed -i '/net-scp/a\  s.add_dependency "openssl", ">= 0"' /usr/share/vagrant/vagrant.gemspec
```

Comment 2 Tomas Tomecek 2017-01-19 13:00:56 UTC
I patched it:


diff --git a/vagrant.gemspec b/vagrant.gemspec
index 52c77e7..1df3580 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
   s.add_dependency "net-ssh", "~> 3.0"
   s.add_dependency "net-sftp", "~> 2.1"
   s.add_dependency "net-scp", ">= 1.1.0"
+  s.add_dependency "openssl", ">= 2.0.2"
   # Remove BSD specific dependency.
   # s.add_dependency "rb-kqueue", "~> 0.2.0"
   s.add_dependency "rest-client", ">= 1.6.0", "< 3.0"


And got


/usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb:118:in `generate_key': undefined method `p=' for #<OpenSSL::PKey::DH:0x005617a121fca0> (NoMethodError)
Did you mean?  p
        from /usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb:51:in `initialize'
        from /usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/algorithms.rb:362:in `new'
        from /usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/algorithms.rb:362:in `exchange_keys'
        from /usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/algorithms.rb:206:in `proceed!'
        from /usr/share/gems/gems/net-ssh-3.2.0/lib/net/ssh/transport/algorithms.rb:154:in `accept_kexinit'

Comment 3 Vít Ondruch 2017-01-19 13:07:39 UTC
It seems that rubygem-net-ssh needs some update to be compatible with Ruby 2.4. Quickly checking the changelog, there are indeed some changes which might be related to this issue:

https://github.com/net-ssh/net-ssh/issues/466

Comment 4 Vít Ondruch 2017-02-06 11:48:47 UTC
So, I fixed rubygem-net-ssh in Rawhide:

https://koji.fedoraproject.org/koji/taskinfo?taskID=17630647

It appears to fix the issues.

Reassigning and closing the ticket. Feel free to reopen if you encounter any further issues.

Comment 5 Tomas Tomecek 2017-02-09 08:30:01 UTC
Well done! Works just fine.

Comment 6 Vít Ondruch 2017-02-09 10:24:58 UTC
(In reply to Tomas Tomecek from comment #5)
> Well done! Works just fine.

Glad to hear that. Thx for the feedback.


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