----- Original Message -----
From: "Vít Ondruch" <vondruch(a)redhat.com>
To: ruby-sig(a)lists.fedoraproject.org
Sent: Wednesday, January 27, 2021 6:42:25 PM
Subject: Re: rubygem-openssl is going to be bundled in Ruby
This have finally landed in Rawhide (ruby-3.0.0-145.fc34). Please let me know
should you experience any issues (especially with update).
Builds fine for me on all Fedoras:
https://copr.fedorainfracloud.org/coprs/pvalena/ruby/build/1914642/
Thanks!
Pavel
Vít
Dne 26. 01. 21 v 13:06 Vít Ondruch napsal(a):
Hi,
Following the bundling of Racc [1] and did_you_mean [2], I am forced to
bundle also OpenSSL. This is due to the StdLib symlinks together with
`require_relative` [3] causing double loading issues, e.g.:
~~~
$ ruby --disable-gems -e 'require "openssl"; require
"openssl/digest"'
/usr/share/ruby/openssl/digest.rb:45: warning: already initialized constant
OpenSSL::Digest::MD4
/usr/share/gems/gems/openssl-2.2.0/lib/openssl/digest.rb:45: warning:
previous definition of MD4 was here
/usr/share/ruby/openssl/digest.rb:45: warning: already initialized constant
OpenSSL::Digest::MD5
/usr/share/gems/gems/openssl-2.2.0/lib/openssl/digest.rb:45: warning:
previous definition of MD5 was here
/usr/share/ruby/openssl/digest.rb:45: warning: already initialized constant
OpenSSL::Digest::RIPEMD160
/usr/share/gems/gems/openssl-2.2.0/lib/openssl/digest.rb:45: warning:
previous definition of RIPEMD160 was here
/usr/share/ruby/openssl/digest.rb:45: warning: already initialized constant
OpenSSL::Digest::SHA1
/usr/share/gems/gems/openssl-2.2.0/lib/openssl/digest.rb:45: warning:
previous definition of SHA1 was here
/usr/share/ruby/openssl/digest.rb:45: warning: already initialized constant
OpenSSL::Digest::SHA224
/usr/share/gems/gems/openssl-2.2.0/lib/openssl/digest.rb:45: warning:
previous definition of SHA224 was here
/usr/share/ruby/openssl/digest.rb:45: warning: already initialized constant
OpenSSL::Digest::SHA256
/usr/share/gems/gems/openssl-2.2.0/lib/openssl/digest.rb:45: warning:
previous definition of SHA256 was here
/usr/share/ruby/openssl/digest.rb:45: warning: already initialized constant
OpenSSL::Digest::SHA384
/usr/share/gems/gems/openssl-2.2.0/lib/openssl/digest.rb:45: warning:
previous definition of SHA384 was here
/usr/share/ruby/openssl/digest.rb:45: warning: already initialized constant
OpenSSL::Digest::SHA512
/usr/share/gems/gems/openssl-2.2.0/lib/openssl/digest.rb:45: warning:
previous definition of SHA512 was here
/usr/share/ruby/openssl/digest.rb:52:in `<class:Digest>': superclass mismatch
for class Digest (TypeError)
from /usr/share/ruby/openssl/digest.rb:16:in `<module:OpenSSL>'
from /usr/share/ruby/openssl/digest.rb:15:in `<top (required)>'
from -e:1:in `require'
from -e:1:in `<main>'
~~~
This is the reason why rubygem-net-ssh is broken ATM [4]. Not sure if
upstream is really able to resolve the double loading issue [5]. While I
could revert the [3] to resolve the original state, we would need to
maintain this patch for the foreseeable future. Therefore it is probably
better to keep openssl bundled. This at least will provide experience closer
to upstream.
Vít
[1]
https://src.fedoraproject.org/rpms/ruby/c/baf046a6a4d17fa309c9d20fa3db949...
[2]
https://src.fedoraproject.org/rpms/ruby/c/ca69f778a9169c7ff172d2cc9c9d31c...
[3]
https://github.com/ruby/openssl/commit/74e03b588f58bcac007d7145c3bb6c4754...
[4]
https://koschei.fedoraproject.org/package/rubygem-net-ssh
[5]
https://bugs.ruby-lang.org/issues/16978#note-11