diff --git a/CHANGELOG.md b/CHANGELOG.md index ef2790e..0b7b2fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## Version 20150130-next + + * Added additonal native extension versions: + - bcrypt 3.1.10 + - eventmachine 1.0.6 + - json 1.8.2 + - mini_portile 0.6.2 + - nokogiri 1.6.6.2 + - sqlite3 1.3.10 + - nokogumbo 1.2.0 + - rugged 0.22.0b5 + ## Version 20150130 Upgrading to this version is strongly recommended because of the OpenSSL upgrade, which fixes some security vulnerabilities! diff --git a/VERSION.txt b/VERSION.txt index 48c859a..41ab540 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20150130 +20150130-next diff --git a/linux/build b/linux/build index 044f7c2..1c36978 100755 --- a/linux/build +++ b/linux/build @@ -11,7 +11,7 @@ RUNTIME_DIR= OUTPUT_DIR= ARCHITECTURE= CONCURRENCY=$CPUCOUNT -GEMFILE="$SELFDIR/../shared/Gemfile" +GEMFILE="$SELFDIR/../shared/gemfiles" SETUP_SOURCE=true COMPILE=true SANITY_CHECK_OUTPUT=true @@ -101,9 +101,20 @@ if [[ ! -e "$RUNTIME_DIR/mock" ]]; then fi if [[ "$GEMFILE" != "" ]]; then GEMFILE="`absolute_path \"$GEMFILE\"`" - GEMFILE_MOUNT=(-v "$GEMFILE:/Gemfile:ro") - if [[ -e "$GEMFILE.lock" ]]; then - GEMFILE_MOUNT+=(-v "$GEMFILE.lock:/Gemfile.lock:ro") + if [[ -d "$GEMFILE" ]]; then + for F in "$GEMFILE"/*/Gemfile; do + DIR="`dirname \"$F\"`" + DIR="`basename \"$DIR\"`" + GEMFILE_MOUNT+=(-v "$F:/gemfiles/$DIR/Gemfile:ro") + if [[ -e "$F.lock" ]]; then + GEMFILE_MOUNT+=(-v "$F.lock:/gemfiles/$DIR/Gemfile.lock:ro") + fi + done + else + GEMFILE_MOUNT=(-v "$GEMFILE:/gemfiles/Gemfile:ro") + if [[ -e "$GEMFILE.lock" ]]; then + GEMFILE_MOUNT+=(-v "$GEMFILE.lock:/gemfiles/Gemfile.lock:ro") + fi fi fi diff --git a/linux/internal/build b/linux/internal/build index 0abdfb2..6e9f5cd 100755 --- a/linux/internal/build +++ b/linux/internal/build @@ -12,12 +12,9 @@ ROOT=/var/lib/mock/$CHROOT_NAME/root run rm -rf $ROOT/system $ROOT/output run mkdir $ROOT/system $ROOT/output run cp /system/* $ROOT/system/ -run cp /system_shared/* $ROOT/system/ -if [[ -e /Gemfile ]]; then - run cp /Gemfile $ROOT/system/ -fi -if [[ -e /Gemfile.lock ]]; then - run cp /Gemfile.lock $ROOT/system/ +run cp -R /system_shared/* $ROOT/system/ +if [[ -e /gemfiles ]]; then + run cp -R /gemfiles $ROOT/system/ fi echo "Dumping parameters" echo $ARCHITECTURE > $ROOT/system/NAME diff --git a/linux/internal/build-inside-mock b/linux/internal/build-inside-mock index c8743ab..7cf7d92 100755 --- a/linux/internal/build-inside-mock +++ b/linux/internal/build-inside-mock @@ -172,15 +172,21 @@ echo $GEM_EXTENSION_API_VERSION > /tmp/ruby/info/GEM_EXTENSION_API_VERSION # removing explicitly gems. run rm -rf /tmp/ruby/lib/ruby/gems/$RUBY_COMPAT_VERSION/gems/{test-unit,rdoc}-* -if [[ -e /system/Gemfile ]]; then +if [[ -e /system/gemfiles ]]; then run /tmp/ruby/bin/gem install bundler -v $BUNDLER_VERSION --no-rdoc --no-ri - run cp /system/Gemfile* /tmp/ruby - echo "+ Entering /tmp/ruby" - pushd /tmp/ruby >/dev/null - run /tmp/ruby/bin/bundle install --system --retry 3 - run rm Gemfile* - echo "+ Leaving /tmp/ruby" - popd >/dev/null + + for GEMFILE in /system/gemfiles/*/Gemfile; do + run cp "$GEMFILE" /tmp/ruby/ + if [[ -e "$GEMFILE.lock" ]]; then + run cp "$GEMFILE.lock" /tmp/ruby/ + fi + echo "+ Entering /tmp/ruby" + pushd /tmp/ruby >/dev/null + run /tmp/ruby/bin/bundle install --system --retry 3 + run rm Gemfile* + echo "+ Leaving /tmp/ruby" + popd >/dev/null + done fi # Strip binaries and remove unnecessary files. diff --git a/linux/internal/setup-runtime b/linux/internal/setup-runtime index 490609a..5e78ff4 100755 --- a/linux/internal/setup-runtime +++ b/linux/internal/setup-runtime @@ -50,7 +50,7 @@ header "Installing additional software inside chroot" run rm -rf /var/lib/mock/$CHROOT_NAME/root/system run mkdir /var/lib/mock/$CHROOT_NAME/root/system run cp /system/* /var/lib/mock/$CHROOT_NAME/root/system/ -run cp /system_shared/* /var/lib/mock/$CHROOT_NAME/root/system/ +run cp -R /system_shared/* /var/lib/mock/$CHROOT_NAME/root/system/ echo $ARCHITECTURE > /var/lib/mock/$CHROOT_NAME/root/system/ARCHITECTURE run /system/setuser app /usr/bin/mock -r $CHROOT_NAME --shell /system/setup-runtime-inside-mock run rm -rf /var/lib/mock/$CHROOT_NAME/root/system diff --git a/linux/internal/setup-runtime-inside-mock b/linux/internal/setup-runtime-inside-mock index f4d0a1d..51919a7 100755 --- a/linux/internal/setup-runtime-inside-mock +++ b/linux/internal/setup-runtime-inside-mock @@ -109,6 +109,7 @@ if [[ ! -e /usr/local/override/lib/libffi.so.6 ]]; then fi echo +header "Installing SQLite3" if [[ ! -e /usr/local/override/lib/libsqlite3.a ]]; then download_and_extract sqlite-autoconf-$SQLITE3_VERSION.tar.gz \ http://www.sqlite.org/2014/sqlite-autoconf-$SQLITE3_VERSION.tar.gz diff --git a/osx/build b/osx/build index 1f0677b..40c9e46 100755 --- a/osx/build +++ b/osx/build @@ -9,11 +9,12 @@ BUNDLER_VERSION=`cat "$SELFDIR/../BUNDLER_VERSION.txt"` WORKDIR= OWNS_WORKDIR=true +GEMFILES=() RUNTIME_DIR= OUTPUT_DIR= CONCURRENCY=4 -GEMFILE="$SELFDIR/../shared/Gemfile" +GEMFILE="$SELFDIR/../shared/gemfiles" SETUP_SOURCE=true COMPILE=true @@ -176,6 +177,11 @@ else fi if [[ "$GEMFILE" != "" ]]; then GEMFILE="`absolute_path \"$GEMFILE\"`" + if [[ -d "$GEMFILE" ]]; then + GEMFILES=("$GEMFILE"/*/Gemfile) + else + GEMFILES=("$GEMFILE") + fi fi if [[ -e ~/.bundle/config ]]; then echo "ERROR: ~/.bundle/config detected. Global Bundler configuration" \ @@ -275,9 +281,31 @@ if [[ "$GEMFILE" != "" ]]; then run /tmp/ruby/bin/gem install "$RUNTIME_DIR/vendor/cache/bundler-$BUNDLER_VERSION.gem" --no-rdoc --no-ri else run /tmp/ruby/bin/gem install bundler -v $BUNDLER_VERSION --no-rdoc --no-ri + run mkdir -p "$RUNTIME_DIR/vendor/cache" + run cp /tmp/ruby/lib/ruby/gems/$RUBY_COMPAT_VERSION/cache/bundler-$BUNDLER_VERSION.gem "$RUNTIME_DIR/vendor/cache/" fi # Run bundle install. + for GEMFILE in "${GEMFILES[@]}"; do + run cp "$GEMFILE" /tmp/ruby/ + if [[ -e "$GEMFILE.lock" ]]; then + run cp "$GEMFILE.lock" /tmp/ruby/ + fi + echo "+ Entering /tmp/ruby" + pushd /tmp/ruby >/dev/null + run /tmp/ruby/bin/bundle config --local build.nokogiri "" + run /tmp/ruby/bin/bundle config --local build.mysql2 "--with-mysql_config" + run /tmp/ruby/bin/bundle config --local build.charlock_holmes "--with-icu-dir=$RUNTIME_DIR" + run /tmp/ruby/bin/bundle install --system --retry 3 + run /tmp/ruby/bin/bundle package + run rm -rf "$RUNTIME_DIR/vendor" + run mv vendor "$RUNTIME_DIR/" + + run rm -rf Gemfile* .bundle + echo "+ Leaving /tmp/ruby" + popd >/dev/null + done + run cp "$GEMFILE" /tmp/ruby/ if [[ -e "$GEMFILE.lock" ]]; then run cp "$GEMFILE.lock" /tmp/ruby/ diff --git a/osx/setup-runtime b/osx/setup-runtime index 07c9967..eda5ee6 100755 --- a/osx/setup-runtime +++ b/osx/setup-runtime @@ -248,7 +248,8 @@ elif [[ ! -e "$RUNTIME_DIR/bin/cmake" ]] || $FORCE_CMAKE; then run ./configure --prefix="$RUNTIME_DIR" --no-qt-gui --parallel=$CONCURRENCY run make -j$CONCURRENCY run make install - echo "Entering $RUNTIME_DIR" + + echo "Leaving source directory" popd >/dev/null run rm -rf cmake-$CMAKE_VERSION else @@ -293,7 +294,8 @@ elif [[ ! -e "$RUNTIME_DIR/bin/openssl" ]] || $FORCE_OPENSSL; then # on the Makefile which invoked setup-runtime could somehow pass the -j2 to sub-makes. run make -j1 run make install_sw - echo "Entering $RUNTIME_DIR" + + echo "Leaving source directory" popd >/dev/null run rm -rf openssl-$OPENSSL_VERSION @@ -331,7 +333,8 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libncurses.5.dylib" ]] || $FORCE_NCURSES; then --without-develop run make -j$CONCURRENCY run make install - echo "Entering $RUNTIME_DIR" + + echo "Leaving source directory" popd >/dev/null run rm -rf ncurses-$NCURSES_VERSION @@ -362,7 +365,8 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libedit.0.dylib" ]] || $FORCE_LIBEDIT; then run ./configure --prefix="$RUNTIME_DIR" --disable-static --enable-widec run make -j$CONCURRENCY run make install-strip - echo "Entering $RUNTIME_DIR" + + echo "Leaving source directory" popd >/dev/null run rm -rf libedit-$LIBEDIT_DIR_VERSION @@ -390,7 +394,8 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libgmp.10.dylib" ]] || $FORCE_GMP; then run ./configure --prefix="$RUNTIME_DIR" --disable-static --without-readline run make -j$CONCURRENCY run make install-strip - echo "Entering $RUNTIME_DIR" + + echo "Leaving source directory" popd >/dev/null run rm -rf gmp-$GMP_DIR_VERSION @@ -416,7 +421,8 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libffi.6.dylib" ]] || $FORCE_LIBFFI; then ./configure --prefix="$RUNTIME_DIR" --disable-static --enable-portable-binary run make -j$CONCURRENCY run make install-strip - echo "Entering $RUNTIME_DIR" + + echo "Leaving source directory" popd >/dev/null run rm -rf libffi-$LIBFFI_VERSION @@ -439,7 +445,8 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libyaml-0.2.dylib" ]] || $FORCE_LIBYAML; then run ./configure --prefix="$RUNTIME_DIR" --disable-static run make -j$CONCURRENCY run make install-strip - echo "Entering $RUNTIME_DIR" + + echo "Leaving source directory" popd >/dev/null run rm -rf yaml-$LIBYAML_VERSION @@ -486,7 +493,7 @@ elif [[ ! -e "$RUNTIME_DIR/lib/liblzma.5.dylib" ]] || $FORCE_LIBLZMA; then run make -j$CONCURRENCY run make install-strip - echo "Entering $RUNTIME_DIR" + echo "Leaving source directory" popd >/dev/null run rm -rf xz-$XZ_VERSION @@ -521,7 +528,7 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libmysqlclient.a" ]] || $FORCE_MYSQL; then run make -C include install run make -C scripts install - echo "Entering $RUNTIME_DIR" + echo "Leaving source directory" popd >/dev/null run rm -rf mysql-connector-c-$MYSQL_LIB_VERSION-src else @@ -548,7 +555,7 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libpq.a" ]] || $FORCE_POSTGRESQL; then run make -j$CONCURRENCY -C src/bin/pg_config run make -C src/bin/pg_config install-strip - echo "Entering $RUNTIME_DIR" + echo "Leaving source directory" popd >/dev/null run rm -rf postgresql-$POSTGRESQL_VERSION diff --git a/shared/gemfiles/20150130-next-default/Gemfile b/shared/gemfiles/20150130-next-default/Gemfile new file mode 100644 index 0000000..3971b20 --- /dev/null +++ b/shared/gemfiles/20150130-next-default/Gemfile @@ -0,0 +1,19 @@ +#source 'http://production.cf.rubygems.org/' +source 'https://rubygems.org' + +gem 'nokogiri' +gem 'sqlite3' +gem 'mysql2' +gem 'json' +gem 'ffi' +gem 'bcrypt' +gem 'yajl-ruby' +gem 'thin' +gem 'RedCloth' +gem 'escape_utils' +gem 'posix-spawn' +gem 'nokogumbo' +gem 'github-markdown' +gem 'rugged' +gem 'charlock_holmes' +gem 'unf_ext' diff --git a/shared/gemfiles/20150130-next-default/Gemfile.lock b/shared/gemfiles/20150130-next-default/Gemfile.lock new file mode 100644 index 0000000..890f9a6 --- /dev/null +++ b/shared/gemfiles/20150130-next-default/Gemfile.lock @@ -0,0 +1,49 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.2.9) + bcrypt (3.1.10) + charlock_holmes (0.7.3) + daemons (1.1.9) + escape_utils (1.0.1) + eventmachine (1.0.6) + ffi (1.9.6) + github-markdown (0.6.8) + json (1.8.2) + mini_portile (0.6.2) + mysql2 (0.3.17) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + nokogumbo (1.3.0) + nokogiri + posix-spawn (0.3.9) + rack (1.6.0) + rugged (0.21.4) + sqlite3 (1.3.10) + thin (1.6.3) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0) + rack (~> 1.0) + unf_ext (0.0.6) + yajl-ruby (1.2.1) + +PLATFORMS + ruby + +DEPENDENCIES + RedCloth + bcrypt + charlock_holmes + escape_utils + ffi + github-markdown + json + mysql2 + nokogiri + nokogumbo + posix-spawn + rugged + sqlite3 + thin + unf_ext + yajl-ruby diff --git a/shared/gemfiles/20150130-next-extras/Gemfile b/shared/gemfiles/20150130-next-extras/Gemfile new file mode 100644 index 0000000..2ae931d --- /dev/null +++ b/shared/gemfiles/20150130-next-extras/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem 'nokogumbo', '1.2.0' +gem 'rugged', '0.22.0b5' diff --git a/shared/gemfiles/20150130-next-extras/Gemfile.lock b/shared/gemfiles/20150130-next-extras/Gemfile.lock new file mode 100644 index 0000000..6d61dfe --- /dev/null +++ b/shared/gemfiles/20150130-next-extras/Gemfile.lock @@ -0,0 +1,16 @@ +GEM + remote: https://rubygems.org/ + specs: + mini_portile (0.6.2) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + nokogumbo (1.2.0) + nokogiri + rugged (0.22.0b5) + +PLATFORMS + ruby + +DEPENDENCIES + nokogumbo (= 1.2.0) + rugged (= 0.22.0b5) diff --git a/shared/Gemfile b/shared/gemfiles/20150130/Gemfile similarity index 56% rename from shared/Gemfile rename to shared/gemfiles/20150130/Gemfile index 9a66eaf..30005f1 100644 --- a/shared/Gemfile +++ b/shared/gemfiles/20150130/Gemfile @@ -1,8 +1,3 @@ -# This Gemfile defines all native extensions that Traveling Ruby supports. -# To add a new native extension, add it to this Gemfile, run `bundle install` on -# your workstation (to update the Gemfile.lock), and re-run the Traveling Ruby -# build system. - #source 'http://production.cf.rubygems.org/' source 'https://rubygems.org' diff --git a/shared/Gemfile.lock b/shared/gemfiles/20150130/Gemfile.lock similarity index 100% rename from shared/Gemfile.lock rename to shared/gemfiles/20150130/Gemfile.lock diff --git a/shared/gemfiles/README.md b/shared/gemfiles/README.md new file mode 100644 index 0000000..c28ceaf --- /dev/null +++ b/shared/gemfiles/README.md @@ -0,0 +1 @@ +The Gemfiles in this directory define all native extensions that Traveling Ruby supports. To add a new native extension, create a new directory and create a Gemfile inside containing the new native extension. Then run `bundle install` inside that directory on your workstation (to create/update the Gemfile.lock), and re-run the Traveling Ruby build system. \ No newline at end of file