diff options
author | Antti Jaakkola <antti.jaakkola@qt.io> | 2020-07-24 09:39:32 +0300 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@qt.io> | 2020-12-31 06:08:19 +0000 |
commit | 68a183324d0285a28abda4c1ac319184ddc2533a (patch) | |
tree | 44061b4563faf8645fe59cdc5cc66802eb567dfe /coin | |
parent | ce27bd8f0e19d5857ac16df6738d7b2c8fa99822 (diff) |
Use Parallels for macOS 10.15 builds and tests
Pick-to: 5.15
Pick-to: 6.0
Change-Id: I875cf12afafae5389f8c974cd40789c5183d4cb2
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'coin')
50 files changed, 1140 insertions, 6 deletions
diff --git a/coin/platform_configs/cmake_platforms.yaml b/coin/platform_configs/cmake_platforms.yaml index 8599a0f5..35558dbb 100644 --- a/coin/platform_configs/cmake_platforms.yaml +++ b/coin/platform_configs/cmake_platforms.yaml @@ -78,6 +78,25 @@ Configurations: 'TEST_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache' ] - + Id: 'macos-10.15-host' + Template: 'qtci-macos-10.15-x86_64-100' + Compiler: 'Clang' + Features: ['Packaging', 'Sccache', 'InsignificantTests'] + Configure arguments: '-DQT_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFEATURE_separate_debug_info=ON -DFEATURE_headersclean=ON -DFEATURE_framework=ON -DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DODBC_ROOT=/usr/local/opt/libiodbc -DPostgreSQL_ROOT={{.Env.POSTGRESQLBINPATH}}/..' + Environment variables: [ + 'NON_QTBASE_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache', + 'TEST_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache' + ] +- + Template: 'qtci-macos-10.15-x86_64-100' + Compiler: 'Clang' + Features: ['Sccache', 'InsignificantTests'] + Configure arguments: '-DFEATURE_developer_build=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_WITH_PCH=OFF -DFEATURE_framework=OFF -DQT_NAMESPACE=TestNamespace -DQT_BUILD_EXAMPLES=ON -DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache' + Environment variables: [ + 'NON_QTBASE_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache', + 'TEST_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache' + ] +- Template: 'qtci-windows-10-x86_64-52' Compiler: 'MSVC2019' Features: ['Packaging', 'Sccache', "DebugAndRelease"] diff --git a/coin/provisioning/common/macos/disable-notifications_and_warnings.sh b/coin/provisioning/common/macos/disable-notifications_and_warnings.sh index c40a4f65..e189e098 100755 --- a/coin/provisioning/common/macos/disable-notifications_and_warnings.sh +++ b/coin/provisioning/common/macos/disable-notifications_and_warnings.sh @@ -4,4 +4,4 @@ echo "Unload notificationcenterui.plist" launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist echo "Remove 32-bit warnings" -rm ~/Library/Preferences/com.apple.coreservices.uiagent.plist +rm -f ~/Library/Preferences/com.apple.coreservices.uiagent.plist diff --git a/coin/provisioning/common/macos/disable_spotlight.sh b/coin/provisioning/common/macos/disable_spotlight.sh index 7c60b52b..de93a335 100755 --- a/coin/provisioning/common/macos/disable_spotlight.sh +++ b/coin/provisioning/common/macos/disable_spotlight.sh @@ -35,4 +35,8 @@ # Disable spotlight and and stop indexing sudo mdutil -a -i off -sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" +sudo mdutil -a -i off / +# Disable spotlight indexing /Volumes +sudo mdutil -i off /Volumes +# Erase spotlight index +sudo mdutil -E / diff --git a/coin/provisioning/common/macos/install_xcode.sh b/coin/provisioning/common/macos/install_xcode.sh index 5eddb72f..61326666 100755 --- a/coin/provisioning/common/macos/install_xcode.sh +++ b/coin/provisioning/common/macos/install_xcode.sh @@ -51,6 +51,8 @@ function InstallXCode() { echo "Uncompressing and installing '$sourceFile'" if [[ $sourceFile =~ tar ]]; then cd /Applications/ && sudo tar -zxf "$sourceFile" + elif [[ $sourceFile =~ "xip" ]]; then + cd /Applications/ && xip -x "$sourceFile" else xzcat < "$sourceFile" | (cd /Applications/ && sudo cpio -dmi) fi diff --git a/coin/provisioning/common/macos/java.sh b/coin/provisioning/common/macos/java.sh index c5222a55..9599cbfd 100755 --- a/coin/provisioning/common/macos/java.sh +++ b/coin/provisioning/common/macos/java.sh @@ -45,10 +45,11 @@ url=ci-files01-hki.intra.qt.io:/hdd/www/input/mac # url_alt=http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-macosx-x64.dmg echo "Mounting $targetFile" -sudo mount "$url" /Volumes +sudo mkdir -p /Volumes/files +sudo mount "$url" /Volumes/files -sudo cp "/Volumes/$targetFile" /tmp -sudo umount /Volumes +sudo cp "/Volumes/files/$targetFile" /tmp +sudo umount /Volumes/files sudo hdiutil attach "/tmp/$targetFile" echo Installing JDK diff --git a/coin/provisioning/common/macos/screenresolution.sh b/coin/provisioning/common/macos/screenresolution.sh new file mode 100755 index 00000000..6cac2441 --- /dev/null +++ b/coin/provisioning/common/macos/screenresolution.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +############################################################################# +## +## Copyright (C) 2020 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$ +## +############################################################################# + +# Install screenresolution and set correct resolution at boot + +brew install screenresolution + +sudo tee -a /usr/local/bin/set_resolution.sh <<"EOF" +#!/bin/bash +sleep 20 +/usr/local/bin/screenresolution set 1280x800x32@0 +EOF + + +sudo chmod a+x /usr/local/bin/set_resolution.sh + + +sudo tee -a ~/Library/LaunchAgents/screenresolution.plist <<"EOF" +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + <dict> + <key>Label</key> + <string>org.qt.io.screenresolution</string> + <key>ProgramArguments</key> + <array> + <string>/usr/local/bin/set_resolution.sh</string> + </array> + <key>RunAtLoad</key> + <true/> + <key>KeepAlive</key> + <false/> + <key>LaunchOnlyOnce</key> + <true/> + <key>StandardErrorPath</key> + <string>/tmp/screenresolution.err</string> + <key>StandardOutPath</key> + <string>/tmp/screenresolution.out</string> + </dict> +</plist> +EOF + diff --git a/coin/provisioning/common/macos/telegraf-coin.conf b/coin/provisioning/common/macos/telegraf-coin.conf index 006de88c..d06e90cc 100644 --- a/coin/provisioning/common/macos/telegraf-coin.conf +++ b/coin/provisioning/common/macos/telegraf-coin.conf @@ -54,4 +54,4 @@ # Monitor I/O latency [[inputs.exec]] data_format = "influx" - commands = [ "/usr/bin/telegraf-ioping.sh /" ] + commands = [ "/usr/local/bin/telegraf-ioping.sh /" ] diff --git a/coin/provisioning/common/macos/telegraf-ioping.sh b/coin/provisioning/common/macos/telegraf-ioping.sh new file mode 100644 index 00000000..eee1372b --- /dev/null +++ b/coin/provisioning/common/macos/telegraf-ioping.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Measure I/O latency once, return data in InfluxDB format +# +# Run one ioping command for read, and one for write. +# Each one sends 3 requests and reports the minimum time, in nanoseconds. +# (Because of limitations of ioping, we can't just send one request and get +# the number back in the batch format. Additionally, the number seems to be +# fluctuating quite a bit so taking the smallest number out of 3 requests is +# stabilising it a bit.) + + +set -e + +[ x"$1" = x ] && echo "$0 takes a path as a first argument" && exit 1 + +# Try to run in high priority to avoid slow-downs because of +# factors other than I/O. +renice -n -10 -p $$ >/dev/null 2>&1 || true + + +rlatency="$(/usr/local/bin/ioping -B -k -c 3 -i 0.1 "$1" | cut -d " " -f 5)" +wlatency="$(/usr/local/bin/ioping -B -k -c 3 -i 0.1 -W "$1" | cut -d " " -f 5)" + +printf "ioping,path=$1 read_latency_ns=%u,write_latency_ns=%u\n" \ + $rlatency $wlatency diff --git a/coin/provisioning/common/macos/telegraf_install.sh b/coin/provisioning/common/macos/telegraf_install.sh new file mode 100755 index 00000000..75a41bf9 --- /dev/null +++ b/coin/provisioning/common/macos/telegraf_install.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +############################################################################# +## +## Copyright (C) 2019 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 telegraf and ioping and our script telegraf-ioping.sh +# to the /usr/bin directory. +# +# The reasons we don't install to /usr/local/bin are: +# 1. On SLES and RHEL, the PATH of sudo (secure_path setting in /etc/sudoers) +# does not include /usr/local/bin. +# 2. On macOS /usr/local/bin does not even exist early in provisioning. + + +######################## BOILERPLATE ########################### +set -e + + +PROVISIONING_DIR="$(dirname "$0")/../../" +. "$PROVISIONING_DIR"/common/unix/common.sourced.sh + +. "$PROVISIONING_DIR"/common/unix/DownloadURL.sh + +is_script_executed telegraf_install.sh \ + || fatal "Script telegraf_install.sh should be executed, not sourced" + +################################################################ + + +[ "$PROVISIONING_OS" = linux ] \ + && ioping_sha256=259abf04bcb84f4126ff97c04b6651e1cf5ea6d8a9ff364c769a26c95b6eeb44 \ + || ioping_sha256=55de6a2f1a5343e0ce8df31d82d47a9e79c7e612edbc6dfb39b5fc6fb358b2e3 +DownloadURL "http://ci-files01-hki.intra.qt.io/input/ioping/ioping.${PROVISIONING_OS}-${PROVISIONING_ARCH}" \ + '' "$ioping_sha256" ioping +/usr/bin/sudo mkdir -p /usr/local/bin/ +$CMD_INSTALL -m 755 ./ioping /usr/local/bin/ +rm -f ioping + +# 2. Install custom ioping monitoring script +$CMD_INSTALL -m 755 "$PROVISIONING_DIR"/common/macos/telegraf-ioping.sh /usr/local/bin/ + +# 3. Download and install telegraf + +[ x"$PROVISIONING_OS" = xmacos ] && os=darwin || os=linux +[ x"$PROVISIONING_ARCH" = xx86 ] && arch=i386 || arch=amd64 +package_filename=telegraf-1.12.6_${os}_${arch}.tar.gz +package_sha256_list="$PROVISIONING_DIR"/common/shared/telegraf/telegraf_packages.sha256.txt +package_sha256=$(sed -n "s/.*$package_filename *//p" "$package_sha256_list") + +DownloadURL \ + http://ci-files01-hki.intra.qt.io/input/telegraf/"$package_filename" \ + https://dl.influxdata.com/telegraf/releases/"$package_filename" \ + "$package_sha256" \ + telegraf.tar.gz + +tar -xzf ./telegraf.tar.gz -C /tmp +telegraf_binary=$(find /tmp/telegraf* -name telegraf -type f | grep /bin/ | head -1) +$CMD_INSTALL -m 755 "$telegraf_binary" /usr/local/bin/ +rm -rf /tmp/telegraf* + +# 4. Edit config file with passwords +"$PROVISIONING_DIR"/common/unix/telegraf_password.sh + +# 5. Start telegraf in background (-b) and with retaining the environment (-E) +# in order to report as hostname = $COIN_UNIQUE_JOB_ID. +/usr/bin/sudo -b -E telegraf --config /etc/telegraf-coin.conf >/dev/null 2>&1 + +echo DONE: "Installed and started telegraf: $package_filename" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/01-disable-notifications_and_warnings.sh b/coin/provisioning/qtci-macos-10.15-x86_64/01-disable-notifications_and_warnings.sh new file mode 100755 index 00000000..27efbb62 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/01-disable-notifications_and_warnings.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +"$(dirname "$0")"/../common/macos/disable-notifications_and_warnings.sh diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/01-increase_limits.sh b/coin/provisioning/qtci-macos-10.15-x86_64/01-increase_limits.sh new file mode 100755 index 00000000..08669e52 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/01-increase_limits.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +"$(dirname "$0")"/../common/macos/increase_limits.sh diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/01-install_telegraf.sh b/coin/provisioning/qtci-macos-10.15-x86_64/01-install_telegraf.sh new file mode 100755 index 00000000..abd9ba0d --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/01-install_telegraf.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +"$(dirname "$0")"/../common/macos/telegraf_install.sh diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/01-sha1sum-compatibility.sh b/coin/provisioning/qtci-macos-10.15-x86_64/01-sha1sum-compatibility.sh new file mode 100755 index 00000000..739a809d --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/01-sha1sum-compatibility.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2020 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$ +## +############################################################################# + +#!/usr/bin/env bash + +set -ex + +# shellcheck source=../common/macos/sha1sum-compatibility.sh +source "${BASH_SOURCE%/*}/../common/macos/sha1sum-compatibility.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/03-bashprofile.sh b/coin/provisioning/qtci-macos-10.15-x86_64/03-bashprofile.sh new file mode 100755 index 00000000..2c3e45f3 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/03-bashprofile.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +set -ex + +# Read .bashrc if exist +printf -- "# Get the aliases and functions\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n" >> ~/.bash_profile + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/05-systemsetup.sh b/coin/provisioning/qtci-macos-10.15-x86_64/05-systemsetup.sh new file mode 100755 index 00000000..aed78aee --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/05-systemsetup.sh @@ -0,0 +1,106 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2020 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 + +# This script modified system settings for automated use + +targetFile="$HOME/vncpw.txt" + +# Fetch password +curl --retry 5 --retry-delay 10 --retry-max-time 60 "http://ci-files01-hki.intra.qt.io/input/semisecure/vncpw.txt" -o "$targetFile" +shasum "$targetFile" |grep "a795fccaa8f277e62ec08e6056c544b8b63924a0" + +{ VNCPassword=$(cat "$targetFile"); } 2> /dev/null +NTS_IP=10.212.2.216 + +echo "Disable Screensaver" +# For current session +defaults -currentHost write com.apple.screensaver idleTime 0 + +echo "Disable sleep" +sudo pmset sleep 0 displaysleep 0 + +# For session after a reboot +mkdir -p "$HOME/Library/LaunchAgents" +sudo tee -a "$HOME/Library/LaunchAgents/no-screensaver.plist" <<EOT +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> + +<plist version="1.0"> + <dict> + <key>Label</key> + <string>org.qt.io.screensaver_disable</string> + <key>ProgramArguments</key> + <array> + <string>defaults</string> + <string>-currentHost</string> + <string>write</string> + <string>com.apple.screensaver</string> + <string>idleTime</string> + <string>0</string> + </array> + <key>RunAtLoad</key> + <true/> + <key>KeepAlive</key> + <false/> + </dict> +</plist> +EOT + +defaults write com.apple.screensaver askForPassword -int 0 + +echo "Set keyboard type rates and delays" +# normal minimum is 15 (225 ms) +defaults write -g InitialKeyRepeat -int 15 +# normal minimum is 2 (30 ms) +defaults write -g KeyRepeat -int 2 + +set +x +echo "Enable remote desktop sharing" +sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw $VNCPassword -restart -agent -privs -all +set -x + +echo "Set Network Test Server address to $NTS_IP in /etc/hosts" +echo "$NTS_IP qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts + +sudo systemsetup settimezone GMT +sudo systemsetup setusingnetworktime off +sudo rm -f "$targetFile" + +# Enable automount for nfs shares +sudo sed -i'.orig' -e 's:^#/net:/net:' -e 's:hidefromfinder,nosuid:hidefromfinder,nosuid,locallocks,nocallback:' /etc/auto_master +sudo automount -cv + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/06-crashreporter.sh b/coin/provisioning/qtci-macos-10.15-x86_64/06-crashreporter.sh new file mode 100755 index 00000000..8461c656 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/06-crashreporter.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +set -ex + +defaults write com.apple.CrashReporter DialogType server diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/06-disable_spotlight.sh b/coin/provisioning/qtci-macos-10.15-x86_64/06-disable_spotlight.sh new file mode 100755 index 00000000..67e2c1f6 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/06-disable_spotlight.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -ex + +# shellcheck source=../common/macos/disable_spotlight.sh +source "${BASH_SOURCE%/*}/../common/macos/disable_spotlight.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/06-disable_update_downloads.sh b/coin/provisioning/qtci-macos-10.15-x86_64/06-disable_update_downloads.sh new file mode 100755 index 00000000..3c11214d --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/06-disable_update_downloads.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -ex +BASEDIR=$(dirname "$0") +"$BASEDIR"/../common/macos/disable_update_downloads.sh diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/07-SSL_keychain.sh b/coin/provisioning/qtci-macos-10.15-x86_64/07-SSL_keychain.sh new file mode 100755 index 00000000..6e7c796a --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/07-SSL_keychain.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +set -ex + +# shellcheck source=../common/unix/SetEnvVar.sh +source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" + +# Enables the usage of temporary keychains for SSL autotests +SetEnvVar "QT_SSL_USE_TEMPORARY_KEYCHAIN" "1" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/15-xz.sh b/coin/provisioning/qtci-macos-10.15-x86_64/15-xz.sh new file mode 100755 index 00000000..0d609fb5 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/15-xz.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2020 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 XZ-Utils + +# XZ-Utils are needed for uncompressing xz-compressed files + +set -ex + +# shellcheck source=../common/macos/InstallPKGFromURL.sh +source "${BASH_SOURCE%/*}/../common/macos/InstallPKGFromURL.sh" + +PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/macos_10.12_sierra/XZ.pkg" +AltUrl="http://sourceforge.net/projects/macpkg/files/XZ/5.0.7/XZ.pkg" +SHA1="f0c1f82ebcffe0bd4b8b57b6a77805db56b2de67" +DestDir="/" + +InstallPKGFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$DestDir" + +echo "XZ = 5.0.7" >> ~/versions.txt diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/20-java.sh b/coin/provisioning/qtci-macos-10.15-x86_64/20-java.sh new file mode 100755 index 00000000..dcfcb93b --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/20-java.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -ex + +BASEDIR=$(dirname "$0") +"$BASEDIR/../common/macos/java.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/20-xcode.sh b/coin/provisioning/qtci-macos-10.15-x86_64/20-xcode.sh new file mode 100755 index 00000000..f26d1027 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/20-xcode.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2020 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 Xcode +# Prerequisites: Have Xcode prefetched to local cache as xz compressed. +# This can be achieved by fetching Xcode_9.xip from Apple Store. +# Uncompress it with 'xar -xf Xcode_9.xip' +# Then get https://gist.githubusercontent.com/pudquick/ff412bcb29c9c1fa4b8d/raw/24b25538ea8df8d0634a2a6189aa581ccc6a5b4b/parse_pbzx2.py +# with which you can run 'python parse_pbzx2.py Content'. +# This will give you five files called "Content.part<00..05>.cpio.xz". +# Extract those that have the extension .xz with xz. +# "cat" together all the content files "cat file1, file2, file3, file4, file5 >file_new" +# Compress the new file with xz back to something like Xcode_9.xz +# Upload the file to temporary storage for this script to use. + +set -ex + +# shellcheck source=../common/macos/install_xcode.sh +source "${BASH_SOURCE%/*}/../common/macos/install_xcode.sh" + +InstallXCode /net/ci-files01-hki.intra.qt.io/hdd/www/input/mac/macos_10.15_catalina/Xcode_11.3.1.xip 11.3.1 diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/21-install-commandlinetools.sh b/coin/provisioning/qtci-macos-10.15-x86_64/21-install-commandlinetools.sh new file mode 100755 index 00000000..4bc482da --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/21-install-commandlinetools.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2020 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/macos/install-commandlinetools.sh +source "${BASH_SOURCE%/*}/../common/macos/install-commandlinetools.sh" +version="11.3.1" +packageName="Command_Line_Tools_for_Xcode_$version.dmg" +url="http://ci-files01-hki.intra.qt.io/input/mac/macos_10.15_catalina/$packageName" +sha1="cec5824d127bba2d2a3ba8e5343ae7a32214e62c" + +InstallCommandLineTools $url $url $sha1 $packageName $version + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/24-sccache.sh b/coin/provisioning/qtci-macos-10.15-x86_64/24-sccache.sh new file mode 100755 index 00000000..358b23fb --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/24-sccache.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +source "${BASH_SOURCE%/*}/../common/macos/sccache.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/25-cmake.sh b/coin/provisioning/qtci-macos-10.15-x86_64/25-cmake.sh new file mode 100755 index 00000000..4f4d405e --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/25-cmake.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -ex + +BASEDIR=$(dirname "$0") +"$BASEDIR/../common/macos/cmake.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/25-homebrew.sh b/coin/provisioning/qtci-macos-10.15-x86_64/25-homebrew.sh new file mode 100755 index 00000000..f7f9e214 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/25-homebrew.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -e + +BASEDIR=$(dirname "$0") +"$BASEDIR/../common/macos/homebrew.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/25-mysql.sh b/coin/provisioning/qtci-macos-10.15-x86_64/25-mysql.sh new file mode 100755 index 00000000..2ec3705f --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/25-mysql.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2020 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 MySQL + +# MySQL is needed for Qt to be able to support MySQL + +set -ex + +# shellcheck source=../common/macos/InstallAppFromCompressedFileFromURL.sh +source "${BASH_SOURCE%/*}/../common/macos/InstallAppFromCompressedFileFromURL.sh" +# shellcheck source=../common/unix/SetEnvVar.sh +source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" + +PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/macos_10.12_sierra/mysql-5.7.15-osx10.11-x86_64.tar.gz" +AltUrl="https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.15-osx10.11-x86_64.tar.gz" +SHA1="07949bd42f350b0504a1536b8830b809b4a34fca" +appPrefix="" +targetDir="/opt/mysql57/" + +sudo mkdir -p "/opt" + +InstallAppFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$appPrefix" "$targetDir" + +SetEnvVar "MYSQLBINPATH" "/opt/mysql57/bin" +echo "MySQL = 5.7.15" >> ~/versions.txt diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/25-pip.sh b/coin/provisioning/qtci-macos-10.15-x86_64/25-pip.sh new file mode 100755 index 00000000..86db3e27 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/25-pip.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -ex + +BASEDIR=$(dirname "$0") +"$BASEDIR/../common/macos/pip.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/25-postgresql.sh b/coin/provisioning/qtci-macos-10.15-x86_64/25-postgresql.sh new file mode 100755 index 00000000..69cfa6aa --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/25-postgresql.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2020 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 PostgreSQL + +# PostgreSQL is needed for Qt to be able to support PostgreSQL + +set -ex + +# shellcheck source=../common/macos/InstallAppFromCompressedFileFromURL.sh +source "${BASH_SOURCE%/*}/../common/macos/InstallAppFromCompressedFileFromURL.sh" +# shellcheck source=../common/unix/SetEnvVar.sh +source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" + +psqlVersion="9.6.0" + +PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/macos_10.12_sierra/Postgres-$psqlVersion.zip" +AltUrl="https://github.com/PostgresApp/PostgresApp/releases/download/$psqlVersion/Postgres-$psqlVersion.zip" +SHA1="5078e44663787006ca55fa3b5e2be598bed82eb5" +appPrefix="" + +InstallAppFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$appPrefix" + +SetEnvVar "POSTGRESQLBINPATH" "/Applications/Postgres.app/Contents/Versions/9.6/bin" +echo "PostgreSQL = $psqlVersion" >> ~/versions.txt diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/25-python2.sh b/coin/provisioning/qtci-macos-10.15-x86_64/25-python2.sh new file mode 100755 index 00000000..7ebb8825 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/25-python2.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -ex + +# shellcheck source=../common/macos/python2.sh +source "${BASH_SOURCE%/*}/../common/macos/python2.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/25-python3.sh b/coin/provisioning/qtci-macos-10.15-x86_64/25-python3.sh new file mode 100755 index 00000000..eb2a4863 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/25-python3.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -ex + +# shellcheck source=../common/macos/python3.sh +source "${BASH_SOURCE%/*}/../common/macos/python3.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/26-freetype.sh b/coin/provisioning/qtci-macos-10.15-x86_64/26-freetype.sh new file mode 100755 index 00000000..0faec4b4 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/26-freetype.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -ex + +brew install freetype diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/26-ninja.sh b/coin/provisioning/qtci-macos-10.15-x86_64/26-ninja.sh new file mode 100755 index 00000000..08428b2f --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/26-ninja.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -ex + +# shellcheck source=../common/macos/ninja.sh +source "${BASH_SOURCE%/*}/../common/macos/ninja.sh" + + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/26-odbc.sh b/coin/provisioning/qtci-macos-10.15-x86_64/26-odbc.sh new file mode 100755 index 00000000..2aedfe7b --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/26-odbc.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Install libiodbc + +set -ex + +BASEDIR=$(dirname "$0") +"$BASEDIR/../common/macos/libiodbc.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/26-p7zip.sh b/coin/provisioning/qtci-macos-10.15-x86_64/26-p7zip.sh new file mode 100755 index 00000000..15511332 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/26-p7zip.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Install 7z to be used from command line + +set -ex + +brew update +brew install p7zip diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/26-pcre2.sh b/coin/provisioning/qtci-macos-10.15-x86_64/26-pcre2.sh new file mode 100755 index 00000000..f8af516b --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/26-pcre2.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -ex + +brew install pcre2 diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/27-libclang.sh b/coin/provisioning/qtci-macos-10.15-x86_64/27-libclang.sh new file mode 100755 index 00000000..aad628cb --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/27-libclang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -ex + +BASEDIR=$(dirname "$0") +# There is only one mac package and common script uses it as a default +"$BASEDIR/../common/unix/libclang.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/30-android.sh b/coin/provisioning/qtci-macos-10.15-x86_64/30-android.sh new file mode 100755 index 00000000..094dc356 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/30-android.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2020 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 + +set -ex + +# shellcheck source=../common/unix/SetEnvVar.sh +source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" + +targetFolder="/opt/android" +sdkTargetFolder="$targetFolder/sdk" + +basePath="/net/ci-files01-hki.intra.qt.io/hdd/www/input/android" + +toolsVersion="2.1" +# toolsFile dertermines tools version +toolsFile="commandlinetools-mac-6609375_latest.zip" + +ndkVersion="r21d" +ndkFile="android-ndk-$ndkVersion-darwin-x86_64.zip" +sdkBuildToolsVersion="28.0.3" +# this is compile sdk version +sdkApiLevel="android-28" + +toolsSourceFile="$basePath/$toolsFile" +ndkSourceFile="$basePath/$ndkFile" + +echo "Unzipping Android NDK to '$targetFolder'" +sudo unzip -q "$ndkSourceFile" -d "$targetFolder" +echo "Unzipping Android Tools to '$sdkTargetFolder'" +sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder" + +echo "Changing ownership of Android files." +sudo chown -R qt:wheel "$targetFolder" + +# Run the following command under `eval` or `sh -c` so that the shell properly splits it +sdkmanager_no_progress_bar_cmd="tr '\r' '\n' | grep -v '^\[[ =]*\]'" + +sudo mkdir "$sdkTargetFolder/cmdline-tools" +sudo mv "$sdkTargetFolder/tools" "$sdkTargetFolder/cmdline-tools" + +echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion." +(echo "y"; echo "y") | "$sdkTargetFolder/cmdline-tools/tools/bin/sdkmanager" "--sdk_root=$sdkTargetFolder" \ + "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \ + | eval $sdkmanager_no_progress_bar_cmd + +echo "Checking the contents of Android SDK..." +ls -l "$sdkTargetFolder" + +SetEnvVar "ANDROID_SDK_HOME" "$sdkTargetFolder" +SetEnvVar "ANDROID_NDK_HOME" "$targetFolder/android-ndk-$ndkVersion" +SetEnvVar "ANDROID_NDK_ROOT" "$targetFolder/android-ndk-$ndkVersion" +SetEnvVar "ANDROID_NDK_HOST" "darwin-x86_64" +SetEnvVar "ANDROID_API_VERSION" "$sdkApiLevel" + +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 diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/30-fbx.sh b/coin/provisioning/qtci-macos-10.15-x86_64/30-fbx.sh new file mode 100755 index 00000000..34eefeb6 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/30-fbx.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -ex + +BASEDIR=$(dirname "$0") +"$BASEDIR/../common/macos/fbx_macos.sh" + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/30-nodejs.sh b/coin/provisioning/qtci-macos-10.15-x86_64/30-nodejs.sh new file mode 100755 index 00000000..ab992405 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/30-nodejs.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -ex + +brew install nodejs + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/35-install-breakpad.sh b/coin/provisioning/qtci-macos-10.15-x86_64/35-install-breakpad.sh new file mode 100755 index 00000000..74dd1579 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/35-install-breakpad.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -ex + +# shellcheck source=../common/unix/install-breakpad.sh +source "${BASH_SOURCE%/*}/../common/unix/install-breakpad.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/35-install_protobuff.sh b/coin/provisioning/qtci-macos-10.15-x86_64/35-install_protobuff.sh new file mode 100755 index 00000000..ac9d86ca --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/35-install_protobuff.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2020 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/unix/install_protobuff.sh +source "${BASH_SOURCE%/*}/../common/unix/install_protobuff.sh" + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/35-openssl.sh b/coin/provisioning/qtci-macos-10.15-x86_64/35-openssl.sh new file mode 100755 index 00000000..57a86c47 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/35-openssl.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -ex + +# shellcheck source=../common/macos/install_openssl.sh +source "${BASH_SOURCE%/*}/../common/unix/install-openssl.sh" "macos" + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/36-emsdk.sh b/coin/provisioning/qtci-macos-10.15-x86_64/36-emsdk.sh new file mode 100755 index 00000000..7396d336 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/36-emsdk.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -ex + +# shellcheck source=../common/unix/emsdk.sh +source "${BASH_SOURCE%/*}/../common/unix/emsdk.sh" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/40-qnx700.sh b/coin/provisioning/qtci-macos-10.15-x86_64/40-qnx700.sh new file mode 100755 index 00000000..bb035fdf --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/40-qnx700.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +############################################################################# +## +## Copyright (C) 2020 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 QNX 7. + +targetFolder="/opt/" +sourceFile="/net/ci-files01-hki.intra.qt.io/hdd/www/input/qnx/qnx700-20190325-2-macos.tar.xz" +folderName="qnx700" + +sudo mkdir -p "$targetFolder" + +echo "Extracting QNX 7" +sudo tar -C "$targetFolder" -Jxf $sourceFile + +sudo chown -R qt:wheel "$targetFolder"/"$folderName" + +# Verify that we have last file in zip +if [ ! -f $targetFolder/$folderName/qnxsdp-env.sh ]; then + exit 1 +fi + +# Set env variables +echo "export QNX_700=$targetFolder/$folderName" >> ~/.bashrc +echo "QNX SDP = 7.0.0" >> ~/versions.txt diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/55-signtools.sh b/coin/provisioning/qtci-macos-10.15-x86_64/55-signtools.sh new file mode 100755 index 00000000..85087b33 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/55-signtools.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env sh + +############################################################################# +## +## Copyright (C) 2020 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$ +## +############################################################################# + +# Install tools for singing packages +# This script assume that OS is vanilla. Target machine dosen't have any signing certificates installed. + +set -ex + +cache="http://ci-files01-hki.intra.qt.io/input" +cacheSigningTools="$cache/mac/sign_tools" +targetFolder="/Users/qt" +keychains="$targetFolder/Library/Keychains" + +Install() { + + url=$1 + targetFile=$2 + expectedSha1=$3 + + echo "Fetching $targetFile from $url..." + curl --retry 5 --retry-delay 10 --retry-max-time 60 "$url" -o "$targetFile" + shasum "$targetFile" |grep "$expectedSha1" + +} + +# qt-license +sha1QtLicense="9d59241d16f68d914f1c7aa1dc23e05faa169e8d" +Install "$cache/semisecure/.qt-license" "$targetFolder/.qt-license" $sha1QtLicense + +# Login keychain +sha1LoginKeychainPassword="aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" +Install "$cacheSigningTools/login_keychain_password.txt" "$targetFolder/login_keychain_password.txt" "$sha1LoginKeychainPassword" +{ loginKeychainPassword=$(cat "$targetFolder/login_keychain_password.txt"); } 2> /dev/null +loginKeychain=$keychains/login.keychain + +echo "Setting login.keychain as default keychain.." +security default-keychain -s $loginKeychain* +echo "Unlocking Login keychain with password.." +{ security unlock-keychain -p "$loginKeychainPassword" $loginKeychain*; } 2> /dev/null + +echo "remove the "Lock after X minutes of inactivity" from login.keychain" +security set-keychain-settings $loginKeychain + +# Apple Worldwide Developer Relations Certification Authority -> https://developer.apple.com/certificationauthority/AppleWWDRCA.cer +sha1AppleWWDRCA="ff6797793a3cd798dc5b2abef56f73edc9f83a64" +Install "$cacheSigningTools/AppleWWDRCA.cer" "$targetFolder/AppleWWDRCA.cer" $sha1AppleWWDRCA +sudo security add-certificates -k $loginKeychain* "$targetFolder/AppleWWDRCA.cer" + +# Developer ID Certification Authority -> https://www.apple.com/certificateauthority/DeveloperIDCA.cer +sha1DeveloperIDCA="3b166c3b7dc4b751c9fe2afab9135641e388e186" +Install "$cacheSigningTools/DeveloperIDCA.cer" "$targetFolder/DeveloperIDCA.cer" $sha1DeveloperIDCA +sudo security add-certificates -k $loginKeychain* "$targetFolder/DeveloperIDCA.cer" + +# Create script to unlock keychain 'security unlock-keychain -p 'password' Developer_ID_TheQtCompany.keychain' +sha1UnLockKeychain="4398870e3f558ad28c80566b5f70e24dc29ea724" +unlockKeychain=$targetFolder/unlock-keychain.sh +{ Install "$cacheSigningTools/unlock-keychain.sh" "$unlockKeychain" $sha1UnLockKeychain; } 2> /dev/null +sudo chmod 755 "$unlockKeychain" + +# Codesigning requirements file. The bundle identifier in the requirements file should match the identifier of the application that is signed. +shaCsreq="2c3f00b1845a0f475673fd6934ba25ea51d1f910" +csreq=$targetFolder/csreq_qt_company.txt +Install "$cacheSigningTools/csreq_qt_company.txt" "$csreq" $shaCsreq +chmod 755 "$csreq" + +# iOS signing tools +devIDKeychain="Developer_ID_TheQtCompany.keychain-db" +shaDevIdKeychain="972cca1879cdaeeb6042f9879756c748a8d1eddc" +Install "$cacheSigningTools/$devIDKeychain" "$keychains/$devIDKeychain" $shaDevIdKeychain +echo "Opening $devIDKeychain.." +open "$keychains/$devIDKeychain" + +sha1DeveloperIDTheQtCompanyKeychainPassword="d758e067736bbda7a91ffaec66cd38afdaf68ea6" +Install "$cacheSigningTools/Developer_ID_TheQtCompany_keychain_password.txt" "$targetFolder/Developer_ID_TheQtCompany_keychain_password.txt" "$sha1DeveloperIDTheQtCompanyKeychainPassword" +{ DeveloperIDTheQtCompanyKeychainPassword=$(cat "$targetFolder/Developer_ID_TheQtCompany_keychain_password.txt"); } 2> /dev/null + +echo "Unlocking $devIDKeychain with password.." +{ security unlock-keychain -p "$DeveloperIDTheQtCompanyKeychainPassword" $keychains/Developer_ID_TheQtCompany.keychain; } 2> /dev/null +security set-keychain-settings $keychains/Developer_ID_TheQtCompany.keychain + +sha1Ios="aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" +{ Install "$cacheSigningTools/ios_password.txt" "$targetFolder/ios_password.txt" $sha1Ios; } 2> /dev/null +{ iosPassword=$(cat "$targetFolder/ios_password.txt"); } 2> /dev/null + +iPhoneDeveloper="iPhoneDeveloperCiTeam2020.p12" +shaIPhoneDeveloper="73136e44fed850f398e85908e4a73f20a6bdd8a2" +Install "$cacheSigningTools/latest_ios_cert_2020/$iPhoneDeveloper" "$targetFolder/$iPhoneDeveloper" $shaIPhoneDeveloper +echo "Importing $iPhoneDeveloper.." +{ security import $targetFolder/$iPhoneDeveloper -k $loginKeychain* -P "$iosPassword" -T /usr/bin/codesign; } 2> /dev/null + +iPhoneDistribution="iPhoneDistributionCiTeam2020.p12" +shaIPhoneDistribution="36215c3cbc6bfee48e86aafbd53c56282fe36d8d" +Install "$cacheSigningTools/latest_ios_cert_2020/$iPhoneDistribution" "$targetFolder/$iPhoneDistribution" $shaIPhoneDistribution +echo "Importing $iPhoneDistribution.." +{ security import "$targetFolder/$iPhoneDistribution" -k $loginKeychain* -P "$iosPassword" -T /usr/bin/codesign; } 2> /dev/null + +# Mobileprovision +echo "Creating directory $targetFolder/Library/MobileDevice/Provisioning Profiles.." +mkdir "$targetFolder/Library/MobileDevice" +mkdir "$targetFolder/Library/MobileDevice/Provisioning Profiles" +shaMobileprovision="ec9697276253ca7bf4401912236f0e6fde4214da" +Install "$cacheSigningTools/latest_ios_cert_2020/iOS_Dev_2020_citeam.mobileprovision" "$targetFolder/Library/MobileDevice/Provisioning Profiles/iOS_Dev_2020_citeam.mobileprovision" $shaMobileprovision + +# Removing password files +rm -fr "$targetFolder/login_keychain_password.txt" + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/80-screenresolution.sh b/coin/provisioning/qtci-macos-10.15-x86_64/80-screenresolution.sh new file mode 100755 index 00000000..920c579c --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/80-screenresolution.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +"$(dirname "$0")"/../common/macos/screenresolution.sh + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/90-squish.sh b/coin/provisioning/qtci-macos-10.15-x86_64/90-squish.sh new file mode 100755 index 00000000..17a0c38e --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/90-squish.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -ex + +BASEDIR=$(dirname "$0") +"$BASEDIR/../common/unix/squishInstall.sh" + diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/97-set-locale.sh b/coin/provisioning/qtci-macos-10.15-x86_64/97-set-locale.sh new file mode 100755 index 00000000..e34b7381 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/97-set-locale.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -ex + +BASEDIR=$(dirname "$0") +$BASEDIR/../common/macos/set-locale.sh diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/99-mac-version.sh b/coin/provisioning/qtci-macos-10.15-x86_64/99-mac-version.sh new file mode 100755 index 00000000..99d94150 --- /dev/null +++ b/coin/provisioning/qtci-macos-10.15-x86_64/99-mac-version.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -ex + +BASEDIR=$(dirname "$0") +$BASEDIR/../common/macos/macos-version.sh |