Skip to content

Commit

Permalink
Add additional native extension versions
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
FooBarWidget committed Feb 4, 2015
1 parent c77b9a5 commit bab09ec
Show file tree
Hide file tree
Showing 16 changed files with 182 additions and 36 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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!
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20150130
20150130-next
19 changes: 15 additions & 4 deletions linux/build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
9 changes: 3 additions & 6 deletions linux/internal/build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 14 additions & 8 deletions linux/internal/build-inside-mock
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion linux/internal/setup-runtime
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions linux/internal/setup-runtime-inside-mock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 29 additions & 1 deletion osx/build
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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" \
Expand Down Expand Up @@ -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/
Expand Down
27 changes: 17 additions & 10 deletions osx/setup-runtime
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
19 changes: 19 additions & 0 deletions shared/gemfiles/20150130-next-default/Gemfile
Original file line number Diff line number Diff line change
@@ -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'
49 changes: 49 additions & 0 deletions shared/gemfiles/20150130-next-default/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions shared/gemfiles/20150130-next-extras/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

gem 'nokogumbo', '1.2.0'
gem 'rugged', '0.22.0b5'
16 changes: 16 additions & 0 deletions shared/gemfiles/20150130-next-extras/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 0 additions & 5 deletions shared/Gemfile → shared/gemfiles/20150130/Gemfile
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions shared/gemfiles/README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit bab09ec

Please sign in to comment.