Commit graph

830 commits

Author SHA1 Message Date
Hiroshi SHIBATA
7dffe09db7
ruby-build 20250415 2025-04-15 10:32:16 +09:00
Hiroshi SHIBATA
cae502a444
ruby-build 20250409 2025-04-09 20:38:36 +09:00
Charles Oliver Nutter
f661b64cab
Don't delete jruby.sh
I'm not sure why this file was being deleted but this code dates way back! Unfortunately deleting this interferes with a new version of the native JRuby launcher we want to release which is dependent on the shell script being present. This PR removes jruby.sh from the `remove_windows_files` function so it can be used by the new launcher.

See https://github.com/jruby/jruby-launcher/pull/48#issuecomment-2772272290
2025-04-02 12:42:27 -05:00
Hiroshi SHIBATA
2334633d60
ruby-build 20250326 2025-03-26 14:47:28 +09:00
Benoit Daloze
88dd8dbfef ruby-build 20250318 2025-03-18 13:58:34 +01:00
Hiroshi SHIBATA
cb9c1decb3
ruby-build 20250215 2025-02-15 07:35:48 +09:00
Hiroshi SHIBATA
20f209a092
ruby-build 20250212 2025-02-12 09:03:43 +09:00
Hiroshi SHIBATA
65c7d80a66
ruby-build 20250205 2025-02-05 09:18:01 +09:00
Hiroshi SHIBATA
31fa406e7d
ruby-build 20250130 2025-01-30 08:37:54 +09:00
Benoit Daloze
d5453a162d ruby-build 20250127 2025-01-27 13:36:11 +01:00
Mislav Marohnić
eabf640863
compute_sha2: drop support for OS X Leopard
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. b396ad7cd1
2025-01-22 13:27:25 +01:00
Mislav Marohnić
fdcfac8d42
rbenv install: fix substituting $HOME with "~" (#2501)
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 "/".
2025-01-21 22:11:40 +01:00
Mislav Marohnić
3366b3bff2
ruby-build 20250121 2025-01-21 20:48:38 +01:00
Benoit Daloze
4b363d67d5 Simplify logic for rpath, the comma syntax is supported by all compilers
* From https://github.com/rbenv/ruby-build/pull/2496/files#r1915751424
2025-01-15 15:22:21 +01:00
Hiroshi SHIBATA
644d2940e6
ruby-build 20250115 2025-01-15 17:49:45 +09:00
Mislav Marohnić
f6628c3d1f
ruby-build 20250114 2025-01-14 23:40:13 +01:00
Mislav Marohnić
afb5dcc402
Fix installing OpenSSL on non-Linux or with clang
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.
2025-01-14 23:32:57 +01:00
Mislav Marohnić
068c4047cf
Fix library lookup path in the vendored OpenSSL (#2493)
* 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
2025-01-11 15:15:26 +01:00
Hiroshi SHIBATA
b5ade6192c
ruby-build 20241225.2 2024-12-25 18:02:54 +09:00
Hiroshi SHIBATA
62b63dbb12
ruby-build 20241225.1 2024-12-25 17:42:03 +09:00
Hiroshi SHIBATA
554dda2dcb
ruby-build 20241225 2024-12-25 15:43:43 +09:00
Hiroshi SHIBATA
5a5358797d
ruby-build 20241213 2024-12-13 07:51:28 +09:00
Benoit Daloze
6c937c819c Add an environment variable to always build openssl/libssl
* This is useful when one wants to avoid depending e.g. on which openssl version
  is installed in Homebrew, notably for https://github.com/ruby/setup-ruby/issues/668
2024-11-13 14:27:42 +01:00
Mislav Marohnić
87c272cd57
Merge pull request #2462 from rbenv/named-pipes
Allow named pipes as build definition argument
2024-11-05 23:43:02 +01:00
Mislav Marohnić
4b3890884a
Allow named pipes as build definition argument
Allow ruby-build to read a build definition from a named pipe in addition to just
from regular files.
2024-11-05 15:04:47 +01:00
Mislav Marohnić
bc88537fc5
Avoid array subscript error when checking OpenSSL versions
If none of Homebrew OpenSSL versions satisfy the `needs_openssl` requirement,
array iteration will reach `index=-1` and that will raise a non-fatal error
when accessing the `versions` array. This makes sure not to go past index=0.
2024-11-05 14:42:53 +01:00
Hiroshi SHIBATA
281e598b07
ruby-build 20241105 2024-11-05 14:30:21 +09:00
Hiroshi SHIBATA
f370d55536
ruby-build 20241030 2024-10-30 20:07:27 +09:00
Benoit Daloze
aab1b8d0e7 ruby-build 20241017 2024-10-17 19:08:14 +02:00
Mislav Marohnić
14d3185545
Fix linking to vendored OpenSSL on 64-bit systems
On 64-bit systems, the build system for OpenSSL tends to produce a "lib64"
directory instead of a "lib" directory due to its "multilib" feature being
enabled by default. However, the Ruby "openssl" extension assumes that the
directory is always named "lib", or explicitly passed via `--with-openssl-lib`.

This disables multilib support in OpenSSL by passing `--libdir=lib` to OpenSSL
configure step.
2024-10-15 14:24:13 +02:00
Benoit Daloze
1559160ea7 ruby-build 20241007 2024-10-07 19:50:08 +02:00
Benoit Daloze
a22ff72e32
Support ruby-build ruby-X.Y.Z DIR (#2448)
* By searching a X.Y.Z definition if no ruby-X.Y.Z definition is not found.
* Add test and documentation.

Co-authored-by: Mislav Marohnić <git@mislav.net>
2024-09-23 19:15:29 +02:00
Benoit Daloze
2d00d407e7
Add -d, --dir option to install to <prefix>/<definition> instead of <prefix> (#2447)
Similar to ruby-install's -r, --rubies-dir flag.

---------

Co-authored-by: Mislav Marohnić <git@mislav.net>
2024-09-23 18:00:15 +02:00
Benoit Daloze
ed384c8f36 ruby-build 20240917 2024-09-17 15:11:53 +02:00
Hiroshi SHIBATA
d0e7c67023
ruby-build 20240903 2024-09-03 16:23:34 +09:00
Charles Oliver Nutter
89eb562616 Clear LC_ALL for tr call
This resolves additional issues when tr is called in a shell that
has set LC_ALL to a specific encoding. In that case, the tr may
fail to ignore binary files, expecting that they are in some
encoding.

See https://github.com/rbenv/ruby-build/issues/2279
2024-07-30 15:27:06 -05:00
Mislav Marohnić
072022f689
ruby-build 20240727 2024-07-27 00:55:32 +02:00
Benoit Daloze
acbd79b4c2 ruby-build 20240722 2024-07-22 12:47:34 +02:00
Hiroshi SHIBATA
836e3bece4
ruby-build 20240709.1 2024-07-09 12:43:12 +09:00
Hiroshi SHIBATA
1260e002c4
ruby-build 20240709 2024-07-09 11:56:28 +09:00
Mislav Marohnić
cd7fd50818
ruby-build 20240702 2024-07-02 10:40:03 +02:00
Hiroshi SHIBATA
fe13cc8a5c
ruby-build 20240612 2024-06-12 05:33:02 +02:00
Mislav Marohnić
fb1b4da13d
Simplify JRuby version check
In case shelling out to jruby fails, the error output wouldn't get printed to
stderr but ruby-build would abort.
2024-06-10 11:54:48 +02:00
Hiroshi SHIBATA
db6c17529b
ruby-build 20240530.1 2024-05-30 15:33:07 +09:00
Hiroshi SHIBATA
f53dbed4d1
ruby-build 20240530 2024-05-30 13:21:43 +09:00
Hiroshi SHIBATA
0aefaa4e30
ruby-build 20240517 2024-05-17 10:06:16 +09:00
Mislav Marohnić
263640c9fe
ruby-build 20240501 2024-05-01 15:48:04 +02:00
Mislav Marohnić
81eed6c48e
rbenv install: error out instead of prompting in non-interactive mode 2024-05-01 15:45:23 +02:00
Hiroshi SHIBATA
346c0dccae
ruby-build 20240423 2024-04-23 21:54:43 +09:00
Benoit Daloze
5e5a2995e1 ruby-build 20240416 2024-04-16 17:27:04 +02:00