-
Notifications
You must be signed in to change notification settings - Fork 784
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
Prototype: Install from Binary #1761
Conversation
This follows the pattern that rvm uses. There's a --movable flag, and that adds some extra options. Only tested on Ubuntu so far, but I can confirm that the configure options end up in RbConfig, but have not tested beyond that yet.
I have only confirmed this on Ubuntu x86_64, with MRI releases. There will need to be some more work to make it more generalized, and supporting other systems.
I was looking more closely at the RVM mirror, and seems that some of these have not been updated particularly recently (5 years). 10.12, vs Big Sur which is 11.2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Thanks for working on this!
My expectation was that --movable
was added to produce the binaries that are later downloaded with --binary
. But looking at the diff, that's not the case, as this downloads RVM's own movable rubies. In the long term, where should we download the rubies from, and how do we verify their authenticity?
I have no idea to support pre-build binary without ruby-build team. At least, I will not support and investigate them. |
This is squarely in prototype territory. I didn't have a good place to toss those built iwth --movable at the time I was working on.
I was thinking about this. I could imagine having something similar to
Something I had been thinking about is, how much does this overlap with the existing I could imagine more code being needed to download from GitHub Packages like I mentioned in #42 (comment) . I could also imagine having publish a built file. homebrew had a lot of tooling around both of those already (fetching and publishing), so it wasn't as big of a lift for that project. As @hsbt said, this would need to be hosted somewhere and managed by someone. I think if we can have a way to let people add repositories of binaries w/ a preference to install them, that would still be a great step forward. It would also help validate the approach for a wider audience. |
Using GitHub Packages is a great idea! 🤔 |
FYI, you could follow an approach similar to https://github.com/ruby/ruby-builder More might be needed, e.g., if libssl is installed by Homebrew, or MacPorts or Homebrew in a non-standard location on macOS. But that might not be an issue given that I think building movable Rubies is hard and brittle (#1760 (comment)), so I'd think that would be a non-goal, only use binaries if they are installed to the expected location. Ultimately it would be best if CRuby itself would provide builds for various OS/OS version/arch, JRuby & TruffleRuby already do. That might be worth opening a ticket at https://bugs.ruby-lang.org/ |
I prefer to use the binaries from ruby/ruby-builder instead of binaries of RVM because they are built by ruby-build and uses github packages. |
Some relevant details from ruby-builder 1 2:
Note: they are using releases not packages, which is a little easier for downloading. |
any updates? |
That's not directly possible because those CRuby binaries are not movable (ruby/setup-ruby#98 (comment)) and so they only work if installed under So either someone can find how to make properly-working movable CRuby builds (I think it's hard, likely needs some hacks and I'm not willing to do it, but it seems possible), or there could be a separate set of builds (e.g., another repo like ruby-builder) which for instance expects the install location to be |
This is work towards #42
I have only confirmed this on Ubuntu x86_64, with MRI releases. There will need to be some more work to make it more generalized, and supporting other systems. I built this off of my other PR #1760 thinking I would use that to build, and this to install. I can rebase if necessary.
Screen.Recording.2021-04-23.at.3.49.02.PM.mov