diff --git a/Dockerfile.sh b/Dockerfile.sh index 4328863..fb5c358 100755 --- a/Dockerfile.sh +++ b/Dockerfile.sh @@ -9,11 +9,14 @@ COPY portage/ /usr/portage COPY overlays/ /var/lib/layman COPY files/install.sh / +COPY files/install-riak.sh / COPY files/vars.config / COPY files/riak-rebar.config / COPY files/riak-reltool.config / COPY files/riak.schema / +COPY files/erlang_otp.patch / RUN /install.sh +RUN /install-riak.sh # Install custom hooks COPY files/prestart.d /tmp/portage-root/etc/riak/prestart.d diff --git a/files/erlang_otp.patch b/files/erlang_otp.patch new file mode 100644 index 0000000..8ee4c2b --- /dev/null +++ b/files/erlang_otp.patch @@ -0,0 +1,11 @@ +--- erts/configure.in.bak 2020-02-06 13:29:22.927933000 -0000 ++++ erts/configure.in 2020-02-06 13:29:10.160580000 -0000 +@@ -1339,7 +1339,7 @@ + if test "x$with_termcap" != "xno" && + test "X$host" != "Xwin32"; then + # try these libs +- termcap_libs="ncurses curses termcap termlib" ++ termcap_libs="tinfo ncurses curses termcap termlib" + + for termcap_lib in $termcap_libs; do + AC_CHECK_LIB($termcap_lib, tgetent, TERMCAP_LIB="-l$termcap_lib") diff --git a/files/install-riak.sh b/files/install-riak.sh new file mode 100755 index 0000000..2d0d5cc --- /dev/null +++ b/files/install-riak.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e eu + +source /lib/gentoo/functions.sh +source /etc/portage/make.conf + +# Build riak +export GIT_BRANCH_RIAK=riak-2.9.0p5 + +cd /opt +git clone -n -b $GIT_BRANCH_RIAK https://github.com/basho/riak.git riak; +cd riak; git checkout -q $GIT_BRANCH_RIAK; +mv /riak-rebar.config /opt/riak/rebar.config +mv /riak-reltool.config /opt/riak/rel/reltool.config +mv /riak.schema /opt/riak/rel/files/riak.schema +make lock +make rel OVERLAY_VARS="overlay_vars=/vars.config" diff --git a/files/install.sh b/files/install.sh index 5360bbf..325059f 100755 --- a/files/install.sh +++ b/files/install.sh @@ -10,7 +10,6 @@ GCC_LDPATH="$(gcc-config -L)" # Build riak export OPENSSL_VERSION=1.0.2u export GIT_BRANCH_OTP=basho-otp-16 -export GIT_BRANCH_RIAK=riak-2.9.0p5 # Build OpenSSL cd /opt @@ -26,6 +25,7 @@ cd openssl-${OPENSSL_VERSION}; \ cd /opt git clone -n -b $GIT_BRANCH_OTP 'https://github.com/basho/otp.git' $GIT_BRANCH_OTP cd $GIT_BRANCH_OTP; git checkout -q $GIT_BRANCH_OTP; \ + patch -p 0 < /erlang_otp.patch; \ ./otp_build setup -a --prefix=/usr/local \ --enable-m64-build \ --with-ssl=/usr/local/ssl \ @@ -33,19 +33,9 @@ cd $GIT_BRANCH_OTP; git checkout -q $GIT_BRANCH_OTP; \ --disable-hipe \ --enable-smp-support \ --enable-threads \ - --without-termcap \ --enable-kernel-poll; \ make install -cd /opt -git clone -n -b $GIT_BRANCH_RIAK https://github.com/basho/riak.git riak; -cd riak; git checkout -q $GIT_BRANCH_RIAK; -mv /riak-rebar.config /opt/riak/rebar.config -mv /riak-reltool.config /opt/riak/rel/reltool.config -mv /riak.schema /opt/riak/rel/files/riak.schema -make lock -make rel OVERLAY_VARS="overlay_vars=/vars.config" - # Build image mkdir -p "${DEST}"/{etc,run,var,lib64,usr/lib64}/ ln -s /run "${DEST}/var/run" diff --git a/files/riak.schema b/files/riak.schema index 1c2c0b9..7a3da2f 100644 --- a/files/riak.schema +++ b/files/riak.schema @@ -74,7 +74,6 @@ undefined -> []; ErrorFilename -> [{lager_file_backend, [{file, ErrorFilename}, {level, error}, - {formatter, lager_logstash_formatter}, {size, 10485760}, {date, "$D0"}, {count, 5}]}]