Commit graph

285 commits

Author SHA1 Message Date
Mislav Marohnić
a8b23fac56 ruby-build 20140919 2014-09-19 09:04:50 -06:00
Erik Michaels-Ober
498062cd0d ruby-build 20140918 2014-09-18 12:40:13 +02:00
Mislav Marohnić
406d745f50 Peruse /etc/os-release among others when detecting system info
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
2014-09-08 22:58:05 -07:00
Mislav Marohnić
512910a675 ruby-build 20140908 2014-09-08 13:49:41 -07:00
Mislav Marohnić
0170728de9 Merge pull request #630 from sstephenson/freebsd-make
On FreeBSD 10, stop defaulting to MAKE=gmake
2014-09-08 13:38:01 -07:00
Mislav Marohnić
323c2b778b Sort Ruby versions when listing available definitions
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
2014-09-08 13:06:48 -07:00
Mislav Marohnić
a4556a7346 Verify that TMPDIR can hold executables before installing
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.
2014-09-08 10:43:57 -07:00
Mislav Marohnić
60a5abeb3d Fix stripping away non-digits from OS release number 2014-09-08 10:05:17 -07: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ć
4463320e81 Print OS information on build failure
This is useful info for when someone is pasting build output to our
issue tracker seeking support.
2014-09-06 02:20:39 -07:00
Mislav Marohnić
95964b17f1 Highlight output that mentions path to full build log
People often miss that and think that the last 10 lines of build output
is the only information they got.
2014-09-06 02:17:11 -07:00
Mislav Marohnić
17cb1ed6af Prevent "BUILD FAILED" appearing twice on ./configure error
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]
2014-09-06 01:29:28 -07:00
Mislav Marohnić
0bdd502ba8 Indicate ruby-build version number on build failures
This might save us from having to ask people which version they have
installed when they paste us build output from the console.
2014-09-06 01:23:17 -07:00
Mislav Marohnić
2f51dee3f0 Print configure options when openssl ext failed to compile
This helps to debug whether `--with-openssl-dir` was used properly.
2014-09-05 16:56:48 -07:00
Mislav Marohnić
1fa109ceb1 Don't log files as they're extracted from tarball
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.
2014-09-05 16:56:48 -07:00
Erik Michaels-Ober
7a17175fc9 ruby-build 20140905 2014-09-05 15:31:01 +02:00
Mislav Marohnić
e8e77e6028 Read ruby-build revision from git if available
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.
2014-08-25 17:54:33 -07:00
Mislav Marohnić
f118b173af Extra definitions paths via RUBY_BUILD_DEFINITIONS
This is a colon-separated list of directories that will get searched for
build definition in order from left to right.
2014-08-17 12:20:53 -07:00
Mislav Marohnić
ff75ca7204 Support changing RUBY_BUILD_ROOT
This is to allow specifying an alternate path where `share/ruby-build/*`
definitions reside. Useful in tests as well.
2014-08-17 12:20:53 -07:00
Erik Michaels-Ober
c819790848 ruby-build 20140702 2014-07-02 08:37:09 +02:00
Yamashita Yuu
07ef88d7c8 Surely update local git working copy 2014-06-07 01:27:49 +09:00
Yamashita Yuu
01e8767560 Fix fetch_git with --keep
Update existing git repo if exists, or clone if not exists.
The destination repo might exist if the `--keep` was supplied for `ruby-build`.
2014-06-07 01:27:49 +09:00
Mislav Marohnić
273be046b1 ruby-build 20140524 2014-05-24 22:41:15 +07:00
Mislav Marohnić
5dc9233199 Merge remote-tracking branch 'origin' into shasum 2014-05-23 14:40:48 +07:00
Thomas Johansen
b4154d11e8 Re-introduce legacy MD5 checksum verification based on checksum length
This is so any 3rd-party definitions continue to work even if they have
MD5 checksums embedded.
2014-05-23 14:39:41 +07:00
Thomas Johansen
fb5e2b1ae6 Replace MD5 commands with SHA2 equivalents
A more secure hashing algorithm makes it less feasible to serve up a
modified tarball that matches the same checksum.

See the discussion in #548
2014-05-23 14:34:37 +07:00
Mislav Marohnić
c79dcb379e Merge branch 'patch-galore' 2014-05-23 14:14:53 +07:00
SHIBATA Hiroshi
846cad88ee Revert "Merge pull request #535 from Fleurer/patch/1"
This reverts commit d45f145197, reversing
changes made to 13de51105b.
2014-05-12 10:15:53 +09:00
Erik Michaels-Ober
6da69089fb ruby-build 20140509 2014-05-09 01:15:24 +02:00
SHIBATA Hiroshi
d45f145197 Merge pull request #535 from Fleurer/patch/1
link the latest log to /tmp/ruby-build.latest.log
2014-05-06 18:17:23 +09:00
Chris Seaton
6953313c04 Make the downloading message print the actual file name, not just the package name plus .tar.gz. 2014-04-26 16:15:10 +01:00
Mislav Marohnić
210ceef8a3 More portable invocation of mktemp
`mktemp -t ruby-patch`, although working on OS X, fails on Travis CI
with the message "too few X's in template".

https://travis-ci.org/sstephenson/ruby-build/builds/23436088
2014-04-21 17:24:11 +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
Erik Michaels-Ober
5bce29be00 ruby-build 20140420 2014-04-20 10:24:23 +02:00
Erik Michaels-Ober
0a9b5e3a1e ruby-build 20140408 2014-04-08 13:56:12 +02:00
Mislav Marohnić
09a52d30c2 ruby-build 20140405 2014-04-05 22:02:06 +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
Li Yazhou
da2ae30bc1 link the latest ruby-build.$SEED.log and ruby-build.$SEED/ to ruby-build.latest.log and ruby-build.latest/ respectively 2014-03-27 12:28:22 +08:00
Mislav Marohnić
1bcd249ffa Avoid re-downloading if there's a valid tarball in build location
If there already exists a valid tarball in the build location, e.g. as
artefact of a previous install using `--keep`, don't re-download the
file, as there is no need.

References #487
2014-03-25 04:15:50 +01:00
Mislav Marohnić
a3009b4641 Fix re-downloading tarball when destination file already exists
Previously, curl and wget were instructed to try to resume the download
if the destination file already exists. This is supposed to be done via
the "Range" HTTP header, but doesn't work well with CloudFront:

    HTTP server doesn't seem to support byte ranges. Cannot resume.

CloudFront is supposed to support ranges, so I don't know what's going
on here. It might be failing only in case the existing file is a fully
downloaded tarball?

In any case, this disables resuming downloads and resorts to simply
re-downloading the tarball always, overwriting the existing file.

Fixes #487
2014-03-25 03:21:27 +01:00
Dan Poggi
7b62fcff58 Fixes check for user-specified definition
Better to use -f than -e to check for a user-specified definition file.
With -e, if the user accidentally types the name of a directory (or, far
less likely, a device file) with the same name as the Ruby they're
trying to install, they end up with ruby-build doing absolutely nothing
at best, or an error message that could be pretty confusing at worst.
2014-02-26 04:23:56 -05:00
Erik Michaels-Ober
9951b22bcb ruby-build 20140225 2014-02-26 11:06:40 +09:00
Chris Seaton
dcdccd76e4 Add support for JRuby 9000 bundled with the Graal VM
JRuby 9000 (the next major release) includes a backend that supports a
new JVM JIT compiler called Graal. Graal is based on OpenJDK but hasn't
been released yet.

http://openjdk.java.net/projects/graal/
2014-02-26 01:23:04 +01:00
Erik Michaels-Ober
7710db5777 ruby-build 20140224.1 2014-02-24 23:42:31 +09:00
Erik Michaels-Ober
089523b937 ruby-build 20140224 2014-02-24 20:23:44 +09: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
Erik Michaels-Ober
36cb25d2a0 ruby-build 20140214 💘 2014-02-14 09:49:06 +01:00
Mislav Marohnić
1c6251073d Use colorize helper for require_gcc
Ensures that color is off if the stderr stream is not a terminal
2014-02-10 20:12:21 +01:00