From 6c13aa242312bcc545088a34a5ac758780734a19 Mon Sep 17 00:00:00 2001 From: Sergey Shilov <31342446+sergey-shilov@users.noreply.github.com> Date: Thu, 22 Mar 2018 18:40:31 +0300 Subject: [PATCH] INDY-1205: add build procedure of rocksdb package to build-3rd-parties script. (#583) Signed-off-by: Sergey Shilov --- build-scripts/ubuntu-1604/Dockerfile | 7 +------ .../ubuntu-1604/build-3rd-parties.sh | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/build-scripts/ubuntu-1604/Dockerfile b/build-scripts/ubuntu-1604/Dockerfile index fc39e59340..08b290d896 100644 --- a/build-scripts/ubuntu-1604/Dockerfile +++ b/build-scripts/ubuntu-1604/Dockerfile @@ -4,10 +4,6 @@ RUN apt-get update -y && apt-get install -y \ apt-transport-https \ ca-certificates -RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 && \ - echo "deb https://repo.sovrin.org/test/deb xenial rocksdb" >> /etc/apt/sources.list && \ - apt-get update - RUN apt-get update -y && apt-get install -y \ # common stuff git \ @@ -27,8 +23,7 @@ RUN apt-get update -y && apt-get install -y \ libbz2-dev \ zlib1g-dev \ liblz4-dev \ - libsnappy-dev \ - rocksdb=5.8.8 + libsnappy-dev RUN pip3 install -U setuptools diff --git a/build-scripts/ubuntu-1604/build-3rd-parties.sh b/build-scripts/ubuntu-1604/build-3rd-parties.sh index 775b688de9..4cfda1c985 100755 --- a/build-scripts/ubuntu-1604/build-3rd-parties.sh +++ b/build-scripts/ubuntu-1604/build-3rd-parties.sh @@ -5,6 +5,21 @@ set -x OUTPUT_PATH=${1:-.} +function build_rocksdb_deb { + VERSION=$1 + VERSION_TAG="rocksdb-$VERSION" + + git clone https://github.com/evernym/rocksdb.git /tmp/rocksdb + cd /tmp/rocksdb + git checkout $VERSION_TAG + EXTRA_CFLAGS="-fPIC" EXTRA_CXXFLAGS="-fPIC" ./build_tools/make_package.sh $VERSION + cp ./package/rocksdb_${VERSION}_amd64.deb $OUTPUT_PATH + # Install it in the system as it is needed by python-rocksdb. + make install + cd - + rm -rf /tmp/rocksdb +} + function build_from_pypi { PACKAGE_NAME=$1 @@ -43,6 +58,9 @@ function build_from_pypi { rm ${PREREM_TMP} } +# Build rocksdb at first +build_rocksdb_deb 5.8.8 + build_from_pypi ioflo 1.5.4 build_from_pypi orderedset 2.0 build_from_pypi base58 0.2.4 @@ -56,4 +74,5 @@ build_from_pypi intervaltree 2.1.0 build_from_pypi portalocker 0.5.7 build_from_pypi sortedcontainers 1.5.7 build_from_pypi setuptools 38.5.2 +# TODO: add libsnappy dependency for python-rocksdb package build_from_pypi python-rocksdb 0.6.9