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

invoke make update-gems before make install with ruby-trunk #1098

Merged
merged 6 commits into from
Jun 13, 2017
Merged

Conversation

hsbt
Copy link
Member

@hsbt hsbt commented Jun 9, 2017

Fixes #1093

Added make update-gems command before make install when installing to 2.5.0-dev named "ruby-trunk"

/cc @k0kubun

I'm not a familiar with shell script. Can I handle ruby-trunk, ruby-2.4.0-dev and ruby-2.3.0-dev smartly?

bin/ruby-build Outdated
} >&4 2>&1

if [ "$package_name" == "ruby-trunk" ]; then
{ "$MAKE" update-gems
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, it's also necessary to execute "$MAKE" extract-gems to use bundled gems when manually building ruby, isn't it? Not sure, just confirmation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I'll confirm it later.

Copy link
Member

@jeremy jeremy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than checking package_name, perhaps we could introduce a separate standard_from_source build step that handles the gem update and anything else specific to building from source rather than from a distribution tarball.

Better yet, if the standard step were composed of separate standard_build and standard_install steps, then we could reuse standard_build and just introduce a new standard_install_from_source that performs the gem update before invoking standard_install.

Then our build def would look like

install_git "ruby-trunk" "https://github.com/ruby/ruby.git" "trunk" ldflags_dirs autoconf standard_build standard_install_from_source verify_openssl

@hsbt
Copy link
Member Author

hsbt commented Jun 12, 2017

@jeremy Looks good. I'm going to update with your suggestion.

hsbt added 4 commits June 12, 2017 15:29
  * standard_build invoke configure and make. It not invoke `make install`.
  * standard_install invoke only `make install`.
  * Added backword compatibility function for above separation.
  * Added new function for bundled_gems support named standard_install_with_bundled_gems.
@hsbt
Copy link
Member Author

hsbt commented Jun 12, 2017

@k0kubun Can you try this branch for installing bundled gems?

@k0kubun
Copy link
Contributor

k0kubun commented Jun 12, 2017

$ rbenv install 2.5.0-dev
Cloning https://github.com/ruby/ruby.git...
Installing ruby-trunk...
Installed ruby-trunk to /home/k0kubun/.rbenv/versions/2.5.0-dev

$ rbenv shell 2.5.0-dev
$ irb
irb(main):001:0> require 'minitest'
=> true

@hsbt It worked! Thanks.

@jeremy jeremy requested review from mislav and sstephenson June 12, 2017 17:09
@hsbt hsbt merged commit f81c95d into master Jun 13, 2017
@hsbt hsbt deleted the update-gems branch June 13, 2017 00:20
jasonkarns added a commit to nodenv/node-build that referenced this pull request Nov 11, 2018
Main change is replication of: rbenv/ruby-build#1098

* tag 'ruby-build/v20170726':
  bump version to v20170726
  Add rbx-3.81 and rbx-3.82
  Add definition for JRuby 9.1.12.0
  Add definition for JRuby 9.1.11.0
  Added gitignore for bats repository
  Ruby 2.2 entered unsupported security maintenance on 2016-12-25
  Ruby 2.1 reached end of life on 2017-03-31
  Improve check for openssl on macOS
  Pass arguments for separated functions
  To use standard_build and standard_install_with_bundled_gems for ruby versions that has bundled gems
  Separated standard function to standard_build and standard_install.
  invoke extract-gems after update-gems
  Add rbx-3.76, rbx-3.77, rbx-3.78, rbx-3.79 and rbx-3.80
  invoke make update-gems before make install with ruby-trunk
  Ignore LibreSSL bundled with macOS 10.13
  Add JRuby 1.7.27
  Add definition for JRuby 9.1.10.0
  Upgrade to OpenSSL 1.1.0f
  Upgrade to OpenSSL 1.0.2l
gemmaro pushed a commit to gemmaro/ruby-build that referenced this pull request Aug 17, 2024
rbenv-prefix: do not silence rbenv-which for system version
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.

3 participants