diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-08 12:31:35 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-09 14:05:56 +0100 |
commit | 90272a84aeeb02d5121a1b86dba607dfb57db45f (patch) | |
tree | 0e6424005020faeb0712ef55e39691c19765a743 /coin/provisioning/common | |
parent | f1a9b684bf72282204987b3ed33922e36d693884 (diff) | |
parent | 207494b1d32ec331383d08e6f490cd0b4cfcb82e (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Also update to pyro toolchain in QEMU way.
Conflicts:
coin/platform_configs/default.txt
coin/platform_configs/qt5.txt
coin/platform_configs/qtdeclarative.txt
coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/004-yocto.sh
Done-with: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Task-number: QTBUG-64384
Change-Id: If0451b81059e6831a5e5df0f359f119caf4ee09d
Diffstat (limited to 'coin/provisioning/common')
21 files changed, 376 insertions, 74 deletions
diff --git a/coin/provisioning/common/3dstudio_3rdparty.ps1 b/coin/provisioning/common/3dstudio_3rdparty.ps1 index 36816438..f9c8faa7 100644 --- a/coin/provisioning/common/3dstudio_3rdparty.ps1 +++ b/coin/provisioning/common/3dstudio_3rdparty.ps1 @@ -2,7 +2,7 @@ $zip = "c:\users\qt\downloads\Qt3DStudio-3rdparty-win64-CI.zip" -Invoke-WebRequest -UseBasicParsing http://ci-files01-hki.ci.local/input/3rdparty/Qt3DStudio-3rdparty-win64-CI.zip -OutFile $zip +Invoke-WebRequest -UseBasicParsing http://ci-files01-hki.intra.qt.io/input/3rdparty/Qt3DStudio-3rdparty-win64-CI.zip -OutFile $zip Verify-Checksum $zip "08D740D2EFB4CBCDE7D012908B89AA48DE5CD4E1" Extract-Zip $zip C:\Utils\Qt3DStudio3rdparty Remove-Item $zip diff --git a/coin/provisioning/common/InstallAppFromCompressedFileFromURL.sh b/coin/provisioning/common/InstallAppFromCompressedFileFromURL.sh index bee16dd2..2af2db10 100644 --- a/coin/provisioning/common/InstallAppFromCompressedFileFromURL.sh +++ b/coin/provisioning/common/InstallAppFromCompressedFileFromURL.sh @@ -42,6 +42,7 @@ source "${BASH_SOURCE%/*}/try_catch.sh" # shellcheck source=DownloadURL.sh source "${BASH_SOURCE%/*}/DownloadURL.sh" +ExceptionDownload=99 ExceptionCreateTmpFile=100 ExceptionCreateTmpDirectory=101 ExceptionUncompress=102 @@ -80,7 +81,7 @@ function InstallAppFromCompressedFileFromURL { else targetDirectory=$(mktemp -d) || throw $ExceptionCreateTmpDirectory fi - DownloadURL "$url" "$url_alt" "$expectedSha1" "$targetFile" + (DownloadURL "$url" "$url_alt" "$expectedSha1" "$targetFile") || throw $ExceptionDownload echo "Uncompress $targetFile" case $extension in "tar.gz") @@ -103,6 +104,9 @@ function InstallAppFromCompressedFileFromURL { catch || { case $ex_code in + $ExceptionDownload) + exit 1; + ;; $ExceptionCreateTmpFile) echo "Failed to create temporary file" exit 1; diff --git a/coin/provisioning/common/InstallFromCompressedFileFromURL.sh b/coin/provisioning/common/InstallFromCompressedFileFromURL.sh index e3716597..df84431a 100644 --- a/coin/provisioning/common/InstallFromCompressedFileFromURL.sh +++ b/coin/provisioning/common/InstallFromCompressedFileFromURL.sh @@ -38,6 +38,7 @@ source "${BASH_SOURCE%/*}/try_catch.sh" # shellcheck source=DownloadURL.sh source "${BASH_SOURCE%/*}/DownloadURL.sh" +ExceptionDownload=99 ExceptionCreateTmpFile=100 ExceptionCreateTmpDirectory=101 ExceptionUncompress=102 @@ -66,7 +67,7 @@ function InstallFromCompressedFileFromURL { echo "Creating temporary file and directory" targetFile=$(mktemp "$TMPDIR$(uuidgen)XXXXX.$extension") || throw $ExceptionCreateTmpFile targetDirectory=$(mktemp -d) || throw $ExceptionCreateTmpDirectory - DownloadURL "$url" "$url_alt" "$expectedSha1" "$targetFile" + (DownloadURL "$url" "$url_alt" "$expectedSha1" "$targetFile") || throw $ExceptionDownload echo "Uncompress $targetFile" case $extension in "tar.gz") @@ -90,6 +91,9 @@ function InstallFromCompressedFileFromURL { catch || { case $ex_code in + $ExceptionDownload) + exit 1; + ;; $ExceptionCreateTmpFile) echo "Failed to create temporary file" exit 1; diff --git a/coin/provisioning/common/android_linux.sh b/coin/provisioning/common/android_linux.sh new file mode 100644 index 00000000..ee3008c1 --- /dev/null +++ b/coin/provisioning/common/android_linux.sh @@ -0,0 +1,124 @@ +#!/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$ +## +############################################################################# + +# This script install Android sdk and ndk. + +# It also runs update for SDK API, latest SDK tools, latest platform-tools and build-tools version + +source "${BASH_SOURCE%/*}/../common/try_catch.sh" +source "${BASH_SOURCE%/*}/../common/DownloadURL.sh" + +targetFolder="/opt/android" +sdkTargetFolder="$targetFolder/sdk" + +basePath="http://ci-files01-hki.intra.qt.io/input/android" + +toolsVersion="r25.2.5" +toolsFile="tools_$toolsVersion-linux.zip" +ndkVersion="r10e" +ndkFile="android-ndk-$ndkVersion-linux-x86_64.zip" +sdkBuildToolsVersion="25.0.2" +sdkApiLevel="android-21" + +toolsSha1="72df3aa1988c0a9003ccdfd7a13a7b8bd0f47fc1" +ndkSha1="f692681b007071103277f6edc6f91cb5c5494a32" + +toolsTargetFile="/tmp/$toolsFile" +toolsSourceFile="$basePath/$toolsFile" +ndkTargetFile="/tmp/$ndkFile" +ndkSourceFile="$basePath/$ndkFile" + +ExceptionDownload=99 +ExceptionUnzipTools=100 +ExceptionUnzipNdk=101 +ExceptionRmTools=102 +ExceptionRmNdk=103 +ExceptionSdkManager=104 + +try +( + (DownloadURL "$toolsSourceFile" "$toolsSourceFile" "$toolsSha1" "$toolsTargetFile") || throw $ExceptionDownload + (DownloadURL "$ndkSourceFile" "$ndkSourceFile" "$ndkSha1" "$ndkTargetFile") || throw $ExceptionDownload + echo "Unzipping Android NDK to '$targetFolder'" + sudo unzip -q "$ndkTargetFile" -d "$targetFolder" || throw $ExceptionUnzipNdk + echo "Unzipping Android Tools to '$sdkTargetFolder'" + sudo unzip -q "$toolsTargetFile" -d "$sdkTargetFolder" || throw $ExceptionUnzipTools + rm "$ndkTargetFile" || throw $ExceptionRmNdk + rm "$toolsTargetFile" || throw $ExceptionRmTools + + echo "Changing ownership of Android files." + sudo chown -R qt:wheel "$targetFolder" + + echo "Running SDK manager for platforms;$sdkApiLevel, tools, platform-tools and build-tools;$sdkBuildToolsVersion." + echo "y" |"$sdkTargetFolder/tools/bin/sdkmanager" "platforms;$sdkApiLevel" "tools" "platform-tools" "build-tools;$sdkBuildToolsVersion" || throw $ExceptionSdkManager + + echo "export ANDROID_SDK_HOME=$sdkTargetFolder" >> ~/.bashrc + echo "export ANDROID_NDK_HOME=$targetFolder/android-ndk-$ndkVersion" >> ~/.bashrc + echo "export ANDROID_NDK_HOST=linux-x86_64" >> ~/.bashrc + echo "export ANDROID_API_VERSION=$sdkApiLevel" >> ~/.bashrc + + echo "Android SDK tools = $toolsVersion" >> ~/versions.txt + echo "Android SDK Build Tools = $sdkBuildToolsVersion" >> ~/versions.txt + echo "Android SDK API level = $sdkApiLevel" >> ~/versions.txt + echo "Android NDK = $ndkVersion" >> ~/versions.txt +) +catch || { + case $ex_code in + $ExceptionDownload) + exit 1; + ;; + $ExceptionUnzipTools) + echo "Failed to unzip Android SDK Tools." + exit 1; + ;; + $ExceptionUnzipNdk) + echo "Failed to unzip Android NDK." + exit 1; + ;; + $ExceptionRmTools) + echo "Failed to remove temporary tools package '$toolsTargetFile'." + exit 1; + ;; + $ExceptionRmNdk) + echo "Failed to remove temporary NDK package '$ndkTargetFile'." + exit 1; + ;; + $ExceptionSdkManager) + echo "Failed to run sdkmanager." + exit 1; + ;; + esac +} + diff --git a/coin/provisioning/common/cmake.ps1 b/coin/provisioning/common/cmake.ps1 index 8a94dc5d..1716467c 100644 --- a/coin/provisioning/common/cmake.ps1 +++ b/coin/provisioning/common/cmake.ps1 @@ -44,12 +44,6 @@ Download $officialurl $cachedurl $zip Verify-Checksum $zip "541F6E7EFD228E46770B8631FFE57097576E4D4E" Extract-Zip $zip C: -# TODO: Remove line below after all Windows TIER2 VMs are based on vanilla OS -if((Test-Path -Path "C:\CMake" )){ - try { - Rename-Item -ErrorAction 'Stop' "C:\CMake" C:\CMake_old - } catch {} -} $defaultinstallfolder = "C:\cmake-" + $version + "-win32-x86" Rename-Item $defaultinstallfolder C:\CMake diff --git a/coin/provisioning/common/cmake_linux.sh b/coin/provisioning/common/cmake_linux.sh index c23cf9b2..701d9081 100755 --- a/coin/provisioning/common/cmake_linux.sh +++ b/coin/provisioning/common/cmake_linux.sh @@ -37,8 +37,8 @@ # CMake is needed for autotests that verify that Qt can be built with CMake -# shellcheck source=../common/InstallFromCompressedFileFromURL.sh -source "${BASH_SOURCE%/*}/../common/InstallFromCompressedFileFromURL.sh" +# shellcheck source=InstallFromCompressedFileFromURL.sh +source "${BASH_SOURCE%/*}/InstallFromCompressedFileFromURL.sh" version="3.6.2" PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/cmake/cmake-3.6.2-Linux-x86_64.tar.gz" diff --git a/coin/provisioning/common/disable_selinux.sh b/coin/provisioning/common/disable_selinux.sh new file mode 100644 index 00000000..30162166 --- /dev/null +++ b/coin/provisioning/common/disable_selinux.sh @@ -0,0 +1,5 @@ +# We need to disable selinux while we are overwriting some binaries +# required by it. If this is not done, ICU provisioning will create +# template that is not booting. + +sudo sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config diff --git a/coin/provisioning/common/helpers.ps1 b/coin/provisioning/common/helpers.ps1 index d901e370..f6a9fd90 100644 --- a/coin/provisioning/common/helpers.ps1 +++ b/coin/provisioning/common/helpers.ps1 @@ -28,7 +28,10 @@ function Extract-7Zip if (-not (test-path $zipExe)) { $zipExe = join-path ${env:ProgramW6432} '7-zip\7z.exe' if (-not (test-path $zipExe)) { - throw "Could not find 7-zip." + $zipExe = "C:\Utils\sevenzip\7z.exe" + if (-not (test-path $zipExe)) { + throw "Could not find 7-zip." + } } } } else { diff --git a/coin/provisioning/common/install-java.ps1 b/coin/provisioning/common/install-java.ps1 index 4b9dd097..50f12c89 100644 --- a/coin/provisioning/common/install-java.ps1 +++ b/coin/provisioning/common/install-java.ps1 @@ -36,6 +36,8 @@ # This script will install Java RE # Official Java RE 7 downloads require Oracle accounts. Using local mirrors only. +$installdir = "C:\Program Files\Java\jre7" + $version = "7u7" if( (is64bitWinHost) -eq 1 ) { $arch = "x64" @@ -53,4 +55,8 @@ Copy-Item $url_cache $javaPackage cmd /c "$javaPackage /s SPONSORS=0" echo "Cleaning $javaPackage.." Remove-Item -Recurse -Force "$javaPackage" + +[Environment]::SetEnvironmentVariable("JAVA_HOME", "$installdir", [EnvironmentVariableTarget]::Machine) +Add-Path "$installdir\bin" + echo "Java = $version $arch" >> ~\versions.txt diff --git a/coin/provisioning/common/install-jdk.ps1 b/coin/provisioning/common/install-jdk.ps1 new file mode 100644 index 00000000..e4260deb --- /dev/null +++ b/coin/provisioning/common/install-jdk.ps1 @@ -0,0 +1,78 @@ +############################################################################ +## +## 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$ +## +############################################################################# + +. "$PSScriptRoot\..\common\helpers.ps1" + +# This script will install Java SE + +$installdir = "C:\Program Files\Java\jdk1.8.0_144" + +$version = "8u144" +if( (is64bitWinHost) -eq 1 ) { + $arch = "x64" + $sha1 = "adb03bc3f4b40bcb3227687860798981d58e1858" +} +else { + $arch = "i586" + $sha1 = "3b9ab95914514eaefd72b815c5d9dd84c8e216fc" +} + +$url_cache = "\\ci-files01-hki.intra.qt.io\provisioning\windows\jdk-" + $version + "-windows-" + $arch + ".exe" +$official_url = "http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-" + $version + "-windows-" + $arch + ".exe" +$javaPackage = "C:\Windows\Temp\jdk-$version.exe" + +echo "Fetching Java SE $version..." +$ProgressPreference = 'SilentlyContinue' +try { + echo "...from local cache" + Invoke-WebRequest -UseBasicParsing $url_cache -OutFile $javaPackage +} catch { + echo "...from oracle.com" + $client = new-object System.Net.WebClient + $cookie = "oraclelicense=accept-securebackup-cookie" + $client.Headers.Add("Cookie", $cookie) + $client.DownloadFile($official_url, $javaPackage) + + Invoke-WebRequest -UseBasicParsing $official_url -OutFile $javaPackage +} + +Verify-Checksum $javaPackage $sha1 + +cmd /c "$javaPackage /s SPONSORS=0" +echo "Cleaning $javaPackage.." +Remove-Item -Recurse -Force "$javaPackage" + +[Environment]::SetEnvironmentVariable("JAVA_HOME", "$installdir", [EnvironmentVariableTarget]::Machine) +Add-Path "$installdir\bin" + +echo "Java SE = $version $arch" >> ~\versions.txt diff --git a/coin/provisioning/common/install-sevenzip.ps1 b/coin/provisioning/common/install-sevenzip.ps1 index 1db41cc1..5f19543f 100644 --- a/coin/provisioning/common/install-sevenzip.ps1 +++ b/coin/provisioning/common/install-sevenzip.ps1 @@ -35,7 +35,8 @@ # This script installs 7-Zip -$version = "1604" +$version = "16.04" +$nonDottedVersion = "1604" if( (is64bitWinHost) -eq 1 ) { $arch = "-x64" @@ -46,15 +47,18 @@ else { $sha1 = "dd1cb1163c5572951c9cd27f5a8dd550b33c58a4" } -$url_cache = "\\ci-files01-hki.intra.qt.io\provisioning\windows\7z" + $version + $arch + ".exe" -$url_official = "http://www.7-zip.org/a/7z" + $version + $arch + ".exe" -$7zPackage = "C:\Windows\Temp\7zip-$version.exe" +$url_cache = "\\ci-files01-hki.intra.qt.io\provisioning\windows\7z" + $nonDottedVersion + $arch + ".exe" +$url_official = "http://www.7-zip.org/a/7z" + $nonDottedVersion + $arch + ".exe" +$7zPackage = "C:\Windows\Temp\7zip-$nonDottedVersion.exe" +$7zTargetLocation = "C:\Utils\sevenzip\" Download $url_official $url_cache $7zPackage Verify-Checksum $7zPackage $sha1 -cmd /c "$7zPackage /S /D=C:\Utils\sevenzip\" +Start-Process -FilePath $7zPackage -ArgumentList "/S","/D=$7zTargetLocation" -Wait echo "Cleaning $7zPackage.." Remove-Item -Recurse -Force "$7zPackage" +Add-Path $7zTargetLocation + echo "7-Zip = $version" >> ~\versions.txt diff --git a/coin/provisioning/common/windows_removethemall.ps1 b/coin/provisioning/common/integrity.sh index 0e584900..6998866a 100644..100755 --- a/coin/provisioning/common/windows_removethemall.ps1 +++ b/coin/provisioning/common/integrity.sh @@ -1,9 +1,11 @@ +#!/bin/bash + ############################################################################# ## -## Copyright (C) 2016 The Qt Company Ltd. +## Copyright (C) 2017 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## -## This file is part of the test suite of the Qt Toolkit. +## This file is part of the provisioning scripts of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:LGPL21$ ## Commercial License Usage @@ -31,31 +33,23 @@ ## ############################################################################# -Function Remove { -Param ( - [string]$1 - ) - If (Test-Path $1){ - echo "Remove $1" - Remove-Item -Recurse -Force $1 - }Else{ - echo "'$1' does not exists or already removed !!" - } +# This script installs INTEGRITY + +source "${BASH_SOURCE%/*}/../common/InstallFromCompressedFileFromURL.sh" + +version="11.4.4" +PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/integrity/ghs_$version.tar.gz" +AltUrl="$PrimaryUrl" # we lack an external source for this +SHA1="4afa3c15e13c91734951b73f6b21388294c5d794" +targetFolder="/opt/ghs" +appPrefix="" -} +InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$targetFolder" "$appPrefix" -Function Remove-Path { - Param ( - [string]$Path - ) - echo "Remove $path from Path" - $name = "Path" - $value = ([System.Environment]::GetEnvironmentVariable("Path").Split(";") | ? {$_ -ne "$path"}) -join ";" - $type = "Machine" - [System.Environment]::SetEnvironmentVariable($name,$value,$type) -} +echo "export INTEGRITY_BSP=platform-cortex-a9" >> ~/.bashrc +echo "export INTEGRITY_PATH=$targetFolder/comp_201654" >> ~/.bashrc +echo "export INTEGRITY_DIR=$targetFolder/int1144" >> ~/.bashrc +echo "export INTEGRITY_GL_INC_DIR=\$INTEGRITY_DIR/INTEGRITY-include/Vivante/sdk/inc" >> ~/.bashrc +echo "export INTEGRITY_GL_LIB_DIR=\$INTEGRITY_DIR/libs/Vivante" >> ~/.bashrc -# Remove Android sdk and ndk -dir c:\utils\android* | ForEach { Rename-Item $_ $_"-deleted" } -[Environment]::SetEnvironmentVariable("ANDROID_NDK_HOME",$null,"User") -[Environment]::SetEnvironmentVariable("ANDROID_SDK_HOME",$null,"User") +echo "INTEGRITY = $version" >> ~/versions.txt diff --git a/coin/provisioning/common/mysql.ps1 b/coin/provisioning/common/mysql.ps1 index e300566e..63088861 100644 --- a/coin/provisioning/common/mysql.ps1 +++ b/coin/provisioning/common/mysql.ps1 @@ -57,11 +57,6 @@ function DownloadAndInstall Remove-Item $package } -# Remove any leftovers -try { - Rename-Item -ErrorAction 'Stop' c:\utils\my_sql c:\utils\mysql_deleted -} catch {} - if( (is64bitWinHost) -eq 1 ) { # Install x64 bit version $architecture = "x64" diff --git a/coin/provisioning/common/ninja.ps1 b/coin/provisioning/common/ninja.ps1 index 75d74d36..08bf2579 100644 --- a/coin/provisioning/common/ninja.ps1 +++ b/coin/provisioning/common/ninja.ps1 @@ -2,11 +2,10 @@ $zip = "c:\users\qt\downloads\ninja-1.6.0-win-x86.zip" -Download https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip \\ci-files01-hki.ci.local\provisioning\ninja\ninja-1.6.0-win-x86.zip $zip +Download https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip \\ci-files01-hki.intra.qt.io\provisioning\ninja\ninja-1.6.0-win-x86.zip $zip Verify-Checksum $zip "E01093F6533818425F8EFB0843CED7DCAABEA3B2" Extract-Zip $zip C:\Utils\Ninja Remove-Item $zip -$machinePath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine) -[Environment]::SetEnvironmentVariable("Path", $machinePath + ";C:\Utils\Ninja", [EnvironmentVariableTarget]::Machine) +Add-Path "C:\Utils\Ninja" diff --git a/coin/provisioning/common/openssl_for_android_linux.sh b/coin/provisioning/common/openssl_for_android_linux.sh new file mode 100644 index 00000000..70684eaf --- /dev/null +++ b/coin/provisioning/common/openssl_for_android_linux.sh @@ -0,0 +1,85 @@ +#!/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$ +## +############################################################################# + +# This script install OpenSSL from sources. +# Requires GCC and Perl to be in PATH. + +source "${BASH_SOURCE%/*}/try_catch.sh" +source "${BASH_SOURCE%/*}/DownloadURL.sh" + +version="1.0.2g" +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" +installFolder="/home/qt/" +sha="36af23887402a5ea4ebef91df8e61654906f58f2" +# Until every VM doing Linux Android builds have provisioned the env variable +# OPENSSL_ANDROID_HOME, we can't change the hard coded path that's currently in Coin. +# QTQAINFRA-1436 +opensslHome="${installFolder}openssl-1.0.2" + +ExceptionDownload=99 +ExceptionTar=100 +ExceptionConfig=101 + +try +( + (DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile") || throw $ExceptionDownload + + tar -xzf "$targetFile" -C "$installFolder" || throw $ExceptionTar + # This rename should be removed once hard coded path from Coin is fixed. (QTQAINFRA-1436) + mv "${opensslHome}g" "${opensslHome}" + pushd "$opensslHome" + perl Configure shared android || throw $ExceptionConfig + + echo "export OPENSSL_ANDROID_HOME=$opensslHome" >> ~/.bashrc + echo "OpenSSL for Android = $version" >> ~/versions.txt +) +catch || { + case $ex_code in + $ExceptionDownload) + exit 1; + ;; + $ExceptionTar) + echo "Failed to extract $targetFile" + exit 1; + ;; + $ExceptionConfig) + echo "Failed to run 'config'." + exit 1; + ;; + esac + +} diff --git a/coin/provisioning/common/postgresql.ps1 b/coin/provisioning/common/postgresql.ps1 index dd5858a3..ca47f078 100644 --- a/coin/provisioning/common/postgresql.ps1 +++ b/coin/provisioning/common/postgresql.ps1 @@ -48,11 +48,6 @@ if( (is64bitWinHost) -eq 1 ) { $internalUrl = "\\ci-files01-hki.intra.qt.io\provisioning\windows\postgresql-$version-windows-x64-binaries.zip" $sha1 = "4da0453cdfda335e064d4437cf5bb9d356054cfd" - # Delete any leftovers - try { - Rename-Item -ErrorAction 'Stop' c:\utils\postgresql c:\utils\postgresql-deleted - } catch {} - echo "Fetching from URL ..." Download $externalUrl $internalUrl $packagex64 Verify-Checksum $packagex64 $sha1 diff --git a/coin/provisioning/common/python3.ps1 b/coin/provisioning/common/python3.ps1 index 3c565874..316b567a 100644 --- a/coin/provisioning/common/python3.ps1 +++ b/coin/provisioning/common/python3.ps1 @@ -46,12 +46,12 @@ $install_path = "C:\Python36" if ( $archVer -eq 64 ) { echo "Running in 64 bit system" $externalUrl = "https://www.python.org/ftp/python/$version/python-$version-amd64.exe" - $internalUrl = "http://ci-files01-hki.ci.local/input/windows/python-$version-amd64.exe" + $internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/python-$version-amd64.exe" $sha1 = "bf54252c4065b20f4a111cc39cf5215fb1edccff" } else { $externalUrl = "https://www.python.org/ftp/python/$version/python-$version.exe" - $internalUrl = "http://ci-files01-hki.ci.local/input/windows/python-$version.exe" + $internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/python-$version.exe" $sha1 = "76c50b747237a0974126dd8b32ea036dd77b2ad1" } diff --git a/coin/provisioning/common/python3.sh b/coin/provisioning/common/python3.sh index 56e82386..31591339 100755 --- a/coin/provisioning/common/python3.sh +++ b/coin/provisioning/common/python3.sh @@ -38,7 +38,7 @@ source "${BASH_SOURCE%/*}/InstallPKGFromURL.sh" -PrimaryUrl="http://ci-files01-hki.ci.local/input/mac/python-3.6.1-macosx10.6.pkg" +PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/python-3.6.1-macosx10.6.pkg" AltUrl="https://www.python.org/ftp/python/3.6.1/python-3.6.1-macosx10.6.pkg" SHA1="ae0c749544c2d573c3cc29c4c2d7d9a595db28f9" DestDir="/" diff --git a/coin/provisioning/common/linux-removethemall.sh b/coin/provisioning/common/qnx_700.sh index 4386ec74..1f1c0f3f 100755..100644 --- a/coin/provisioning/common/linux-removethemall.sh +++ b/coin/provisioning/common/qnx_700.sh @@ -33,17 +33,29 @@ ## ############################################################################# -# This script removes preinstalled sw. -# NOTE! Make sure that ALL software which are removed here have provision script under platrom folders which calls this script +# This script installs QNX 7. -function RemoveDir { - targetFolder=$1 +set -ex +targetFolder="/opt/" +sourceFile="http://ci-files01-hki.intra.qt.io/input/qnx/qnx700.tar.xz" +sha1="949a87c5f00d0756956cb4b1b3b213ecaeee9113" +folderName="qnx700" +targetFile="qnx700.tar.xz" +wget --tries=5 --waitretry=5 --output-document="$targetFile" "$sourceFile" +echo "$sha1 $targetFile" | sha1sum --check +if [ ! -d "$targetFolder" ]; then + mkdir -p $targetFolder +fi +sudo tar -C $targetFolder -Jxf $targetFile +sudo chown -R qt:users "$targetFolder"/"$folderName" - if [ -d "$targetFolder" ]; then - echo "Removing existing $targetFolder..." - sudo rm -fr "$targetFolder" - fi -} +# Verify that we have last file in tar +if [ ! -f $targetFolder/$folderName/qnxsdp-env.sh ]; then + echo "Installation failed!" + exit -1 +fi -# Android -RemoveDir /opt/android +rm -rf $targetFile +# Set env variables +echo "export QNX_700=$targetFolder$folderName" >> ~/.bashrc +echo "QNX SDP = 7.0.0" >> ~/versions.txt diff --git a/coin/provisioning/common/ruby.ps1 b/coin/provisioning/common/ruby.ps1 index 343bacfc..f7813c20 100644 --- a/coin/provisioning/common/ruby.ps1 +++ b/coin/provisioning/common/ruby.ps1 @@ -2,6 +2,6 @@ $installer = "c:\users\qt\downloads\rubyinstaller-2.3.1.exe" -Download https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.1.exe http://ci-files01-hki.ci.local/input/ruby/rubyinstaller-2.3.1.exe $installer +Download https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.1.exe http://ci-files01-hki.intra.qt.io/input/ruby/rubyinstaller-2.3.1.exe $installer Verify-Checksum $installer "FF377F6F313849C3B0CD72EEC1EFFA436F0E4A36" & $installer /DIR=C:\ruby /VERYSILENT diff --git a/coin/provisioning/common/vc_redist.ps1 b/coin/provisioning/common/vc_redist.ps1 index 4213dde9..4a8376b6 100644 --- a/coin/provisioning/common/vc_redist.ps1 +++ b/coin/provisioning/common/vc_redist.ps1 @@ -43,13 +43,13 @@ if ( $archVer -eq 64 ) { echo "Running in 64 bit system" $arch = "x64" $externalUrl = "https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe" - $internalUrl = "http://ci-files01-hki.ci.local/input/windows/vc_redist.x64.exe" + $internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/vc_redist.x64.exe" $sha1 = "3155cb0f146b927fcc30647c1a904cd162548c8c" } else { $arch = "x86" $externalUrl = "https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe" - $internalUrl = "http://ci-files01-hki.ci.local/input/windows/vc_redist.x86.exe" + $internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/vc_redist.x86.exe" $sha1 = "bfb74e498c44d3a103ca3aa2831763fb417134d1" } |