aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/macos
diff options
context:
space:
mode:
Diffstat (limited to 'coin/provisioning/common/macos')
-rwxr-xr-xcoin/provisioning/common/macos/InstallAppFromCompressedFileFromURL.sh35
-rwxr-xr-xcoin/provisioning/common/macos/InstallPKGFromURL.sh49
-rwxr-xr-xcoin/provisioning/common/macos/android.sh78
-rwxr-xr-xcoin/provisioning/common/macos/cmake.sh47
-rwxr-xr-xcoin/provisioning/common/macos/disable-app-reopen.sh12
-rwxr-xr-xcoin/provisioning/common/macos/disable-notifications_and_warnings.sh9
-rwxr-xr-xcoin/provisioning/common/macos/disable_net_lso.sh34
-rwxr-xr-xcoin/provisioning/common/macos/disable_spotlight.sh41
-rwxr-xr-xcoin/provisioning/common/macos/docker.sh37
-rwxr-xr-xcoin/provisioning/common/macos/enable_zsh_history_and_viminfo.sh12
-rwxr-xr-xcoin/provisioning/common/macos/fbx_macos.sh40
-rwxr-xr-xcoin/provisioning/common/macos/fix_relative_dependencies.sh25
-rwxr-xr-xcoin/provisioning/common/macos/homebrew.sh19
-rwxr-xr-xcoin/provisioning/common/macos/homebrew_for_arm_mac.sh30
-rwxr-xr-xcoin/provisioning/common/macos/increase_limits.sh45
-rwxr-xr-xcoin/provisioning/common/macos/install-commandlinetools.sh37
-rwxr-xr-xcoin/provisioning/common/macos/install-git.sh7
-rwxr-xr-xcoin/provisioning/common/macos/install_openssl_111a.sh78
-rwxr-xr-xcoin/provisioning/common/macos/install_xcode.sh49
-rwxr-xr-xcoin/provisioning/common/macos/java.sh56
-rwxr-xr-xcoin/provisioning/common/macos/java_arm.sh33
-rw-r--r--coin/provisioning/common/macos/libiodbc.rb16
-rwxr-xr-xcoin/provisioning/common/macos/libiodbc.sh39
-rwxr-xr-xcoin/provisioning/common/macos/libusb.sh35
-rwxr-xr-xcoin/provisioning/common/macos/macos-version.sh57
-rwxr-xr-xcoin/provisioning/common/macos/makeuniversal.sh34
-rwxr-xr-xcoin/provisioning/common/macos/mimersql.sh56
-rwxr-xr-xcoin/provisioning/common/macos/mount-vcpkg-cache-drive.sh28
-rwxr-xr-xcoin/provisioning/common/macos/ninja.sh18
-rwxr-xr-xcoin/provisioning/common/macos/nodejs.sh19
-rwxr-xr-xcoin/provisioning/common/macos/pip.sh11
-rwxr-xr-xcoin/provisioning/common/macos/pkgconfig.sh12
-rwxr-xr-xcoin/provisioning/common/macos/postgresql.sh41
-rwxr-xr-xcoin/provisioning/common/macos/python2.sh41
-rwxr-xr-xcoin/provisioning/common/macos/python3.sh61
-rwxr-xr-xcoin/provisioning/common/macos/sccache.sh12
-rwxr-xr-xcoin/provisioning/common/macos/screenresolution.sh43
-rwxr-xr-xcoin/provisioning/common/macos/set-locale.sh17
-rwxr-xr-xcoin/provisioning/common/macos/set_tcc_permissions.sh31
-rwxr-xr-xcoin/provisioning/common/macos/sha1sum-compatibility.sh35
-rwxr-xr-xcoin/provisioning/common/macos/system_updates.sh38
-rw-r--r--coin/provisioning/common/macos/telegraf-coin.conf10
-rwxr-xr-xcoin/provisioning/common/macos/telegraf-ioping.sh28
-rwxr-xr-xcoin/provisioning/common/macos/telegraf_install.sh68
-rwxr-xr-xcoin/provisioning/common/macos/version.sh41
45 files changed, 890 insertions, 674 deletions
diff --git a/coin/provisioning/common/macos/InstallAppFromCompressedFileFromURL.sh b/coin/provisioning/common/macos/InstallAppFromCompressedFileFromURL.sh
index 1dd48e87..03454485 100755
--- a/coin/provisioning/common/macos/InstallAppFromCompressedFileFromURL.sh
+++ b/coin/provisioning/common/macos/InstallAppFromCompressedFileFromURL.sh
@@ -1,37 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL21$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2017 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# This script receives URLs to a compressed file. It then downloads it,
# uncompresses it and installs it by default
diff --git a/coin/provisioning/common/macos/InstallPKGFromURL.sh b/coin/provisioning/common/macos/InstallPKGFromURL.sh
index 77ef128a..62ae9db5 100755
--- a/coin/provisioning/common/macos/InstallPKGFromURL.sh
+++ b/coin/provisioning/common/macos/InstallPKGFromURL.sh
@@ -1,37 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL21$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2017 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
set -ex
@@ -42,7 +11,9 @@ function InstallPKGFromURL {
targetDirectory=$4
echo "Creating temporary file"
- targetFile=$(mktemp "$TMPDIR$(uuidgen).pkg")
+ package_basename="${url/*\//}"
+ tmpdir=$(mktemp -d)
+ targetFile="$tmpdir/$package_basename"
echo "Downloading PKG from primary URL '$url'"
curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" || (
echo "Failed to download '$url' multiple times"
@@ -50,10 +21,12 @@ function InstallPKGFromURL {
curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url_alt"
)
echo "Checking SHA1 on PKG '$targetFile'"
- echo "$expectedSha1 *$targetFile" > "$targetFile.sha1"
- /usr/bin/shasum --check "$targetFile.sha1"
+ echo "$expectedSha1 *$targetFile" > "$targetFile".sha1
+ /usr/bin/shasum --check "$targetFile".sha1
echo "Run installer on PKG"
sudo installer -package "$targetFile" -target "$targetDirectory"
- echo "Removing file '$targetFile'"
- rm "$targetFile"
+
+ rm -f "$targetFile".sha1
+ rm -f "$targetFile"
+ rmdir "$tmpdir"
}
diff --git a/coin/provisioning/common/macos/android.sh b/coin/provisioning/common/macos/android.sh
new file mode 100755
index 00000000..b7dc953f
--- /dev/null
+++ b/coin/provisioning/common/macos/android.sh
@@ -0,0 +1,78 @@
+#!/usr/bin/env bash
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# 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=../unix/SetEnvVar.sh
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+
+targetFolder="/opt/android"
+sdkTargetFolder="$targetFolder/sdk"
+
+basePath="/net/ci-files01-hki.ci.qt.io/hdd/www/input/android"
+
+toolsVersion="2.1"
+# toolsFile dertermines tools version
+toolsFile="commandlinetools-mac-6609375_latest.zip"
+
+ndkVersionLatest="r26b"
+ndkVersionDefault="$ndkVersionLatest"
+sdkBuildToolsVersion="34.0.0"
+# this is compile sdk version
+sdkApiLevel="android-34"
+
+toolsSourceFile="$basePath/$toolsFile"
+
+function InstallNdk() {
+
+ ndkVersion=$1
+
+ if [[ ! -d "${targetFolder}/android-ndk-${ndkVersion}" ]]; then
+ echo "Unzipping Android NDK $ndkVersion to '${targetFolder}'"
+ ndkSourceFile="$basePath/android-ndk-$ndkVersion-darwin*.zip"
+ sudo unzip -q "$ndkSourceFile" -d "$targetFolder"
+ fi
+
+}
+
+InstallNdk $ndkVersionDefault
+InstallNdk $ndkVersionLatest
+
+echo "Unzipping Android Tools to '$sdkTargetFolder'"
+sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder"
+
+echo "Changing ownership of Android files."
+sudo chown -R qt:wheel "$targetFolder"
+sudo chmod -R 755 $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_ROOT" "$sdkTargetFolder"
+SetEnvVar "ANDROID_NDK_ROOT_DEFAULT" "$targetFolder/android-ndk-$ndkVersionDefault"
+SetEnvVar "ANDROID_NDK_ROOT_LATEST" "$targetFolder/android-ndk-$ndkVersionLatest"
+SetEnvVar "ANDROID_NDK_HOST" "darwin-x86_64"
+SetEnvVar "ANDROID_API_VERSION" "$sdkApiLevel"
+
+cat << EOT >>~/versions.txt
+Android SDK tools = $toolsVersion
+Android SDK Build Tools = $sdkBuildToolsVersion
+Android SDK API level = $sdkApiLevel
+Android NDK = $ndkVersionDefault
+EOT
diff --git a/coin/provisioning/common/macos/cmake.sh b/coin/provisioning/common/macos/cmake.sh
index e22425b7..b9ff8dfb 100755
--- a/coin/provisioning/common/macos/cmake.sh
+++ b/coin/provisioning/common/macos/cmake.sh
@@ -1,37 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL21$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2017 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# This script installs CMake
@@ -42,13 +11,15 @@ source "${BASH_SOURCE%/*}/InstallAppFromCompressedFileFromURL.sh"
# shellcheck source=../unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
-PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/macos_10.13_high_sierra/cmake-3.11.3-Darwin-x86_64.tar.gz"
-AltUrl="https://cmake.org/files/v3.11/cmake-3.11.3-Darwin-x86_64.tar.gz"
-SHA1="3d13de8020ce560159fa5cecb669498c48552d96"
-appPrefix="cmake-3.11.3-Darwin-x86_64"
+majorminorversion="3.27.7"
+version="3.27.7"
+PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/cmake/cmake-$version-macos-universal.tar.gz"
+AltUrl="https://cmake.org/files/v$majorminorversion/cmake-$version-macos-universal.tar.gz"
+SHA1="75153b6c7a418bc7120c6217d4698c7d245d00e0"
+appPrefix="cmake-$version-macos-universal"
InstallAppFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$appPrefix"
SetEnvVar "PATH" "/Applications/CMake.app/Contents/bin:\$PATH"
-echo "CMake = 3.11.3" >> ~/versions.txt
+echo "CMake = $version" >> ~/versions.txt
diff --git a/coin/provisioning/common/macos/disable-app-reopen.sh b/coin/provisioning/common/macos/disable-app-reopen.sh
new file mode 100755
index 00000000..139f6d04
--- /dev/null
+++ b/coin/provisioning/common/macos/disable-app-reopen.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# Copyright (C) 2021 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# Prevent applications from re-opening after re-boot.
+# This is needed only with physical mac mini machines used in ci.
+
+
+set -e
+
+sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow*
+sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow*
diff --git a/coin/provisioning/common/macos/disable-notifications_and_warnings.sh b/coin/provisioning/common/macos/disable-notifications_and_warnings.sh
new file mode 100755
index 00000000..13c0a480
--- /dev/null
+++ b/coin/provisioning/common/macos/disable-notifications_and_warnings.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+#Copyright (C) 2023 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+echo "Unload notificationcenterui.plist"
+launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
+
+echo "Remove 32-bit warnings"
+rm -f ~/Library/Preferences/com.apple.coreservices.uiagent.plist
diff --git a/coin/provisioning/common/macos/disable_net_lso.sh b/coin/provisioning/common/macos/disable_net_lso.sh
new file mode 100755
index 00000000..7c51a486
--- /dev/null
+++ b/coin/provisioning/common/macos/disable_net_lso.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+# Copyright (C) 2021 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+sudo tee -a /Library/LaunchDaemons/net_tcp_tso_off.plist > /dev/null <<EOB
+<?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>net_tcp_tso_off</string>
+ <key>MachServices</key>
+ <dict>
+ <key>net_tcp_tso_off</key>
+ <true/>
+ </dict>
+ <key>Program</key>
+ <string>/usr/sbin/sysctl</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/usr/sbin/sysctl</string>
+ <string>net.inet.tcp.tso=0</string>
+ </array>
+ <key>UserName</key>
+ <string>root</string>
+ <key>GroupName</key>
+ <string>wheel</string>
+ <key>KeepAlive</key>
+ <true/>
+ <key>RunAtLoad</key>
+ <true/>
+</dict>
+</plist>
+EOB
diff --git a/coin/provisioning/common/macos/disable_spotlight.sh b/coin/provisioning/common/macos/disable_spotlight.sh
index 7c60b52b..a404d3e7 100755
--- a/coin/provisioning/common/macos/disable_spotlight.sh
+++ b/coin/provisioning/common/macos/disable_spotlight.sh
@@ -1,38 +1,11 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL21$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2017 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# 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/docker.sh b/coin/provisioning/common/macos/docker.sh
new file mode 100755
index 00000000..7ae9cdd5
--- /dev/null
+++ b/coin/provisioning/common/macos/docker.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# shellcheck source=./../unix/DownloadURL.sh
+source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
+
+# This script will install Docker which is needed by RTA
+
+chip=$1
+
+if [[ $chip == "amd64" ]]; then
+ sha="158eae1d2f81cc8a0754d2ea3af8c6e6e555f69b"
+else
+ sha="6adf6cc8558af69296208b045187406a95b020bf"
+fi
+
+echo "Installing Docker for $chip chip"
+urlOccifical="https://desktop.docker.com/mac/main/${chip}/Docker.dmg?utm_source=docker"
+urlCache="http://ci-files01-hki.ci.qt.io/input/mac/Docker_${chip}.dmg"
+
+DownloadURL "$urlCache" "$urlOccifical" "$sha" "/tmp/Docker_${chip}.dmg"
+
+sudo hdiutil attach "/tmp/Docker_${chip}.dmg"
+sudo /Volumes/Docker/Docker.app/Contents/MacOS/install --accept-license --user qt
+sudo hdiutil detach /Volumes/Docker
+
+# Add registry mirror for docker images
+mkdir "$HOME/.docker"
+sudo tee -a "$HOME/.docker/daemon.json" <<"EOF"
+{
+ "builder": { "gc": { "defaultKeepStorage": "20GB", "enabled": true } },
+ "experimental": false,
+ "features": { "buildkit": true },
+ "registry-mirrors": ["http://repo-clones.ci.qt.io:5000"]
+}
+EOF
diff --git a/coin/provisioning/common/macos/enable_zsh_history_and_viminfo.sh b/coin/provisioning/common/macos/enable_zsh_history_and_viminfo.sh
new file mode 100755
index 00000000..98daf16d
--- /dev/null
+++ b/coin/provisioning/common/macos/enable_zsh_history_and_viminfo.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# Copyright (C) 2023 The Qt Company Ltd.
+
+if [ -f /Users/qt/.zsh_history ]
+then
+ sudo chown qt:staff /Users/qt/.zsh_history
+fi
+
+if [ -f /Users/qt/.viminfo ]
+then
+ sudo chown qt:staff /Users/qt/.viminfo
+fi
diff --git a/coin/provisioning/common/macos/fbx_macos.sh b/coin/provisioning/common/macos/fbx_macos.sh
index e9b7c689..62d643ee 100755
--- a/coin/provisioning/common/macos/fbx_macos.sh
+++ b/coin/provisioning/common/macos/fbx_macos.sh
@@ -1,36 +1,6 @@
#!/usr/bin/env bash
-#############################################################################
-##
-## Copyright (C) 2018 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$
-##
-#############################################################################
+# Copyright (C) 2018 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# This script installs FBX SDK
@@ -39,16 +9,16 @@ set -ex
# shellcheck source=../unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
-version="2016.1.2"
+#version="2016.1.2"
fileName="fbx20161_2_fbxsdk_clang_mac.pkg_nospace.tgz"
-cachedUrl="/net/ci-files01-hki.intra.qt.io/hdd/www/input/fbx/$fileName"
+cachedUrl="/net/ci-files01-hki.ci.qt.io/hdd/www/input/fbx/$fileName"
# officialUrl="http://download.autodesk.com/us/fbx_release_older/$version/fbx20161_2_fbxsdk_clang_mac.pkg.tgz"
targetFolder="/tmp"
echo "Extracting '$cachedUrl'"
tar -xzf "$cachedUrl" -C "$targetFolder"
-rm -rf "$targetFolder/$fileName"
+rm -rf "${targetFolder:?}/${fileName}"
echo "Copying preinstalled FBX SDK to Applications"
sudo cp -r "$targetFolder/Autodesk" /Applications
diff --git a/coin/provisioning/common/macos/fix_relative_dependencies.sh b/coin/provisioning/common/macos/fix_relative_dependencies.sh
new file mode 100755
index 00000000..e67a00c4
--- /dev/null
+++ b/coin/provisioning/common/macos/fix_relative_dependencies.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+set -e
+
+# realpath is not included to macOS <= 12.
+# dir=$(realpath "$1")
+dir=$(cd "$1" && pwd)
+
+dir_length=${#dir}
+dylib_regex="^$dir/.*\.dylib$"
+
+find "$dir" -type f -name '*.dylib' | while read -r library_path; do
+ install_name=$(otool -D "$library_path" | sed -n '2p' | grep -E "$dylib_regex" )
+ if [ -n "$install_name" ]; then
+ fixed_install_name="@rpath${install_name:dir_length}"
+ install_name_tool -id "$fixed_install_name" "$library_path"
+ fi
+
+ otool -L "$library_path" | awk '/\t/ {print $1}' | grep -E "$dylib_regex" | while read -r dependency_path; do
+ fixed_dependency_path="@loader_path${dependency_path:dir_length}"
+ install_name_tool -change "$dependency_path" "$fixed_dependency_path" "$library_path"
+ done
+done
diff --git a/coin/provisioning/common/macos/homebrew.sh b/coin/provisioning/common/macos/homebrew.sh
index 715477c0..4f3a93ba 100755
--- a/coin/provisioning/common/macos/homebrew.sh
+++ b/coin/provisioning/common/macos/homebrew.sh
@@ -1,12 +1,23 @@
-#!/usr/bin/env bash
+#!/bin/bash
+#Copyright (C) 2023 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# Will install homebrew package manager for macOS.
# WARNING: Requires commandlinetools
-# TODO audit and cache this file locally, see QTQAINFRA-3134
-curl -L -o /tmp/homebrew_install https://raw.githubusercontent.com/Homebrew/install/master/install
+set -e
+
+source "$(dirname "$0")"/../../common/unix/DownloadURL.sh
+
+
+DownloadURL \
+ http://ci-files01-hki.ci.qt.io/input/mac/homebrew-install.c744a716f9845988d01e6e238eee7117b8c366c9.rb \
+ https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \
+ b9782cc0b550229de77b429b56ffce04157e60486ab9df00461ccf3dad565b0a \
+ /tmp/homebrew_install
/usr/bin/ruby /tmp/homebrew_install </dev/null
-brew update
+# No need to manually do `brew update`, the homebrew installer script does it.
+### brew update
diff --git a/coin/provisioning/common/macos/homebrew_for_arm_mac.sh b/coin/provisioning/common/macos/homebrew_for_arm_mac.sh
new file mode 100755
index 00000000..e84621ff
--- /dev/null
+++ b/coin/provisioning/common/macos/homebrew_for_arm_mac.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+# Copyright (C) 2021 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# Will install homebrew package manager for macOS.
+# WARNING: Requires commandlinetools
+
+
+set -e
+
+. "$(dirname "$0")"/../unix/DownloadURL.sh
+. "$(dirname "$0")"/../unix/SetEnvVar.sh
+
+
+DownloadURL \
+ http://ci-files01-hki.ci.qt.io/input/mac/homebrew/be699a568315f57b65519df576d7fc5840b8a5cc/install.sh \
+ https://raw.githubusercontent.com/Homebrew/install/be699a568315f57b65519df576d7fc5840b8a5cc/install \
+ f20e4a577f0cafbab5a44b4d239886d725b3b985 \
+ /tmp/homebrew_install.sh
+
+DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw"
+{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null
+sudo chmod 755 /tmp/homebrew_install.sh
+{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null
+rm -f "/Users/qt/pw"
+
+# No need to manually do `brew update`, the homebrew installer script does it.
+### brew update
+
+SetEnvVar "PATH" "\$PATH:/opt/homebrew/bin"
diff --git a/coin/provisioning/common/macos/increase_limits.sh b/coin/provisioning/common/macos/increase_limits.sh
index 040c55e8..58b20f49 100755
--- a/coin/provisioning/common/macos/increase_limits.sh
+++ b/coin/provisioning/common/macos/increase_limits.sh
@@ -1,37 +1,6 @@
-#!/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$
-##
-#############################################################################
+#!/bin/bash
+# Copyright (C) 2019 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# Increase the soft and hard RLIMIT_NOFILE and RLIMIT_NPROC limits.
@@ -42,16 +11,16 @@
set -e
PROVISIONING_DIR="$(dirname "$0")/../../"
-. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
-
+# shellcheck source=../unix/common.sourced.sh
+source "$PROVISIONING_DIR"/common/unix/common.sourced.sh
echo "Current limits are:"
ulimit -a
launchctl limit
$CMD_INSTALL -m 644 -o root -g wheel \
- $PROVISIONING_DIR/common/macos/limit.maxfiles.plist \
- $PROVISIONING_DIR/common/macos/limit.maxproc.plist \
+ "$PROVISIONING_DIR/common/macos/limit.maxfiles.plist" \
+ "$PROVISIONING_DIR/common/macos/limit.maxproc.plist" \
/Library/LaunchDaemons/
# Activate the new limits immediately (not for the current session though)
diff --git a/coin/provisioning/common/macos/install-commandlinetools.sh b/coin/provisioning/common/macos/install-commandlinetools.sh
index b9f81534..f74eaca0 100755
--- a/coin/provisioning/common/macos/install-commandlinetools.sh
+++ b/coin/provisioning/common/macos/install-commandlinetools.sh
@@ -1,37 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL21$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2017 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# shellcheck source=../unix/DownloadURL.sh
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
set -ex
@@ -50,7 +19,7 @@ function InstallCommandLineTools {
hdiutil attach "/tmp/$packageName"
cd "/Volumes/Command Line Developer Tools"
echo "Installing"
- sudo installer -pkg ./*.pkg -target /
+ sudo installer -pkg ./*.pkg -target / -allowUntrusted
cd /
# Let's fait for 5 second before unmounting. Sometimes resource is busy and cant be unmounted
sleep 3
diff --git a/coin/provisioning/common/macos/install-git.sh b/coin/provisioning/common/macos/install-git.sh
new file mode 100755
index 00000000..45ac2817
--- /dev/null
+++ b/coin/provisioning/common/macos/install-git.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+#Copyright (C) 2023 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+set -ex
+
+brew install git
diff --git a/coin/provisioning/common/macos/install_openssl_111a.sh b/coin/provisioning/common/macos/install_openssl_111a.sh
deleted file mode 100755
index cd6cd9e8..00000000
--- a/coin/provisioning/common/macos/install_openssl_111a.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env bash
-
-#############################################################################
-##
-## 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 install OpenSSL
-
-set -ex
-
-# shellcheck source=../unix/InstallFromCompressedFileFromURL.sh
-source "${BASH_SOURCE%/*}/../unix/InstallFromCompressedFileFromURL.sh"
-# shellcheck source=../unix/SetEnvVar.sh
-source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
-
-opensslVersion="1.1.1a"
-opensslFile="openssl-$opensslVersion.tar.gz"
-opensslDlUrl="http://ci-files01-hki.intra.qt.io/input/openssl/$opensslFile"
-opensslAltDlUrl="https://www.openssl.org/source/$opensslFile"
-opensslSha1="8fae27b4f34445a5500c9dc50ae66b4d6472ce29"
-
-# Below target location has been hard coded into Coin.
-# QTQAINFRA-1195
-openssl_install_dir=/usr/local/openssl-$opensslVersion
-opensslTargetLocation="/usr/local/opt/openssl"
-
-InstallFromCompressedFileFromURL "$opensslDlUrl" "$opensslAltDlUrl" "$opensslSha1" "/tmp/openssl-$opensslVersion" "openssl-$opensslVersion"
-cd "/tmp/openssl-$opensslVersion"
-sudo ./Configure --prefix=$openssl_install_dir shared no-ssl3-method enable-ec_nistp_64_gcc_128 darwin64-x86_64-cc "-Wa,--noexecstack"
-
-sudo make install_sw install_ssldirs
-
-path=$(echo "$opensslTargetLocation" | sed -E 's/(.*)\/.*$/\1/')
-sudo mkdir -p "$path"
-sudo ln -s $openssl_install_dir $opensslTargetLocation
-
-SetEnvVar "PATH" "\"$opensslTargetLocation/bin:\$PATH\""
-SetEnvVar "MANPATH" "\"$opensslTargetLocation/share/man:\$MANPATH\""
-
-SetEnvVar "OPENSSL_DIR" "\"$openssl_install_dir\""
-SetEnvVar "OPENSSL_INCLUDE" "\"$openssl_install_dir/include\""
-SetEnvVar "OPENSSL_LIB" "\"$openssl_install_dir/lib\""
-
-security find-certificate -a -p /Library/Keychains/System.keychain | sudo tee -a $opensslTargetLocation/ssl/cert.pem > /dev/null
-security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain | sudo tee -a $opensslTargetLocation/ssl/cert.pem > /dev/null
-
-sudo rm -rf /tmp/openssl-$opensslVersion
-
-echo "OpenSSL = $opensslVersion" >> ~/versions.txt
diff --git a/coin/provisioning/common/macos/install_xcode.sh b/coin/provisioning/common/macos/install_xcode.sh
index 5eddb72f..440f19b9 100755
--- a/coin/provisioning/common/macos/install_xcode.sh
+++ b/coin/provisioning/common/macos/install_xcode.sh
@@ -1,37 +1,9 @@
#!/usr/bin/env bash
+# Copyright (C) 2021 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-#############################################################################
-##
-## 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$
-##
-#############################################################################
+# shellcheck source=./../unix/DownloadURL.sh
+source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
# This script installs Xcode
# Prerequisites: Have Xcode prefetched to local cache as xz compressed.
@@ -51,17 +23,24 @@ function InstallXCode() {
echo "Uncompressing and installing '$sourceFile'"
if [[ $sourceFile =~ tar ]]; then
cd /Applications/ && sudo tar -zxf "$sourceFile"
+ elif [[ $sourceFile =~ "xip" ]]; then
+ if [[ $sourceFile =~ "http" ]]; then
+ Download "$sourceFile" "/Applications/Xcode_$version.xip"
+ cd /Applications/ && xip -x "Xcode_$version.xip"
+ else
+ cd /Applications/ && xip -x "$sourceFile"
+ fi
else
xzcat < "$sourceFile" | (cd /Applications/ && sudo cpio -dmi)
fi
echo "Versioning application bundle"
- majorVersion=$(echo $version | cut -d '.' -f 1)
+ majorVersion=$(echo "$version" | cut -d '.' -f 1)
versionedAppBundle="/Applications/Xcode${majorVersion}.app"
- sudo mv /Applications/Xcode.app ${versionedAppBundle}
+ sudo mv /Applications/Xcode*.app "${versionedAppBundle}"
echo "Selecting Xcode"
- sudo xcode-select --switch ${versionedAppBundle}
+ sudo xcode-select --switch "${versionedAppBundle}"
echo "Accept license"
sudo xcodebuild -license accept
diff --git a/coin/provisioning/common/macos/java.sh b/coin/provisioning/common/macos/java.sh
index c5222a55..1429f824 100755
--- a/coin/provisioning/common/macos/java.sh
+++ b/coin/provisioning/common/macos/java.sh
@@ -1,63 +1,33 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL21$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2021 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# This script installs JDK
set -ex
echo "Installing Java Development Kit"
+version=11.0.12
+targetFile=jdk-${version}_osx-x64_bin.dmg
-targetFile=jdk-8u102-macosx-x64.dmg
-
-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
+url=ci-files01-hki.ci.qt.io:/hdd/www/input/mac
+# url_alt=https://www.oracle.com/java/technologies/downloads/#java11-linux
echo "Mounting $targetFile"
-sudo mount "$url" /Volumes
+sudo mkdir -p /Volumes/files
+sudo mount -o locallocks "$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
-cd /Volumes/JDK\ 8\ Update\ 102/ && sudo installer -package JDK\ 8\ Update\ 102.pkg -target /
+cd /Volumes/JDK\ ${version} && sudo installer -package JDK\ ${version}.pkg -target /
echo "Unmounting $targetFile"
-sudo hdiutil unmount /Volumes/JDK\ 8\ Update\ 102/ -force
+sudo hdiutil unmount /Volumes/JDK\ ${version} -force
echo "Disable auto update"
sudo defaults write /Library/Preferences/com.oracle.java.Java-Updater JavaAutoUpdateEnabled -bool false
-echo "JDK Version = 8 update 102" >> ~/versions.txt
+echo "JDK Version = ${version}" >> ~/versions.txt
diff --git a/coin/provisioning/common/macos/java_arm.sh b/coin/provisioning/common/macos/java_arm.sh
new file mode 100755
index 00000000..1c4b1ed1
--- /dev/null
+++ b/coin/provisioning/common/macos/java_arm.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+# Copyright (C) 2021 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# This script installs JDK
+
+set -ex
+
+echo "Installing Java Development Kit"
+
+targetFile=zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.dmg
+
+url=ci-files01-hki.ci.qt.io:/hdd/www/input/mac
+# url_alt=https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.dmg
+
+echo "Mounting $targetFile"
+sudo mkdir -p /Volumes/files
+sudo mount -o locallocks "$url" /Volumes/files
+
+sudo cp "/Volumes/files/$targetFile" /tmp
+sudo umount /Volumes/files
+sudo hdiutil attach "/tmp/$targetFile"
+
+echo Installing JDK
+cd /Volumes/Zulu\ OpenJDK\ 15.29+15 && sudo installer -pkg Double-Click\ to\ Install\ Zulu\ 15.pkg -target /
+
+echo "Unmounting $targetFile"
+sudo hdiutil unmount /Volumes/Zulu\ OpenJDK\ 15.29+15 -force
+
+echo "Disable auto update"
+sudo defaults write /Library/Preferences/com.oracle.java.Java-Updater JavaAutoUpdateEnabled -bool false
+
+echo "JDK Version = 15.0.2" >> ~/versions.txt
diff --git a/coin/provisioning/common/macos/libiodbc.rb b/coin/provisioning/common/macos/libiodbc.rb
index ed669e69..69e5793c 100644
--- a/coin/provisioning/common/macos/libiodbc.rb
+++ b/coin/provisioning/common/macos/libiodbc.rb
@@ -1,8 +1,15 @@
class Libiodbc < Formula
desc "Database connectivity layer based on ODBC. (alternative to unixodbc)"
homepage "http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/"
- url "https://github.com/openlink/iODBC/archive/v3.52.12.tar.gz"
- sha256 "b2cab4f8fbd5388344d7ee0deb1a32310795b1e631c3505a5b515d90186e2516"
+ url "https://github.com/openlink/iODBC/archive/v3.52.15.tar.gz"
+ sha256 "f6b376b6dffb4807343d6d612ed527089f99869ed91bab0bbbb47fdea5ed6ace"
+
+ option "with-universal", "Build as universal binary"
+
+ if build.with? "universal"
+ version "3.52.15-universal"
+ env :std
+ end
depends_on "autoconf" => :build
depends_on "automake" => :build
@@ -11,8 +18,11 @@ class Libiodbc < Formula
conflicts_with "unixodbc", :because => "both install 'odbcinst.h' header"
def install
+ if build.with? "universal"
+ ENV['CFLAGS'] = '-O -arch arm64 -arch x86_64 -mmacosx-version-min=10.9'
+ end
system "./autogen.sh"
- system "./configure", "--prefix=#{prefix}"
+ system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make", "install"
end
diff --git a/coin/provisioning/common/macos/libiodbc.sh b/coin/provisioning/common/macos/libiodbc.sh
index d620c71d..059758c8 100755
--- a/coin/provisioning/common/macos/libiodbc.sh
+++ b/coin/provisioning/common/macos/libiodbc.sh
@@ -1,37 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2018 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$
-##
-#############################################################################
+# Copyright (C) 2018 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# Install libiodbc
@@ -40,11 +9,11 @@ set -ex
# shellcheck source=../unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
-brew install ${BASH_SOURCE%/*}/libiodbc.rb
+brew install --formula "${BASH_SOURCE%/*}/libiodbc.rb" "$@"
# CPLUS_INCLUDE_PATH is set so clang and configure can find libiodbc
-read -r -a arr <<< $(brew list --versions libiodbc)
+read -r -a arr <<< "$(brew list --versions libiodbc)"
version=${arr[1]}
SetEnvVar "CPLUS_INCLUDE_PATH" "/usr/local/Cellar/libiodbc/$version/include${CPLUS_INCLUDE_PATH:+:}${CPLUS_INCLUDE_PATH}"
diff --git a/coin/provisioning/common/macos/libusb.sh b/coin/provisioning/common/macos/libusb.sh
new file mode 100755
index 00000000..2abe6cbf
--- /dev/null
+++ b/coin/provisioning/common/macos/libusb.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+# Copyright (C) 2020 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# Install libusb
+set -ex
+
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+brew install libusb
+read -r -a arr <<< "$(brew list --versions libusb)"
+version=${arr[1]}
+echo "libusb = $version" >> ~/versions.txt
+
+mkdir /tmp/arm64/
+mkdir /tmp/amd64/
+
+case $(sw_vers -productVersion) in
+ 11*) codename=big_sur;;
+ 12*) codename=monterey;;
+ 13*) codename=ventura;;
+ 14*) codename=sonoma;;
+esac
+
+brew fetch --bottle-tag=arm64_"${codename}" libusb
+brew fetch --bottle-tag="${codename}" libusb
+tar xf "$(brew --cache --bottle-tag=arm64_"${codename}" libusb)" -C /tmp/arm64/
+tar xf "$(brew --cache --bottle-tag="${codename}" libusb)" -C /tmp/amd64
+for f in /tmp/arm64/libusb/"$version"/lib/* ; do
+ if lipo -info "$f" >/dev/null 2>&1; then
+ file="$(basename "$f")"
+ lipo -create -output "$(brew --cellar)/libusb/$version/lib/$file" \
+ "/tmp/arm64/libusb/$version/lib/$file" \
+ "/tmp/amd64/libusb/$version/lib/$file"
+ fi
+done
diff --git a/coin/provisioning/common/macos/macos-version.sh b/coin/provisioning/common/macos/macos-version.sh
index 9f357b8c..182c1161 100755
--- a/coin/provisioning/common/macos/macos-version.sh
+++ b/coin/provisioning/common/macos/macos-version.sh
@@ -1,53 +1,20 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2016 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$
-##
-#############################################################################
+# Copyright (C) 2016 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# This script needs to be called last during provisioning so that the software information will show up last in provision log.
set -ex
# Print all build machines versions to provision log
-echo "*********************************************" >> ~/versions.txt
-echo "***** macOS version *****" >> ~/versions.txt
-sw_vers >> ~/versions.txt
-echo "***** All installed packages *****" >> ~/versions.txt
-echo "***** HomeBrew *****" >> ~/versions.txt
-brew list --versions >> ~/versions.txt
-echo "***** HomeBrew Casks*****" >> ~/versions.txt
-brew cask list --versions >> ~/versions.txt
-echo "***** Apple's installer *****" >> ~/versions.txt
-pkgutil --pkgs >> ~/versions.txt
-echo "*********************************************" >> ~/versions.txt
-
+( echo "*********************************************"
+ echo "***** macOS version *****"
+ sw_vers
+ echo "***** All installed packages *****"
+ echo "***** HomeBrew *****"
+ brew list --versions
+ echo "***** Apple's installer *****"
+ pkgutil --pkgs
+ echo "*********************************************"
+) >> ~/versions.txt
"$(dirname "$0")/version.sh"
diff --git a/coin/provisioning/common/macos/makeuniversal.sh b/coin/provisioning/common/macos/makeuniversal.sh
new file mode 100755
index 00000000..0f5fc6a0
--- /dev/null
+++ b/coin/provisioning/common/macos/makeuniversal.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+# Copyright (C) 2021 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# Copies or lipos files from the given DESTDIR dirs to the respective install dir
+
+set -e
+
+for dir in "$@"; do
+ echo "Processing files in $dir ..."
+ pushd "$dir" >/dev/null
+ find . -type f -or -type l | while read -r f; do
+ dst="${f:1}"
+ dstdir="$(dirname "$dst")"
+ mkdir -p "$dstdir"
+
+ if [[ -L "$f" ]]; then
+ if [[ ! -L "$dst" && ! -d "$dst" && ! -f "$dst" ]]; then
+ echo "Copying symlink $dir/$f to $dst"
+ cp -P -n "$f" "$dst"
+ fi
+ elif [[ ! -f "$dst" ]]; then
+ echo "Copying $dir/$f to $dst"
+ cp -c "$f" "$dst"
+ elif lipo -info "$f" >/dev/null 2>&1; then
+ echo "Lipoing $dir/$f into $dst"
+ lipo -create -output "$dst" "$dst" "$f"
+ elif ! diff "$f" "$dst"; then
+ echo "Error: File $f in $dir doesn't match destination $dst"
+ exit 1
+ fi
+ done
+ popd >/dev/null
+done
diff --git a/coin/provisioning/common/macos/mimersql.sh b/coin/provisioning/common/macos/mimersql.sh
new file mode 100755
index 00000000..10ee1dc5
--- /dev/null
+++ b/coin/provisioning/common/macos/mimersql.sh
@@ -0,0 +1,56 @@
+#!/usr/bin/env bash
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# This script installs Mimer SQL
+
+# Mimer SQL is needed for Qt to be able to support Mimer SQL
+
+set -ex
+os="$1"
+
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
+
+mimerSqlVersion="11.0.7G"
+if [ "$os" = "macos" ]; then
+ arch=$(uname -m)
+ if [ "$arch" = "x86_64" ]; then
+ mimerSqlPackageName="mimersql-110_x86_64.tgz"
+ SHA1="d748f87b72e7188c527f131db2590f552f18f544"
+ else
+ mimerSqlPackageName="mimersql-110_arm64.tgz"
+ SHA1="f209c97074d096e50e637441073e8aa355c5116e"
+ fi
+else
+ mimerSqlPackageName="mimersql-110_universal.tgz"
+ SHA1="eab32be623f1cbde7c29cea0f0ca4332b8ca502b"
+fi
+
+PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/mac/$mimerSqlPackageName"
+AltUrl="https://install.mimer.com/qt/macOS/$mimerSqlPackageName"
+
+DownloadURL "$PrimaryUrl" "$AltUrl" "$SHA1" "/tmp/$mimerSqlPackageName"
+
+echo "Installing $mimerSqlPackageName"
+if [ -e /tmp/mimersql_${mimerSqlVersion} ]; then
+ rm -r /tmp/mimersql_${mimerSqlVersion}
+fi
+mkdir /tmp/mimersql_${mimerSqlVersion}
+tar -C /tmp/mimersql_${mimerSqlVersion} -zxf /tmp/$mimerSqlPackageName
+if [ ! -e /usr/local/include ]; then
+ sudo mkdir -p /usr/local/include
+ sudo chmod 777 /usr/local/include
+fi
+if [ ! -e /usr/local/lib ]; then
+ sudo mkdir -p /usr/local/lib
+ sudo chmod 777 /usr/local/lib
+fi
+sudo cp /tmp/mimersql_${mimerSqlVersion}/include/*.h /usr/local/include/
+sudo chmod 755 /usr/local/include/mimer*.h
+sudo cp /tmp/mimersql_${mimerSqlVersion}/lib/libmimerapi.dylib /usr/local/lib/
+sudo chmod 755 /usr/local/lib/libmimerapi.dylib
+echo "Removing $mimerSqlPackageName"
+rm "/tmp/$mimerSqlPackageName"
+rm -r /tmp/mimersql_${mimerSqlVersion}
+echo "Mimer SQL = $mimerSqlVersion" >> ~/versions.txt
diff --git a/coin/provisioning/common/macos/mount-vcpkg-cache-drive.sh b/coin/provisioning/common/macos/mount-vcpkg-cache-drive.sh
new file mode 100755
index 00000000..8a3e1f69
--- /dev/null
+++ b/coin/provisioning/common/macos/mount-vcpkg-cache-drive.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+set -e
+
+# Avoid leaking secrets in the logs
+set +x
+
+targetDir="$HOME/vcpkg-cache"
+
+# Specify the path to the credential file
+credentialFile="$HOME/samba_credentials"
+username=$(grep '^username=' "$credentialFile" | cut -d '=' -f 2)
+password=$(grep '^password=' "$credentialFile" | cut -d '=' -f 2)
+
+mkdir -p "$targetDir"
+
+# Mount the SMB share
+# Check if the mount was successful
+if mount -v -t smbfs -o -N "//${username}:${password}@vcpkg-server.ci.qt.io/vcpkg" "$targetDir"
+then
+ echo "SMB share mounted successfully!"
+else
+ echo "Failed to mount SMB share."
+fi
+
+set -x
diff --git a/coin/provisioning/common/macos/ninja.sh b/coin/provisioning/common/macos/ninja.sh
new file mode 100755
index 00000000..66ac8324
--- /dev/null
+++ b/coin/provisioning/common/macos/ninja.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+# Copyright (C) 2021 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# This script will install ninja binary
+
+# shellcheck source=./../unix/InstallFromCompressedFileFromURL.sh
+source "${BASH_SOURCE%/*}/../unix/InstallFromCompressedFileFromURL.sh"
+
+version="1.10.2"
+internalUrl="http://ci-files01-hki.ci.qt.io/input/mac/ninja-mac_v${version}.zip"
+externalUrl="https://github.com/ninja-build/ninja/releases/download/v${version}/ninja-mac.zip"
+SHA1="95d0ca5e7c67ab7181c87e6a6ec59d11b1ff2d30"
+DestDir="/usr/local/bin/"
+
+InstallFromCompressedFileFromURL "$internalUrl" "$externalUrl" "$SHA1" "$DestDir" ""
+
+echo "Ninja = $version" >> ~/versions.txt
diff --git a/coin/provisioning/common/macos/nodejs.sh b/coin/provisioning/common/macos/nodejs.sh
new file mode 100755
index 00000000..ac927110
--- /dev/null
+++ b/coin/provisioning/common/macos/nodejs.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+# Copyright (C) 2021 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# shellcheck source=./../unix/DownloadURL.sh
+source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
+
+# This script will install Nodejs
+
+version="18.16.0"
+urlCache="http://ci-files01-hki.ci.qt.io/input/nodejs/node-v$version.pkg"
+urlOffcial="https://nodejs.org/dist/v$version/node-v$version.pkg"
+sha256="156aa5b9580288fb0b3c6134eb8fac64e50745d78d33eebe9e29eb7ff87b8e1e"
+
+DownloadURL $urlCache $urlOffcial $sha256 "/tmp/node-v$version.pkg"
+sudo installer -pkg "/tmp/node-v$version.pkg" -target /
+
+ echo "Nodejs = $version" >> ~/versions.txt
+
diff --git a/coin/provisioning/common/macos/pip.sh b/coin/provisioning/common/macos/pip.sh
index 2d07db85..ce73d283 100755
--- a/coin/provisioning/common/macos/pip.sh
+++ b/coin/provisioning/common/macos/pip.sh
@@ -1,11 +1,20 @@
#!/usr/bin/env bash
+#Copyright (C) 2023 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# shellcheck source=../unix/DownloadURL.sh
+source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
function InstallPip {
python=$1
# Will install pip utility for python
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
+ if [[ $python == "python2.7" ]]; then
+ DownloadURL "http://ci-files01-hki.ci.qt.io/input/mac/python27/get-pip.py" "https://bootstrap.pypa.io/2.7/get-pip.py" "c4c5f74586cffe49804f167d95d1710b9750ddf0"
+ else
+ DownloadURL "http://ci-files01-hki.ci.qt.io/input/mac/get-pip.py" "https://bootstrap.pypa.io/get-pip.py" "209ddf0bb8d1cf06a1f17dd9f21970c76b3d2be2"
+ fi
sudo "$python" get-pip.py
rm get-pip.py
}
diff --git a/coin/provisioning/common/macos/pkgconfig.sh b/coin/provisioning/common/macos/pkgconfig.sh
new file mode 100755
index 00000000..5b849821
--- /dev/null
+++ b/coin/provisioning/common/macos/pkgconfig.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# Copyright (C) 2020 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# Install pkgconfig
+set -ex
+
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+brew install pkgconfig
+read -r -a arr <<< "$(brew list --versions pkgconfig)"
+version=${arr[1]}
+echo "pkgconfig = $version" >> ~/versions.txt
diff --git a/coin/provisioning/common/macos/postgresql.sh b/coin/provisioning/common/macos/postgresql.sh
new file mode 100755
index 00000000..8980d28e
--- /dev/null
+++ b/coin/provisioning/common/macos/postgresql.sh
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+# Copyright (C) 2020 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# This script installs PostgreSQL
+
+# PostgreSQL is needed for Qt to be able to support PostgreSQL
+
+set -ex
+
+# shellcheck source=../unix/SetEnvVar.sh
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+# shellcheck source=../unix/DownloadURL.sh
+source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
+
+psqlAppVersion="2.5"
+psqlVersion="14"
+
+packageName="Postgres-$psqlAppVersion-$psqlVersion.dmg"
+
+PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/mac/macos_10.12_sierra/$packageName"
+AltUrl="https://github.com/PostgresApp/PostgresApp/releases/download/v$psqlAppVersion/$packageName"
+SHA1="04cb6939704c5ede5646c1da8a686da3ded98a26"
+
+DownloadURL "$PrimaryUrl" "$AltUrl" "$SHA1" "/tmp/$packageName"
+
+mountpoint="/tmp/pg-mount"
+mkdir -p "$mountpoint"
+
+echo "Mounting $packageName in $mountpoint"
+hdiutil attach -nobrowse -mountpoint "$mountpoint" "/tmp/$packageName"
+
+rm -Rf /Applications/Postgres.app
+cp -Rf "$mountpoint/Postgres.app" /Applications
+
+umount "$mountpoint"
+echo "Removing $packageName"
+rm "/tmp/$packageName"
+
+SetEnvVar "POSTGRESQLBINPATH" "/Applications/Postgres.app/Contents/Versions/$psqlVersion/bin"
+echo "PostgreSQL = $psqlVersion ($psqlAppVersion)" >> ~/versions.txt
diff --git a/coin/provisioning/common/macos/python2.sh b/coin/provisioning/common/macos/python2.sh
index 4ab914de..2da8b463 100755
--- a/coin/provisioning/common/macos/python2.sh
+++ b/coin/provisioning/common/macos/python2.sh
@@ -1,37 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2018 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$
-##
-#############################################################################
+# Copyright (C) 2018 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# This script installs python2
@@ -42,7 +11,7 @@ source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
# shellcheck source=./pip.sh
source "${BASH_SOURCE%/*}/pip.sh"
-PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/python-2.7.16-macosx10.6.pkg"
+PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/mac/python-2.7.16-macosx10.6.pkg"
AltUrl="https://www.python.org/ftp/python/2.7.16/python-2.7.16-macosx10.6.pkg"
SHA1="895a8327a58e7c0e58852638ab3d84843643535b"
DestDir="/"
@@ -51,6 +20,10 @@ InstallPKGFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$DestDir"
InstallPip python2.7
+echo "Configure pip"
+/Library/Frameworks/Python.framework/Versions/2.7/bin/pip config --user set global.index https://ci-files01-hki.ci.qt.io/input/python_module_cache
+/Library/Frameworks/Python.framework/Versions/2.7/bin/pip config --user set global.extra-index-url https://pypi.org/simple/
+
/Library/Frameworks/Python.framework/Versions/2.7/bin/pip install virtualenv
SetEnvVar "PATH" "/Library/Frameworks/Python.framework/Versions/2.7/bin/:\$PATH"
diff --git a/coin/provisioning/common/macos/python3.sh b/coin/provisioning/common/macos/python3.sh
index 35bccc93..925a4925 100755
--- a/coin/provisioning/common/macos/python3.sh
+++ b/coin/provisioning/common/macos/python3.sh
@@ -1,38 +1,7 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Copyright (C) 2017 Pelagicore AG
-## 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$
-##
-#############################################################################
+# Copyright (C) 2019 The Qt Company Ltd.
+# Copyright (C) 2017 Pelagicore AG
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# This script installs python3
@@ -43,23 +12,25 @@ source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
# shellcheck source=./pip.sh
source "${BASH_SOURCE%/*}/pip.sh"
-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"
+PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/mac/python-3.9.6-macos11.pkg"
+AltUrl="https://www.python.org/ftp/python/3.9.6/python-3.9.6-macos11.pkg"
+SHA1="2af5277c2e197719eb4b820430dee5d89e2577b6"
DestDir="/"
InstallPKGFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$DestDir"
-InstallPip python3.6
+InstallPip python3.9
-/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3 install virtualenv wheel
+echo "Configure pip"
+/Library/Frameworks/Python.framework/Versions/3.9/bin/pip config --user set global.index https://ci-files01-hki.ci.qt.io/input/python_module_cache
+/Library/Frameworks/Python.framework/Versions/3.9/bin/pip config --user set global.extra-index-url https://pypi.org/simple/
-SetEnvVar "PYTHON3_PATH" "/Library/Frameworks/Python.framework/Versions/3.6/bin"
-SetEnvVar "PIP3_PATH" "/Library/Frameworks/Python.framework/Versions/3.6/bin"
+/Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 install virtualenv wheel html5lib
-# Install all needed packages in a special wheel cache directory
-/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3 wheel --wheel-dir $HOME/python3-wheels -r ${BASH_SOURCE%/*}/../shared/requirements.txt
-SetEnvVar "PYTHON3_WHEEL_CACHE" "$HOME/python3-wheels"
+SetEnvVar "PYTHON3_PATH" "/Library/Frameworks/Python.framework/Versions/3.9/bin"
+SetEnvVar "PIP3_PATH" "/Library/Frameworks/Python.framework/Versions/3.9/bin"
-echo "python3 = 3.6.1" >> ~/versions.txt
+# Install Python certificates. Required at least for emsdk installation
+open /Applications/Python\ 3.9/Install\ Certificates.command
+echo "python3 = 3.9.6" >> ~/versions.txt
diff --git a/coin/provisioning/common/macos/sccache.sh b/coin/provisioning/common/macos/sccache.sh
new file mode 100755
index 00000000..85c4aee2
--- /dev/null
+++ b/coin/provisioning/common/macos/sccache.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# Copyright (C) 2019 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+set -ex
+
+source "${BASH_SOURCE%/*}/../unix/sccache.sh"
+
+targetArch=x86_64-apple-darwin
+targetVersion=0.2.14
+sha1=764bc1664c0ff616d9980a6d127175d0a2041781
+installSccache "$targetArch" "$targetVersion" "$sha1"
diff --git a/coin/provisioning/common/macos/screenresolution.sh b/coin/provisioning/common/macos/screenresolution.sh
new file mode 100755
index 00000000..1b552e88
--- /dev/null
+++ b/coin/provisioning/common/macos/screenresolution.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+# Copyright (C) 2020 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# 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/set-locale.sh b/coin/provisioning/common/macos/set-locale.sh
new file mode 100755
index 00000000..bede1e00
--- /dev/null
+++ b/coin/provisioning/common/macos/set-locale.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+# Copyright (C) 2019 The Qt Company Ltd.
+# Copyright (C) 2017 Pelagicore AG
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# This script sets the macOS locale to UTF-8
+set -ex
+
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+SetEnvVar "LANG" "en_US.UTF-8"
+
+# The following settings match the "United States" region default
+defaults write -globalDomain AppleLocale "en_US"
+defaults write -globalDomain AppleLanguages "(en)"
+defaults write -globalDomain AppleMeasurementUnits "Inches"
+defaults write -globalDomain AppleTemperatureUnit "Fahrenheit"
+defaults write -globalDomain AppleMetricUnits -bool false
diff --git a/coin/provisioning/common/macos/set_tcc_permissions.sh b/coin/provisioning/common/macos/set_tcc_permissions.sh
new file mode 100755
index 00000000..d9fb222b
--- /dev/null
+++ b/coin/provisioning/common/macos/set_tcc_permissions.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+#Copyright (C) 2024 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+TCC_DATABASE="$HOME/Library/Application Support/com.apple.TCC/TCC.db"
+if touch "$TCC_DATABASE"; then
+ # We can write to the TCC database
+ BOOTSTRAP_AGENT="$HOME/bootstrap-agent"
+ REQ_STR=$(codesign -d -r- "$BOOTSTRAP_AGENT" 2>&1 | awk -F ' => ' '/designated/{print $2}')
+ REQ_HEX=$(echo "$REQ_STR" | csreq -r- -b >(xxd -p | tr -d '\n'))
+
+ # shellcheck disable=SC2043
+ for service in kTCCServiceMicrophone; do
+ sqlite3 -echo "$TCC_DATABASE" <<EOF
+ DELETE from access WHERE client = '$BOOTSTRAP_AGENT' AND service = '$service';
+ INSERT INTO access (service, client, client_type, auth_value, auth_reason, auth_version, csreq, flags) VALUES (
+ '$service', -- service
+ '$BOOTSTRAP_AGENT', -- client
+ 1, -- client_type (1 - absolute path)
+ 2, -- auth_value (2 - allowed)
+ 4, -- auth_reason (4 - "System Set")
+ 1, -- auth_version
+ X'$REQ_HEX', -- csreq
+ 0 -- flags
+ );
+EOF
+ done
+else
+ echo "TCC database is not writable. Is SIP disabled?" >&2
+ exit 1
+fi
diff --git a/coin/provisioning/common/macos/sha1sum-compatibility.sh b/coin/provisioning/common/macos/sha1sum-compatibility.sh
index c3936499..65685371 100755
--- a/coin/provisioning/common/macos/sha1sum-compatibility.sh
+++ b/coin/provisioning/common/macos/sha1sum-compatibility.sh
@@ -1,37 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2018 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$
-##
-#############################################################################
+# Copyright (C) 2018 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# On macOS the sha1 tool is named 'shasum' while on all other unix systems it is called 'sha1sum'.
# In order to make all unix provioning scripts run on macOS without special case handling
diff --git a/coin/provisioning/common/macos/system_updates.sh b/coin/provisioning/common/macos/system_updates.sh
index 0736d740..8cc9410e 100755
--- a/coin/provisioning/common/macos/system_updates.sh
+++ b/coin/provisioning/common/macos/system_updates.sh
@@ -1,40 +1,12 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL21$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# Disable "Download newly available updates in the background" from App Store
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticDownload -boolean FALSE
# Disable "Install system data files and security updates" from App Store
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -boolean FALSE
+
+# Disable "Automatic checks"
+sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool FALSE
diff --git a/coin/provisioning/common/macos/telegraf-coin.conf b/coin/provisioning/common/macos/telegraf-coin.conf
index 24440a05..d06e90cc 100644
--- a/coin/provisioning/common/macos/telegraf-coin.conf
+++ b/coin/provisioning/common/macos/telegraf-coin.conf
@@ -24,7 +24,13 @@
# collect_cpu_time = false
# report_active = false
[[inputs.disk]]
- ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
+ # macOS needs two extra filesystem exceptions:
+ # + cd9660: This is a read-only filesystem, and always 100% full
+ # + msdos: Sometimes at boot a short-lived unique mount of type "msdos"
+ # is performed, at the random directory
+ # /Volumes/firmwaresyncd.XXXXXX.
+ # The uniqueness of the path bloats the cardinality of InfluxDB.
+ ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs", "cd9660", "msdos"]
#[[inputs.diskio]] # linux-only
[[inputs.kernel]]
[[inputs.mem]]
@@ -48,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 100755
index 00000000..9b6d3851
--- /dev/null
+++ b/coin/provisioning/common/macos/telegraf-ioping.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#Copyright (C) 2023 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# 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
+
+[ -z "$1" ] && 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..f9658d83
--- /dev/null
+++ b/coin/provisioning/common/macos/telegraf_install.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+# 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")/../../"
+
+# shellcheck source=../unix/common.sourced.sh
+source "${BASH_SOURCE%/*}/../unix/common.sourced.sh"
+# shellcheck source=../unix/DownloadURL.sh
+source "${BASH_SOURCE%/*}/../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.ci.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
+
+[ "$PROVISIONING_OS" = macos ] && os=darwin || os=linux
+[ "$PROVISIONING_ARCH" = x86 ] && 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.ci.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/common/macos/version.sh b/coin/provisioning/common/macos/version.sh
index 3e2a7f19..8e3cde83 100755
--- a/coin/provisioning/common/macos/version.sh
+++ b/coin/provisioning/common/macos/version.sh
@@ -1,37 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2016 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$
-##
-#############################################################################
+# Copyright (C) 2016 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# This script will print all installed software to provision log.
# Script needs to be named so that it will be ran at last during provisioning
@@ -41,3 +10,9 @@ echo "*********************************************"
echo "***** SW VERSIONS *****"
cat ~/versions.txt
echo "*********************************************"
+echo "*************** mount ***********************"
+mount
+echo "*********************************************"
+echo "*************** df **************************"
+df -h
+echo "*********************************************"