Commit graph

746 commits

Author SHA1 Message Date
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
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
Mislav Marohnić
d3a7889c07
Simplify truffleruby+graalvm-dev build definition re: download redirect
The `http get <url> <destfile>` utility had a bug with aria2c downloader where it couldn't properly save to destfile if it was an absolute path.

I have tried having `http get <url> -` output the downloaded file to stdout, but this conflicted with the output of `log_command` (which is also to stdout) so for now let's keep using the temporary file to resolve manual URL redirects.
2024-03-22 16:14:21 +01:00
Benoit Daloze
89d30cf338 ruby-build 20240319 2024-03-19 16:55:48 +01:00
Benoit Daloze
926ed2a649 ruby-build 20240318 2024-03-18 18:57:42 +01:00
Hiroshi SHIBATA
09da542276
ruby-build 20240221 2024-02-21 19:52:10 +09:00
Hiroshi SHIBATA
e1b36a32fb
ruby-build 20240119 2024-01-19 08:22:53 +09:00
Benoit Daloze
a6c972e2c1 ruby-build 20240116 2024-01-16 15:59:20 +01:00
Mislav Marohnić
8465e028e8
Skip passing --with-readline-dir for Ruby 3.3+ 2024-01-07 14:24:40 +01:00
Hiroshi SHIBATA
a473f444de
ruby-build 20231225 2023-12-25 16:43:55 +09:00
Hiroshi SHIBATA
1b66c8345d
ruby-build 20231211 2023-12-11 20:14:52 +09:00
Mislav Marohnić
89617471f8
Fix linking to older OpenSSL for Ruby < 2.7.7
Explicitly set PKG_CONFIG_PATH when `--with-openssl-dir` is used for older Rubies.
Otherwise, Ruby will attempt to link to the latest OpenSSL found by pkg-config,
which could be incompatible.
2023-12-07 15:52:10 +01:00
Mislav Marohnić
c5346187ac
Simplify build & install steps for dev rubies
This merges "standard_build" and "standard_install" build steps into one again
and modifies "standard_install_with_bundled_gems" to just invoke "standard"
with the addition of `update-gems` & `extract-gems` targets.
2023-11-30 16:32:57 +01:00
Mislav Marohnić
efe73b4841
Fix compiling Ruby < 2.5 by omitting --with-ext
Using `--with-ext=+` only has the indended effect (compiling all extensions that would normally get compiled) on Ruby 2.5+. On older versions, it causes none of the default extensions to get compiled, resulting in a defunct installation.
2023-11-24 22:08:28 +01:00
Mislav Marohnić
4a3ff7e194
Surface make problems while building Ruby extensions
A very common type of build failure is that the Ruby "openssl" extension failed to compile. However, when that happens, ruby-build just prints a generic "BUILD FAILED" message. To find out what happened, the user would first have to open the ruby-build log, note the "Following extensions are not compiled" section, then figure out how to find the exact location to the "ext/openssl/mkmf.log" file for more information.

Now, when `make` fails, ruby-build will automatically forward the "Following extensions are not compiled" information to stderr.
2023-11-21 17:12:53 +01:00
Mislav Marohnić
6250069ccb
Instruct Ruby to fail the build if openssl or psych are missing
Normally, Ruby `make` step will print a warning about any missing
extensions, but will not abort the build and instead proceed as normal.

Since Ruby installations without openssl or psych are essentially
broken, ruby-build used to have a `verify_openssl` build step to test if
the newly built Ruby can load these extensions, and print helpful
information and abort the build on errors:

    Loading the Ruby openssl extension failed
    ERROR: Ruby install aborted due to missing extensions

The `verify_opensl` implementation was necessary to provide a good
experience for ruby-build users, but was hacky and I would prefer to
eliminate it.

It appears that passing `--with-ext=openssl,psych` to the Ruby configure
step marks those extensions as mandatory and fails the `make` process if
they failed to build. This is exactly the behavior we want, so this
enables the configure option for all Ruby builds.
2023-11-21 17:12:53 +01:00
Hiroshi SHIBATA
e4e49a1601
ruby-build 20231114 2023-11-14 21:13:25 +09:00
Mislav Marohnić
270ecd0bcb
Merge pull request #2304 from rbenv/fix-wget
Abandon using `--show-progress` for wget
2023-11-09 02:08:54 +01:00
Mislav Marohnić
4c07370ac4
Abandon using --show-progress for wget
It seems like there exist platforms that have wget which does not
support the `--show-progress` option. This reverts to using wget in its
default verbose mode where a progress bar and bunch more information are
printed to stderr.
2023-11-09 01:59:21 +01:00
Mislav Marohnić
c4f811a23d
Fix commands printed when TMPDIR is empty 2023-11-08 23:56:03 +01:00
Mislav Marohnić
bb18f12e64
ruby-build 20231107 2023-11-07 19:16:07 +01:00