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

Remove ruby-install dependency and build from Ruby source #5

Open
calebhailey opened this issue Apr 9, 2019 · 0 comments
Open

Remove ruby-install dependency and build from Ruby source #5

calebhailey opened this issue Apr 9, 2019 · 0 comments

Comments

@calebhailey
Copy link
Contributor

calebhailey commented Apr 9, 2019

In the end, the trick which made this work was a Ruby make configure flag called load-relative which causes ruby to resolve load paths at runtime (dynamically): https://github.com/ruby/ruby/blob/d48783bb0236db505fe1205d1d9822309de53a36/configure.ac#L145-L147

The ruby-install project does provide some niceties in the form of features (and anti-features) as it describes in its readme:

## Features

* Supports installing arbitrary versions.
* Supports downloading the latest versions and checksums from [ruby-versions].
* Supports installing into `/opt/rubies/` for root and `~/.rubies/` for users
  by default.
* Supports installing into arbitrary directories.
* Supports downloading from arbitrary URLs.
* Supports downloading from mirrors.
* Supports downloading/applying patches.
* Supports specifying arbitrary `./configure` options.
* Supports downloading archives using `wget` or `curl`.
* Supports verifying downloaded archives using `md5sum`, `md5` or `openssl md5`.
* Supports installing build dependencies via the package manager:
  * [apt]
  * [dnf]
  * [yum]
  * [pacman]
  * [zypper]
  * [pkg]
  * [macports]
  * [brew]
* Has tests.

## Anti-Features

* Does not require updating every time a new Ruby version comes out.
* Does not require recipes for each individual Ruby version or configuration.
* Does not support installing trunk/HEAD.

...but we don't need all of these features. If we wanted to reduce ruby-install as an external dependency, we would likely need to refactor the Dockerfile to fetch and validate source SHAs, and recreate the required ./configure options (including --enable-load-relative).

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

No branches or pull requests

1 participant