From 18b6f27f49e64a7ae6ce96d13ab7f36cf9b19c13 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Thu, 19 May 2022 00:24:44 +0200 Subject: [PATCH] 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