diff options
Diffstat (limited to 'coin/provisioning/common/macos')
43 files changed, 605 insertions, 906 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 d9b55d3b..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,7 @@ function InstallPKGFromURL { targetDirectory=$4 echo "Creating temporary file" - package_basename=$(echo "$url" | sed 's|^.*/||') + package_basename="${url/*\//}" tmpdir=$(mktemp -d) targetFile="$tmpdir/$package_basename" echo "Downloading PKG from primary URL '$url'" 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 504ed802..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,11 +11,11 @@ source "${BASH_SOURCE%/*}/InstallAppFromCompressedFileFromURL.sh" # shellcheck source=../unix/SetEnvVar.sh source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" -majorminorversion="3.19" -version="3.19.2" -PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/cmake/cmake-$version-macos-universal.tar.gz" +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="753c72931e9c76c969255c197781635e7110e363" +SHA1="75153b6c7a418bc7120c6217d4698c7d245d00e0" appPrefix="cmake-$version-macos-universal" InstallAppFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$appPrefix" 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 index e189e098..13c0a480 100755 --- a/coin/provisioning/common/macos/disable-notifications_and_warnings.sh +++ b/coin/provisioning/common/macos/disable-notifications_and_warnings.sh @@ -1,4 +1,6 @@ #!/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 diff --git a/coin/provisioning/common/macos/disable_net_lso.sh b/coin/provisioning/common/macos/disable_net_lso.sh index 469bd3db..7c51a486 100755 --- a/coin/provisioning/common/macos/disable_net_lso.sh +++ b/coin/provisioning/common/macos/disable_net_lso.sh @@ -1,39 +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) 2021 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$ -## -############################################################################# - -echo """<?xml version=\"1.0\" encoding=\"UTF-8\"?> +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> @@ -61,4 +31,4 @@ echo """<?xml version=\"1.0\" encoding=\"UTF-8\"?> <true/> </dict> </plist> -""" | sudo tee -a /Library/LaunchDaemons/net_tcp_tso_off.plist +EOB diff --git a/coin/provisioning/common/macos/disable_spotlight.sh b/coin/provisioning/common/macos/disable_spotlight.sh index de93a335..a404d3e7 100755 --- a/coin/provisioning/common/macos/disable_spotlight.sh +++ b/coin/provisioning/common/macos/disable_spotlight.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 # Disable spotlight and and stop indexing sudo mdutil -a -i off 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 66463c44..4f3a93ba 100755 --- a/coin/provisioning/common/macos/homebrew.sh +++ b/coin/provisioning/common/macos/homebrew.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/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. @@ -7,11 +9,11 @@ set -e -. "$(dirname "$0")"/../../common/unix/DownloadURL.sh +source "$(dirname "$0")"/../../common/unix/DownloadURL.sh DownloadURL \ - http://ci-files01-hki.intra.qt.io/input/mac/homebrew-install.c744a716f9845988d01e6e238eee7117b8c366c9.rb \ + 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 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 cd7838b6..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 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_xcode.sh b/coin/provisioning/common/macos/install_xcode.sh index c1f8f971..440f19b9 100755 --- a/coin/provisioning/common/macos/install_xcode.sh +++ b/coin/provisioning/common/macos/install_xcode.sh @@ -1,37 +1,6 @@ #!/usr/bin/env bash - -############################################################################# -## -## Copyright (C) 2021 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 # shellcheck source=./../unix/DownloadURL.sh source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh" @@ -56,7 +25,7 @@ function InstallXCode() { cd /Applications/ && sudo tar -zxf "$sourceFile" elif [[ $sourceFile =~ "xip" ]]; then if [[ $sourceFile =~ "http" ]]; then - Download $sourceFile /Applications/Xcode_$version.xip + Download "$sourceFile" "/Applications/Xcode_$version.xip" cd /Applications/ && xip -x "Xcode_$version.xip" else cd /Applications/ && xip -x "$sourceFile" @@ -66,12 +35,12 @@ function InstallXCode() { 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 34cf8477..1429f824 100755 --- a/coin/provisioning/common/macos/java.sh +++ b/coin/provisioning/common/macos/java.sh @@ -1,48 +1,17 @@ #!/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 mkdir -p /Volumes/files @@ -53,12 +22,12 @@ 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 index cf9e7150..2abe6cbf 100755 --- a/coin/provisioning/common/macos/libusb.sh +++ b/coin/provisioning/common/macos/libusb.sh @@ -1,43 +1,35 @@ #!/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$ -## -############################################################################# +# 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) +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 c88cd9b8..182c1161 100755 --- a/coin/provisioning/common/macos/macos-version.sh +++ b/coin/provisioning/common/macos/macos-version.sh @@ -1,51 +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 "***** 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 index 9b689647..66ac8324 100755 --- a/coin/provisioning/common/macos/ninja.sh +++ b/coin/provisioning/common/macos/ninja.sh @@ -1,47 +1,16 @@ #!/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$ -## -############################################################################# +# 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.1" -internalUrl="http://ci-files01-hki.ci.local/input/mac/ninja-mac_v${version}.zip" +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="de7c594e3bf76f7c86b9d6874d49c8824b2a76e1" +SHA1="95d0ca5e7c67ab7181c87e6a6ec59d11b1ff2d30" DestDir="/usr/local/bin/" InstallFromCompressedFileFromURL "$internalUrl" "$externalUrl" "$SHA1" "$DestDir" "" diff --git a/coin/provisioning/common/macos/nodejs.sh b/coin/provisioning/common/macos/nodejs.sh index 1313d27e..ac927110 100755 --- a/coin/provisioning/common/macos/nodejs.sh +++ b/coin/provisioning/common/macos/nodejs.sh @@ -1,49 +1,18 @@ #!/usr/bin/env bash - -############################################################################# -## -## Copyright (C) 2021 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 # shellcheck source=./../unix/DownloadURL.sh source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh" # This script will install Nodejs -version="14.16.1" -urlCache="http://ci-files01-hki.ci.local/input/nodejs/node-v$version.pkg" +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" -sha1="4720274971c40fe51b2c647060f77c45fb4949a7" +sha256="156aa5b9580288fb0b3c6134eb8fac64e50745d78d33eebe9e29eb7ff87b8e1e" -DownloadURL $urlCache $urlOffcial $sha1 "/tmp/node-v$version.pkg" +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 b1c9a864..ce73d283 100755 --- a/coin/provisioning/common/macos/pip.sh +++ b/coin/provisioning/common/macos/pip.sh @@ -1,4 +1,6 @@ #!/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" @@ -9,9 +11,9 @@ function InstallPip { # Will install pip utility for python if [[ $python == "python2.7" ]]; then - DownloadURL "http://ci-files01-hki.intra.qt.io/input/mac/python27/get-pip.py" "https://bootstrap.pypa.io/2.7/get-pip.py" "c4c5f74586cffe49804f167d95d1710b9750ddf0" + 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.intra.qt.io/input/mac/get-pip.py" "https://bootstrap.pypa.io/get-pip.py" "209ddf0bb8d1cf06a1f17dd9f21970c76b3d2be2" + 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 index 9fad4912..5b849821 100755 --- a/coin/provisioning/common/macos/pkgconfig.sh +++ b/coin/provisioning/common/macos/pkgconfig.sh @@ -1,43 +1,12 @@ #!/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$ -## -############################################################################# +# 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) +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 185c3b01..1a8809d6 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) 2019 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,23 @@ 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.7.4-macosx10.9.pkg" -AltUrl="https://www.python.org/ftp/python/3.7.4/python-3.7.4-macosx10.9.pkg" -SHA1="ef8a6b1abba6a6e8553916a881af440705653fa8" +PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/mac/python-3.11.9-macos11.pkg" +AltUrl="https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg" +SHA1="d156e22e4f8902c0ebdf466a3a01832e0f0a85d8" DestDir="/" InstallPKGFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$DestDir" -InstallPip python3.7 - -/Library/Frameworks/Python.framework/Versions/3.7/bin/pip3 install virtualenv wheel +echo "Configure pip" +/Library/Frameworks/Python.framework/Versions/3.11/bin/pip3 config --user set global.index https://ci-files01-hki.ci.qt.io/input/python_module_cache +/Library/Frameworks/Python.framework/Versions/3.11/bin/pip3 config --user set global.extra-index-url https://pypi.org/simple/ -SetEnvVar "PYTHON3_PATH" "/Library/Frameworks/Python.framework/Versions/3.7/bin" -SetEnvVar "PIP3_PATH" "/Library/Frameworks/Python.framework/Versions/3.7/bin" +/Library/Frameworks/Python.framework/Versions/3.11/bin/pip3 install virtualenv wheel html5lib -# Install all needed packages in a special wheel cache directory -/Library/Frameworks/Python.framework/Versions/3.7/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.11/bin" +SetEnvVar "PIP3_PATH" "/Library/Frameworks/Python.framework/Versions/3.11/bin" -echo "python3 = 3.7.4" >> ~/versions.txt +# Install Python certificates. Required at least for emsdk installation +open /Applications/Python\ 3.11/Install\ Certificates.command +echo "python3 = 3.11.9" >> ~/versions.txt diff --git a/coin/provisioning/common/macos/sccache.sh b/coin/provisioning/common/macos/sccache.sh index 90d7761e..85c4aee2 100755 --- a/coin/provisioning/common/macos/sccache.sh +++ b/coin/provisioning/common/macos/sccache.sh @@ -1,37 +1,6 @@ #!/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$ -## -############################################################################# +# 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 diff --git a/coin/provisioning/common/macos/screenresolution.sh b/coin/provisioning/common/macos/screenresolution.sh index 6cac2441..1b552e88 100755 --- a/coin/provisioning/common/macos/screenresolution.sh +++ b/coin/provisioning/common/macos/screenresolution.sh @@ -1,37 +1,6 @@ #!/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$ -## -############################################################################# +# 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 diff --git a/coin/provisioning/common/macos/set-locale.sh b/coin/provisioning/common/macos/set-locale.sh index 7d8ada74..bede1e00 100755 --- a/coin/provisioning/common/macos/set-locale.sh +++ b/coin/provisioning/common/macos/set-locale.sh @@ -1,38 +1,7 @@ #!/usr/bin/env bash - -############################################################################# -## -## Copyright (C) 2019 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 sets the macOS locale to UTF-8 set -ex 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-ioping.sh b/coin/provisioning/common/macos/telegraf-ioping.sh index eee1372b..9b6d3851 100644..100755 --- a/coin/provisioning/common/macos/telegraf-ioping.sh +++ b/coin/provisioning/common/macos/telegraf-ioping.sh @@ -1,4 +1,6 @@ #!/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 # @@ -12,7 +14,7 @@ set -e -[ x"$1" = x ] && echo "$0 takes a path as a first argument" && exit 1 +[ -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. @@ -22,5 +24,5 @@ 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 +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 index 75a41bf9..f9658d83 100755 --- a/coin/provisioning/common/macos/telegraf_install.sh +++ b/coin/provisioning/common/macos/telegraf_install.sh @@ -1,38 +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) 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. @@ -46,11 +14,12 @@ ######################## BOILERPLATE ########################### set -e - PROVISIONING_DIR="$(dirname "$0")/../../" -. "$PROVISIONING_DIR"/common/unix/common.sourced.sh -. "$PROVISIONING_DIR"/common/unix/DownloadURL.sh +# 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" @@ -61,7 +30,7 @@ is_script_executed telegraf_install.sh \ [ "$PROVISIONING_OS" = linux ] \ && ioping_sha256=259abf04bcb84f4126ff97c04b6651e1cf5ea6d8a9ff364c769a26c95b6eeb44 \ || ioping_sha256=55de6a2f1a5343e0ce8df31d82d47a9e79c7e612edbc6dfb39b5fc6fb358b2e3 -DownloadURL "http://ci-files01-hki.intra.qt.io/input/ioping/ioping.${PROVISIONING_OS}-${PROVISIONING_ARCH}" \ +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/ @@ -72,14 +41,14 @@ $CMD_INSTALL -m 755 "$PROVISIONING_DIR"/common/macos/telegraf-ioping.sh /usr/l # 3. Download and install telegraf -[ x"$PROVISIONING_OS" = xmacos ] && os=darwin || os=linux -[ x"$PROVISIONING_ARCH" = xx86 ] && arch=i386 || arch=amd64 +[ "$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.intra.qt.io/input/telegraf/"$package_filename" \ + http://ci-files01-hki.ci.qt.io/input/telegraf/"$package_filename" \ https://dl.influxdata.com/telegraf/releases/"$package_filename" \ "$package_sha256" \ telegraf.tar.gz diff --git a/coin/provisioning/common/macos/version.sh b/coin/provisioning/common/macos/version.sh index e57fb60b..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 |