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

pull ruby build #924

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

pull ruby build #924

wants to merge 26 commits into from

Conversation

jasonkarns
Copy link
Member

  • Add RUBY_BUILD_TARBALL_OVERRIDE to override the ruby tarball URL
  • Cleanup in openssl compilation step
  • Remove implicit LDFLAGS, CPPFLAGS, and "ldflags_dirs" build step
  • Remove "ldflags_dirs" step from build definitions
  • Avoid compiling OpenSSL if the user supplied --with-openssl-dir on the command line
  • ruby-build 20231014
  • Cleanup in truffleruby+graalvm installation
  • Avoiding excessive cd when fetching git repos (#2273)
  • Improve cached_tarball test helper
  • Add needs_openssl test
  • Add JRuby 9.4.4.0
  • TruffleRuby: remove explicit [email protected] requirement on macOS
  • JRuby: remove [email protected] requirement from jruby-dev
  • Fix fixing JRuby shebangs on macOS
  • Skip ri/rdoc when installing jruby-launcher
  • Bump up OpenSSL 3.1.4
  • Add TruffleRuby and TruffleRuby GraalVM 23.1.1
  • ruby-build 20231025

eregon and others added 26 commits October 12, 2023 11:48
* Update the check for whether a package is a ruby.
- The `make -j 1` workaround seems neither in effect nor necessary anymore
- Assume that KERNEL_BITS workaround isn't necessary anymore
- Declare more variables as local
The default settings for LDFLAGS and CPPFLAGS were there since the initial commit to ruby-build:

    LDFLAGS="-L${PREFIX_PATH}/lib"
    CPPFLAGS="-I${PREFIX_PATH}/include"

However, it's not clear to me what these settings help with. A typical Ruby installation will initialize files in these directories, but it will do so regardless of the environment variables.

So, let's remove them and see what breaks.
…the command line

Same with linking libyaml, gmp, etc. to Homebrew. This considers all user configuration inputs when checking for existing flags.
Add RUBY_BUILD_TARBALL_OVERRIDE to override the ruby tarball URL
Reuse original `build_package_copy` instead of having to maintain an additional `build_package_copy_to` step.

As a bonus, this prevents a global variable `to` from leaking.
Avoid compiling OpenSSL if the user supplied `--with-openssl-dir` on the command line
Cleanup in OpenSSL compilation step
Remove implicit LDFLAGS, CPPFLAGS, and "ldflags_dirs" build step
- Now only generates a `configure` script if explicitly specified
- Add ability to add arbitrary files to the tarball
- Cache most common tarballs in fixtures directory to speed up tests
Add tests for functionality related to linking to OpenSSL
TruffleRuby build definitions used to explicitly rely on `brew --prefix [email protected]` on macOS and abort installation if that was not found. However, this check didn't take into account that the user might have set OPENSSL_PREFIX in their environment, or that they have another `openssl@*` version installed via Homebrew. This change removes the `use_homebrew_openssl` check and allows TruffleRuby to perform its own OpenSSL detection.

https://github.com/oracle/truffleruby/blob/vm-23.1.0/lib/truffle/truffle/openssl-prefix.rb#L14-L17
This is to allow JRuby itself to check for compatible OpenSSL versions and not have ruby-build abort early on macOS.
LC_CTYPE is "utf-8" on macOS, which instructs utilities like `tr` to expect Unicode input. However, in case of binary files, which we here explicitly guard against, the utility will fail because of invalid input encoding.

The solution is to set LC_CTYPE=C which effectively removes the expectation around input encoding and allows `tr` to process the input byte-by-byte.
* commit 'refs/rbtags/v20231025':
  ruby-build 20231025
  Add TruffleRuby and TruffleRuby GraalVM 23.1.1
  Bump up OpenSSL 3.1.4
  Skip ri/rdoc when installing jruby-launcher
  Fix fixing JRuby shebangs on macOS
  JRuby: remove `[email protected]` requirement from `jruby-dev`
  TruffleRuby: remove explicit `[email protected]` requirement on macOS
  Add JRuby 9.4.4.0
  Add `needs_openssl` test
  Improve `cached_tarball` test helper
  Avoiding excessive cd when fetching git repos (#2273)
  Cleanup in truffleruby+graalvm installation
  ruby-build 20231014
  Avoid compiling OpenSSL if the user supplied `--with-openssl-dir` on the command line
  Remove "ldflags_dirs" step from build definitions
  Remove implicit LDFLAGS, CPPFLAGS, and "ldflags_dirs" build step
  Cleanup in openssl compilation step
  Add RUBY_BUILD_TARBALL_OVERRIDE to override the ruby tarball URL
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.

5 participants