Commit graph

36 commits

Author SHA1 Message Date
Mislav Marohnić
19a59f42cc Ignore RUBY_CONFIGURE_OPTS from environment in testing
Avoids failures caused by somebody's environment possibly having
RUBY_CONFIGURE_OPTS exported to have a value.
2014-11-16 16:07:39 -08:00
Mislav Marohnić
e8a97b10f6 Fix the test suite on Darwin
Setting CC makes sure that we never have to perform the Darwin-specific
check for whether we should default to `CC=clang` and thus break `uname`
stubs in unrelated tests.

CI never caught this because Travis already has CC set to gcc-4.6.
2014-10-31 04:13:57 +01:00
Mislav Marohnić
f104098909 Fix rbx-1.2.4 setup phase
Rubinius back then didn't have a Gemfile, so don't try to invoke `bundle`.
Instead, rely on the host Ruby to already have rake installed.
2014-10-28 15:41:09 +01:00
Mislav Marohnić
0e58079d66 On FreeBSD, stop defaulting to MAKE=gmake
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`.
2014-09-08 09:52:15 -07:00
Mislav Marohnić
f4c2fe67e3 Fix detecting of CPU cores on FreeBSD
On FreeBSD, use the same approach as OS X with `sysctl`.
2014-09-08 09:11:39 -07:00
Mislav Marohnić
1786cf75d2 Fix patch passed via stdin in tests
[picture of I Have No Idea What I'm Doing dog]

https://travis-ci.org/sstephenson/ruby-build/builds/23435342
2014-04-21 17:12:06 +02:00
Mislav Marohnić
c76cde673e Make --patch compatible with git diff patches
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
2014-04-21 16:01:06 +02:00
Mislav Marohnić
74b21936a1 Use patch --force to ignore missing files when patching
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
2014-04-21 15:32:34 +02:00
Mislav Marohnić
a4c3dbc573 Avoid sed with extended regexp
Seems like sed 4.1.5 on RHEL 5.3 doesn't support `-E`, and sed on OS X doesn't
support `-r` to activate the extended regexp mode. Best to avoid extended regexp
altogether for compatibility.

Fixes #495
2014-04-05 21:29:38 +02:00
Mislav Marohnić
f44d7ba8c6 Add test for Rubinius gem binstubs fix
References #433
2014-04-05 21:24:46 +02:00
Jose Luis Salas
53920b0fe1 Update libyaml to 0.1.6
Security fix for CVE-2014-2525

Advisory: http://www.ocert.org/advisories/ocert-2014-003.html
2014-03-26 21:17:10 +01:00
Mislav Marohnić
ea481d2766 Add test for JRuby+Graal 2014-02-26 01:23:25 +01:00
Colin Mattson
060f50fcd8 Improve Java 7 detection
Java on most (all?) platforms directs `-version` output to STDERR.
2014-02-17 19:44:49 -07:00
Mislav Marohnić
047953e125 Simplify Java 7 detection and error message 2014-02-10 20:11:22 +01:00
Erik Michaels-Ober
63fc2c91b0 Update libyaml to version 0.1.5
Closes https://github.com/sstephenson/ruby-build/issues/499.
2014-02-04 11:51:46 +01:00
Eric Lindvall
37c9a0465d Add test for MAKE_INSTALL_OPTS
Also fix the ordering of make install arguments
2014-01-22 11:55:01 -08:00
Eric Lindvall
52b275680f Add tests for RUBY_MAKE_INSTALL_OPTS= 2014-01-21 18:23:56 -08:00
Mislav Marohnić
9effc7a670 Thorougly test JRuby install process 2013-12-21 02:09:56 +01:00
Mislav Marohnić
8ebfd1d0a9 Merge branch 'apply-patch'
Closes #469
2013-12-20 19:07:34 +01:00
Mislav Marohnić
94c15a54f0 Auto-detect and link to Homebrew's readline
I thought this was not necessary, but a number of people had problems
when linking to OS X's "readline" (actually Editline wrapper):

- Some components of Pry wouldn't work
- Writing literal Unicode characters was not possible #379
- The compilation would downright fail in some cases #82 #461

Fixes #461
2013-12-12 00:03:47 +01:00
Mislav Marohnić
4351c46923 Add --patch flag to apply a Ruby patch from stdin
If `-p|--patch` flag was set while invoking `ruby-build` or
`rbenv install`, ruby-build will use `patch -p0 -i -` to apply a patch
from stdin to Ruby, Rubinius, or JRuby source code before running the
rest of `build_package_*` commands.

References #443
2013-12-11 21:16:47 +01:00
Mislav Marohnić
2fa587bcfe Fix installing Rubinius 2.0 with Ruby 1.8
Fixes #429, references rubinius/rubinius#2693
2013-11-22 14:23:44 +01:00
Mislav Marohnić
bc9adfdd5d Demonstrate that one can use RUBY_CONFIGURE to apply a patch
References #443
2013-10-30 13:05:49 +01:00
Mislav Marohnić
8b6616b8a7 Install the Rubinius bundle in isolation
Makes sure that installing Rubinius won't touch other gems outside the
build directory.
2013-10-29 14:13:34 +01:00
Mislav Marohnić
00fcf8b504 Bash here-document doesn't work with non-executable TMPDIR
Fixes https://travis-ci.org/sstephenson/ruby-build/builds/13131225
2013-10-28 00:55:35 +01:00
Mislav Marohnić
d9cd8a1ae3 Abort early if TMPDIR is non-writable or non-executable
Fixes #148
2013-10-28 00:44:15 +01:00
Mislav Marohnić
6c08c56d3a Detect number of CPU cores used for make
Alt. implementation of #401, #434
2013-10-27 22:24:12 +01:00
Mislav Marohnić
51000d5e56 Add test for automatic fetching of rake gem 2013-10-26 18:28:53 +02:00
Mislav Marohnić
a6847fdd62 Reduce boilerplate in tests 2013-10-26 17:49:43 +02:00
Mislav Marohnić
9aab127f75 Install Rake and Bundler in isolation when missing
Some Rubies need Rake or Bundler for the installation process. However,
since the host Ruby version might not have those gems installed, install
them in a temporary GEM_HOME and add their executables to PATH.

Fixes #426
2013-10-26 17:39:55 +02:00
Mislav Marohnić
730a8164d5 Use rake from the current bundle for Rubinius
Rake might not be available on the system, but if there is a Gemfile,
assume that it bundles rake.
2013-10-26 15:48:25 +02:00
Mislav Marohnić
f27c561388 Recursive copying fixes and tests
Use the `cp -f` flag to force unlinking non-writable files.

Closes #384
2013-10-26 08:20:44 +02:00
Mislav Marohnić
da840a82a1 Add test for FreeBSD gmake
Closes #293
2013-10-26 05:47:39 +02:00
Mislav Marohnić
b37427b688 Support relative path as install prefix
Fixes #110
2013-10-26 05:24:25 +02:00
Mislav Marohnić
dc054d30bf Simplify fetching tarballs in build tests
- use cache path feature to skip HTTP fetch atogether
- unified build.log
2013-10-26 05:08:19 +02:00
Mislav Marohnić
c7851c5123 Add tests for Homebrew libyaml integration 2013-10-25 04:17:53 +02:00