Permalink
Browse files

Verify MD5 checksums of tarballs downloaded with install_package

Checksums are optional and specified as anchors on package URLs.
  • Loading branch information...
1 parent a2e9412 commit ebed6000e8c74c75336f679f6adee792a2659a4d @sstephenson sstephenson committed Nov 15, 2012
Showing with 168 additions and 99 deletions.
  1. +78 −9 bin/ruby-build
  2. +2 −2 share/ruby-build/1.8.6-p383
  3. +2 −2 share/ruby-build/1.8.6-p420
  4. +2 −2 share/ruby-build/1.8.7-p249
  5. +2 −2 share/ruby-build/1.8.7-p302
  6. +2 −2 share/ruby-build/1.8.7-p334
  7. +2 −2 share/ruby-build/1.8.7-p352
  8. +2 −2 share/ruby-build/1.8.7-p357
  9. +2 −2 share/ruby-build/1.8.7-p358
  10. +2 −2 share/ruby-build/1.8.7-p370
  11. +3 −3 share/ruby-build/1.9.1-p378
  12. +3 −3 share/ruby-build/1.9.2-p180
  13. +3 −3 share/ruby-build/1.9.2-p290
  14. +3 −3 share/ruby-build/1.9.2-p318
  15. +3 −3 share/ruby-build/1.9.2-p320
  16. +1 −1 share/ruby-build/1.9.3-dev
  17. +3 −3 share/ruby-build/1.9.3-p0
  18. +3 −3 share/ruby-build/1.9.3-p125
  19. +2 −2 share/ruby-build/1.9.3-p194
  20. +2 −2 share/ruby-build/1.9.3-p286
  21. +2 −2 share/ruby-build/1.9.3-p327
  22. +3 −3 share/ruby-build/1.9.3-preview1
  23. +2 −2 share/ruby-build/1.9.3-rc1
  24. +1 −1 share/ruby-build/2.0.0-dev
  25. +2 −2 share/ruby-build/2.0.0-preview1
  26. +1 −1 share/ruby-build/jruby-1.5.6
  27. +1 −1 share/ruby-build/jruby-1.6.3
  28. +1 −1 share/ruby-build/jruby-1.6.4
  29. +1 −1 share/ruby-build/jruby-1.6.5
  30. +1 −1 share/ruby-build/jruby-1.6.5.1
  31. +1 −1 share/ruby-build/jruby-1.6.6
  32. +1 −1 share/ruby-build/jruby-1.6.7
  33. +1 −1 share/ruby-build/jruby-1.6.7.2
  34. +1 −1 share/ruby-build/jruby-1.6.8
  35. +1 −1 share/ruby-build/jruby-1.7.0
  36. +1 −1 share/ruby-build/jruby-1.7.0-preview1
  37. +1 −1 share/ruby-build/jruby-1.7.0-preview2
  38. +1 −1 share/ruby-build/jruby-1.7.0-rc1
  39. +1 −1 share/ruby-build/jruby-1.7.0-rc2
  40. +1 −1 share/ruby-build/maglev-1.0.0
  41. +2 −2 share/ruby-build/rbx-1.2.4
  42. +2 −2 share/ruby-build/rbx-2.0.0-rc1
  43. +2 −2 share/ruby-build/ree-1.8.6-2009.06
  44. +2 −2 share/ruby-build/ree-1.8.7-2009.09
  45. +2 −2 share/ruby-build/ree-1.8.7-2009.10
  46. +2 −2 share/ruby-build/ree-1.8.7-2010.01
  47. +2 −2 share/ruby-build/ree-1.8.7-2010.02
  48. +2 −2 share/ruby-build/ree-1.8.7-2011.03
  49. +2 −2 share/ruby-build/ree-1.8.7-2011.12
  50. +2 −2 share/ruby-build/ree-1.8.7-2012.01
  51. +1 −1 share/ruby-build/ree-1.8.7-2012.02
View
@@ -127,7 +127,45 @@ make_package() {
popd >&4
}
-fetch_url() {
+compute_md5() {
+ if type md5 &>/dev/null; then
+ md5 -q
+ elif type md5sum &>/dev/null; then
+ local output="$(md5sum -b)"
+ echo "${output% *}"
+ else
+ echo "error: please install \`md5sum\` and try again" >&2
+ exit 1
+ fi
+}
+
+verify_checksum() {
+ local filename="$1"
+ if [ ! -e "$filename" ]; then
+ return 1
+ fi
+
+ local expected_checksum="$2"
+ if [ -z "$expected_checksum" ]; then
+ return 0
+ fi
+
+ local computed_checksum="$(compute_md5 < "$filename")"
+ if [ -z "$computed_checksum" ]; then
+ return 1
+ fi
+
+ if [ "$expected_checksum" != "$computed_checksum" ]; then
+ { echo
+ echo "checksum mismatch: ${filename} (file is corrupt)"
+ echo "expected $expected_checksum, got $computed_checksum"
+ echo
+ } >&4
+ return 1
+ fi
+}
+
+retrieve_url() {
if type curl &>/dev/null; then
curl -f "$@"
elif type wget &>/dev/null; then
@@ -141,20 +179,51 @@ fetch_url() {
fetch_tarball() {
local package_name="$1"
local package_url="$2"
- local filename="${package_name}.tar.gz"
+ local checksum="${package_url#*\#}"
+ if [ -n "$checksum" ]; then
+ package_url="${package_url%%#*}"
+ fi
+
+ local package_filename="${package_name}.tar.gz"
+ symlink_tarball_from_cache "$package_filename" "$checksum" ||
+ download_tarball "$package_url" "$package_filename" "$checksum"
+
+ { tar xzvf "$package_filename"
+ rm -f "$package_filename"
+ } >&4 2>&1
+}
+
+symlink_tarball_from_cache() {
if [ -n "$RUBY_BUILD_CACHE_PATH" ]; then
- filename="${RUBY_BUILD_CACHE_PATH}/${filename}"
+ local package_filename="$1"
+ local cached_package_filename="${RUBY_BUILD_CACHE_PATH}/$package_filename"
+ local checksum="$2"
+
+ if verify_checksum "$cached_package_filename" "$checksum"; then
+ ln -s "$cached_package_filename" "$package_filename" >&4 2>&1
+ return 0
+ fi
fi
+ return 1
+}
- if [ ! -e "$filename" ]; then
- echo "Downloading ${package_url}..." >&2
- { fetch_url "$package_url" > "${package_name}.tar.gz"
- [ -z "$RUBY_BUILD_CACHE_PATH" ] || mv "${package_name}.tar.gz" "$filename"
+download_tarball() {
+ local package_url="$1"
+ local package_filename="$2"
+ local checksum="$3"
+
+ echo "Downloading ${package_url}..." >&2
+ { retrieve_url "$package_url" > "$package_filename"
+ verify_checksum "$package_filename" "$checksum"
+ } >&4 2>&1
+
+ if [ -n "$RUBY_BUILD_CACHE_PATH" ]; then
+ local cached_package_filename="${RUBY_BUILD_CACHE_PATH}/$package_filename"
+ { mv "$package_filename" "$cached_package_filename"
+ ln -s "$cached_package_filename" "$package_filename"
} >&4 2>&1
fi
-
- tar xzvf "$filename" >&4 2>&1
}
fetch_git() {
@@ -1,3 +1,3 @@
require_gcc
-install_package "ruby-1.8.6-p383" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p383.tar.gz"
-install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz" ruby
+install_package "ruby-1.8.6-p383" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p383.tar.gz#4f49544d4a4d0d34e9d86c41e853db2e"
+install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby
@@ -1,3 +1,3 @@
require_gcc
-install_package "ruby-1.8.6-p420" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p420.tar.gz"
-install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz" ruby
+install_package "ruby-1.8.6-p420" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p420.tar.gz#ca1eee44f842e93b5098bc5a2bb9a40b"
+install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby
@@ -1,3 +1,3 @@
require_gcc
-install_package "ruby-1.8.7-p249" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p249.tar.gz"
-install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby
+install_package "ruby-1.8.7-p249" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p249.tar.gz#d7db7763cffad279952eb7e9bbfc221c"
+install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
@@ -1,3 +1,3 @@
require_gcc
-install_package "ruby-1.8.7-p302" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p302.tar.gz"
-install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby
+install_package "ruby-1.8.7-p302" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p302.tar.gz#f446550dfde0d8162a6ed8d5a38b3ac2"
+install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
@@ -1,3 +1,3 @@
require_gcc
-install_package "ruby-1.8.7-p334" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz"
-install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby
+install_package "ruby-1.8.7-p334" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz#aacb6ee5dfe2367682bba56af7f415b8"
+install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
@@ -1,3 +1,3 @@
require_gcc
-install_package "ruby-1.8.7-p352" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p352.tar.gz"
-install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby
+install_package "ruby-1.8.7-p352" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p352.tar.gz#0c33f663a10a540ea65677bb755e57a7"
+install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
@@ -1,3 +1,3 @@
require_gcc
-install_package "ruby-1.8.7-p357" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p357.tar.gz"
-install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby
+install_package "ruby-1.8.7-p357" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p357.tar.gz#b2b8248ff5097cfd629f5b9768d1df82"
+install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
@@ -1,3 +1,3 @@
require_gcc
-install_package "ruby-1.8.7-p358" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.gz"
-install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby
+install_package "ruby-1.8.7-p358" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.gz#26bd55358847459a7752acdbd33a535f"
+install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
@@ -1,3 +1,3 @@
require_gcc
-install_package "ruby-1.8.7-p370" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p370.tar.gz"
-install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby
+install_package "ruby-1.8.7-p370" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p370.tar.gz#98b00bbd1cdde3116155edb6e555b781"
+install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
@@ -1,4 +1,4 @@
require_gcc
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.1-p378" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p378.tar.gz"
-install_package "rubygems-1.3.5" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.5.tgz" ruby
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.1-p378" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p378.tar.gz#9fc5941bda150ac0a33b299e1e53654c"
+install_package "rubygems-1.3.5" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.5.tgz#6e317335898e73beab15623cdd5f8cff" ruby
@@ -1,4 +1,4 @@
require_gcc
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.2-p180" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz"
-install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz" ruby
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.2-p180" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz#0d6953820c9918820dd916e79f4bfde8"
+install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
@@ -1,4 +1,4 @@
require_gcc
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.2-p290" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz"
-install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz" ruby
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.2-p290" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz#604da71839a6ae02b5b5b5e1b792d5eb"
+install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
@@ -1,4 +1,4 @@
require_gcc
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.2-p318" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p318.tar.gz"
-install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz" ruby
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.2-p318" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p318.tar.gz#cc7bf1025128e1985882ae243f348802"
+install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
@@ -1,4 +1,4 @@
require_gcc
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.2-p320" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p320.tar.gz"
-install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz" ruby
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.2-p320" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p320.tar.gz#5ef5d9c07af207710bd9c2ad1cef4b42"
+install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
@@ -1,2 +1,2 @@
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_git "ruby-1.9.3-dev" "https://github.com/ruby/ruby.git" "ruby_1_9_3" autoconf standard
@@ -1,4 +1,4 @@
require_gcc
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.3-p0" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz"
-install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz" ruby
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.3-p0" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz#8e2fef56185cfbaf29d0c8329fc77c05"
+install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
@@ -1,4 +1,4 @@
[ -n "$CC" ] || export CC=cc
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.3-p125" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz"
-install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz" ruby
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.3-p125" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz#e3ea86b9d3fc2d3ec867f66969ae3b92"
+install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
@@ -1,2 +1,2 @@
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.3-p194" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz"
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.3-p194" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz#bc0c715c69da4d1d8bd57069c19f6c0e"
@@ -1,2 +1,2 @@
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.3-p286" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz"
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.3-p286" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz#e2469b55c2a3d0d643097d47fe4984bb"
@@ -1,2 +1,2 @@
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.3-p327" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz"
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.3-p327" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz#96118e856b502b5d7b3a4398e6c6e98c#96118e856b502b5d7b3a4398e6c6e98c"
@@ -1,4 +1,4 @@
require_gcc
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.3-preview1" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-preview1.tar.gz"
-install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz" ruby
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.3-preview1" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-preview1.tar.gz#0f0220be4cc7c51a82c1bd8f6a0969f3"
+install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
@@ -1,3 +1,3 @@
require_gcc
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-1.9.3-rc1" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-rc1.tar.gz"
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-1.9.3-rc1" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-rc1.tar.gz#46a2a481536ca0ca0b80ad2b091df68e"
@@ -1,2 +1,2 @@
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_git "ruby-2.0.0-dev" "https://github.com/ruby/ruby.git" "trunk" autoconf standard
@@ -1,2 +1,2 @@
-install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
-install_package "ruby-2.0.0-preview1" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-preview1.tar.gz"
+install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
+install_package "ruby-2.0.0-preview1" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-preview1.tar.gz#c7d73f3ddb6d25e7733626ddbad04158"
@@ -1 +1 @@
-install_package "jruby-1.5.6" "http://jruby.org.s3.amazonaws.com/downloads/1.5.6/jruby-bin-1.5.6.tar.gz" jruby
+install_package "jruby-1.5.6" "http://jruby.org.s3.amazonaws.com/downloads/1.5.6/jruby-bin-1.5.6.tar.gz#94033a36517645b7a7ec781a3507c654" jruby
@@ -1 +1 @@
-install_package "jruby-1.6.3" "http://jruby.org.s3.amazonaws.com/downloads/1.6.3/jruby-bin-1.6.3.tar.gz" jruby
+install_package "jruby-1.6.3" "http://jruby.org.s3.amazonaws.com/downloads/1.6.3/jruby-bin-1.6.3.tar.gz#694b80e4eea784cdc1eb39fb1e3132c9" jruby
@@ -1 +1 @@
-install_package "jruby-1.6.4" "http://jruby.org.s3.amazonaws.com/downloads/1.6.4/jruby-bin-1.6.4.tar.gz" jruby
+install_package "jruby-1.6.4" "http://jruby.org.s3.amazonaws.com/downloads/1.6.4/jruby-bin-1.6.4.tar.gz#0e96b6f4d1c6f12b5ac480cd7ab7da78" jruby
@@ -1 +1 @@
-install_package "jruby-1.6.5" "http://jruby.org.s3.amazonaws.com/downloads/1.6.5/jruby-bin-1.6.5.tar.gz" jruby
+install_package "jruby-1.6.5" "http://jruby.org.s3.amazonaws.com/downloads/1.6.5/jruby-bin-1.6.5.tar.gz#54354082673bd115f945890dc6864413" jruby
@@ -1 +1 @@
-install_package "jruby-1.6.5.1" "http://jruby.org.s3.amazonaws.com/downloads/1.6.5.1/jruby-bin-1.6.5.1.tar.gz" jruby
+install_package "jruby-1.6.5.1" "http://jruby.org.s3.amazonaws.com/downloads/1.6.5.1/jruby-bin-1.6.5.1.tar.gz#246a7aa2b7d7e6e9e8a0c2e282cbcfd0" jruby
@@ -1 +1 @@
-install_package "jruby-1.6.6" "http://jruby.org.s3.amazonaws.com/downloads/1.6.6/jruby-bin-1.6.6.tar.gz" jruby
+install_package "jruby-1.6.6" "http://jruby.org.s3.amazonaws.com/downloads/1.6.6/jruby-bin-1.6.6.tar.gz#78b1dcaf198e79f98b37cf09c362a956" jruby
@@ -1 +1 @@
-install_package "jruby-1.6.7" "http://jruby.org.s3.amazonaws.com/downloads/1.6.7/jruby-bin-1.6.7.tar.gz" jruby
+install_package "jruby-1.6.7" "http://jruby.org.s3.amazonaws.com/downloads/1.6.7/jruby-bin-1.6.7.tar.gz#fd1b8d7389aa92da69ea6efb4782e40a" jruby
@@ -1 +1 @@
-install_package "jruby-1.6.7.2" "http://jruby.org.s3.amazonaws.com/downloads/1.6.7.2/jruby-bin-1.6.7.2.tar.gz" jruby
+install_package "jruby-1.6.7.2" "http://jruby.org.s3.amazonaws.com/downloads/1.6.7.2/jruby-bin-1.6.7.2.tar.gz#1e520f1b5130114464e5f1950cb24774" jruby
@@ -1 +1 @@
-install_package "jruby-1.6.8" "http://jruby.org.s3.amazonaws.com/downloads/1.6.8/jruby-bin-1.6.8.tar.gz" jruby
+install_package "jruby-1.6.8" "http://jruby.org.s3.amazonaws.com/downloads/1.6.8/jruby-bin-1.6.8.tar.gz#a76ac5845640e4a1ebdfa74421efc935" jruby
@@ -1 +1 @@
-install_package "jruby-1.7.0" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0/jruby-bin-1.7.0.tar.gz" jruby
+install_package "jruby-1.7.0" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0/jruby-bin-1.7.0.tar.gz#21861e0ecdbf48cda713c8ade82fdddb" jruby
@@ -1 +1 @@
-install_package "jruby-1.7.0.preview1" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0.preview1/jruby-bin-1.7.0.preview1.tar.gz" jruby
+install_package "jruby-1.7.0.preview1" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0.preview1/jruby-bin-1.7.0.preview1.tar.gz#7b9e5e1cd0d818d0199086d948f948b4" jruby
@@ -1 +1 @@
-install_package "jruby-1.7.0.preview2" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0.preview2/jruby-bin-1.7.0.preview2.tar.gz" jruby
+install_package "jruby-1.7.0.preview2" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0.preview2/jruby-bin-1.7.0.preview2.tar.gz#e8f1623759590aadbf49e4cc53f1cb61" jruby
@@ -1 +1 @@
-install_package "jruby-1.7.0.RC1" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0.RC1/jruby-bin-1.7.0.RC1.tar.gz" jruby
+install_package "jruby-1.7.0.RC1" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0.RC1/jruby-bin-1.7.0.RC1.tar.gz#bdddcee3d126cddd9a85b5a066a7e25e" jruby
@@ -1 +1 @@
-install_package "jruby-1.7.0.RC2" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0.RC2/jruby-bin-1.7.0.RC2.tar.gz" jruby
+install_package "jruby-1.7.0.RC2" "http://jruby.org.s3.amazonaws.com/downloads/1.7.0.RC2/jruby-bin-1.7.0.RC2.tar.gz#ffe2dd61711f4574fed344af151e5de5" jruby
@@ -1 +1 @@
-install_package "MagLev-1.0.0" "http://glass-downloads.gemstone.com/maglev/MagLev-1.0.0.tar.gz" maglev
+install_package "MagLev-1.0.0" "http://glass-downloads.gemstone.com/maglev/MagLev-1.0.0.tar.gz#e02cb8ee04438451eb78df14f91a68a9" maglev
Oops, something went wrong.

5 comments on commit ebed600

Too bad it's a breaking change for all previous recipes released in the wild (and there are quite a few) https://www.google.fr/#q=install_package++ruby-build+-sstephenson&oq=install_package+ruby-build+-sstephenson )

Collaborator

jeremy replied Nov 16, 2012

@octplane are you speculating, or did you hit a bug? checksums are optional

@jeremy I hit the bug ( https://gist.github.com/3228523/6420b0b85166d4f44636d157affde77830b8eaa0 fails. while https://gist.github.com/3228523/6f6a31d2f033f3ad4ae4b5d0ae8519cde811a14c doesn't , for example).

It says:

checksum mismatch: yaml-0.1.4.tar.gz (file is corrupt)
expected http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz, got 36c852831d02cf90508c29852361d01b
Collaborator

sstephenson replied Nov 16, 2012

Thanks @octplane. Fixed in 86f9cb7.

My pleasure :-)

Please sign in to comment.