diff options
author | Heikki Halmet <heikki.halmet@qt.io> | 2022-01-18 11:07:05 +0200 |
---|---|---|
committer | Heikki Halmet <heikki.halmet@qt.io> | 2022-05-06 08:43:22 +0300 |
commit | 6656aca5fb051cd60b38ddc85b928b3872bc6d51 (patch) | |
tree | d855bc9dc18e8cde1011ca5a5dd137459941b1bc | |
parent | 20f8f198f38150d1cdd56a72fcd8b1a5d533ce2d (diff) |
Provisioning: Update OpenSSL to version 1.1.1m
Change-Id: I93702b9faac5abc9fc01a5725cf34a17a94f0bea
(cherry picked from commit 87321654619f9a336f702d746bbb5d9a26bd9dc6)
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
7 files changed, 194 insertions, 82 deletions
diff --git a/coin/provisioning/common/unix/install-openssl.sh b/coin/provisioning/common/unix/install-openssl.sh index 75b7edbc..a66767fb 100755 --- a/coin/provisioning/common/unix/install-openssl.sh +++ b/coin/provisioning/common/unix/install-openssl.sh @@ -2,8 +2,8 @@ ############################################################################# ## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ +## Copyright (C) 2022 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. ## @@ -42,11 +42,11 @@ source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh" # shellcheck source=../unix/SetEnvVar.sh source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" -version="1.1.1g" +version="1.1.1m" officialUrl="https://www.openssl.org/source/openssl-$version.tar.gz" cachedUrl="http://ci-files01-hki.intra.qt.io/input/openssl/openssl-$version.tar.gz" targetFile="/tmp/openssl-$version.tar.gz" -sha="b213a293f2127ec3e323fb3cfc0c9807664fd997" +sha="39d424c4411e45f1570073d7a71b1830b96007ca" opensslHome="${HOME}/openssl-${version}" opensslSource="${opensslHome}-src" DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile" diff --git a/coin/provisioning/common/unix/openssl_for_android.sh b/coin/provisioning/common/unix/openssl_for_android.sh new file mode 100755 index 00000000..38be2c97 --- /dev/null +++ b/coin/provisioning/common/unix/openssl_for_android.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2022 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 3 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL3 included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 3 requirements +## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 2.0 or (at your option) the GNU General +## Public license version 3 or any later version approved by the KDE Free +## Qt Foundation. The licenses are as published by the Free Software +## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-2.0.html and +## https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +# This script install prebuilt OpenSSL which was built against Android NDK 21. +# OpenSSL build will fail with Android NDK 22, because it's missing platforms and sysroot directories + +set -ex +# shellcheck source=../unix/DownloadURL.sh +source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh" +# shellcheck source=../unix/SetEnvVar.sh +source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" + +version="1.1.1m" +: ' SOURCE BUILD INSTRUCTIONS - Openssl prebuilt was made using Android NDK 21 +# Source built requires GCC and Perl to be in PATH. +exports_file="/tmp/export.sh" +# source previously made environmental variables. +if uname -a |grep -q "Ubuntu"; then + # shellcheck disable=SC1090 + grep -e "^export" "$HOME/.profile" > $exports_file && source $exports_file + rm -rf "$exports_file" +else + # shellcheck disable=SC1090 + grep -e "^export" "$HOME/.bashrc" > $exports_file && source $exports_file + rm -rf "$exports_file" +fi + +officialUrl="https://www.openssl.org/source/openssl-$version.tar.gz" +cachedUrl="http://ci-files01-hki.intra.qt.io/input/openssl/openssl-$version.tar.gz" +targetFile="/tmp/openssl-$version.tar.gz" +sha="39d424c4411e45f1570073d7a71b1830b96007ca" +opensslHome="${HOME}/openssl/android/openssl-${version}" +DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile" +mkdir -p "${HOME}/openssl/android/" +tar -xzf "$targetFile" -C "${HOME}/openssl/android/" +if uname -a |grep -q "Darwin"; then + TOOLCHAIN=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/darwin-x86_64/bin +else + TOOLCHAIN=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin +fi +cd "$opensslHome" +PATH=$TOOLCHAIN:$PATH CC=clang ./Configure android-arm +PATH=$TOOLCHAIN:$PATH CC=clang make build_generated +' + +if uname -a |grep -q "Darwin"; then + prebuiltUrl="http://ci-files01-hki.intra.qt.io/input/openssl/prebuilt-openssl-1_1_1_m_for-android-ndk-21_darwin.tar.gz" + sha="d8c189f8a329263365c73bc471b6c9c68d117e3a" +else + prebuiltUrl="http://ci-files01-hki.intra.qt.io/input/openssl/prebuilt-openssl-1_1_1_m_for-android-ndk-21.tar.gz" + sha="db028f25ca4d000fe2317c3abfdfa0c234833549" +fi +targetFile="/tmp/prebuilt-openssl-$version.tar.gz" +DownloadURL "$prebuiltUrl" "$prebuiltUrl" "$sha" "$targetFile" +tar -xzf "$targetFile" -C "${HOME}" + +opensslHome="${HOME}/openssl/android/openssl-${version}" +SetEnvVar "OPENSSL_ANDROID_HOME" "$opensslHome" + +echo "OpenSSL for Android = $version" >> ~/versions.txt diff --git a/coin/provisioning/common/windows/android-openssl.ps1 b/coin/provisioning/common/windows/android-openssl.ps1 index 010e7e76..c92bd4fb 100644 --- a/coin/provisioning/common/windows/android-openssl.ps1 +++ b/coin/provisioning/common/windows/android-openssl.ps1 @@ -1,7 +1,7 @@ ############################################################################ ## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ +## Copyright (C) 2022 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. ## @@ -45,9 +45,11 @@ if (Is64BitWinHost) { # Msys need to be installed to target machine # More info and building instructions can be found from http://doc.qt.io/qt-5/opensslsupport.html -$version = "1.1.1g" +$version = "1.1.1m" $zip = Get-DownloadLocation ("openssl-$version.tar.gz") -$sha1 = "b213a293f2127ec3e323fb3cfc0c9807664fd997" +$prebuilt_zip = Get-DownloadLocation ("openssl-android-master-$version.zip") +$sha1 = "39d424c4411e45f1570073d7a71b1830b96007ca" +$prebuilt_sha1 = "07fad2a44ffa90261a779782bd64fe2304487945" $destination = "C:\Utils\openssl-android-master" # msys unix style paths diff --git a/coin/provisioning/common/windows/openssl-arm64.ps1 b/coin/provisioning/common/windows/openssl-arm64.ps1 new file mode 100644 index 00000000..3af34428 --- /dev/null +++ b/coin/provisioning/common/windows/openssl-arm64.ps1 @@ -0,0 +1,77 @@ +############################################################################# +## +## Copyright (C) 2022 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 3 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL3 included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 3 requirements +## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 2.0 or (at your option) the GNU General +## Public license version 3 or any later version approved by the KDE Free +## Qt Foundation. The licenses are as published by the Free Software +## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-2.0.html and +## https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +. "$PSScriptRoot\helpers.ps1" + +# This script installs OpenSSL ARM64 $version. + +##### OpenSSL ARM64 has been pre-built with following commands ##### +# Two different builds were done to the same folder C:\openssl_arm64\. One with '--debug' and one with '--release' parameter +# From Visual studio 'C++ Universal Windows Platform support for v142 build tools (ARM64)' and 'Windows Universal C Runtime' were installed +# cd C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build +# call vcvarsamd64_arm64 +# +# perl Configure no-asm VC-WIN64-ARM --debug --prefix=C:\openssl_arm64\ --openssldir=C:\openssl_arm64\ +# nmake +# nmake install +# +# perl Configure no-asm VC-WIN64-ARM --release --prefix=C:\openssl_arm64\ --openssldir=C:\openssl_arm64\ +# nmake +# nmake install +################################################################################################################################################# + +$version = "1_1_1_m" +$url = "\\ci-files01-hki.intra.qt.io\provisioning\openssl\openssl-$version-arm64.zip" +$sha1 = "52963bba9b542eb885f19641f5cd78870246ea02" +$installFolder = "C:\openssl_arm64" +$zip_package = "C:\Windows\Temp\$version.zip" + +Write-Host "Fetching from URL ..." +Download $url $url $zip_package +Verify-Checksum $zip_package $sha1 +Extract-7Zip $zip_package C:\ +Remove $zip_package + +Set-EnvironmentVariable "OPENSSL_ROOT_DIR_x64_arm64" "$installFolder" +Set-EnvironmentVariable "OPENSSL_CONF_x64_arm64" "$installFolder\bin\openssl.cfg" +Set-EnvironmentVariable "OPENSSL_INCLUDE_x64_arm64" "$installFolder\include" +Set-EnvironmentVariable "OPENSSL_LIB_x64_arm64" "$installFolder\lib" + +# Store version information to ~/versions.txt, which is used to print version information to provision log. +Write-Output "OpenSSL ARM= $version" >> ~/versions.txt diff --git a/coin/provisioning/common/windows/openssl.ps1 b/coin/provisioning/common/windows/openssl.ps1 index 9a66b2ee..4dcf58fe 100644 --- a/coin/provisioning/common/windows/openssl.ps1 +++ b/coin/provisioning/common/windows/openssl.ps1 @@ -1,7 +1,7 @@ ############################################################################# ## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ +## Copyright (C) 2022 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. ## @@ -36,7 +36,7 @@ # This script installs OpenSSL $version. # Both x86 and x64 versions needed when x86 integrations are done on x64 machine -$version = "1_1_1g" +$version = "1_1_1m" $packagex64 = "C:\Windows\Temp\Win64OpenSSL-$version.exe" $packagex86 = "C:\Windows\Temp\Win32OpenSSL-$version.exe" @@ -47,7 +47,7 @@ if (Is64BitWinHost) { $installFolder = "C:\openssl" $externalUrl = "https://slproweb.com/download/Win64OpenSSL-$version.exe" $internalUrl = "\\ci-files01-hki.intra.qt.io\provisioning\openssl\Win64OpenSSL-$version.exe" - $sha1 = "7643561c372720f55de51454a707ede334db086e" + $sha1 = "16d83bd6d36be7b3ea85f822135352fa8f8d8134" Write-Host "Fetching from URL ..." Download $externalUrl $internalUrl $packagex64 @@ -74,7 +74,7 @@ if (Is64BitWinHost) { $externalUrl = "https://slproweb.com/download/Win32OpenSSL-$version.exe" $internalUrl = "\\ci-files01-hki.intra.qt.io\provisioning\openssl\Win32OpenSSL-$version.exe" -$sha1 = "c7d4b096c2413d1af819ccb291214fa3c4cece07" +$sha1 = "1d7146e56b201404ce67f1e636eab360211c175a" Write-Host "Fetching from URL ..." Download $externalUrl $internalUrl $packagex86 diff --git a/coin/provisioning/qtci-linux-RHEL-7.6-x86_64/50-openssl_for_android_linux.sh b/coin/provisioning/qtci-linux-RHEL-7.6-x86_64/50-openssl_for_android_linux.sh index ef2b3ba8..3f200cb4 100755 --- a/coin/provisioning/qtci-linux-RHEL-7.6-x86_64/50-openssl_for_android_linux.sh +++ b/coin/provisioning/qtci-linux-RHEL-7.6-x86_64/50-openssl_for_android_linux.sh @@ -1,37 +1,5 @@ #!/usr/bin/env bash -############################################################################# -## -## Copyright (C) 2017 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL21$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 or version 3 as published by the Free -## Software Foundation and appearing in the file LICENSE.LGPLv21 and -## LICENSE.LGPLv3 included in the packaging of this file. Please review the -## following information to ensure the GNU Lesser General Public License -## requirements will be met: https://www.gnu.org/licenses/lgpl.html and -## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## As a special exception, The Qt Company gives you certain additional -## rights. These rights are described in The Qt Company LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## $QT_END_LICENSE$ -## -############################################################################# set +e # shellcheck disable=SC1091 @@ -39,5 +7,5 @@ source /opt/rh/devtoolset-4/enable set -ex -# shellcheck source=../common/linux/openssl_for_android_linux.sh -source "${BASH_SOURCE%/*}/../common/linux/openssl_for_android_linux.sh" +# shellcheck source=../common/unix/openssl_for_android.sh +source "${BASH_SOURCE%/*}/../common/unix/openssl_for_android.sh" diff --git a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/50-openssl_for_android_linux.sh b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/50-openssl_for_android_linux.sh index 81ea3b17..f3ef6c5d 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/50-openssl_for_android_linux.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/50-openssl_for_android_linux.sh @@ -1,39 +1,6 @@ #!/bin/bash -############################################################################# -## -## Copyright (C) 2017 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL21$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 or version 3 as published by the Free -## Software Foundation and appearing in the file LICENSE.LGPLv21 and -## LICENSE.LGPLv3 included in the packaging of this file. Please review the -## following information to ensure the GNU Lesser General Public License -## requirements will be met: https://www.gnu.org/licenses/lgpl.html and -## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## As a special exception, The Qt Company gives you certain additional -## rights. These rights are described in The Qt Company LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## $QT_END_LICENSE$ -## -############################################################################# - set -ex -# shellcheck source=../common/linux/openssl_for_android_linux.sh -source "${BASH_SOURCE%/*}/../common/linux/openssl_for_android_linux.sh" +# shellcheck source=../common/unix/openssl_for_android.sh +source "${BASH_SOURCE%/*}/../common/unix/openssl_for_android.sh" |