From 8f58ed68dcfd2ebe6038a38fa3759a5b00751fd6 Mon Sep 17 00:00:00 2001 From: Peter Shipton Date: Thu, 13 Oct 2022 13:15:54 -0400 Subject: [PATCH] Add --openssl-repo option for downloading OpenSSL source Signed-off-by: Peter Shipton --- closed/get_openssl_source.sh | 13 +++++++++---- get_source.sh | 7 ++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/closed/get_openssl_source.sh b/closed/get_openssl_source.sh index 73783208ea8..79b7256e24c 100644 --- a/closed/get_openssl_source.sh +++ b/closed/get_openssl_source.sh @@ -23,16 +23,17 @@ # =========================================================================== usage() { - echo "Usage: $0 [-h|--help] [--openssl-version=]" + echo "Usage: $0 [-h|--help] [--openssl-repo=] [--openssl-version=]" echo "where:" echo " -h|--help print this help, then exit" + echo " --openssl-repo OpenSSL repository. By default, https://github.com/openssl/openssl.git" echo " --openssl-version OpenSSL version to download. For example, 1.1.1" echo "" exit 1 } OPENSSL_VERSION="" -GIT_URL="https://github.com/openssl/openssl.git" +OPENSSL_URL="https://github.com/openssl/openssl.git" for i in "$@" do @@ -41,6 +42,10 @@ do usage ;; + --openssl-repo=* ) + OPENSSL_URL="${i#*=}" + ;; + --openssl-version=* ) OPENSSL_VERSION="${i#*=}" ;; @@ -85,7 +90,7 @@ if [ -f "openssl/openssl_version.txt" ]; then fi echo "" -echo "Cloning OpenSSL version $OPENSSL_VERSION" -git clone --depth=1 -b $OPENSSL_SOURCE_TAG $GIT_URL +echo "Cloning OpenSSL version $OPENSSL_VERSION from $OPENSSL_URL" +git clone --depth=1 -b $OPENSSL_SOURCE_TAG $OPENSSL_URL echo $OPENSSL_SOURCE_TAG > openssl/openssl_version.txt diff --git a/get_source.sh b/get_source.sh index 459adf37eb1..90756e803f2 100644 --- a/get_source.sh +++ b/get_source.sh @@ -1,6 +1,6 @@ #!/bin/bash # =========================================================================== -# (c) Copyright IBM Corp. 2017, 2021 All Rights Reserved +# (c) Copyright IBM Corp. 2017, 2022 All Rights Reserved # =========================================================================== # # This code is free software; you can redistribute it and/or modify it @@ -41,6 +41,7 @@ usage() { echo " -omr-sha a commit SHA for the omr repository" echo " -omr-reference a local repo to use as a clone reference" echo " -parallel (boolean) if 'true' then the clone j9 repository commands run in parallel, default is false" + echo " --openssl-repo Specify the OpenSSL repository to download from" echo " --openssl-version Specify the version of OpenSSL source to download" echo "" exit 1 @@ -60,6 +61,10 @@ for i in "$@" ; do j9options="${j9options} ${i}" ;; + --openssl-repo=* ) + openssloptions="${openssloptions} ${i}" + ;; + --openssl-version=* ) DOWNLOAD_OPENSSL=true openssloptions="${openssloptions} ${i}"