From 75bb90a4aa897a74fea876c175bfba2d09e9cfb2 Mon Sep 17 00:00:00 2001 From: m2049r Date: Thu, 22 Apr 2021 18:45:21 +0200 Subject: [PATCH] update & clean build --- app/CMakeLists.txt | 52 ++++++++--------- app/build.gradle | 1 + external-libs/.gitignore | 2 +- external-libs/Makefile | 80 +++++++++++++------------- external-libs/VERSION | 2 +- external-libs/android32.Dockerfile | 65 ++++++++++++--------- external-libs/android32_x86.Dockerfile | 67 ++++++++++++--------- external-libs/android64.Dockerfile | 67 ++++++++++++--------- external-libs/android64_x86.Dockerfile | 67 ++++++++++++--------- 9 files changed, 224 insertions(+), 179 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 80e07f7..b0a67ef 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -68,108 +68,108 @@ set_target_properties(boost_wserialization PROPERTIES IMPORTED_LOCATION ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/libboost_wserialization.a) ############# -# Monero +# Wownero ############# add_library(wallet_api STATIC IMPORTED) set_target_properties(wallet_api PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libwallet_api.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libwallet_api.a) add_library(wallet STATIC IMPORTED) set_target_properties(wallet PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libwallet.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libwallet.a) add_library(cryptonote_core STATIC IMPORTED) set_target_properties(cryptonote_core PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libcryptonote_core.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libcryptonote_core.a) add_library(cryptonote_basic STATIC IMPORTED) set_target_properties(cryptonote_basic PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libcryptonote_basic.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libcryptonote_basic.a) add_library(mnemonics STATIC IMPORTED) set_target_properties(mnemonics PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libmnemonics.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libmnemonics.a) add_library(common STATIC IMPORTED) set_target_properties(common PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libcommon.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libcommon.a) add_library(cncrypto STATIC IMPORTED) set_target_properties(cncrypto PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libcncrypto.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libcncrypto.a) add_library(ringct STATIC IMPORTED) set_target_properties(ringct PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libringct.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libringct.a) add_library(ringct_basic STATIC IMPORTED) set_target_properties(ringct_basic PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libringct_basic.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libringct_basic.a) add_library(blockchain_db STATIC IMPORTED) set_target_properties(blockchain_db PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libblockchain_db.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libblockchain_db.a) add_library(lmdb STATIC IMPORTED) set_target_properties(lmdb PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/liblmdb.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/liblmdb.a) add_library(easylogging STATIC IMPORTED) set_target_properties(easylogging PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libeasylogging.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libeasylogging.a) add_library(unbound STATIC IMPORTED) set_target_properties(unbound PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libunbound.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libunbound.a) add_library(epee STATIC IMPORTED) set_target_properties(epee PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libepee.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libepee.a) add_library(blocks STATIC IMPORTED) set_target_properties(blocks PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libblocks.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libblocks.a) add_library(checkpoints STATIC IMPORTED) set_target_properties(checkpoints PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libcheckpoints.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libcheckpoints.a) add_library(device STATIC IMPORTED) set_target_properties(device PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libdevice.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libdevice.a) add_library(device_trezor STATIC IMPORTED) set_target_properties(device_trezor PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libdevice_trezor.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libdevice_trezor.a) add_library(multisig STATIC IMPORTED) set_target_properties(multisig PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libmultisig.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libmultisig.a) add_library(version STATIC IMPORTED) set_target_properties(version PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libversion.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libversion.a) add_library(net STATIC IMPORTED) set_target_properties(net PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libnet.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libnet.a) add_library(hardforks STATIC IMPORTED) set_target_properties(hardforks PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libhardforks.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libhardforks.a) add_library(randomx STATIC IMPORTED) set_target_properties(randomx PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/librandomx.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/librandomx.a) add_library(rpc_base STATIC IMPORTED) set_target_properties(rpc_base PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/librpc_base.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/librpc_base.a) add_library(wallet-crypto STATIC IMPORTED) set_target_properties(wallet-crypto PROPERTIES IMPORTED_LOCATION - ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libwallet-crypto.a) + ${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/wownero/libwallet-crypto.a) ############# # System diff --git a/app/build.gradle b/app/build.gradle index 33ef933..93ee8ca 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 30 buildToolsVersion '29.0.3' + ndkVersion '17.2.4988734' defaultConfig { applicationId "com.m2049r.wowwallet" minSdkVersion 21 diff --git a/external-libs/.gitignore b/external-libs/.gitignore index 4cc6b6d..2dbd21a 100644 --- a/external-libs/.gitignore +++ b/external-libs/.gitignore @@ -1,4 +1,4 @@ -/monero +/wownero /arm64-v8a /armeabi-v7a /x86 diff --git a/external-libs/Makefile b/external-libs/Makefile index 62f6af2..67f29d0 100644 --- a/external-libs/Makefile +++ b/external-libs/Makefile @@ -1,45 +1,45 @@ -# ln -s /opt/monero monero +FLAVOUR=wownero all: arm64-v8a x86_64 include VERSION -arm64-v8a: monero +arm64-v8a: $(FLAVOUR) -rm -rf arm64-v8a - -docker container rm monero-android-arm64 -f - docker build -f android64.Dockerfile -t monero-android-arm64 monero - docker create -it --name monero-android-arm64 monero-android-arm64 bash - docker cp monero-android-arm64:/opt/android/prefix/lib/. arm64-v8a/ - docker cp monero-android-arm64:/src/build/release/lib/. arm64-v8a//monero + -docker container rm $(FLAVOUR)-android-arm64 -f + docker build -f android64.Dockerfile -t $(FLAVOUR)-android-arm64 $(FLAVOUR) + docker create -it --name $(FLAVOUR)-android-arm64 $(FLAVOUR)-android-arm64 bash + docker cp $(FLAVOUR)-android-arm64:/opt/android/prefix/lib/. arm64-v8a/ + docker cp $(FLAVOUR)-android-arm64:/src/build/release/lib/. arm64-v8a//$(FLAVOUR) -armeabi-v7a: monero +armeabi-v7a: $(FLAVOUR) -rm -rf armeabi-v7a - -docker container rm monero-android-arm32 -f - docker build -f android32.Dockerfile -t monero-android-arm32 monero - docker create -it --name monero-android-arm32 monero-android-arm32 bash - docker cp monero-android-arm32:/opt/android/prefix/lib/. armeabi-v7a - docker cp monero-android-arm32:/src/build/release/lib/. armeabi-v7a/monero + -docker container rm $(FLAVOUR)-android-arm32 -f + docker build -f android32.Dockerfile -t $(FLAVOUR)-android-arm32 $(FLAVOUR) + docker create -it --name $(FLAVOUR)-android-arm32 $(FLAVOUR)-android-arm32 bash + docker cp $(FLAVOUR)-android-arm32:/opt/android/prefix/lib/. armeabi-v7a + docker cp $(FLAVOUR)-android-arm32:/src/build/release/lib/. armeabi-v7a/$(FLAVOUR) -x86_64: monero +x86_64: $(FLAVOUR) -rm -rf x86_64 - -docker container rm monero-android-x86_64 -f - docker build -f android64_x86.Dockerfile -t monero-android-x86_64 monero - docker create -it --name monero-android-x86_64 monero-android-x86_64 bash - docker cp monero-android-x86_64:/opt/android/prefix/lib/. x86_64 - docker cp monero-android-x86_64:/src/build/release/lib/. x86_64/monero + -docker container rm $(FLAVOUR)-android-x86_64 -f + docker build -f android64_x86.Dockerfile -t $(FLAVOUR)-android-x86_64 $(FLAVOUR) + docker create -it --name $(FLAVOUR)-android-x86_64 $(FLAVOUR)-android-x86_64 bash + docker cp $(FLAVOUR)-android-x86_64:/opt/android/prefix/lib/. x86_64 + docker cp $(FLAVOUR)-android-x86_64:/src/build/release/lib/. x86_64/$(FLAVOUR) -x86: monero +x86: $(FLAVOUR) -rm -rf x86 - -docker container rm monero-android-x86 -f - docker build -f android32_x86.Dockerfile -t monero-android-x86 monero - docker create -it --name monero-android-x86 monero-android-x86 bash - docker cp monero-android-x86:/opt/android/prefix/lib/. x86 - docker cp monero-android-x86:/src/build/release/lib/. x86/monero + -docker container rm $(FLAVOUR)-android-x86 -f + docker build -f android32_x86.Dockerfile -t $(FLAVOUR)-android-x86 $(FLAVOUR) + docker create -it --name $(FLAVOUR)-android-x86 $(FLAVOUR)-android-x86 bash + docker cp $(FLAVOUR)-android-x86:/opt/android/prefix/lib/. x86 + docker cp $(FLAVOUR)-android-x86:/src/build/release/lib/. x86/$(FLAVOUR) -include: monero +include: $(FLAVOUR) -mkdir include - cp monero/src/wallet/api/wallet2_api.h include/ + cp $(FLAVOUR)/src/wallet/api/wallet2_api.h include/ VERSION: - echo MONERUJO_WOW `git -C . branch | grep "^\*" | sed 's/^..//'` with WOWMONERO `git -C monero branch | grep "^\*" | sed 's/^..//'` > VERSION + echo MONERUJO_WOW `git -C . branch | grep "^\*" | sed 's/^..//'` with $(FLAVOUR) `git -C $(FLAVOUR) branch | grep "^\*" | sed 's/^..//'` > VERSION clean: -rm -rf arm64-v8a @@ -50,17 +50,17 @@ clean: -rm -f VERSION distclean: clean - -docker container rm monero-android-arm64 -f - -docker container rm monero-android-arm32 -f - -docker container rm monero-android-x86_64 -f - -docker container rm monero-android-x86 -f - -docker image rm monero-android-arm64 -f - -docker image rm monero-android-arm32 -f - -docker image rm monero-android-x86_64 -f - -docker image rm monero-android-x86 -f - -rm monero + -docker container rm $(FLAVOUR)-android-arm64 -f + -docker container rm $(FLAVOUR)-android-arm32 -f + -docker container rm $(FLAVOUR)-android-x86_64 -f + -docker container rm $(FLAVOUR)-android-x86 -f + -docker image rm $(FLAVOUR)-android-arm64 -f + -docker image rm $(FLAVOUR)-android-arm32 -f + -docker image rm $(FLAVOUR)-android-x86_64 -f + -docker image rm $(FLAVOUR)-android-x86 -f + -rm $(FLAVOUR) -monero: - $(error Please ln -s monero) +$(FLAVOUR): + $(error Please ln -s $(FLAVOUR)) -.PHONY: all clean distclean include +.PHONY: all clean distclean diff --git a/external-libs/VERSION b/external-libs/VERSION index 10dba95..af9d8e2 100644 --- a/external-libs/VERSION +++ b/external-libs/VERSION @@ -1 +1 @@ -MONERUJO_WOW master with WOWMONERO (HEAD detached at v0.9.3.3) +MONERUJO_WOW feature_updatebuild with wownero (HEAD detached at v0.9.3.3) diff --git a/external-libs/android32.Dockerfile b/external-libs/android32.Dockerfile index c0c9c33..908e96f 100644 --- a/external-libs/android32.Dockerfile +++ b/external-libs/android32.Dockerfile @@ -1,20 +1,22 @@ FROM debian:stable -RUN apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool libtinfo5 +RUN set -x && apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool libtinfo5 WORKDIR /opt/android ## INSTALL ANDROID SDK ENV ANDROID_SDK_REVISION 4333796 ENV ANDROID_SDK_HASH 92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9 -RUN curl -s -O https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ +RUN set -x \ + && curl -s -O https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ && echo "${ANDROID_SDK_HASH} sdk-tools-linux-${ANDROID_SDK_REVISION}.zip" | sha256sum -c \ && unzip sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ && rm -f sdk-tools-linux-${ANDROID_SDK_REVISION}.zip ## INSTALL ANDROID NDK -ENV ANDROID_NDK_REVISION 17b -ENV ANDROID_NDK_HASH 5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd -RUN curl -s -O https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ +ENV ANDROID_NDK_REVISION 17c +ENV ANDROID_NDK_HASH 3f541adbd0330a9205ba12697f6d04ec90752c53d6b622101a2a8a856e816589 +RUN set -x \ + && curl -s -O https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ && echo "${ANDROID_NDK_HASH} android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip" | sha256sum -c \ && unzip android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ && rm -f android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip @@ -25,25 +27,29 @@ ENV ANDROID_NDK_ROOT ${WORKDIR}/android-ndk-r${ANDROID_NDK_REVISION} ENV PREFIX /opt/android/prefix ENV TOOLCHAIN_DIR ${WORKDIR}/toolchain-arm -RUN ${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py \ +RUN set -x \ + && ${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py \ --arch arm \ --api 21 \ --install-dir ${TOOLCHAIN_DIR} \ --stl=libc++ #INSTALL cmake -ENV CMAKE_VERSION 3.12.1 -RUN cd /usr \ - && curl -s -O https://cmake.org/files/v3.12/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ +ARG CMAKE_VERSION=3.14.6 +ARG CMAKE_HASH=82e08e50ba921035efa82b859c74c5fbe27d3e49a4003020e3c77618a4e912cd +RUN set -x \ + && cd /usr \ + && curl -L -s -O https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ + && echo "${CMAKE_HASH} cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" | sha256sum -c \ && tar -xzf /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ && rm -f /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz ENV PATH /usr/cmake-${CMAKE_VERSION}-Linux-x86_64/bin:$PATH ## Boost -ARG BOOST_VERSION=1_68_0 -ARG BOOST_VERSION_DOT=1.68.0 -ARG BOOST_HASH=7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7 -RUN set -ex \ +ARG BOOST_VERSION=1_70_0 +ARG BOOST_VERSION_DOT=1.70.0 +ARG BOOST_HASH=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 +RUN set -x \ && curl -s -L -o boost_${BOOST_VERSION}.tar.bz2 https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \ && echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \ && tar -xvf boost_${BOOST_VERSION}.tar.bz2 \ @@ -57,9 +63,10 @@ ENV PATH $TOOLCHAIN_DIR/arm-linux-androideabi/bin:$TOOLCHAIN_DIR/bin:$PATH ARG NPROC=1 # Build iconv for lib boost locale -ENV ICONV_VERSION 1.15 -ENV ICONV_HASH ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 -RUN curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ +ENV ICONV_VERSION 1.16 +ENV ICONV_HASH e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 +RUN set -x \ + && curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ && echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf libiconv-${ICONV_VERSION}.tar.gz \ && rm -f libiconv-${ICONV_VERSION}.tar.gz \ @@ -68,7 +75,8 @@ RUN curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar && make -j${NPROC} && make install ## Build BOOST -RUN cd boost_${BOOST_VERSION} \ +RUN set -x \ + && cd boost_${BOOST_VERSION} \ && ./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} install -j${NPROC} #Note : we build openssl because the default lacks DSA1 @@ -76,7 +84,8 @@ RUN cd boost_${BOOST_VERSION} \ # download, configure and make Zlib ENV ZLIB_VERSION 1.2.11 ENV ZLIB_HASH c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 -RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ +RUN set -x \ + && curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ && echo "${ZLIB_HASH} zlib-${ZLIB_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf zlib-${ZLIB_VERSION}.tar.gz \ && rm zlib-${ZLIB_VERSION}.tar.gz \ @@ -87,7 +96,8 @@ RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ # open ssl ARG OPENSSL_VERSION=1.0.2p ARG OPENSSL_HASH=50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00 -RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ +RUN set -x \ + && curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ && echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \ && rm openssl-${OPENSSL_VERSION}.tar.gz \ @@ -103,9 +113,10 @@ RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && make install # ZMQ -ARG ZMQ_VERSION=v4.2.5 -ARG ZMQ_HASH=d062edd8c142384792955796329baf1e5a3377cd -RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \ +ARG ZMQ_VERSION=v4.3.2 +ARG ZMQ_HASH=a84ffa12b2eb3569ced199660bac5ad128bff1f0 +RUN set -x \ + && git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \ && cd libzmq \ && test `git rev-parse HEAD` = ${ZMQ_HASH} || exit 1 \ && ./autogen.sh \ @@ -114,9 +125,9 @@ RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \ && make install # Sodium -ARG SODIUM_VERSION=1.0.16 -ARG SODIUM_HASH=675149b9b8b66ff44152553fb3ebf9858128363d -RUN set -ex \ +ARG SODIUM_VERSION=1.0.18 +ARG SODIUM_HASH=4f5e89fa84ce1d178a6765b8b46f2b6f91216677 +RUN set -x \ && git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} \ && cd libsodium \ && test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \ @@ -127,7 +138,7 @@ RUN set -ex \ COPY . /src ARG NPROC=4 -RUN set -ex \ +RUN set -x \ && cd /src \ && CMAKE_INCLUDE_PATH="${PREFIX}/include" \ CMAKE_LIBRARY_PATH="${PREFIX}/lib" \ @@ -135,6 +146,6 @@ RUN set -ex \ USE_SINGLE_BUILDDIR=1 \ PATH=${HOST_PATH} make release-static-android-armv7-wallet_api -j${NPROC} -RUN set -ex \ +RUN set -x \ && cd /src/build/release \ && find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \; diff --git a/external-libs/android32_x86.Dockerfile b/external-libs/android32_x86.Dockerfile index 3cded27..7ba7bcf 100644 --- a/external-libs/android32_x86.Dockerfile +++ b/external-libs/android32_x86.Dockerfile @@ -1,20 +1,22 @@ FROM debian:stable -RUN apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool libtinfo5 +RUN set -x && apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool libtinfo5 WORKDIR /opt/android ## INSTALL ANDROID SDK ENV ANDROID_SDK_REVISION 4333796 ENV ANDROID_SDK_HASH 92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9 -RUN curl -s -O https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ +RUN set -x \ + && curl -s -O https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ && echo "${ANDROID_SDK_HASH} sdk-tools-linux-${ANDROID_SDK_REVISION}.zip" | sha256sum -c \ && unzip sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ && rm -f sdk-tools-linux-${ANDROID_SDK_REVISION}.zip ## INSTALL ANDROID NDK -ENV ANDROID_NDK_REVISION 17b -ENV ANDROID_NDK_HASH 5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd -RUN curl -s -O https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ +ENV ANDROID_NDK_REVISION 17c +ENV ANDROID_NDK_HASH 3f541adbd0330a9205ba12697f6d04ec90752c53d6b622101a2a8a856e816589 +RUN set -x \ + && curl -s -O https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ && echo "${ANDROID_NDK_HASH} android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip" | sha256sum -c \ && unzip android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ && rm -f android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip @@ -25,25 +27,29 @@ ENV ANDROID_NDK_ROOT ${WORKDIR}/android-ndk-r${ANDROID_NDK_REVISION} ENV PREFIX /opt/android/prefix ENV TOOLCHAIN_DIR ${WORKDIR}/toolchain -RUN ${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py \ +RUN set -x \ + && ${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py \ --arch x86 \ --api 21 \ --install-dir ${TOOLCHAIN_DIR} \ --stl=libc++ #INSTALL cmake -ENV CMAKE_VERSION 3.12.1 -RUN cd /usr \ - && curl -s -O https://cmake.org/files/v3.12/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ +ARG CMAKE_VERSION=3.14.6 +ARG CMAKE_HASH=82e08e50ba921035efa82b859c74c5fbe27d3e49a4003020e3c77618a4e912cd +RUN set -x \ + && cd /usr \ + && curl -L -s -O https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ + && echo "${CMAKE_HASH} cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" | sha256sum -c \ && tar -xzf /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ && rm -f /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz ENV PATH /usr/cmake-${CMAKE_VERSION}-Linux-x86_64/bin:$PATH ## Boost -ARG BOOST_VERSION=1_68_0 -ARG BOOST_VERSION_DOT=1.68.0 -ARG BOOST_HASH=7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7 -RUN set -ex \ +ARG BOOST_VERSION=1_70_0 +ARG BOOST_VERSION_DOT=1.70.0 +ARG BOOST_HASH=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 +RUN set -x \ && curl -s -L -o boost_${BOOST_VERSION}.tar.bz2 https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \ && echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \ && tar -xvf boost_${BOOST_VERSION}.tar.bz2 \ @@ -57,9 +63,10 @@ ENV PATH $TOOLCHAIN_DIR/i686-linux-android/bin:$TOOLCHAIN_DIR/bin:$PATH ARG NPROC=1 # Build iconv for lib boost locale -ENV ICONV_VERSION 1.15 -ENV ICONV_HASH ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 -RUN curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ +ENV ICONV_VERSION 1.16 +ENV ICONV_HASH e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 +RUN set -x \ + && curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ && echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf libiconv-${ICONV_VERSION}.tar.gz \ && rm -f libiconv-${ICONV_VERSION}.tar.gz \ @@ -68,7 +75,8 @@ RUN curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar && make -j${NPROC} && make install ## Build BOOST -RUN cd boost_${BOOST_VERSION} \ +RUN set -x \ + && cd boost_${BOOST_VERSION} \ && ./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} install -j${NPROC} #Note : we build openssl because the default lacks DSA1 @@ -76,7 +84,8 @@ RUN cd boost_${BOOST_VERSION} \ # download, configure and make Zlib ENV ZLIB_VERSION 1.2.11 ENV ZLIB_HASH c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 -RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ +RUN set -x \ + && curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ && echo "${ZLIB_HASH} zlib-${ZLIB_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf zlib-${ZLIB_VERSION}.tar.gz \ && rm zlib-${ZLIB_VERSION}.tar.gz \ @@ -87,7 +96,8 @@ RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ # open ssl ARG OPENSSL_VERSION=1.0.2p ARG OPENSSL_HASH=50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00 -RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ +RUN set -x \ + && curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ && echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \ && rm openssl-${OPENSSL_VERSION}.tar.gz \ @@ -103,20 +113,21 @@ RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && make install # ZMQ -ARG ZMQ_VERSION=master -ARG ZMQ_HASH=501d0815bf2b0abb93be8214fc66519918ef6c40 -RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \ +ARG ZMQ_VERSION=v4.3.2 +ARG ZMQ_HASH=a84ffa12b2eb3569ced199660bac5ad128bff1f0 +RUN set -x \ + && git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \ && cd libzmq \ - && git checkout ${ZMQ_HASH} \ + && test `git rev-parse HEAD` = ${ZMQ_HASH} || exit 1 \ && ./autogen.sh \ && CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=x86-linux-android --enable-static --disable-shared \ && make -j${NPROC} \ && make install # Sodium -ARG SODIUM_VERSION=1.0.16 -ARG SODIUM_HASH=675149b9b8b66ff44152553fb3ebf9858128363d -RUN set -ex \ +ARG SODIUM_VERSION=1.0.18 +ARG SODIUM_HASH=4f5e89fa84ce1d178a6765b8b46f2b6f91216677 +RUN set -x \ && git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} \ && cd libsodium \ && test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \ @@ -127,7 +138,7 @@ RUN set -ex \ COPY . /src ARG NPROC=4 -RUN set -ex \ +RUN set -x \ && cd /src \ && CMAKE_INCLUDE_PATH="${PREFIX}/include" \ CMAKE_LIBRARY_PATH="${PREFIX}/lib" \ @@ -135,6 +146,6 @@ RUN set -ex \ USE_SINGLE_BUILDDIR=1 \ PATH=${HOST_PATH} make release-static-android-x86-wallet_api -j${NPROC} -RUN set -ex \ +RUN set -x \ && cd /src/build/release \ && find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \; diff --git a/external-libs/android64.Dockerfile b/external-libs/android64.Dockerfile index e80b4d7..00a90ff 100644 --- a/external-libs/android64.Dockerfile +++ b/external-libs/android64.Dockerfile @@ -1,20 +1,22 @@ FROM debian:stable -RUN apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool libtinfo5 +RUN set -x && apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool libtinfo5 WORKDIR /opt/android ## INSTALL ANDROID SDK ENV ANDROID_SDK_REVISION 4333796 ENV ANDROID_SDK_HASH 92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9 -RUN curl -s -O https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ +RUN set -x \ + && curl -s -O https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ && echo "${ANDROID_SDK_HASH} sdk-tools-linux-${ANDROID_SDK_REVISION}.zip" | sha256sum -c \ && unzip sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ && rm -f sdk-tools-linux-${ANDROID_SDK_REVISION}.zip ## INSTALL ANDROID NDK -ENV ANDROID_NDK_REVISION 17b -ENV ANDROID_NDK_HASH 5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd -RUN curl -s -O https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ +ENV ANDROID_NDK_REVISION 17c +ENV ANDROID_NDK_HASH 3f541adbd0330a9205ba12697f6d04ec90752c53d6b622101a2a8a856e816589 +RUN set -x \ + && curl -s -O https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ && echo "${ANDROID_NDK_HASH} android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip" | sha256sum -c \ && unzip android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ && rm -f android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip @@ -25,25 +27,29 @@ ENV ANDROID_NDK_ROOT ${WORKDIR}/android-ndk-r${ANDROID_NDK_REVISION} ENV PREFIX /opt/android/prefix ENV TOOLCHAIN_DIR ${WORKDIR}/toolchain-arm -RUN ${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py \ +RUN set -x \ + && ${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py \ --arch arm64 \ --api 21 \ --install-dir ${TOOLCHAIN_DIR} \ --stl=libc++ #INSTALL cmake -ENV CMAKE_VERSION 3.12.1 -RUN cd /usr \ - && curl -s -O https://cmake.org/files/v3.12/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ +ARG CMAKE_VERSION=3.14.6 +ARG CMAKE_HASH=82e08e50ba921035efa82b859c74c5fbe27d3e49a4003020e3c77618a4e912cd +RUN set -x \ + && cd /usr \ + && curl -L -s -O https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ + && echo "${CMAKE_HASH} cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" | sha256sum -c \ && tar -xzf /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ && rm -f /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz ENV PATH /usr/cmake-${CMAKE_VERSION}-Linux-x86_64/bin:$PATH ## Boost -ARG BOOST_VERSION=1_68_0 -ARG BOOST_VERSION_DOT=1.68.0 -ARG BOOST_HASH=7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7 -RUN set -ex \ +ARG BOOST_VERSION=1_70_0 +ARG BOOST_VERSION_DOT=1.70.0 +ARG BOOST_HASH=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 +RUN set -x \ && curl -s -L -o boost_${BOOST_VERSION}.tar.bz2 https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \ && echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \ && tar -xvf boost_${BOOST_VERSION}.tar.bz2 \ @@ -57,9 +63,10 @@ ENV PATH $TOOLCHAIN_DIR/aarch64-linux-android/bin:$TOOLCHAIN_DIR/bin:$PATH ARG NPROC=1 # Build iconv for lib boost locale -ENV ICONV_VERSION 1.15 -ENV ICONV_HASH ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 -RUN curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ +ENV ICONV_VERSION 1.16 +ENV ICONV_HASH e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 +RUN set -x \ + && curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ && echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf libiconv-${ICONV_VERSION}.tar.gz \ && rm -f libiconv-${ICONV_VERSION}.tar.gz \ @@ -68,7 +75,8 @@ RUN curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar && make -j${NPROC} && make install ## Build BOOST -RUN cd boost_${BOOST_VERSION} \ +RUN set -x \ + && cd boost_${BOOST_VERSION} \ && ./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} install -j${NPROC} #Note : we build openssl because the default lacks DSA1 @@ -76,7 +84,8 @@ RUN cd boost_${BOOST_VERSION} \ # download, configure and make Zlib ENV ZLIB_VERSION 1.2.11 ENV ZLIB_HASH c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 -RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ +RUN set -x \ + && curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ && echo "${ZLIB_HASH} zlib-${ZLIB_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf zlib-${ZLIB_VERSION}.tar.gz \ && rm zlib-${ZLIB_VERSION}.tar.gz \ @@ -87,7 +96,8 @@ RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ # open ssl ARG OPENSSL_VERSION=1.0.2p ARG OPENSSL_HASH=50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00 -RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ +RUN set -x \ + && curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ && echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \ && rm openssl-${OPENSSL_VERSION}.tar.gz \ @@ -103,20 +113,21 @@ RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && make install # ZMQ -ARG ZMQ_VERSION=master -ARG ZMQ_HASH=501d0815bf2b0abb93be8214fc66519918ef6c40 -RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \ +ARG ZMQ_VERSION=v4.3.2 +ARG ZMQ_HASH=a84ffa12b2eb3569ced199660bac5ad128bff1f0 +RUN set -x \ + && git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \ && cd libzmq \ - && git checkout ${ZMQ_HASH} \ + && test `git rev-parse HEAD` = ${ZMQ_HASH} || exit 1 \ && ./autogen.sh \ && CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=aarch64-linux-android --enable-static --disable-shared \ && make -j${NPROC} \ && make install # Sodium -ARG SODIUM_VERSION=1.0.16 -ARG SODIUM_HASH=675149b9b8b66ff44152553fb3ebf9858128363d -RUN set -ex \ +ARG SODIUM_VERSION=1.0.18 +ARG SODIUM_HASH=4f5e89fa84ce1d178a6765b8b46f2b6f91216677 +RUN set -x \ && git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} \ && cd libsodium \ && test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \ @@ -127,7 +138,7 @@ RUN set -ex \ COPY . /src ARG NPROC=4 -RUN set -ex \ +RUN set -x \ && cd /src \ && CMAKE_INCLUDE_PATH="${PREFIX}/include" \ CMAKE_LIBRARY_PATH="${PREFIX}/lib" \ @@ -135,6 +146,6 @@ RUN set -ex \ USE_SINGLE_BUILDDIR=1 \ PATH=${HOST_PATH} make release-static-android-armv8-wallet_api -j${NPROC} -RUN set -ex \ +RUN set -x \ && cd /src/build/release \ && find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \; diff --git a/external-libs/android64_x86.Dockerfile b/external-libs/android64_x86.Dockerfile index 15441d5..0bd6d55 100644 --- a/external-libs/android64_x86.Dockerfile +++ b/external-libs/android64_x86.Dockerfile @@ -1,20 +1,22 @@ FROM debian:stable -RUN apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool libtinfo5 +RUN set -x && apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool libtinfo5 WORKDIR /opt/android ## INSTALL ANDROID SDK ENV ANDROID_SDK_REVISION 4333796 ENV ANDROID_SDK_HASH 92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9 -RUN curl -s -O https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ +RUN set -x \ + && curl -s -O https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ && echo "${ANDROID_SDK_HASH} sdk-tools-linux-${ANDROID_SDK_REVISION}.zip" | sha256sum -c \ && unzip sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \ && rm -f sdk-tools-linux-${ANDROID_SDK_REVISION}.zip ## INSTALL ANDROID NDK -ENV ANDROID_NDK_REVISION 17b -ENV ANDROID_NDK_HASH 5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd -RUN curl -s -O https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ +ENV ANDROID_NDK_REVISION 17c +ENV ANDROID_NDK_HASH 3f541adbd0330a9205ba12697f6d04ec90752c53d6b622101a2a8a856e816589 +RUN set -x \ + && curl -s -O https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ && echo "${ANDROID_NDK_HASH} android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip" | sha256sum -c \ && unzip android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \ && rm -f android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip @@ -25,25 +27,29 @@ ENV ANDROID_NDK_ROOT ${WORKDIR}/android-ndk-r${ANDROID_NDK_REVISION} ENV PREFIX /opt/android/prefix ENV TOOLCHAIN_DIR ${WORKDIR}/toolchain -RUN ${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py \ +RUN set -x \ + && ${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py \ --arch x86_64 \ --api 21 \ --install-dir ${TOOLCHAIN_DIR} \ --stl=libc++ #INSTALL cmake -ENV CMAKE_VERSION 3.12.1 -RUN cd /usr \ - && curl -s -O https://cmake.org/files/v3.12/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ +ARG CMAKE_VERSION=3.14.6 +ARG CMAKE_HASH=82e08e50ba921035efa82b859c74c5fbe27d3e49a4003020e3c77618a4e912cd +RUN set -x \ + && cd /usr \ + && curl -L -s -O https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ + && echo "${CMAKE_HASH} cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" | sha256sum -c \ && tar -xzf /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz \ && rm -f /usr/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz ENV PATH /usr/cmake-${CMAKE_VERSION}-Linux-x86_64/bin:$PATH ## Boost -ARG BOOST_VERSION=1_68_0 -ARG BOOST_VERSION_DOT=1.68.0 -ARG BOOST_HASH=7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7 -RUN set -ex \ +ARG BOOST_VERSION=1_70_0 +ARG BOOST_VERSION_DOT=1.70.0 +ARG BOOST_HASH=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 +RUN set -x \ && curl -s -L -o boost_${BOOST_VERSION}.tar.bz2 https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \ && echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \ && tar -xvf boost_${BOOST_VERSION}.tar.bz2 \ @@ -57,9 +63,10 @@ ENV PATH $TOOLCHAIN_DIR/x86_64-linux-android/bin:$TOOLCHAIN_DIR/bin:$PATH ARG NPROC=1 # Build iconv for lib boost locale -ENV ICONV_VERSION 1.15 -ENV ICONV_HASH ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 -RUN curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ +ENV ICONV_VERSION 1.16 +ENV ICONV_HASH e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 +RUN set -x \ + && curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ && echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf libiconv-${ICONV_VERSION}.tar.gz \ && rm -f libiconv-${ICONV_VERSION}.tar.gz \ @@ -68,7 +75,8 @@ RUN curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar && make -j${NPROC} && make install ## Build BOOST -RUN cd boost_${BOOST_VERSION} \ +RUN set -x \ + && cd boost_${BOOST_VERSION} \ && ./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} install -j${NPROC} #Note : we build openssl because the default lacks DSA1 @@ -76,7 +84,8 @@ RUN cd boost_${BOOST_VERSION} \ # download, configure and make Zlib ENV ZLIB_VERSION 1.2.11 ENV ZLIB_HASH c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 -RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ +RUN set -x \ + && curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ && echo "${ZLIB_HASH} zlib-${ZLIB_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf zlib-${ZLIB_VERSION}.tar.gz \ && rm zlib-${ZLIB_VERSION}.tar.gz \ @@ -87,7 +96,8 @@ RUN curl -s -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \ # open ssl ARG OPENSSL_VERSION=1.0.2p ARG OPENSSL_HASH=50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00 -RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ +RUN set -x \ + && curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ && echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \ && rm openssl-${OPENSSL_VERSION}.tar.gz \ @@ -103,20 +113,21 @@ RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && make install # ZMQ -ARG ZMQ_VERSION=master -ARG ZMQ_HASH=501d0815bf2b0abb93be8214fc66519918ef6c40 -RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \ +ARG ZMQ_VERSION=v4.3.2 +ARG ZMQ_HASH=a84ffa12b2eb3569ced199660bac5ad128bff1f0 +RUN set -x \ + && git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \ && cd libzmq \ - && git checkout ${ZMQ_HASH} \ + && test `git rev-parse HEAD` = ${ZMQ_HASH} || exit 1 \ && ./autogen.sh \ && CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=x86_64-linux-android --enable-static --disable-shared \ && make -j${NPROC} \ && make install # Sodium -ARG SODIUM_VERSION=1.0.16 -ARG SODIUM_HASH=675149b9b8b66ff44152553fb3ebf9858128363d -RUN set -ex \ +ARG SODIUM_VERSION=1.0.18 +ARG SODIUM_HASH=4f5e89fa84ce1d178a6765b8b46f2b6f91216677 +RUN set -x \ && git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} \ && cd libsodium \ && test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \ @@ -127,7 +138,7 @@ RUN set -ex \ COPY . /src ARG NPROC=4 -RUN set -ex \ +RUN set -x \ && cd /src \ && CMAKE_INCLUDE_PATH="${PREFIX}/include" \ CMAKE_LIBRARY_PATH="${PREFIX}/lib" \ @@ -135,6 +146,6 @@ RUN set -ex \ USE_SINGLE_BUILDDIR=1 \ PATH=${HOST_PATH} make release-static-android-x86_64-wallet_api -j${NPROC} -RUN set -ex \ +RUN set -x \ && cd /src/build/release \ && find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;