diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-09 10:33:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-14 07:24:32 +0000 |
commit | d615b4a99f2dcbdf464323b4c63f4f71b08b8c47 (patch) | |
tree | 0d809a18ab4cc1295ec473d3819b56d5ff0900df /coin/provisioning/qtci-macos-10.12-x86_64 | |
parent | bded0e1bbc43c1243b2d924f54862b5b7eb748ec (diff) | |
parent | bbf18ab4ad3d965f1512f64e7d3c49eeb5f3f8b3 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.gitmodules
coin/platform_configs/qt5.txt
Remove QNX Windows builds, 0358b6d2
Remove Integrity build temporarily, QTBUG-61702
coin/provisioning/qtci-macos-10.12-x86_64/020-xcode.sh
Done-with: Liang Qi <liang.qi@qt.io>
Change-Id: I5a56633d6cd60b5514828060fde87f784e54cdda
Diffstat (limited to 'coin/provisioning/qtci-macos-10.12-x86_64')
6 files changed, 379 insertions, 62 deletions
diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/005-systemsetup.sh b/coin/provisioning/qtci-macos-10.12-x86_64/005-systemsetup.sh index 48430389..5819e9de 100755 --- a/coin/provisioning/qtci-macos-10.12-x86_64/005-systemsetup.sh +++ b/coin/provisioning/qtci-macos-10.12-x86_64/005-systemsetup.sh @@ -46,10 +46,15 @@ ExceptionSetInitialDelay=101 ExceptionSetDelay=102 ExceptionVNC=103 ExceptionNTS=104 +ExceptionDisableScreensaverPassword=105 try ( echo "Disable Screensaver" + # For current session + defaults -currentHost write com.apple.screensaver idleTime 0 || throw $ExceptionDisableScreensaver + + # For session after a reboot mkdir -p "$HOME/Library/LaunchAgents" || throw $ExceptionDisableScreensaver ( cat >"$HOME/Library/LaunchAgents/no-screensaver.plist" <<EOT @@ -78,6 +83,8 @@ try EOT ) || throw $ExceptionDisableScreensaver + defaults write com.apple.screensaver askForPassword -int 0 || throw $ExceptionDisableScreensaverPassword + echo "Set keyboard type rates and delays" # normal minimum is 15 (225 ms) defaults write -g InitialKeyRepeat -int 15 || throw $ExceptionSetInitialDelay @@ -113,5 +120,9 @@ catch || { echo "Failed to set NTS." exit 1; ;; + $ExceptionDisableScreensaverPassword) + echo "Failed to disable requiring of password after screensaver is enabled." + exit 1; + ;; esac } diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/007-SSL_keychain.sh b/coin/provisioning/qtci-macos-10.12-x86_64/007-SSL_keychain.sh new file mode 100755 index 00000000..61406203 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.12-x86_64/007-SSL_keychain.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# Enables the usage of temporary keychains for SSL autotests +echo "export QT_SSL_USE_TEMPORARY_KEYCHAIN=1" >> ~/.bashrc diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/020-java.sh b/coin/provisioning/qtci-macos-10.12-x86_64/020-java.sh new file mode 100755 index 00000000..a9776ba6 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.12-x86_64/020-java.sh @@ -0,0 +1,129 @@ +#!/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 installs JDK +echo "Installing Java Development Kit" + +# shellcheck source=../common/try_catch.sh +source "${BASH_SOURCE%/*}/../common/try_catch.sh" + +ExceptionDownloadPrimaryUrl=100 +ExceptionDownloadAltUrl=101 +ExceptionSHA1=102 +ExceptionAttachImage=103 +ExceptionInstall=104 +ExceptionDetachImage=105 +ExceptionRemoveTmpFile=106 +ExceptionDisableAutoUpdate=107 + + +url=http://ci-files01-hki.ci.local/input/mac/macos_10.12_sierra/jdk-8u102-macosx-x64.dmg +url_alt=http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-macosx-x64.dmg +targetFile=/tmp/jdk-8u102-macosx-x64.dmg +expectedSha1=1405af955f14e32aae187b5754a716307db22104 + +try +( + try + ( + echo "Downloading from primary URL '$url'" + curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" || throw $ExceptionDownloadPrimaryUrl + ) + catch || { + case $ex_code in + $ExceptionDownloadPrimaryUrl) + echo "Failed to download '$url' multiple times" + echo "Downloading tar.gz from alternative URL '$url_alt'" + curl --fail -L --retry 5 --retry-delay 5 -j -k -H "Cookie: oraclelicense=accept-securebackup-cookie" -o "$targetFile" "$url_alt" || throw $ExceptionDownloadAltUrl + ;; + esac + } + echo "Checking SHA1 on '$targetFile'" + echo "$expectedSha1 *$targetFile" | shasum --check || throw $ExceptionSHA1 + + echo Mounting DMG + hdiutil attach "$targetFile" || throw $ExceptionAttachImage + + echo Installing JDK + (cd /Volumes/JDK\ 8\ Update\ 102/ && sudo installer -package JDK\ 8\ Update\ 102.pkg -target /) || throw $ExceptionInstall + + disk=`hdiutil info | grep '/Volumes/JDK 8 Update 102' | awk '{print $1}'` + hdiutil detach $disk || throw $ExceptionDetachImage + + echo "Removing temporary file '$targetFile'" + rm "$targetFile" || throw $ExceptionRemoveTmpFile + + echo "Disable auto update" + sudo defaults write /Library/Preferences/com.oracle.java.Java-Updater JavaAutoUpdateEnabled -bool false || throw $ExceptionDisableAutoUpdate + + echo "JDK Version = 8 update 102" >> ~/versions.txt +) +catch || { + case $ex_code in + $ExceptionDownloadPrimaryUrl) + echo "Failed to download JDK from primary URL." + exit 1; + ;; + $ExceptionDownloadAltUrl) + echo "Failed to download JDK from alternative URL." + exit 1; + ;; + $ExceptionSHA1) + echo "Failed to check SHA1." + exit 1; + ;; + $ExceptionAttachImage) + echo "Failed to attach image." + exit 1; + ;; + $ExceptionInstall) + echo "Failed to install JDK." + exit 1; + ;; + $ExceptionDetachImage) + echo "Failed to detach image." + exit 1; + ;; + $ExceptionRemoveTmpFile) + echo "Failed to remove temporary file." + exit 1; + ;; + $ExceptionDisableAutoUpdate) + echo "Failed to disable auto update." + exit 1; + ;; + + esac +} diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/020-xcode.sh b/coin/provisioning/qtci-macos-10.12-x86_64/020-xcode.sh index 7c70d954..272952ed 100755 --- a/coin/provisioning/qtci-macos-10.12-x86_64/020-xcode.sh +++ b/coin/provisioning/qtci-macos-10.12-x86_64/020-xcode.sh @@ -45,66 +45,7 @@ # shellcheck source=../common/try_catch.sh source "${BASH_SOURCE%/*}/../common/try_catch.sh" -ExceptionDownloadUrl=100 -ExceptionSHA1=101 -ExceptionUnXZ=102 -ExceptionCPIO=103 -ExceptionDelete=104 -ExceptionAcceptLicense=105 +# shellcheck source=../common/install_xcode.sh +source "${BASH_SOURCE%/*}/../common/install_xcode.sh" - -url=http://ci-files01-hki.ci.local/input/mac/Xcode_8.3.1.xz -targetFile=/tmp/Xcode_8.3.1.xz -expectedSha1=4ecdba2e563229034802a4ee9a0800b947d05a8e - -try -( - echo "Downloading Xcode from primary URL '$url'" - curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" || throw $ExceptionDownloadUrl - - echo "Checking SHA1 on $targetFile" - echo "$expectedSha1 *$targetFile" | shasum --check || throw $ExceptionSHA1 - - echo "Uncompressing '$targetFile'" - xz -d "$targetFile" || throw $ExceptionUnXZ - - echo "Unarchiving '${targetFile%.*}'" - (cd /Applications/ && sudo cpio -dmiI "${targetFile%.*}") || throw $ExceptionCPIO - - echo "Deleting '${targetFile%.*}'" - rm "${targetFile%.*}" || throw $ExceptionDelete - - echo "Accept license" - sudo xcodebuild -license accept || throw $ExceptionAcceptLicense - - echo "XCode = 8.3.1" >> ~/versions.txt -) -catch || { - case $ex_code in - $ExceptionDownloadUrl) - echo "Failed to download Xcode." - exit 1; - ;; - $ExceptionSHA1) - echo "Failed to check SHA1." - exit 1; - ;; - $ExceptionUnXZ) - echo "Failed to uncompress .xz" - exit 1; - ;; - $ExceptionCPIO) - echo "Failed to unarchive .cpio." - exit 1; - ;; - $ExceptionDelete) - echo "Failed to delete temporary file." - exit 1; - ;; - $ExceptionAcceptLicense) - echo "Failed to accept license." - exit 1; - ;; - - esac -} +InstallXCode /net/ci-files01-hki.ci.local/hdd/www/input/mac/Xcode_8.3.1.xz 8.3.1 diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/030-android.sh b/coin/provisioning/qtci-macos-10.12-x86_64/030-android.sh new file mode 100755 index 00000000..c6a17530 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.12-x86_64/030-android.sh @@ -0,0 +1,116 @@ +#!/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 + +# shellcheck source=../common/try_catch.sh +source "${BASH_SOURCE%/*}/../common/try_catch.sh" + +targetFolder="/opt/android" +sdkTargetFolder="$targetFolder/sdk" + +basePath="/net/ci-files01-hki.ci.local/hdd/www/input/android" + +toolsVersion="r25.2.5" +toolsFile="tools_$toolsVersion-macosx.zip" +ndkVersion="r10e" +ndkFile="android-ndk-$ndkVersion-darwin-x86_64.zip" +sdkBuildToolsVersion="25.0.2" +sdkApiLevel="android-21" + +toolsSha1="d2168d963ac5b616e3d3ddaf21511d084baf3659" +ndkSha1="6be8598e4ed3d9dd42998c8cb666f0ee502b1294" + +toolsTargetFile="/tmp/$toolsFile" +toolsSourceFile="$basePath/$toolsFile" +ndkTargetFile="/tmp/$ndkFile" +ndkSourceFile="$basePath/$ndkFile" + +ExceptionUnzipTools=100 +ExceptionUnzipNdk=101 +ExceptionRmTools=102 +ExceptionRmNdk=103 +ExceptionSdkManager=104 + +try +( + echo "Unzipping Android NDK to '$targetFolder'" + sudo unzip -q "$ndkSourceFile" -d "$targetFolder" || throw $ExceptionUnzipNdk + echo "Unzipping Android Tools to '$sdkTargetFolder'" + sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder" || throw $ExceptionUnzipTools + + 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_ROOT=$sdkTargetFolder" >> ~/.bashrc + echo "export ANDROID_NDK_HOME=$targetFolder/android-ndk-$ndkVersion" >> ~/.bashrc + echo "export ANDROID_NDK_HOST=darwin-x86_64" >> ~/.bashrc + echo "export ANDROID_API_VERSION=$sdkApiLevel" >> ~/.bashrc + + echo "Android SDK tools = $toolsVersion" >> ~/version.txt + echo "Android SDK Build Tools = $sdkBuildToolsVersion" >> ~/version.txt + echo "Android SDK API level = $sdkApiLevel" >> ~/version.txt + echo "Android NDK = $ndkVersion" >> ~/version.txt +) +catch || { + case $ex_code in + $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/qtci-macos-10.12-x86_64/035-openssl.sh b/coin/provisioning/qtci-macos-10.12-x86_64/035-openssl.sh new file mode 100755 index 00000000..acd0bd74 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.12-x86_64/035-openssl.sh @@ -0,0 +1,117 @@ +#!/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 OpenSSL + +# shellcheck source=../common/try_catch.sh +source "${BASH_SOURCE%/*}/../common/try_catch.sh" +# shellcheck source=../common/InstallFromCompressedFileFromURL.sh +source "${BASH_SOURCE%/*}/../common/InstallFromCompressedFileFromURL.sh" + +opensslVersion="1.0.2k" +opensslFile="openssl-$opensslVersion.tar.gz" +opensslDlUrl="http://ci-files01-hki.ci.local/input/openssl/$opensslFile" +opensslAltDlUrl="https://www.openssl.org/source/$opensslFile" +opensslSha1="5f26a624479c51847ebd2f22bb9f84b3b44dcb44" + +# Below target location has been hard coded into Coin. +# QTQAINFRA-1195 +opensslTargetLocation="/usr/local/opt/openssl" + +ExceptionCD=100 +ExceptionConfig=101 +ExceptionMake=102 +ExceptionInstall=103 +ExceptionLN=104 +ExceptionCertificate=105 +ExceptionCleanup=106 + +try +( + InstallFromCompressedFileFromURL "$opensslDlUrl" "$opensslAltDlUrl" "$opensslSha1" "/tmp/openssl-$opensslVersion" "openssl-$opensslVersion" + cd "/tmp/openssl-$opensslVersion" || throw $ExceptionCD + pwd + sudo ./config --prefix=/usr/local/openssl-$opensslVersion || throw $ExceptionConfig + echo "Running 'make' for OpenSSL" + sudo make --silent > /tmp/openssl_make.log 2>&1 || throw $ExceptionMake + echo "Running 'make install' for OpenSSL" + sudo make --silent install > /tmp/openssl_make_install.log 2>&1 || throw $ExceptionInstall + + path=$(echo "$opensslTargetLocation" | sed -E 's/(.*)\/.*$/\1/') + sudo mkdir -p "$path" + sudo ln -s /usr/local/openssl-$opensslVersion $opensslTargetLocation || throw $ExceptionLN + + echo "export PATH=\"$opensslTargetLocation/bin:$PATH\"" >> ~/.bashrc + echo "export MANPATH=\"$opensslTargetLocation/share/man:$MANPATH\"" >> ~/.bashrc + + security find-certificate -a -p /Library/Keychains/System.keychain | sudo tee -a $opensslTargetLocation/ssl/cert.pem || throw $ExceptionCertificate + security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain | sudo tee -a $opensslTargetLocation/ssl/cert.pem || throw $ExceptionCertificate + + sudo rm -rf /tmp/openssl-$opensslVersion || throw $ExceptionCleanup + + echo "OpenSSL = $opensslVersion" >> ~/versions.txt +) +catch || { + case $ex_code in + $ExceptionCD) + echo "Failed to change directory to /tmp/openssl-$opensslVersion." + exit 1; + ;; + $ExceptionConfig) + echo "Failed to run config for OpenSSL." + exit 1; + ;; + $ExceptionMake) + echo "Failed to run 'make' for OpenSSL." + exit 1; + ;; + $ExceptionInstall) + echo "Failed to run 'make install' for OpenSSL." + exit 1; + ;; + $ExceptionLN) + echo "Failed to create a soft link for OpenSSL." + exit 1; + ;; + $ExceptionCertificate) + echo "Failed to install Certificate for OpenSSL." + exit 1; + ;; + $ExceptionCleanup) + echo "Failed to clean up /tmp/openssl-$opensslVersion." + exit 1; + ;; + esac +} |