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

Add TruffleRuby to ruby-build #1210

Merged
merged 5 commits into from Jun 15, 2018
Merged

Add TruffleRuby to ruby-build #1210

merged 5 commits into from Jun 15, 2018

Conversation

@eregon
Copy link
Member

eregon commented Jun 15, 2018

Hello,

Here is a PR to add TruffleRuby to ruby-build.
I tried to keep the logic as simple as possible, and to update all relevant places mentioning other implementations.

I tested it locally and it seems to work well.
I also added a couple tests for the new logic.

This is a fully open-source version of TruffleRuby, corresponding to a subset of the Community Edition of GraalVM (See http://www.graalvm.org/downloads/)
It includes the native configuration only, not the JVM configuration, so there is no JVM involved.

@eregon

This comment has been minimized.

Copy link
Member Author

eregon commented Jun 15, 2018

I'm sure why the CI failed. It looks like it tried to download the truffleruby archive and check the checksum, but took more than 10 minutes to download the 40MB archive.
Maybe it should just be restarted as the network might be unreliably slow?

@eregon

This comment has been minimized.

Copy link
Member Author

eregon commented Jun 15, 2018

Running locally with:

$ TRAVIS_COMMIT_RANGE=master... TRAVIS_PULL_REQUEST=true PATH="./bats/bin:$PATH" script/test

gives

...
101 tests, 0 failures
Verifying checksum for https://github.com/oracle/truffleruby/releases/download/vm-1.0.0-rc2/truffleruby-1.0.0-rc2-linux-amd64.tar.gz
Verifying checksum for https://github.com/oracle/truffleruby/releases/download/vm-1.0.0-rc2/truffleruby-1.0.0-rc2-macos-amd64.tar.gz
Verifying checksum for https://www.openssl.org/source/openssl-1.1.0h.tar.gz
23.32s user 16.53s system 17% cpu 3:48.50 total
@hsbt

This comment has been minimized.

Copy link
Member

hsbt commented Jun 15, 2018

@eregon Thanks! I'm happy to add TruffleRuby definition.

@hsbt hsbt merged commit e73041e into rbenv:master Jun 15, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@eregon

This comment has been minimized.

Copy link
Member Author

eregon commented Jun 16, 2018

@hsbt Thank you for merging!

Is there a release of ruby-build planned soon?
It would be great so more people can easily try TruffleRuby, especially for Homebrew users.
(Users of ruby-build as a plugin can just git pull so that's already good 😃 )

@hsbt

This comment has been minimized.

Copy link
Member

hsbt commented Jun 18, 2018

@eregon I did submit pull-request to homebrew-core. Homebrew/homebrew-core#29151

@eregon

This comment has been minimized.

Copy link
Member Author

eregon commented Jun 18, 2018

@hsbt Awesome, thank you!

@xaque208

This comment has been minimized.

Copy link

xaque208 commented on d155b41 Aug 20, 2018

This looks to have broken builds on my OpenBSD systems. --strip-components doesn't look to be available on my OpenBSD boxes. Reverting this change locally allows the configure to continue.

This comment has been minimized.

Copy link
Contributor

nirvdrum replied Aug 20, 2018

@xaque208 Sorry about that. I'm the one that convinced @eregon this would be a good change.

Out of curiosity, do you have GNU tar available on your system? I have a FreeBSD machine available that I could try things on. But I haven't run OpenBSD in quite a while.

This comment has been minimized.

Copy link
Member

mislav replied Aug 20, 2018

I agree that this change is risky and should be reverted. This code path is used by virtually any formula installable by ruby-build and I wouldn't suggest changing it just to accommodate a non-mainstream Ruby distribution. @nirvdrum could you submit a PR?

This comment has been minimized.

Copy link
Member Author

eregon replied Aug 21, 2018

@xaque208 Could you open an issue?

@mislav In the old logic, there is no guarantee the archive will contain a directory with the exact same name as the archive basename. This changes guarantees we extract to $package_name.
So I think it's the right place for this logic, but we can use something else than --strip-components=1 if that's not portable enough.
We checked when making this change, both bsdtar and GNU tar seem to support the option (https://serverfault.com/a/330131/48918 also says so), so I wonder what OpenBSD uses.
I'll check if we still need this change for TruffleRuby. Maybe it's no longer needed and we can just drop it.

This comment has been minimized.

Copy link
Member Author

eregon replied Aug 21, 2018

I made a PR: #1226

This comment has been minimized.

Copy link

xaque208 replied Aug 21, 2018

Excellent, thank you for looking at it @eregon. I was hoping to get more detail for the issue, but things happen while I was sleeping. :)

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

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.