This fixes `rbenv install -l` displaying each version twice due to
RUBY_BUILD_DEFINITIONS path containing ruby-build's own definitions path
twice: both as an rbenv plugin and by appending its own internal path.
When installing rbx over an existing location, the `gems/bin` directory
will already be a symlink to `bin/` and an attempt to recreate this will
end up in recursion that keeps growing a binstub file until the disk is full.
If RUBY_BUILD_CACHE_PATH is set (typically "`rbenv root`/cache" if it
exists), have Rubinius `./configure` script download prebuilt LLVM
versions into that directory and re-use them if already present.
Rubinius fails to download a prebuilt LLVM on Yosemite since one is not
available yet. Instead, download the prebuilt version for the previous
OS X release.
This fixes Rubinius 2.2.7+ builds, but the older ones still fail for me
on Yosemite. This could be due to the fact that they're old releases
which are not compatible with never dependencies on the system.
Newer MRIs will pick up gcc-4.2 from PATH and use that instead of
`/usr/bin/gcc`. While this worked up till now, it will not work in
Yosemite anymore since Homebrew's apple-gcc42 is generally not
compatible with 10.10.
So when CC has not explicitly been set, set it to `clang` to avoid
searching the PATH for any other gcc versions. This fixes MRI builds on
systems where apple-gcc42 is installed.
The definitions that use `require_gcc` are not compatible with Apple's
clang-powered `gcc` and need gcc-4.2 from Homebrew. However, builds
using gcc-4.2 fail on Yosemite with a warning:
couldn't understand kern.osversion `14.0.0'
Although the warning is non-fatal, the build goes to shit from there. It
seems that setting the magical value `MACOSX_DEPLOYMENT_TARGET=10.9`
makes the build work and doesn't seem to have negative consequences.
The TMPDIR check implemented in a4556a73 incorrectly reports that
TMPDIR cannot hold executables on 4.3.11(1) on Ubuntu 14.04.1 LTS.
This is because a script containing no commands returns a non-zero
exit code. Contrast the following:
bash 3.2.53(1) on OS X 10.9.5:
$ bash -c '' && echo SUCCESS
SUCCESS
bash 4.3.11(1) on Ubuntu 14.04.1 LTS:
$ bash -c '' || echo FAIL
FAIL
This patch modifies the test script to explicitly call `exit 0` to
ensure that a successful exit code is returned if the script executes
successfully.
On Fedora, this results in a nice "Fedora 19" identifier and doesn't
show the codename "Schrödinger’s Cat" which is otherwise contained in
`/etc/fedora-release`.
On Arch, this shows "Arch Linux" where previously we had no info for it
(for some reason, `/etc/arch-release` is empty).
http://www.freedesktop.org/software/systemd/man/os-release.html
Stable releases should now be sorted as a higher version than preview
releases or RCs. For instance:
- 1.9.3-preview < 1.9.3-rc1 < 1.9.3-p0
- 2.1.0-dev < 2.1.0-rc1 < 2.1.0
- jruby-1.7.0-preview1 < jruby-1.7.0-rc1 < jruby-1.7.0
This detects when `/tmp` has been mounted with "noexec" mode and avoids
the cryptic error:
./configure: Permission denied
Hopefully the information provided will be enough for the user to know
that they have to change TMPDIR to another location.
It appears that regular `make` that ships on FreeBSD 10 is compatible
enough to build Rubies. This enables ruby-build on fresh FreeBSD
installs (which don't have `gmake` by default) without having to
explicitly set `MAKE=make`.
Since `./configure` executes in a bash subshell, it failing would
execute the ERR trap twice: once in a subshell and once in the main
process. An explicit `return 1` skips one of these ERR traps and fixes
double output.
I hope.
[image of I Have No Idea What I'm Doing dog]
The `-v` option for tar has been here since the beginning of ruby-build,
but it's not really informative to see a list of files in the log as the
list of files is guaranteed to be the same across machines since we do
checksums.
But don't assume that RUBY_BUILD_ROOT is where ruby-build's own files
reside, since RUBY_BUILD_ROOT can be overriden with alternate definition
files location.
Filenames in git diff patches are prefixed by default by "a/" (source)
and "b/" destination. Such patches don't work with ruby-builds `--patch`
option since it internally uses `patch -p0`.
Prior workarounds were to use either an intermediate step:
filterdiff --strip=1
or to generate the patch without the prefix in the first place:
git diff --no-prefix ...
Now, git diff patches are detected by searching for this pattern:
diff --git a/...
And `patch -p1` is used by default in such cases to strip the 1st
component of filename paths.
Fixes#521, closes#484
From patch(1):
-f or --force
Assume that the user knows exactly what he or she is doing, and do not
ask any questions. Skip patches whose headers do not say which file is
to be patched; patch files even though they have the wrong version for
the Prereq: line in the patch; and assume that patches are not reversed
even if they look like they are. This option does not suppress commen-
tary; use -s for that.
Fixes#555