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

Update repo to v20180822 needed by MT-1112 #5

Open
wants to merge 1,448 commits into
base: master
Choose a base branch
from

Conversation

oliwiak82
Copy link

No description provided.

@oliwiak82 oliwiak82 changed the title Update repo to v20180822 Update repo to v20180822 needed by MT-1112 Sep 4, 2018
mislav and others added 24 commits October 13, 2023 19:21
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 openssl@1.1` 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.
hsbt and others added 30 commits December 25, 2024 17:59
Ensures that the command fails when an HTTP error (e.g., 404) occurs.
Add `-f` flag to curl for HTTP error handling
* Fix library lookup path in the vendored OpenSSL

When a vendored OpenSSL is needed for compiling Ruby, that OpenSSL installation
ends up with its `bin/openssl` executable broken due to not finding "libssl.so"
and "libcrypto.so" in the global load path for libraries. This doesn't seem to
negatively affect the Ruby "openssl" extension, but is a broken OpenSSL install
nevertheless.

This change causes the `bin/openssl` executable and related shared libraries to
be built with an "RPATH" pointing to the "lib" directory of the vendored OpenSSL.

* fix test
The recent rpath argument addition broke compilation of OpenSSL with clang since
it seems expect this syntax (comma instead of "="):

    -Wl,-rpath,<path>

Also, it doesn't seem that the rpath argument is necessary for any platform other
than "Linux"; that is, we should skip passing it on BSD and macOS.
Fix installing OpenSSL on non-Linux or with clang
Co-authored-by: Mislav Marohnić <git@mislav.net>
Currently, this test fails if .git isn't present as it expects a
Git-specific output. This change temporarily creates a ".git"
directory during the test run to simulate the existence of a git
repository, thus keeping `rbenv install` output stable.

Co-authored-by: Mislav Marohnić <git@mislav.net>
Allow "nonexistent version" test to work without brew
Depending on bash version, the expression `${var/$HOME\//~/}` will not have
effect because the "~" character in the replacement expression is expanded.

The updated approach is a bit of a mouthful, but it avoids using "~" in a
substitution pattern, while also guarding against values of HOME that are
blank or when HOME is literally just "/".
When computing the SHA-2 checksum, `openssl dgst` is a potential candidate if
openssl was found in PATH. Previously, openssl from Homebrew would also get
explicitly added to the candidates list because, historically, Homebrew did not
link it to PATH, OS X Leopard did not have `shasum`, and system openssl could
not calculate sha256 checksums.

This drops support for OS X Leopard which last had an update 15 years ago.

Ref. b396ad7
compute_sha2: drop support for OS X Leopard
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.