From 9ac2e8e61c8eb2645a9ca8634f577e25bd811895 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Wed, 1 Nov 2023 16:16:48 -0400 Subject: [PATCH] Add the codes for download GSKit from Artifactory --- closed/get_j9_source.sh | 36 ++++++++++++++++++++---------------- get_source.sh | 2 +- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/closed/get_j9_source.sh b/closed/get_j9_source.sh index b6a99defa19..c7e11d98c62 100644 --- a/closed/get_j9_source.sh +++ b/closed/get_j9_source.sh @@ -45,7 +45,7 @@ usage() { echo " -openjceplus-reference a local repo to use as a clone reference" echo " -with-gskit-bin the GSKit binary url" echo " -with-gskit-sdk-bin the GSKIT SDK binary url" - echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK" + echo " -with-gskit-bin-credential the credential for downloading the GSKit binaries" echo " -parallel (boolean) if 'true' then the clone j9 repository commands run in parallel, default is false" echo "" exit 1 @@ -212,28 +212,32 @@ fi openjceplus_source="OpenJCEPlus" if [ "${git_urls[$openjceplus_source]}" ]; then - echo - echo "$openjceplus_source exists, download ICC binaries" - echo + echo + echo "$openjceplus_source exists, download ICC binaries" + echo - cd $openjceplus_source - mkdir -p ./icc/jgsk_sdk/lib64/ + cd $openjceplus_source + mkdir -p ./icc/jgsk_sdk/lib64/ - if [ $gskit_bin_credential ]; then - curl -H "Authorization: Bearer $gskit_bin_credential" -H "Accept: application/octet-stream" -L $gskit_bin --output ./icc/jgsk_crypto.tar - curl -H "Authorization: Bearer $gskit_bin_credential" -H "Accept: application/octet-stream" -L $gskit_sdk_bin --output ./icc/jgsk_crypto_sdk.tar - else - echo "-with-gskit-bin-credential is empty, will add curl command HERE without credential once there are binaries in open repo." - fi + if [ $gskit_bin_credential ]; then + # Download GSKit binaries from artifactory + curl -vk -u "$gskit_bin_credential" -X GET $gskit_bin > ./icc/jgsk_crypto.tar + curl -vk -u "$gskit_bin_credential" -X GET $gskit_sdk_bin > ./icc/jgsk_crypto_sdk.tar + else + echo + echo "GSKit binaries are needed for compiling $openjceplus_source" + echo "Please set -with-gskit-bin, -with-gskit-sdk-bin, and -with-gskit-bin-credential" + exit 1 + fi tar -xf ./icc/jgsk_crypto_sdk.tar -C ./icc/ tar -xf ./icc/jgsk_crypto.tar -C ./icc/jgsk_sdk/lib64/ - # Create OpenJCEPlus Java module folder - mkdir -p ./src/main/openjceplus/share/classes/ - cp -r ./src/main/java/* ./src/main/openjceplus/share/classes/ + # Create OpenJCEPlus Java module folder + mkdir -p ./src/main/openjceplus/share/classes/ + cp -r ./src/main/java/* ./src/main/openjceplus/share/classes/ - cd .. + cd .. fi END_TIME=$(date +%s) diff --git a/get_source.sh b/get_source.sh index 80e8ff53a80..c599c71ee3c 100644 --- a/get_source.sh +++ b/get_source.sh @@ -46,7 +46,7 @@ usage() { echo " -openjceplus-reference a local repo to use as a clone reference" echo " -with-gskit-bin the GSKit binary url" echo " -with-gskit-sdk-bin the GSKIT SDK binary url" - echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK" + echo " -with-gskit-bin-credential the credential for downloading the GSKit binaries" 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"