Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local openssl for old rubies #1476

Conversation

makandra-stefan-langenmaier

Hi!

We have problems with missing openssl-1.0 for older Ruby versions in newer distribution and I saw multiple other issues here with a similar topic.
As I saw, there are alreay local openssl installs used for Macs, I thought this could also be used for older Ruby versions.

Let me know if this could be an approach for Linux without the correct openssl installed. Feedback is welcome.

Best regards,
Stefan

@makandra-stefan-langenmaier makandra-stefan-langenmaier changed the title Local openssl for old distros Local openssl for old rubies Oct 8, 2020
@excid3
Copy link

excid3 commented Oct 27, 2020

I would love this. Would make compiling older rubies on Ubuntu a lot easier.

@excid3
Copy link

excid3 commented Oct 28, 2020

Tested this and it works great. 👍

I did notice that Ruby 2.0.0-p648 is missing the openssl line for Linux and should probably be included. Ideally, all the older ones too, but I'm okay if it's just the latest versions of the old Rubies.

@jeremy
Copy link
Member

jeremy commented Nov 19, 2020

Nice work!

@tibra
Copy link

tibra commented Dec 10, 2020

We absolutely need this! Thanks a lot!

@eregon
Copy link
Member

eregon commented Jan 19, 2021

FWIW, I have a similar branch at master...eregon:ruby23-openssl-linux.
I think it makes sense to compile OpenSSL 1.0.0 automatically on Linux, rather than asking everyone to do this manually:
https://github.com/rbenv/ruby-build/wiki#openssl-version-compatibility

Note that a previous PR doing a similar approach ended up being rejected: #1397 (review)
So I guess we need to convince the other maintainers (cc @mislav @hsbt).

I think the main thing that changed since then is all recent Linux distributions don't have a way to install OpenSSL 1.0.0 anymore, so it's very inconvenient to manually download and compile OpenSSL 1.0.0.
And this logic already exists for macOS anyway.

So I think what we should do is just extend the logic to deal with the slightly different certificate paths on Linux, as done in master...eregon:ruby23-openssl-linux, and then rename
mac_openssl --if has_broken_mac_openssl to
openssl10 --if has_wrong_openssl.
Duplicating the lines in share/ files seems suboptimal to me at least.

@makandra-stefan-langenmaier
Copy link
Author

I'm closing that pull request as the solution caused more problems for us in the long-term and I wanted to reduce possible confusion for others. The issues were not only with Ruby but also other gems that use openssl.

@eregon
Copy link
Member

eregon commented Jun 24, 2021

The issues were not only with Ruby but also other gems that use openssl.

Is it the issue that some gems like database gems (mysql2, pg) link to a system library (e.g., installed by a package manager) and those libraries link against the system libssl, and then the Ruby process ends up loading 2 versions of libssl, which usually segfaults?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants