Update Ruby to 2.4.5, reflect in CrisisCleanup, closes #307

This commit is contained in:
Disassembler 2018-12-05 14:07:45 +01:00
parent e17da9f060
commit e58fc05a7d
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
3 changed files with 10 additions and 18 deletions

View File

@ -11,17 +11,12 @@ RUN EOF
# Download and unpack Ruby # Download and unpack Ruby
mkdir -p /usr/src/ruby mkdir -p /usr/src/ruby
wget http://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.xz -O - | tar xJf - -C /usr/src/ruby --strip-components=1 wget http://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.5.tar.xz -O - | tar xJf - -C /usr/src/ruby --strip-components=1
cd /usr/src/ruby
# Hackfix to suppress "Insecure world writable dir" warning
sed -ni 'p;13a #define ENABLE_PATH_CHECK 0' file.c
# Configure compilation + hackfix to detect isnan/isinf macros
autoconf
ac_cv_func_isnan=yes ac_cv_func_isinf=yes ./configure --build=x86_64-linux-musl --disable-install-doc --enable-shared
# Compile and install Ruby # Compile and install Ruby
cd /usr/src/ruby
autoconf
./configure --build=x86_64-linux-musl --disable-install-doc --enable-shared
make -j $(getconf _NPROCESSORS_ONLN) make -j $(getconf _NPROCESSORS_ONLN)
make install make install
@ -31,8 +26,8 @@ RUN EOF
gem update --system gem update --system
# Cleanup # Cleanup
cd /tmp
rm -r /usr/src/ruby
apk --no-cache del .deps apk --no-cache del .deps
cd /root
rm -r /usr/src/ruby
rm -rf /root/.gem rm -rf /root/.gem
EOF EOF

View File

@ -4,3 +4,4 @@ REVOKE ALL ON DATABASE crisiscleanup FROM public;
ALTER DATABASE crisiscleanup OWNER TO crisiscleanup; ALTER DATABASE crisiscleanup OWNER TO crisiscleanup;
\c crisiscleanup \c crisiscleanup
CREATE EXTENSION hstore; CREATE EXTENSION hstore;
CREATE EXTENSION pg_stat_statements;

View File

@ -17,14 +17,10 @@ RUN EOF
apk --no-cache add --virtual .deps build-base git libxml2-dev libxslt-dev linux-headers npm postgresql-dev yarn zlib-dev apk --no-cache add --virtual .deps build-base git libxml2-dev libxslt-dev linux-headers npm postgresql-dev yarn zlib-dev
# Clone CrisisCleanup # Clone CrisisCleanup
git clone --depth 1000 https://github.com/CrisisCleanup/crisiscleanup /srv/crisiscleanup git clone --depth 1 https://github.com/CrisisCleanup/crisiscleanup /srv/crisiscleanup
# TODO: Update ruby version
git -C /srv/crisiscleanup checkout b9035bd44fff371ea3d525eb560ff45504acaee7
# Hackfix ruby and nodejs dependency versions # Hackfix ruby dependency version
sed -i 's/2\.2\.5/2.3.6/' /srv/crisiscleanup/Gemfile sed -i 's/2\.4\.4/2.4.5/' /srv/crisiscleanup/Gemfile
sed -i 's/rdoc (4\.2\.0)/rdoc (4.3.0)/' /srv/crisiscleanup/Gemfile.lock
sed -i 's/8\.2\.0/>=8.2.0/' /srv/crisiscleanup/package.json
# Install Ruby and NodeJS dependencies # Install Ruby and NodeJS dependencies
cd /srv/crisiscleanup cd /srv/crisiscleanup