I think it might happen like this:

1) Vagrant loads OpenSSL:

https://github.com/hashicorp/vagrant/blob/master/lib/vagrant.rb#L90


2) Later, net-ssh is required somewhere. When net-ssh is loaded, the
OpenSSH from gem is loaded due to dependencies:

https://src.fedoraproject.org/rpms/rubygem-net-ssh/blob/master/f/rubygem-net-ssh.spec#_38


IOW the solution could be to pre-load net-ssh gem. May be we should even
consider to use Bundler to execute the test suite, because that would
pre-load the dependencies from the vagrant.gemspec.


Vít



Dne 28. 01. 20 v 12:09 Vít Ondruch napsal(a):
> I think you focus on wrong problem. Of course the code construction in
> OpenSSL is weird:
>
>
> ~~~
>
>     # Deprecated.
>     #
>     # This class is only provided for backwards compatibility.
>     # Use OpenSSL::Cipher.
>     class Cipher < Cipher; end
>     deprecate_constant :Cipher
>
> ~~~
>
>
> But you should probably focus on the beginning of the test suite output:
>
>
> ~~~
>
> /usr/lib64/gems/ruby/openssl-2.1.2/openssl.so: warning: already
> initialized constant OpenSSL::ASN1::CHARACTER_STRING
> /usr/lib64/gems/ruby/openssl-2.1.2/openssl.so: warning: already
> initialized constant OpenSSL::ASN1::BMPSTRING
> /usr/share/gems/gems/openssl-2.1.2/lib/openssl/cipher.rb:18: warning:
> constant OpenSSL::Cipher::Cipher is deprecated
> /usr/share/gems/gems/openssl-2.1.2/lib/openssl/cipher.rb:24: warning:
> already initialized constant OpenSSL::Cipher::AES
> /usr/share/ruby/openssl/cipher.rb:24: warning: previous definition of
> AES was here
> /usr/share/gems/gems/openssl-2.1.2/lib/openssl/cipher.rb:18: warning:
> constant OpenSSL::Cipher::Cipher is deprecated
> /usr/share/gems/gems/openssl-2.1.2/lib/openssl/cipher.rb:24: warning:
> already initialized constant OpenSSL::Cipher::CAST5
> /usr/share/ruby/openssl/cipher.rb:24: warning: previous definition of
> CAST5 was here
> /usr/share/gems/gems/openssl-2.1.2/lib/openssl/cipher.rb:18: warning:
> constant OpenSSL::Cipher::Cipher is deprecated
> /usr/share/gems/gems/openssl-2.1.2/lib/openssl/cipher.rb:24: warning:
> already initialized constant OpenSSL::Cipher::BF
> /usr/share/ruby/openssl/cipher.rb:24: warning: previous definition of BF
> was here
>
> ~~~
>
>
> To me, this seems as if the gemified OpenSSL were mixed with the OpenSSL
> linked into the StdLib and therefore some code is loaded twice and it
> might result in errors as the one you are pointing out.
>
>
> Vít
>
>
> Dne 28. 01. 20 v 11:49 Pavel Valena napsal(a):
>
>> Hello,
>>
>> it seems Ruby 2.7 came with some openssl surprise, because for some reason 
>> Vagrant testsuite breaks:
>>
>> https://copr-be.cloud.fedoraproject.org/results/pvalena/vagrant/fedora-rawhide-x86_64/01195186-vagrant/builder-live.log.gz
>> https://koji.fedoraproject.org/koji/taskinfo?taskID=41097171
>>
>> f.e.:
>> ```
>> An error occurred while loading ./test/unit/plugins/pushes/ftp/push_test.rb.
>> Failure/Error: class Cipher < Cipher; end
>> TypeError:
>>   superclass mismatch for class Cipher
>> # /usr/share/gems/gems/openssl-2.1.2/lib/openssl/cipher.rb:64:in 
>> `<class:Cipher>'
>> # /usr/share/gems/gems/openssl-2.1.2/lib/openssl/cipher.rb:16:in 
>> `<module:OpenSSL>'
>> # /usr/share/gems/gems/openssl-2.1.2/lib/openssl/cipher.rb:15:in `<top 
>> (required)>'
>> # /usr/share/gems/gems/openssl-2.1.2/lib/openssl.rb:17:in `<top (required)>'
>> # /usr/share/ruby/net/ftp.rb:23:in `<top (required)>'
>> # ./plugins/pushes/ftp/push.rb:1:in `<top (required)>'
>> # ./test/unit/plugins/pushes/ftp/push_test.rb:4:in `<top (required)>'
>> ```
>>
>> But to my best efforts I wasn't able to trace it to the source.
>>
>> Ideas?
>>
>> Pavel
> _______________________________________________
> ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org
> To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org
_______________________________________________
ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org
To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org

Reply via email to