From c74798ebb704edb092204b927ac14a53c9715934 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 18 May 2022 17:45:56 +0200 Subject: [PATCH 1/6] Update cmake and ninja version Signed-off-by: Bensuperpc --- common/common.docker | 7 ++++--- imagefiles/build-and-install-ninja.sh | 10 ++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/common/common.docker b/common/common.docker index 9edbbc6..07f2a20 100644 --- a/common/common.docker +++ b/common/common.docker @@ -1,7 +1,8 @@ WORKDIR /usr/src -ARG GIT_VERSION=2.32.0 -ARG CMAKE_VERSION=3.21.1 +ARG GIT_VERSION=2.36.1 +ARG CMAKE_VERSION=3.23.1 +ARG NINJA_VERSION=1.11.0 ARG FLATCC_VERSION=d90ed18ad09824297ffd5fbc578ccb1666d13890 # Image build scripts @@ -25,7 +26,7 @@ RUN \ /buildscripts/build-and-install-openssh.sh && \ /buildscripts/build-and-install-curl.sh && \ /buildscripts/build-and-install-git.sh && \ - if [ "$CMAKE_BIN" = "true" ]; then CMAKE_VERSION=3.17.1 && /buildscripts/install-cmake-binary.sh $X86_FLAG;else /buildscripts/build-and-install-cmake.sh $X86_FLAG;fi && \ + /buildscripts/build-and-install-cmake.sh $X86_FLAG && \ /buildscripts/install-liquidprompt-binary.sh && \ PYTHON=$([ -e /opt/python/cp38-cp38/bin/python ] && echo "/opt/python/cp38-cp38/bin/python" || echo "python3") && \ /buildscripts/install-python-packages.sh -python ${PYTHON} && \ diff --git a/imagefiles/build-and-install-ninja.sh b/imagefiles/build-and-install-ninja.sh index be337e3..beacda5 100755 --- a/imagefiles/build-and-install-ninja.sh +++ b/imagefiles/build-and-install-ninja.sh @@ -25,14 +25,20 @@ while [ $# -gt 0 ]; do shift done +if [[ -z "${NINJA_VERSION}" ]]; then + echo >&2 'error: NINJA_VERSION env. variable must be set to a non-empty value' + exit 1 +fi + # Download -REV=v1.10.2 +url="https://github.com/ninja-build/ninja/archive/${NINJA_VERSION}.tar.gz" + curl --connect-timeout 30 \ --max-time 10 \ --retry 5 \ --retry-delay 10 \ --retry-max-time 30 \ - -# -o ninja.tar.gz -LO https://github.com/ninja-build/ninja/archive/$REV.tar.gz + -# -o ninja.tar.gz -LO "v$url" mkdir ninja tar -xzvf ./ninja.tar.gz --strip-components=1 -C ./ninja From e21db577b48d5d08c5caf841aed8ce405f30577d Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 18 May 2022 17:56:48 +0200 Subject: [PATCH 2/6] Update openssl version Signed-off-by: Bensuperpc --- common/common.docker | 2 ++ imagefiles/build-and-install-openssl.sh | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/common/common.docker b/common/common.docker index 07f2a20..0158b10 100644 --- a/common/common.docker +++ b/common/common.docker @@ -4,6 +4,8 @@ ARG GIT_VERSION=2.36.1 ARG CMAKE_VERSION=3.23.1 ARG NINJA_VERSION=1.11.0 ARG FLATCC_VERSION=d90ed18ad09824297ffd5fbc578ccb1666d13890 +ARG OPENSSL_VERSION=openssl-1.1.1o +ARG OPENSSL_HASH=9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f # Image build scripts COPY \ diff --git a/imagefiles/build-and-install-openssl.sh b/imagefiles/build-and-install-openssl.sh index 5d6a705..adad2fb 100755 --- a/imagefiles/build-and-install-openssl.sh +++ b/imagefiles/build-and-install-openssl.sh @@ -47,9 +47,17 @@ source $MY_DIR/utils.sh # copied from https://github.com/pypa/manylinux/tree/master/docker/build_scripts # -OPENSSL_ROOT=openssl-1.1.1l +if [[ -z "${OPENSSL_VERSION}" ]]; then + echo >&2 'error: OPENSSL_VERSION env. variable must be set to a non-empty value' + exit 1 +fi + +if [[ -z "${OPENSSL_HASH}" ]]; then + echo >&2 'error: OPENSSL_HASH env. variable must be set to a non-empty value' + exit 1 +fi + # Hash from https://www.openssl.org/source/openssl-1.1.1l.tar.gz.sha256 -OPENSSL_HASH=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1 OPENSSL_DOWNLOAD_URL=http://www.openssl.org/source/ # a recent enough perl is needed to build openssl @@ -111,7 +119,7 @@ function build_openssl { cd /usr/src build_perl $PERL_ROOT $PERL_HASH -build_openssl $OPENSSL_ROOT $OPENSSL_HASH +build_openssl "${OPENSSL_VERSION}" "${OPENSSL_HASH}" # Delete PERL rm -rf /opt/perl From 451acec74b466b383d9caf45adc294bf82d9a3fd Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 18 May 2022 18:04:52 +0200 Subject: [PATCH 3/6] Update curl version Signed-off-by: Bensuperpc --- imagefiles/build-and-install-curl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imagefiles/build-and-install-curl.sh b/imagefiles/build-and-install-curl.sh index e67248b..740a7a2 100755 --- a/imagefiles/build-and-install-curl.sh +++ b/imagefiles/build-and-install-curl.sh @@ -10,8 +10,8 @@ source $MY_DIR/utils.sh # copied from https://github.com/pypa/manylinux/tree/master/docker/build_scripts # -CURL_ROOT=curl-7.76.0 -CURL_HASH=3b4378156ba09e224008e81dcce854b7ce4d182b1f9cfb97fe5ed9e9c18c6bd3 +CURL_ROOT=curl-7_83_1 +CURL_HASH=93fb2cd4b880656b4e8589c912a9fd092750166d555166370247f09d18f5d0c0 CURL_DOWNLOAD_URL=https://curl.haxx.se/download function do_curl_build { From 52c9e8313c0e22df54b39a5b341fcb0b3313f6a9 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 18 May 2022 22:34:46 +0200 Subject: [PATCH 4/6] Fix error Signed-off-by: Bensuperpc --- imagefiles/build-and-install-curl.sh | 2 +- imagefiles/build-and-install-ninja.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/imagefiles/build-and-install-curl.sh b/imagefiles/build-and-install-curl.sh index 740a7a2..78c2113 100755 --- a/imagefiles/build-and-install-curl.sh +++ b/imagefiles/build-and-install-curl.sh @@ -10,7 +10,7 @@ source $MY_DIR/utils.sh # copied from https://github.com/pypa/manylinux/tree/master/docker/build_scripts # -CURL_ROOT=curl-7_83_1 +CURL_ROOT=curl-7.83.1 CURL_HASH=93fb2cd4b880656b4e8589c912a9fd092750166d555166370247f09d18f5d0c0 CURL_DOWNLOAD_URL=https://curl.haxx.se/download diff --git a/imagefiles/build-and-install-ninja.sh b/imagefiles/build-and-install-ninja.sh index beacda5..64d3b68 100755 --- a/imagefiles/build-and-install-ninja.sh +++ b/imagefiles/build-and-install-ninja.sh @@ -31,14 +31,14 @@ if [[ -z "${NINJA_VERSION}" ]]; then fi # Download -url="https://github.com/ninja-build/ninja/archive/${NINJA_VERSION}.tar.gz" +url="https://github.com/ninja-build/ninja/archive/v${NINJA_VERSION}.tar.gz" curl --connect-timeout 30 \ --max-time 10 \ --retry 5 \ --retry-delay 10 \ --retry-max-time 30 \ - -# -o ninja.tar.gz -LO "v$url" + -# -o ninja.tar.gz -LO "$url" mkdir ninja tar -xzvf ./ninja.tar.gz --strip-components=1 -C ./ninja From 1f84d64675405c8364bf43574a4880f526a15206 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 18 May 2022 23:44:47 +0200 Subject: [PATCH 5/6] back to 7.76.0 curl Signed-off-by: Bensuperpc --- imagefiles/build-and-install-curl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imagefiles/build-and-install-curl.sh b/imagefiles/build-and-install-curl.sh index 78c2113..e67248b 100755 --- a/imagefiles/build-and-install-curl.sh +++ b/imagefiles/build-and-install-curl.sh @@ -10,8 +10,8 @@ source $MY_DIR/utils.sh # copied from https://github.com/pypa/manylinux/tree/master/docker/build_scripts # -CURL_ROOT=curl-7.83.1 -CURL_HASH=93fb2cd4b880656b4e8589c912a9fd092750166d555166370247f09d18f5d0c0 +CURL_ROOT=curl-7.76.0 +CURL_HASH=3b4378156ba09e224008e81dcce854b7ce4d182b1f9cfb97fe5ed9e9c18c6bd3 CURL_DOWNLOAD_URL=https://curl.haxx.se/download function do_curl_build { From 18b6f27f49e64a7ae6ce96d13ab7f36cf9b19c13 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Thu, 19 May 2022 00:24:44 +0200 Subject: [PATCH 6/6] Update scripts Signed-off-by: Bensuperpc --- common/common.docker | 9 +++++++++ imagefiles/build-and-install-curl.sh | 14 +++++++++++--- imagefiles/build-and-install-openssl.sh | 15 +++++++++++---- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/common/common.docker b/common/common.docker index 0158b10..6654f44 100644 --- a/common/common.docker +++ b/common/common.docker @@ -1,12 +1,21 @@ WORKDIR /usr/src ARG GIT_VERSION=2.36.1 + ARG CMAKE_VERSION=3.23.1 + ARG NINJA_VERSION=1.11.0 ARG FLATCC_VERSION=d90ed18ad09824297ffd5fbc578ccb1666d13890 + ARG OPENSSL_VERSION=openssl-1.1.1o ARG OPENSSL_HASH=9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f +ARG CURL_VERSION=curl-7.76.0 +ARG CURL_HASH=3b4378156ba09e224008e81dcce854b7ce4d182b1f9cfb97fe5ed9e9c18c6bd3 + +ARG PERL_VERSION=perl-5.32.1 +ARG PERL_HASH=03b693901cd8ae807231b1787798cf1f2e0b8a56218d07b7da44f784a7caeb2c + # Image build scripts COPY \ imagefiles/build-and-install-cmake.sh \ diff --git a/imagefiles/build-and-install-curl.sh b/imagefiles/build-and-install-curl.sh index e67248b..c015c05 100755 --- a/imagefiles/build-and-install-curl.sh +++ b/imagefiles/build-and-install-curl.sh @@ -10,8 +10,16 @@ source $MY_DIR/utils.sh # copied from https://github.com/pypa/manylinux/tree/master/docker/build_scripts # -CURL_ROOT=curl-7.76.0 -CURL_HASH=3b4378156ba09e224008e81dcce854b7ce4d182b1f9cfb97fe5ed9e9c18c6bd3 +if [[ -z "${CURL_VERSION}" ]]; then + echo >&2 'error: CURL_VERSION env. variable must be set to a non-empty value' + exit 1 +fi + +if [[ -z "${CURL_HASH}" ]]; then + echo >&2 'error: CURL_HASH env. variable must be set to a non-empty value' + exit 1 +fi + CURL_DOWNLOAD_URL=https://curl.haxx.se/download function do_curl_build { @@ -43,7 +51,7 @@ function build_curl { } cd /usr/src -build_curl $CURL_ROOT $CURL_HASH +build_curl "${CURL_VERSION}" "${CURL_HASH}" (cat /etc/ld.so.conf.d/usr-local.conf 2> /dev/null | grep -q "^/usr/local/lib$") || echo '/usr/local/lib' >> /etc/ld.so.conf.d/usr-local.conf diff --git a/imagefiles/build-and-install-openssl.sh b/imagefiles/build-and-install-openssl.sh index adad2fb..377267d 100755 --- a/imagefiles/build-and-install-openssl.sh +++ b/imagefiles/build-and-install-openssl.sh @@ -57,12 +57,19 @@ if [[ -z "${OPENSSL_HASH}" ]]; then exit 1 fi +if [[ -z "${PERL_VERSION}" ]]; then + echo >&2 'error: PERL_VERSION env. variable must be set to a non-empty value' + exit 1 +fi + +if [[ -z "${PERL_HASH}" ]]; then + echo >&2 'error: PERL_HASH env. variable must be set to a non-empty value' + exit 1 +fi + # Hash from https://www.openssl.org/source/openssl-1.1.1l.tar.gz.sha256 OPENSSL_DOWNLOAD_URL=http://www.openssl.org/source/ -# a recent enough perl is needed to build openssl -PERL_ROOT=perl-5.32.1 -PERL_HASH=03b693901cd8ae807231b1787798cf1f2e0b8a56218d07b7da44f784a7caeb2c PERL_DOWNLOAD_URL=https://www.cpan.org/src/5.0 function do_perl_build { @@ -118,7 +125,7 @@ function build_openssl { } cd /usr/src -build_perl $PERL_ROOT $PERL_HASH +build_perl "${PERL_VERSION}" "${PERL_HASH}" build_openssl "${OPENSSL_VERSION}" "${OPENSSL_HASH}" # Delete PERL