aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/unix
diff options
context:
space:
mode:
Diffstat (limited to 'coin/provisioning/common/unix')
-rwxr-xr-xcoin/provisioning/common/unix/DownloadURL.sh60
-rwxr-xr-xcoin/provisioning/common/unix/InstallFromCompressedFileFromURL.sh41
-rwxr-xr-xcoin/provisioning/common/unix/SetEnvVar.sh52
-rwxr-xr-xcoin/provisioning/common/unix/check_and_set_proxy.sh40
-rwxr-xr-xcoin/provisioning/common/unix/common.sourced.sh49
-rwxr-xr-xcoin/provisioning/common/unix/disable-ntp_macos.sh41
-rwxr-xr-xcoin/provisioning/common/unix/emsdk.sh84
-rwxr-xr-xcoin/provisioning/common/unix/install-breakpad.sh45
-rwxr-xr-xcoin/provisioning/common/unix/install-conan.sh2
-rwxr-xr-xcoin/provisioning/common/unix/install-ffmpeg-android.sh106
-rwxr-xr-xcoin/provisioning/common/unix/install-ffmpeg-ios.sh76
-rwxr-xr-xcoin/provisioning/common/unix/install-ffmpeg.sh113
-rwxr-xr-xcoin/provisioning/common/unix/install-openssl.sh86
-rwxr-xr-xcoin/provisioning/common/unix/install_grpc.sh84
-rwxr-xr-xcoin/provisioning/common/unix/install_protobuf.sh101
-rwxr-xr-xcoin/provisioning/common/unix/install_protobuff.sh81
-rwxr-xr-xcoin/provisioning/common/unix/libclang-v100-dyn.sh51
-rwxr-xr-xcoin/provisioning/common/unix/libclang.sh83
-rwxr-xr-xcoin/provisioning/common/unix/mqtt_broker.sh43
-rwxr-xr-xcoin/provisioning/common/unix/openssl_3_for_android.sh76
-rwxr-xr-xcoin/provisioning/common/unix/openssl_for_android.sh91
-rw-r--r--coin/provisioning/common/unix/pyenv.rb80
-rwxr-xr-xcoin/provisioning/common/unix/python_modules.sh41
-rwxr-xr-xcoin/provisioning/common/unix/sccache.sh50
-rwxr-xr-xcoin/provisioning/common/unix/sccache_wrapper14
-rwxr-xr-xcoin/provisioning/common/unix/squishInstall.sh124
-rwxr-xr-xcoin/provisioning/common/unix/telegraf_install.sh89
-rwxr-xr-xcoin/provisioning/common/unix/telegraf_password.sh47
28 files changed, 915 insertions, 935 deletions
diff --git a/coin/provisioning/common/unix/DownloadURL.sh b/coin/provisioning/common/unix/DownloadURL.sh
index d8698522..455d65d3 100755
--- a/coin/provisioning/common/unix/DownloadURL.sh
+++ b/coin/provisioning/common/unix/DownloadURL.sh
@@ -1,43 +1,6 @@
-#!/bin/sh
-
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
# A helper script used for downloading a file from a URL or an alternative
@@ -58,9 +21,12 @@ Download () {
url="$1"
targetFile="$2"
- command -v curl >/dev/null \
- && curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" \
- || wget --tries 5 -O "$targetFile" "$url"
+ if command -v curl >/dev/null
+ then
+ curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url"
+ else
+ wget --tries 5 -O "$targetFile" "$url"
+ fi
}
VerifyHash () {
@@ -81,10 +47,10 @@ VerifyHash () {
65) sha256sum "$file" ;;
97) sha384sum "$file" ;;
129) sha512sum "$file" ;;
- *) echo "FATAL! Unknown hash length: $hashLength" 1>&2 && exit 1 ;;
+ *) echo "FATAL! Unknown hash length: $hashLength" 1>&2 ;;
esac | cut -d ' ' -f 1`
- if [ ! "$expectedHash" = "$hash" ]
+ if [ -z "$hash" ] || [ ! "$expectedHash" = "$hash" ]
then
echo "FAIL! wrong file hash: $file $hash" 1>&2
return 1
@@ -98,10 +64,10 @@ DownloadURL () {
url2=$2
expectedHash=$3
# Optional argument $4: destination filename
- if [ x"$4" = x ]
+ if [ -z "$4" ]
then
# defaults to the last component of $url
- targetFile=$(echo $url | sed 's|^.*/||')
+ targetFile="${url/*\//}"
else
targetFile=$4
fi
diff --git a/coin/provisioning/common/unix/InstallFromCompressedFileFromURL.sh b/coin/provisioning/common/unix/InstallFromCompressedFileFromURL.sh
index 41b14c0b..c1358fdd 100755
--- a/coin/provisioning/common/unix/InstallFromCompressedFileFromURL.sh
+++ b/coin/provisioning/common/unix/InstallFromCompressedFileFromURL.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
set -ex
diff --git a/coin/provisioning/common/unix/SetEnvVar.sh b/coin/provisioning/common/unix/SetEnvVar.sh
index 88a2d193..3f457bb4 100755
--- a/coin/provisioning/common/unix/SetEnvVar.sh
+++ b/coin/provisioning/common/unix/SetEnvVar.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# 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
# A helper script used for setting environment variables on Unix systems
@@ -49,10 +12,17 @@ function SetEnvVar {
echo "Setting environment variable $name to $path."
- if uname -a |grep -q "Ubuntu"; then
- echo "export $name=$path" >> ~/.profile
+ if uname -a |grep -q -E "Ubuntu|Debian"; then
+ if lsb_release -a |grep "Ubuntu 22.04"; then
+ echo "export $name=$path" >> ~/.bashrc
+ echo "export $name=$path" >> ~/.bash_profile
+ else
+ echo "export $name=$path" >> ~/.profile
+ fi
else
echo "export $name=$path" >> ~/.bashrc
echo "export $name=$path" >> ~/.zshrc
+ echo "export $name=$path" >> ~/.zshenv
+ echo "export $name=$path" >> ~/.zprofile
fi
}
diff --git a/coin/provisioning/common/unix/check_and_set_proxy.sh b/coin/provisioning/common/unix/check_and_set_proxy.sh
index c2e59b6b..59598205 100755
--- a/coin/provisioning/common/unix/check_and_set_proxy.sh
+++ b/coin/provisioning/common/unix/check_and_set_proxy.sh
@@ -1,42 +1,6 @@
#!/usr/bin/env bash
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
diff --git a/coin/provisioning/common/unix/common.sourced.sh b/coin/provisioning/common/unix/common.sourced.sh
index aba0f78e..c15d9453 100755
--- a/coin/provisioning/common/unix/common.sourced.sh
+++ b/coin/provisioning/common/unix/common.sourced.sh
@@ -1,44 +1,6 @@
#!/bin/sh
-
-
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
# Script to be sourced from everywhere you need a common environment. Defines:
@@ -75,7 +37,7 @@ fatal () {
# Takes one argument which should be the filename of this script. Returns true
# if the script is being sourced, false if the script is being executed.
is_script_executed () {
- [ x"$(basename $(echo "$0" | sed s/^-//))" = x"$1" ]
+ [ "$(basename "$(echo "$0" | sed s/^-//)")" = "$1" ]
}
@@ -86,6 +48,7 @@ is_script_executed common.sourced.sh \
_detect_linux_OS_ID () {
if [ -f /etc/os-release ]
then
+ # shellcheck source=/dev/null
. /etc/os-release
PROVISIONING_OS_ID="$ID"
elif [ -f /etc/redhat-release ]
@@ -107,7 +70,7 @@ set_common_environment () {
# script in a portable way
# PROVISIONING_DIR="$(dirname "$0")/../../"
- [ x"$PROVISIONING_DIR" = x ] \
+ [ -z "$PROVISIONING_DIR" ] \
&& fatal "PROVISIONING_DIR variable needs to be set before calling set_common_environment"
uname_s="$(uname -s)"
@@ -145,7 +108,7 @@ set_common_environment () {
uname_m="$(uname -m)"
case "$uname_m" in
x86_64|amd64) PROVISIONING_ARCH=amd64 ;;
- arm64) PROVISIONING_ARCH=arm64 ;;
+ aarch64|arm64)PROVISIONING_ARCH=arm64 ;;
i[3456]86) PROVISIONING_ARCH=x86 ;;
*) fatal "Unknown architecture in uname: $uname_m" 43 ;;
esac
diff --git a/coin/provisioning/common/unix/disable-ntp_macos.sh b/coin/provisioning/common/unix/disable-ntp_macos.sh
index f9ec7e1f..fd490e43 100755
--- a/coin/provisioning/common/unix/disable-ntp_macos.sh
+++ b/coin/provisioning/common/unix/disable-ntp_macos.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
set -ex
diff --git a/coin/provisioning/common/unix/emsdk.sh b/coin/provisioning/common/unix/emsdk.sh
index efeedbac..580f966f 100755
--- a/coin/provisioning/common/unix/emsdk.sh
+++ b/coin/provisioning/common/unix/emsdk.sh
@@ -1,55 +1,40 @@
#!/usr/bin/env bash
-#############################################################################
-##
-## Copyright (C) 2021 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# 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=./SetEnvVar.sh
source "${BASH_SOURCE%/*}/SetEnvVar.sh"
-version="3.0.0"
-versionNode="v14.15.5"
+# shellcheck source=./DownloadURL.sh
+source "${BASH_SOURCE%/*}/DownloadURL.sh"
+
+version="3.1.50"
+versionNode="v16.20.0"
+tarBallVersion="${version//./_}"
+if uname -a |grep -q Darwin; then
+ tarBallPackage="emsdk_macos_${tarBallVersion}.tar.gz"
+ sha="c12169ec8d22fc7a9ef1ba98027435bdf3b72729"
+else
+ tarBallPackage="emsdk_linux_${tarBallVersion}.tar.gz"
+ sha="5d81a8f1ddcb8d74c70ba5608efd4266c857944a"
+fi
+cacheUrl="https://ci-files01-hki.ci.qt.io/input/emsdk/${tarBallPackage}"
+target="/tmp/${tarBallPackage}"
mkdir -p /opt
cd /opt
-sudo git clone https://github.com/emscripten-core/emsdk.git
-cd emsdk
-sudo ./emsdk install $version
-sudo ./emsdk activate $version
+echo "URL: $cacheUrl"
+
+if DownloadURL "$cacheUrl" "" "$sha" "$target"; then
+ sudo tar -xzf "$target" -C /opt/
+ sudo rm -f "$target"
+else
+ echo "Emsdk isn't cached. Cloning it"
+ sudo git clone https://github.com/emscripten-core/emsdk.git
+ cd emsdk
+ sudo ./emsdk install "$version"
+ sudo ./emsdk activate "$version"
+fi
# platform-specific toolchain and node binaries. urls obtained from "emsdk install"
if uname -a |grep -q Darwin; then
@@ -58,9 +43,12 @@ else
pathNodeExecutable="node-$versionNode-linux-x64/bin/node"
fi
-SetEnvVar "PATH" "\"\$PATH:/opt/emsdk/emscripten-$version/\""
-SetEnvVar "EMSCRIPTEN" "/opt/emsdk/emscripten-$version"
-SetEnvVar "EMSDK" "/opt/emsdk"
-SetEnvVar "EMSDK_NODE" "/opt/emsdk/$pathNodeExecutable"
+emsdkPath="/opt/emsdk/"
+emscriptenPath="${emsdkPath}upstream/emscripten/"
+
+SetEnvVar "PATH" "\"\$PATH:${emscriptenPath}\""
+SetEnvVar "EMSCRIPTEN" "${emscriptenPath}"
+SetEnvVar "EMSDK" "${emsdkPath}"
+SetEnvVar "EMSDK_NODE" "${emsdkPath}${pathNodeExecutable}"
echo "Emsdk = $version" >> ~/versions.txt
diff --git a/coin/provisioning/common/unix/install-breakpad.sh b/coin/provisioning/common/unix/install-breakpad.sh
index b8d268e8..7c3a34fb 100755
--- a/coin/provisioning/common/unix/install-breakpad.sh
+++ b/coin/provisioning/common/unix/install-breakpad.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
# shellcheck source=../unix/DownloadURL.sh
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
@@ -48,12 +11,12 @@ set -ex
breakpad_commit_sha="b988fa74ec18de6214b18f723e48331d9a7802ae"
breakpad_tar="breakpad_$breakpad_commit_sha.tar.gz"
-breakpad_tar_url="http://ci-files01-hki.intra.qt.io/input/breakpad/$breakpad_tar"
+breakpad_tar_url="http://ci-files01-hki.ci.qt.io/input/breakpad/$breakpad_tar"
breakpad_tar_sha="a2d404d2aebc947cdac5840a9bccd65dfafae24c"
linux_syscall_support_commit_sha1="93426bda6535943ff1525d0460aab5cc0870ccaf"
linux_syscall_support_tar="linux-syscall-support_$linux_syscall_support_commit_sha1.tar.gz"
-linux_syscall_support_tar_url="http://ci-files01-hki.intra.qt.io/input/linux-syscall-support/$linux_syscall_support_tar"
+linux_syscall_support_tar_url="http://ci-files01-hki.ci.qt.io/input/linux-syscall-support/$linux_syscall_support_tar"
linux_syscall_support_tar_sha="62565be0920f3661e138d68026b79fbbdc2a11e4"
targetBreakpad="/tmp/$breakpad_tar"
diff --git a/coin/provisioning/common/unix/install-conan.sh b/coin/provisioning/common/unix/install-conan.sh
index f30a2300..8fc83090 100755
--- a/coin/provisioning/common/unix/install-conan.sh
+++ b/coin/provisioning/common/unix/install-conan.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/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
diff --git a/coin/provisioning/common/unix/install-ffmpeg-android.sh b/coin/provisioning/common/unix/install-ffmpeg-android.sh
new file mode 100755
index 00000000..05d0b681
--- /dev/null
+++ b/coin/provisioning/common/unix/install-ffmpeg-android.sh
@@ -0,0 +1,106 @@
+#!/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 will build and install FFmpeg static libs
+set -ex
+os="$1"
+
+# shellcheck source=../unix/InstallFromCompressedFileFromURL.sh
+source "${BASH_SOURCE%/*}/../unix/InstallFromCompressedFileFromURL.sh"
+# shellcheck source=../unix/SetEnvVar.sh
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+
+version="n6.1.1"
+url_public="https://github.com/FFmpeg/FFmpeg/archive/refs/tags/$version.tar.gz"
+sha1="59e0c3c4cc48e9c60073495f8c045329bb21f446"
+url_cached="http://ci-files01-hki.ci.qt.io/input/ffmpeg/$version.tar.gz"
+ffmpeg_name="FFmpeg-$version"
+
+target_dir="$HOME"
+app_prefix=""
+ffmpeg_source_dir="$target_dir/$ffmpeg_name"
+
+if [ ! -d "$ffmpeg_source_dir" ];
+then
+ InstallFromCompressedFileFromURL "$url_cached" "$url_public" "$sha1" "$target_dir" "$app_prefix"
+fi
+
+build_ffmpeg_android() {
+
+ target_arch=$1
+ target_dir=$2
+
+ sudo mkdir -p "$target_dir"
+
+ openssl_include="$OPENSSL_ANDROID_HOME_DEFAULT/include"
+ openssl_libs=""
+ if [ "$target_arch" == "x86_64" ]; then
+ target_toolchain_arch="x86_64-linux-android"
+ target_arch=x86_64
+ target_cpu=x86-64
+ openssl_libs="$OPENSSL_ANDROID_HOME_DEFAULT/x86_64"
+ elif [ "$target_arch" == "x86" ]; then
+ target_toolchain_arch="i686-linux-android"
+ target_arch=x86
+ target_cpu=i686
+ openssl_libs="$OPENSSL_ANDROID_HOME_DEFAULT/x86"
+ elif [ "$target_arch" == "arm64" ]; then
+ target_toolchain_arch="aarch64-linux-android"
+ target_arch=aarch64
+ target_cpu=armv8-a
+ openssl_libs="$OPENSSL_ANDROID_HOME_DEFAULT/arm64-v8a"
+ fi
+
+ api_version=24
+
+ ndk_root=$ANDROID_NDK_ROOT_DEFAULT
+ if uname -a |grep -q "Darwin"; then
+ ndk_host=darwin-x86_64
+ else
+ ndk_host=linux-x86_64
+ fi
+
+ toolchain=${ndk_root}/toolchains/llvm/prebuilt/${ndk_host}
+ toolchain_bin=${toolchain}/bin
+ sysroot=${toolchain}/sysroot
+ cxx=${toolchain_bin}/${target_toolchain_arch}${api_version}-clang++
+ cc=${toolchain_bin}/${target_toolchain_arch}${api_version}-clang
+ ar=${toolchain_bin}/llvm-ar
+ ranlib=${toolchain_bin}/llvm-ranlib
+
+ ffmpeg_config_options=$(cat "${BASH_SOURCE%/*}/../shared/ffmpeg_config_options.txt")
+ ffmpeg_config_options+=" --enable-cross-compile --target-os=android --enable-jni --enable-mediacodec --enable-openssl --enable-pthreads --enable-neon --disable-asm --disable-indev=android_camera"
+ ffmpeg_config_options+=" --arch=$target_arch --cpu=${target_cpu} --sysroot=${sysroot} --sysinclude=${sysroot}/usr/include/"
+ ffmpeg_config_options+=" --cc=${cc} --cxx=${cxx} --ar=${ar} --ranlib=${ranlib}"
+ ffmpeg_config_options+=" --extra-cflags=-I${openssl_include} --extra-ldflags=-L${openssl_libs}"
+
+ local build_dir="$ffmpeg_source_dir/build/$target_arch"
+ sudo mkdir -p "$build_dir"
+ pushd "$build_dir"
+
+ # shellcheck disable=SC2086
+ sudo "$ffmpeg_source_dir/configure" $ffmpeg_config_options --prefix="$target_dir"
+
+ sudo make install -j4
+ popd
+}
+
+if [ "$os" == "android-x86" ]; then
+ target_arch=x86
+ target_dir="/usr/local/android/ffmpeg-x86"
+
+ SetEnvVar "FFMPEG_DIR_ANDROID_X86" "$target_dir"
+elif [ "$os" == "android-x86_64" ]; then
+ target_arch=x86_64
+ target_dir="/usr/local/android/ffmpeg-x86_64"
+
+ SetEnvVar "FFMPEG_DIR_ANDROID_X86_64" "$target_dir"
+elif [ "$os" == "android-arm64" ]; then
+ target_arch=arm64
+ target_dir="/usr/local/android/ffmpeg-arm64"
+
+ SetEnvVar "FFMPEG_DIR_ANDROID_ARM64" "$target_dir"
+fi
+
+build_ffmpeg_android "$target_arch" "$target_dir"
diff --git a/coin/provisioning/common/unix/install-ffmpeg-ios.sh b/coin/provisioning/common/unix/install-ffmpeg-ios.sh
new file mode 100755
index 00000000..e2a401a5
--- /dev/null
+++ b/coin/provisioning/common/unix/install-ffmpeg-ios.sh
@@ -0,0 +1,76 @@
+#!/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
+
+# This script will build and install FFmpeg static libs
+set -ex
+
+# shellcheck source=../unix/InstallFromCompressedFileFromURL.sh
+source "${BASH_SOURCE%/*}/../unix/InstallFromCompressedFileFromURL.sh"
+# shellcheck source=../unix/SetEnvVar.sh
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+
+version="n6.1.1"
+sha1="59e0c3c4cc48e9c60073495f8c045329bb21f446"
+url_public="https://github.com/FFmpeg/FFmpeg/archive/refs/tags/$version.tar.gz"
+url_cached="http://ci-files01-hki.ci.qt.io/input/ffmpeg/$version.tar.gz"
+ffmpeg_name="FFmpeg-$version"
+
+target_dir="$HOME"
+ffmpeg_source_dir="$target_dir/$ffmpeg_name"
+prefix="/usr/local/ios/ffmpeg"
+
+if [ ! -d "$ffmpeg_source_dir" ];
+then
+ InstallFromCompressedFileFromURL "$url_cached" "$url_public" "$sha1" "$target_dir"
+fi
+
+ffmpeg_config_options=$(cat "${BASH_SOURCE%/*}/../shared/ffmpeg_config_options.txt")
+
+build_ffmpeg_ios() {
+ local target_arch=$1
+
+ if [ "$target_arch" == "x86_64" ]; then
+ target_sdk="iphonesimulator"
+ target_arch="x86_64"
+ minos="-mios-simulator-version-min=13.0"
+ else
+ target_sdk="iphoneos"
+ target_arch="arm64"
+ minos="-miphoneos-version-min=13.0"
+ fi
+
+ local build_dir="$ffmpeg_source_dir/build_ios/$target_arch"
+ sudo mkdir -p "$build_dir"
+ pushd "$build_dir"
+
+ # shellcheck disable=SC2086
+ sudo "$ffmpeg_source_dir/configure" $ffmpeg_config_options \
+ --sysroot="$(xcrun --sdk "$target_sdk" --show-sdk-path)" \
+ --enable-cross-compile \
+ --enable-optimizations \
+ --prefix=$prefix \
+ --arch=$target_arch \
+ --cc="xcrun --sdk ${target_sdk} clang -arch $target_arch" \
+ --cxx="xcrun --sdk ${target_sdk} clang++ -arch $target_arch" \
+ --ar="$(xcrun --sdk ${target_sdk} --find ar)" \
+ --ranlib="$(xcrun --sdk ${target_sdk} --find ranlib)" \
+ --strip="$(xcrun --sdk ${target_sdk} --find strip)" \
+ --nm="$(xcrun --sdk ${target_sdk} --find nm)" \
+ --target-os=darwin \
+ --extra-cflags="$minos" \
+ --extra-cxxflags="$minos" \
+ --enable-cross-compile \
+ --enable-swscale \
+ --enable-pthreads \
+ --disable-audiotoolbox
+
+ sudo make install DESTDIR="$build_dir/installed" -j
+ popd
+}
+
+build_ffmpeg_ios "x86_64"
+build_ffmpeg_ios "arm64"
+sudo "${BASH_SOURCE%/*}/../macos/makeuniversal.sh" "$ffmpeg_source_dir/build_ios/x86_64/installed" "$ffmpeg_source_dir/build_ios/arm64/installed"
+SetEnvVar "FFMPEG_DIR_IOS" $prefix
+
diff --git a/coin/provisioning/common/unix/install-ffmpeg.sh b/coin/provisioning/common/unix/install-ffmpeg.sh
new file mode 100755
index 00000000..94d032ed
--- /dev/null
+++ b/coin/provisioning/common/unix/install-ffmpeg.sh
@@ -0,0 +1,113 @@
+#!/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 will build and install FFmpeg static libs
+set -ex
+os="$1"
+
+# shellcheck source=../unix/InstallFromCompressedFileFromURL.sh
+source "${BASH_SOURCE%/*}/../unix/InstallFromCompressedFileFromURL.sh"
+# shellcheck source=../unix/SetEnvVar.sh
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+
+version="n6.1.1"
+url_public="https://github.com/FFmpeg/FFmpeg/archive/$version.tar.gz"
+sha1="59e0c3c4cc48e9c60073495f8c045329bb21f446"
+url_cached="http://ci-files01-hki.ci.qt.io/input/ffmpeg/$version.tar.gz"
+ffmpeg_name="FFmpeg-$version"
+
+target_dir="$HOME"
+app_prefix=""
+ffmpeg_source_dir="$target_dir/$ffmpeg_name"
+
+if [ ! -d "$ffmpeg_source_dir" ]
+then
+ InstallFromCompressedFileFromURL "$url_cached" "$url_public" "$sha1" "$target_dir" "$app_prefix"
+fi
+
+ffmpeg_config_options=$(cat "${BASH_SOURCE%/*}/../shared/ffmpeg_config_options.txt")
+
+install_ff_nvcodec_headers() {
+ nv_codec_version="11.1" # use 11.1 to ensure compatibility with 470 nvidia drivers; might be upated to 12.0
+ nv_codec_url_public="https://github.com/FFmpeg/nv-codec-headers/archive/refs/heads/sdk/$nv_codec_version.zip"
+ nv_codec_url_cached="http://ci-files01-hki.ci.qt.io/input/ffmpeg/nv-codec-headers/nv-codec-headers-sdk-$nv_codec_version.zip"
+ nv_codec_sha1="ceb4966ab01b2e41f02074675a8ac5b331bf603e"
+ #nv_codec_sha1="4f30539f8dd31945da4c3da32e66022f9ca59c08" // 12.0
+ nv_codec_dir="$target_dir/nv-codec-headers-sdk-$nv_codec_version"
+ if [ ! -d "$nv_codec_dir" ]
+ then
+ InstallFromCompressedFileFromURL "$nv_codec_url_cached" "$nv_codec_url_public" "$nv_codec_sha1" "$target_dir" ""
+ fi
+
+ sudo make -C "$nv_codec_dir" install -j
+
+ # Might be not detected by default on RHEL
+ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
+}
+
+build_ffmpeg() {
+ local arch="$1"
+ local prefix="$2"
+ local build_dir="$ffmpeg_source_dir/build/$arch"
+ mkdir -p "$build_dir"
+ pushd "$build_dir"
+
+ if [ -z "$prefix" ]
+ then prefix="/usr/local/$ffmpeg_name"
+ fi
+
+ if [ -n "$arch" ]
+ then cc="clang -arch $arch"
+ fi
+
+ # shellcheck disable=SC2086
+ if [ -n "$arch" ]
+ then "$ffmpeg_source_dir/configure" $ffmpeg_config_options --prefix="$prefix" --enable-cross-compile --arch="$arch" --cc="$cc"
+ else "$ffmpeg_source_dir/configure" $ffmpeg_config_options --prefix="$prefix"
+ fi
+ make install DESTDIR="$build_dir/installed" -j4
+ popd
+}
+
+if [ "$os" == "linux" ]; then
+ install_ff_nvcodec_headers
+
+ ffmpeg_config_options+=" --enable-openssl"
+ build_ffmpeg
+ sudo mv "$ffmpeg_source_dir/build/installed/usr/local/$ffmpeg_name" "/usr/local"
+ SetEnvVar "FFMPEG_DIR" "/usr/local/$ffmpeg_name"
+
+elif [ "$os" == "macos" ] || [ "$os" == "macos-universal" ]; then
+ ffmpeg_config_options+=" --enable-shared --disable-static"
+
+ brew install yasm
+ export MACOSX_DEPLOYMENT_TARGET=12
+ fix_relative_dependencies="${BASH_SOURCE%/*}/../macos/fix_relative_dependencies.sh"
+
+ xcode_major_version=$(xcodebuild -version | awk 'NR==1 {split($2, a, "."); print a[1]}')
+ if [ "$xcode_major_version" -ge 15 ]; then
+ # fix the error: duplicate symbol '_av_ac3_parse_header'
+ ffmpeg_config_options+=" --extra-ldflags=-Wl,-ld_classic"
+ fi
+
+ if [ "$os" == "macos" ]; then
+ build_ffmpeg
+ install_dir="$ffmpeg_source_dir/build/installed"
+ "$fix_relative_dependencies" "$install_dir/usr/local/$ffmpeg_name/lib"
+ sudo mv "$install_dir/usr/local/$ffmpeg_name" "/usr/local"
+ else
+ build_ffmpeg "arm64"
+ build_ffmpeg "x86_64"
+
+ arm64_install_dir="$ffmpeg_source_dir/build/arm64/installed"
+ x86_64_install_dir="$ffmpeg_source_dir/build/x86_64/installed"
+
+ "$fix_relative_dependencies" "$arm64_install_dir/usr/local/$ffmpeg_name/lib"
+ "$fix_relative_dependencies" "$x86_64_install_dir/usr/local/$ffmpeg_name/lib"
+
+ sudo "${BASH_SOURCE%/*}/../macos/makeuniversal.sh" "$arm64_install_dir" "$x86_64_install_dir"
+ fi
+
+ SetEnvVar "FFMPEG_DIR" "/usr/local/$ffmpeg_name"
+fi
diff --git a/coin/provisioning/common/unix/install-openssl.sh b/coin/provisioning/common/unix/install-openssl.sh
index 479245d6..3b3353fb 100755
--- a/coin/provisioning/common/unix/install-openssl.sh
+++ b/coin/provisioning/common/unix/install-openssl.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2021 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
# This script install OpenSSL from sources.
# Requires GCC and Perl to be in PATH.
@@ -48,11 +11,11 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
# shellcheck source=../unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
-version="1.1.1k"
+version="3.0.7"
officialUrl="https://www.openssl.org/source/openssl-$version.tar.gz"
-cachedUrl="http://ci-files01-hki.intra.qt.io/input/openssl/openssl-$version.tar.gz"
+cachedUrl="http://ci-files01-hki.ci.qt.io/input/openssl/openssl-$version.tar.gz"
targetFile="/tmp/openssl-$version.tar.gz"
-sha="bad9dc4ae6dcc1855085463099b5dacb0ec6130b"
+sha="f20736d6aae36bcbfa9aba0d358c71601833bf27"
opensslHome="${HOME}/openssl-${version}"
opensslSource="${opensslHome}-src"
DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile"
@@ -62,16 +25,21 @@ cd "$opensslSource"
pwd
if [[ "$os" == "linux" ]]; then
- ./Configure --prefix="$opensslHome" shared no-ssl3-method enable-ec_nistp_64_gcc_128 linux-x86_64 "-Wa,--noexecstack"
+ if [ $(uname -m) = aarch64 ]; then
+ arch=$(uname -m)
+ else
+ arch="x86_64"
+ fi
+ ./Configure --prefix="$opensslHome" shared enable-ec_nistp_64_gcc_128 "linux-$arch" "-Wa,--noexecstack"
make && make install_sw install_ssldirs
SetEnvVar "OPENSSL_HOME" "$opensslHome"
- if uname -a |grep -q "Ubuntu"; then
- echo "export LD_LIBRARY_PATH=$opensslHome/lib:$LD_LIBRARY_PATH" >> ~/.bash_profile
+ SetEnvVar "PATH" "\"$opensslHome/bin:\$PATH\""
+ if uname -a |grep -q "Debian"; then
+ SetEnvVar "LD_LIBRARY_PATH" "\"$opensslHome/lib:$LD_LIBRARY_PATH\""
else
- echo "export LD_LIBRARY_PATH=$opensslHome/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
+ SetEnvVar "LD_LIBRARY_PATH" "\"$opensslHome/lib64:$LD_LIBRARY_PATH\""
fi
-
-elif [ "$os" == "macos" -o "$os" == "macos-universal" ]; then
+elif [ "$os" == "macos" ] || [ "$os" == "macos-universal" ]; then
# Below target location has been hard coded into Coin.
# QTQAINFRA-1195
echo "prefix=$prefix"
@@ -81,13 +49,13 @@ elif [ "$os" == "macos" -o "$os" == "macos-universal" ]; then
openssl_install_dir="$prefix/openssl-$version"
opensslTargetLocation="$prefix/opt/openssl"
- commonFlags="no-tests shared no-ssl3-method enable-ec_nistp_64_gcc_128 -Wa,--noexecstack"
+ commonFlags=(no-tests shared no-ssl3-method enable-ec_nistp_64_gcc_128 "-Wa,--noexecstack")
- export MACOSX_DEPLOYMENT_TARGET=10.14
+ export MACOSX_DEPLOYMENT_TARGET=12
opensslBuild="${opensslHome}-build"
opensslDestdir="${opensslHome}-destdir"
- mkdir -p $opensslBuild
+ mkdir -p "$opensslBuild"
if [ "$os" == "macos-universal" ]; then
archs="x86_64 arm64"
@@ -96,10 +64,10 @@ elif [ "$os" == "macos" -o "$os" == "macos-universal" ]; then
fi
for arch in $archs; do
- cd $opensslBuild
+ cd "$opensslBuild"
echo "Configuring OpenSSL for $arch"
- mkdir -p $arch && cd $arch
- $opensslSource/Configure --prefix=$openssl_install_dir $commonFlags darwin64-$arch-cc
+ mkdir -p "$arch" && cd "$arch"
+ "$opensslSource/Configure" --prefix="$openssl_install_dir" "${commonFlags[@]}" "darwin64-$arch-cc"
echo "Building OpenSSL for $arch in $PWD"
make >> /tmp/openssl_make.log 2>&1
@@ -111,19 +79,19 @@ elif [ "$os" == "macos" -o "$os" == "macos-universal" ]; then
destdir=""
fi
# shellcheck disable=SC2024
- sudo make install_sw install_ssldirs DESTDIR=$destdir >> /tmp/openssl_make_install.log 2>&1
+ sudo make install_sw install_ssldirs DESTDIR="$destdir" >> /tmp/openssl_make_install.log 2>&1
done
if [ "$os" == "macos-universal" ]; then
echo "Making universal OpenSSL package"
# shellcheck disable=SC2024
sudo rm -Rf "$openssl_install_dir"
- sudo ${SCRIPT_DIR}/../macos/makeuniversal.sh "$opensslDestdir/x86_64" $opensslDestdir/arm64
+ sudo "${SCRIPT_DIR}/../macos/makeuniversal.sh" "$opensslDestdir/x86_64" "$opensslDestdir/arm64"
fi
path=$(echo "$opensslTargetLocation" | sed -E 's/(.*)\/.*$/\1/')
sudo mkdir -p "$path"
- sudo ln -s $openssl_install_dir $opensslTargetLocation
+ sudo ln -s "$openssl_install_dir" "$opensslTargetLocation"
SetEnvVar "PATH" "\"$opensslTargetLocation/bin:\$PATH\""
SetEnvVar "MANPATH" "\"$opensslTargetLocation/share/man:\$MANPATH\""
@@ -132,8 +100,8 @@ elif [ "$os" == "macos" -o "$os" == "macos-universal" ]; then
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
+ 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
fi
diff --git a/coin/provisioning/common/unix/install_grpc.sh b/coin/provisioning/common/unix/install_grpc.sh
new file mode 100755
index 00000000..3b94816a
--- /dev/null
+++ b/coin/provisioning/common/unix/install_grpc.sh
@@ -0,0 +1,84 @@
+#!/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 installs gRPC from sources.
+set -ex
+
+# shellcheck source=./DownloadURL.sh
+source "${BASH_SOURCE%/*}/DownloadURL.sh"
+# shellcheck source=./SetEnvVar.sh
+source "${BASH_SOURCE%/*}/SetEnvVar.sh"
+
+# Extract cmake path from the environment
+if uname -a |grep -q "Ubuntu"; then
+ if lsb_release -a |grep -q "Ubuntu 22.04"; then
+# shellcheck source=/dev/null
+ source ~/.bash_profile
+ else
+# shellcheck source=/dev/null
+ source ~/.profile
+ fi
+else
+# shellcheck source=/dev/null
+ source ~/.bashrc
+fi
+
+version="1.50.1"
+sha1="be1b0c3dbfbc9714824921f50dffb7cf044da5ab"
+internalUrl="http://ci-files01-hki.ci.qt.io/input/automotive_suite/grpc-all-$version.zip"
+externalUrl=""
+installPrefix="$HOME/install-grpc-$version"
+
+targetDir="$HOME/grpc-$version"
+targetFile="$targetDir.zip"
+DownloadURL "$internalUrl" "$externalUrl" "$sha1" "$targetFile"
+unzip -q "$targetFile" -d "$HOME"
+sudo rm "$targetFile"
+
+# devtoolset is needed when running configuration
+if uname -a |grep -qv "Darwin"; then
+ export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH"
+fi
+
+if uname -a |grep -q Darwin; then
+ extraCMakeArgs=("-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=12)
+ SetEnvVar PATH "\$PATH:$installPrefix/bin"
+fi
+
+# MacOS
+if [[ -n "$OPENSSL_DIR" ]]; then
+ extraOpenSslArg=-DOPENSSL_ROOT_DIR=$OPENSSL_DIR
+# Linux
+elif [[ -n "$OPENSSL_HOME" ]]; then
+ extraOpenSslArg=-DOPENSSL_ROOT_DIR=$OPENSSL_HOME
+fi
+
+echo "Configuring and building gRPC"
+
+buildDir="$HOME/build-grpc-$version"
+mkdir -p "$buildDir"
+cd "$buildDir"
+cmake "$targetDir" -G"Ninja Multi-Config" \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+ -DCMAKE_CONFIGURATION_TYPES="Release;Debug;RelWithDebugInfo" \
+ -DCMAKE_INSTALL_PREFIX="$installPrefix" \
+ "${extraCMakeArgs[@]}" \
+ "$extraOpenSslArg" \
+ -DgRPC_BUILD_TESTS=OFF \
+ -DgRPC_PROTOBUF_PROVIDER="package" \
+ -DgRPC_SSL_PROVIDER="package" \
+ -DgRPC_ZLIB_PROVIDER="package"
+ninja all
+
+sudo env "PATH=$PATH" ninja install
+# Refresh shared library cache if OS isn't macOS
+if uname -a |grep -qv "Darwin"; then
+ sudo ldconfig
+fi
+
+SetEnvVar "gRPC_ROOT" "$installPrefix"
+SetEnvVar "absl_ROOT" "$installPrefix"
+
+sudo rm -rf "$targetDir"
+sudo rm -rf "$buildDir"
diff --git a/coin/provisioning/common/unix/install_protobuf.sh b/coin/provisioning/common/unix/install_protobuf.sh
new file mode 100755
index 00000000..110d8b9c
--- /dev/null
+++ b/coin/provisioning/common/unix/install_protobuf.sh
@@ -0,0 +1,101 @@
+#!/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=./DownloadURL.sh
+source "${BASH_SOURCE%/*}/DownloadURL.sh"
+# shellcheck source=./SetEnvVar.sh
+source "${BASH_SOURCE%/*}/SetEnvVar.sh"
+
+# Extract cmake path from the environment
+if uname -a |grep -q "Ubuntu"; then
+ if lsb_release -a |grep "Ubuntu 22.04"; then
+ source ~/.bash_profile
+ else
+ source ~/.profile
+ fi
+else
+ source ~/.bashrc
+fi
+
+# This script will install Google's Protocal Buffers
+
+version="21.9"
+sha1="3226a0e49d048759b702ae524da79387c59f05cc"
+internalUrl="http://ci-files01-hki.ci.qt.io/input/automotive_suite/protobuf-all-$version.zip"
+externalUrl="https://github.com/protocolbuffers/protobuf/releases/download/v$version/protobuf-all-$version.zip"
+
+targetDir="$HOME/protobuf-$version"
+targetFile="$targetDir.zip"
+DownloadURL "$internalUrl" "$externalUrl" "$sha1" "$targetFile"
+unzip "$targetFile" -d "$HOME"
+sudo rm "$targetFile"
+
+cd $targetDir
+
+if uname -a |grep -q "Ubuntu"; then
+ echo 'diff --git a/cmake/conformance.cmake b/cmake/conformance.cmake
+index d6c435ac3..d6fb3a7df 100644
+--- a/cmake/conformance.cmake
++++ b/cmake/conformance.cmake
+@@ -24,6 +24,8 @@ add_executable(conformance_test_runner
+ ${protobuf_SOURCE_DIR}/conformance/conformance.pb.cc
+ ${protobuf_SOURCE_DIR}/conformance/conformance_test.cc
+ ${protobuf_SOURCE_DIR}/conformance/conformance_test_runner.cc
++ ${protobuf_SOURCE_DIR}/conformance/conformance_test_main.cc
++ ${protobuf_SOURCE_DIR}/conformance/text_format_conformance_suite.cc
+ ${protobuf_SOURCE_DIR}/conformance/third_party/jsoncpp/json.h
+ ${protobuf_SOURCE_DIR}/conformance/third_party/jsoncpp/jsoncpp.cpp
+ ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.pb.cc
+@@ -36,6 +38,10 @@ add_executable(conformance_cpp
+ ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto2.pb.cc
+ ${protobuf_SOURCE_DIR}/src/google/protobuf/test_messages_proto3.pb.cc
+ )
++install(TARGETS conformance_test_runner
++ RUNTIME DESTINATION COMPONENT conformance
++ LIBRARY DESTINATION COMPONENT conformance
++ ARCHIVE DESTINATION COMPONENT conformance)
+
+ target_include_directories(
+ conformance_test_runner' | patch -p1
+ extraCMakeArgs=("-Dprotobuf_BUILD_CONFORMANCE=ON")
+fi
+
+# devtoolset is needed when running configuration
+if uname -a |grep -qv "Darwin"; then
+ export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH"
+fi
+
+echo "Configuring and building protobuf"
+
+installPrefix="/usr/local"
+if uname -a |grep -q Darwin; then
+ extraCMakeArgs=("-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=12)
+ SetEnvVar PATH "\$PATH:$installPrefix/bin"
+fi
+
+buildDir="$HOME/build-protobuf-$version"
+mkdir "$buildDir"
+cd "$buildDir"
+cmake "$targetDir" -G"Ninja Multi-Config" \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+ -DCMAKE_INSTALL_PREFIX=$installPrefix \
+ "${extraCMakeArgs[@]}" \
+ -Dprotobuf_BUILD_TESTS=OFF \
+ -Dprotobuf_BUILD_EXAMPLES=OFF \
+ -Dprotobuf_BUILD_PROTOC_BINARIES=ON \
+ -DBUILD_SHARED_LIBS=OFF \
+ -Dprotobuf_WITH_ZLIB=OFF \
+ -DCMAKE_CONFIGURATION_TYPES="Release;Debug;RelWithDebugInfo" \
+ -DCMAKE_CROSS_CONFIGS=all \
+ -DCMAKE_DEFAULT_CONFIGS=all
+ninja all:all
+sudo env "PATH=$PATH" ninja install:all
+
+# Refresh shared library cache if OS isn't macOS
+if uname -a |grep -qv "Darwin"; then
+ sudo ldconfig
+fi
+
+sudo rm -r "$targetDir"
+sudo rm -r "$buildDir"
diff --git a/coin/provisioning/common/unix/install_protobuff.sh b/coin/provisioning/common/unix/install_protobuff.sh
deleted file mode 100755
index fb5ae853..00000000
--- a/coin/provisioning/common/unix/install_protobuff.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# shellcheck source=./DownloadURL.sh
-source "${BASH_SOURCE%/*}/DownloadURL.sh"
-# shellcheck source=./SetEnvVar.sh
-source "${BASH_SOURCE%/*}/SetEnvVar.sh"
-
-# This script will install Google's Protocal Buffers which is needed by Automotive Suite
-
-version="3.6.1"
-sha1="44b8ba225f3b4dc45fb56d5881ec6a91329802b6"
-internalUrl="http://ci-files01-hki.intra.qt.io/input/automotive_suite/protobuf-all-$version.zip"
-externalUrl="https://github.com/protocolbuffers/protobuf/releases/download/v$version/protobuf-all-$version.zip"
-
-targetDir="$HOME/protobuf-$version"
-targetFile="$targetDir.zip"
-DownloadURL "$internalUrl" "$externalUrl" "$sha1" "$targetFile"
-unzip "$targetFile" -d "$HOME"
-sudo rm "$targetFile"
-
-# devtoolset is needed when running configuration
-if uname -a |grep -qv "Darwin"; then
- export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH"
-fi
-
-echo "Configuring and building protobuf"
-cd "$targetDir"
-if uname -a |grep -q Darwin; then
- ./configure --prefix "$(xcrun --sdk macosx --show-sdk-path)/usr/local"
- SetEnvVar PATH "\$PATH:$(xcrun --sdk macosx --show-sdk-path)/usr/local/bin"
-else
- ./configure
-fi
-make -j5
-sudo make install
-
-# Refresh shared library cache if OS isn't macOS
-if uname -a |grep -qv "Darwin"; then
- sudo ldconfig
-fi
-
-sudo rm -r "$targetDir"
diff --git a/coin/provisioning/common/unix/libclang-v100-dyn.sh b/coin/provisioning/common/unix/libclang-v100-dyn.sh
index ee982973..14194f55 100755
--- a/coin/provisioning/common/unix/libclang-v100-dyn.sh
+++ b/coin/provisioning/common/unix/libclang-v100-dyn.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
# PySide versions following 5.6 use a C++ parser based on Clang (http://clang.org/).
# The Clang library (C-bindings), version 3.9 or higher is required for building.
@@ -59,23 +22,23 @@ if uname -a |grep -q Darwin; then
version=$libclang_version
url="https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_${version//\./}-based-mac.7z"
sha1="0fe1fa50b1b469d2c05acc3a3468bc93a66f1e5a"
- url_cached="http://ci-files01-hki.intra.qt.io/input/libclang/dynamic/libclang-release_${version//\./}-based-mac.7z"
+ url_cached="http://ci-files01-hki.ci.qt.io/input/libclang/dynamic/libclang-release_${version//\./}-based-mac.7z"
elif test -f /etc/redhat-release || /etc/centos-release; then
version=$libclang_version
url="https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_${version//\./}-based-linux-Rhel7.6-gcc5.3-x86_64.7z"
sha1="1d2e265502fc0832a854f989d757105833fbd179"
- url_cached="http://ci-files01-hki.intra.qt.io/input/libclang/dynamic/libclang-release_${version//\./}-based-linux-Rhel7.6-gcc5.3-x86_64.7z"
+ url_cached="http://ci-files01-hki.ci.qt.io/input/libclang/dynamic/libclang-release_${version//\./}-based-linux-Rhel7.6-gcc5.3-x86_64.7z"
else
version=$libclang_version
url="https://download.qt.io/development_releases/prebuilt/libclang/dynamic/libclang-release_${version//\./}-based-linux-Ubuntu18.04-gcc9.2-x86_64.7z"
sha1="c1580acb3a82e193acf86f18afb52427c5e67de8"
- url_cached="http://ci-files01-hki.intra.qt.io/input/libclang/libclang-release_${version//\./}-based-linux-Ubuntu18.04-gcc9.2-x86_64.7z"
+ url_cached="http://ci-files01-hki.ci.qt.io/input/libclang/libclang-release_${version//\./}-based-linux-Ubuntu18.04-gcc9.2-x86_64.7z"
fi
zip="/tmp/libclang.7z"
destination="/usr/local/libclang-dynlibs-$version"
-DownloadURL $url_cached $url $sha1 $zip
+DownloadURL "$url_cached" "$url" "$sha1" "$zip"
if command -v 7zr &> /dev/null; then
sudo 7zr x $zip -o/usr/local/
else
@@ -85,5 +48,5 @@ sudo mv /usr/local/libclang "$destination"
rm -rf $zip
-echo "export LLVM_DYNAMIC_LIBS_100=$destination" >> ~/.bash_profile
+SetEnvVar "LLVM_DYNAMIC_LIBS_100" "$destination"
echo "libClang for QtForPython= $version" >> ~/versions.txt
diff --git a/coin/provisioning/common/unix/libclang.sh b/coin/provisioning/common/unix/libclang.sh
index 53a76469..5f75d7e4 100755
--- a/coin/provisioning/common/unix/libclang.sh
+++ b/coin/provisioning/common/unix/libclang.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
# PySide versions following 5.6 use a C++ parser based on Clang (http://clang.org/).
# The Clang library (C-bindings), version 3.9 or higher is required for building.
@@ -53,23 +16,37 @@ source "${BASH_SOURCE%/*}/SetEnvVar.sh"
# shellcheck source=./DownloadURL.sh
source "${BASH_SOURCE%/*}/DownloadURL.sh"
-libclang_version=12.0
+PROVISIONING_DIR="$(dirname "$0")/../../"
+# shellcheck source=./common.sourced.sh
+source "$PROVISIONING_DIR"/common/unix/common.sourced.sh
+
+libclang_version="15.0.0"
if uname -a |grep -q Darwin; then
version=$libclang_version
- url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version//\./}-based-mac.7z"
- url_cached="http://ci-files01-hki.intra.qt.io/input/libclang/qt/libclang-release_${version//\./}-based-mac.7z"
- sha1="bb9223450c1c36ee37d8c91e876dba82db117a7a"
-elif test -f /etc/redhat-release && cat /etc/redhat-release | grep "Red Hat" | grep -v "8" ; then
+ url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version}-based-mac.7z"
+ url_cached="http://ci-files01-hki.ci.qt.io/input/libclang/qt/libclang-release_${version}-based-mac.7z"
+ sha1="6d916a17459c81551dde47580ae3f071e93338a5"
+elif test -f /etc/redhat-release && grep "Red Hat" /etc/redhat-release | grep -v "8" ; then
version=$libclang_version
- url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version//\./}-based-linux-CentOS8.3-gcc9.2-x86_64.7z"
- url_cached="http://ci-files01-hki.intra.qt.io/input/libclang/qt/libclang-release_${version//\./}-based-linux-CentOS8.3-gcc9.2-x86_64.7z"
- sha1="d02e4dd30fe3f810c3a0cdcbed5870dec56ed91b"
+ url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version}-based-linux-Rhel8.4-gcc10.0-x86_64.7z"
+ url_cached="http://ci-files01-hki.ci.qt.io/input/libclang/qt/libclang-release_${version}-based-linux-Rhel8.4-gcc10.0-x86_64.7z"
+ sha1="6ca035bb522022d34d61759e0460845832933b5c"
+elif [ "$PROVISIONING_OS_ID" = ubuntu ]; then
+ version=$libclang_version
+ url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version}-based-linux-Ubuntu22.04-gcc11.2-x86_64.7z"
+ url_cached="http://ci-files01-hki.ci.qt.io/input/libclang/qt/libclang-release_${version}-based-linux-Ubuntu22.04-gcc11.2-x86_64.7z"
+ sha1="dd170ec762a7ec8ac84b4b5cac3a422514e5b030"
+elif [ "$PROVISIONING_OS_ID" = debian ]; then
+ version=17.0.1
+ url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version}-based-linux-Debian11.6-gcc10.0-arm64.7z"
+ url_cached="http://ci-files01-hki.ci.qt.io/input/libclang/qt/libclang-release_${version}-based-linux-Debian11.6-gcc10.0-arm64.7z"
+ sha1="43f0210121b889107e3dab631e8104e661a3866b"
else
version=$libclang_version
- url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version//\./}-based-linux-Ubuntu20.04-gcc9.3-x86_64.7z"
- url_cached="http://ci-files01-hki.intra.qt.io/input/libclang/qt/libclang-release_${version//\./}-based-linux-Ubuntu20.04-gcc9.3-x86_64.7z"
- sha1="81b3e640befa23b5cdebd59e206dc79e4de20ba3"
+ url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version}-based-linux-Ubuntu20.04-gcc9.3-x86_64.7z"
+ url_cached="http://ci-files01-hki.ci.qt.io/input/libclang/qt/libclang-release_${version}-based-linux-Ubuntu20.04-gcc9.3-x86_64.7z"
+ sha1="bd6615012b8bdb2720a45ede56e05f6db7191843"
fi
zip="/tmp/libclang.7z"
@@ -85,9 +62,5 @@ sudo mv /usr/local/libclang "$destination"
rm -rf $zip
-echo "export LLVM_INSTALL_DIR=$destination" >> ~/.bash_profile
+SetEnvVar "LLVM_INSTALL_DIR" "$destination"
echo "libClang = $version" >> ~/versions.txt
-
-# This is a hacked static build of libclang which requires special
-# handling on the qdoc side.
-SetEnvVar "QDOC_USE_STATIC_LIBCLANG" "1"
diff --git a/coin/provisioning/common/unix/mqtt_broker.sh b/coin/provisioning/common/unix/mqtt_broker.sh
index 21da3776..d3cce755 100755
--- a/coin/provisioning/common/unix/mqtt_broker.sh
+++ b/coin/provisioning/common/unix/mqtt_broker.sh
@@ -1,43 +1,6 @@
#!/bin/bash
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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 paho testing broker
@@ -46,7 +9,7 @@ source "${BASH_SOURCE%/*}/InstallFromCompressedFileFromURL.sh"
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
CommitSHA="2873885d7e840b4e06483f36f170c609eb30527d"
-PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mqtt_broker/paho.mqtt.testing-$CommitSHA.zip"
+PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/mqtt_broker/paho.mqtt.testing-$CommitSHA.zip"
AltUrl="https://github.com/eclipse/paho.mqtt.testing/archive/$CommitSHA.zip"
SHA1="1fcc4e61b12f11a1421cc8c3f379276d732e62b7"
targetFolder="/opt/paho_broker"
diff --git a/coin/provisioning/common/unix/openssl_3_for_android.sh b/coin/provisioning/common/unix/openssl_3_for_android.sh
new file mode 100755
index 00000000..0ad79315
--- /dev/null
+++ b/coin/provisioning/common/unix/openssl_3_for_android.sh
@@ -0,0 +1,76 @@
+#!/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 install prebuilt OpenSSL which was built against Android NDK 25.
+# OpenSSL build will fail with Android NDK 22, because it's missing platforms and sysroot directories
+
+set -ex
+# shellcheck source=../unix/DownloadURL.sh
+source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
+# shellcheck source=../unix/SetEnvVar.sh
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+
+version="3.0.7"
+ndkVersionLatest="r26b"
+ndkVersionDefault=$ndkVersionLatest
+prebuiltOpensslNdkShaLatest="ea925d5a5b696916fb3650403a2eb3189c52b5ce"
+prebuiltOpensslNdkShaDefault=$prebuiltOpensslNdkShaLatest
+
+: <<'EOB' SOURCE BUILD INSTRUCTIONS - Openssl prebuilt was made using Android NDK 25
+# Source built requires GCC and Perl to be in PATH. Rhel "requires yum install perl-IPC-Cmd"
+exports_file="/tmp/export.sh"
+# source previously made environmental variables.
+if uname -a |grep -q "Ubuntu"; then
+ # shellcheck disable=SC1090
+ grep -e "^export" "$HOME/.profile" > $exports_file && source $exports_file
+ rm -rf "$exports_file"
+else
+ # shellcheck disable=SC1090
+ grep -e "^export" "$HOME/.bashrc" > $exports_file && source $exports_file
+ rm -rf "$exports_file"
+fi
+
+# ANDROID_NDK_ROOT is required during Configure
+export ANDROID_NDK_ROOT=/opt/android/android-ndk-r26b
+
+officialUrl="https://www.openssl.org/source/openssl-$version.tar.gz"
+cachedUrl="http://ci-files01-hki.ci.qt.io/input/openssl/openssl-$version.tar.gz"
+targetFile="/tmp/openssl-$version.tar.gz"
+sha="f20736d6aae36bcbfa9aba0d358c71601833bf27"
+opensslHome="${HOME}/openssl/android/openssl-${version}"
+DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile"
+mkdir -p "${HOME}/openssl/android/"
+tar -xzf "$targetFile" -C "${HOME}/openssl/android/"
+if uname -a |grep -q "Darwin"; then
+ TOOLCHAIN=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/darwin-x86_64/bin
+else
+ TOOLCHAIN=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin
+fi
+cd "$opensslHome"
+PATH=$TOOLCHAIN:$PATH CC=clang ./Configure android-arm
+PATH=$TOOLCHAIN:$PATH CC=clang make build_generated
+EOB
+
+function InstallPrebuiltOpenssl() {
+
+ ndkVersion=$1
+ sha=$2
+
+ opensslHome="${HOME}/prebuilt-openssl-${version}-for-android-ndk-${ndkVersion}"
+ if [[ ! -d ${opensslHome} ]]; then
+ prebuiltUrl="http://ci-files01-hki.ci.qt.io/input/openssl/prebuilt-openssl-${version}-for-android-ndk-${ndkVersion}.zip"
+ targetFile="/tmp/prebuilt-openssl-${version}-for-android-ndk-${ndkVersion}.zip"
+
+ DownloadURL "$prebuiltUrl" "$prebuiltUrl" "$sha" "$targetFile"
+ unzip -o "$targetFile" -d "${HOME}"
+ sudo rm -f "$targetFile"
+ fi
+}
+
+InstallPrebuiltOpenssl $ndkVersionDefault $prebuiltOpensslNdkShaDefault
+SetEnvVar "OPENSSL_ANDROID_HOME_DEFAULT" "$opensslHome"
+InstallPrebuiltOpenssl $ndkVersionLatest $prebuiltOpensslNdkShaLatest
+SetEnvVar "OPENSSL_ANDROID_HOME_LATEST" "$opensslHome"
+
+echo "OpenSSL for Android = $version" >> ~/versions.txt
diff --git a/coin/provisioning/common/unix/openssl_for_android.sh b/coin/provisioning/common/unix/openssl_for_android.sh
index e2cb4395..d555e0cc 100755
--- a/coin/provisioning/common/unix/openssl_for_android.sh
+++ b/coin/provisioning/common/unix/openssl_for_android.sh
@@ -1,45 +1,8 @@
#!/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
-#############################################################################
-##
-## Copyright (C) 2021 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# This script install prebuilt OpenSSL which was built against Android NDK 21.
+# This script install prebuilt OpenSSL which was built against Android NDK 25.
# OpenSSL build will fail with Android NDK 22, because it's missing platforms and sysroot directories
set -ex
@@ -48,9 +11,14 @@ source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
# shellcheck source=../unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
-version="1.1.1k"
-: ' SOURCE BUILD INSTRUCTIONS - Openssl prebuilt was made using Android NDK 21
-# Source built requires GCC and Perl to be in PATH.
+version="3.0.7"
+ndkVersionLatest="r26b"
+ndkVersionDefault=$ndkVersionLatest
+prebuiltOpensslNdkShaLatest="ea925d5a5b696916fb3650403a2eb3189c52b5ce"
+prebuiltOpensslNdkShaDefault=$prebuiltOpensslNdkShaLatest
+
+: <<'EOB' SOURCE BUILD INSTRUCTIONS - Openssl prebuilt was made using Android NDK r26b
+# Source built requires GCC and Perl to be in PATH. Rhel "requires yum install perl-IPC-Cmd"
exports_file="/tmp/export.sh"
# source previously made environmental variables.
if uname -a |grep -q "Ubuntu"; then
@@ -64,9 +32,9 @@ else
fi
officialUrl="https://www.openssl.org/source/openssl-$version.tar.gz"
-cachedUrl="http://ci-files01-hki.intra.qt.io/input/openssl/openssl-$version.tar.gz"
+cachedUrl="http://ci-files01-hki.ci.qt.io/input/openssl/openssl-$version.tar.gz"
targetFile="/tmp/openssl-$version.tar.gz"
-sha="bad9dc4ae6dcc1855085463099b5dacb0ec6130b"
+sha="f20736d6aae36bcbfa9aba0d358c71601833bf27"
opensslHome="${HOME}/openssl/android/openssl-${version}"
DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile"
mkdir -p "${HOME}/openssl/android/"
@@ -79,20 +47,27 @@ fi
cd "$opensslHome"
PATH=$TOOLCHAIN:$PATH CC=clang ./Configure android-arm
PATH=$TOOLCHAIN:$PATH CC=clang make build_generated
-'
+EOB
-if uname -a |grep -q "Darwin"; then
- prebuiltUrl="http://ci-files01-hki.intra.qt.io/input/openssl/prebuilt-openssl-1_1_1_k_for-android-ndk-21_darwin.tar.gz"
- sha="6e3e48441ff58596f25bc27fdc05ae43e5a7581d"
-else
- prebuiltUrl="http://ci-files01-hki.intra.qt.io/input/openssl/prebuilt-openssl-1_1_1_k_for-android-ndk-21.tar.gz"
- sha="8c4db1eb8460d749c998a0e033b3939123cbc5ac"
-fi
-targetFile="/tmp/prebuilt-openssl-$version.tar.gz"
-DownloadURL "$prebuiltUrl" "$prebuiltUrl" "$sha" "$targetFile"
-tar -xzf "$targetFile" -C "${HOME}"
+function InstallPrebuiltOpenssl() {
-opensslHome="${HOME}/openssl/android/openssl-${version}"
-SetEnvVar "OPENSSL_ANDROID_HOME" "$opensslHome"
+ ndkVersion=$1
+ sha=$2
+
+ opensslHome="${HOME}/prebuilt-openssl-${version}-for-android-ndk-${ndkVersion}"
+ if [[ ! -d ${opensslHome} ]]; then
+ prebuiltUrl="http://ci-files01-hki.ci.qt.io/input/openssl/prebuilt-openssl-${version}-for-android-ndk-${ndkVersion}.zip"
+ targetFile="/tmp/prebuilt-openssl-${version}-for-android-ndk-${ndkVersion}.zip"
+
+ DownloadURL "$prebuiltUrl" "$prebuiltUrl" "$sha" "$targetFile"
+ unzip -o "$targetFile" -d "${HOME}"
+ sudo rm -f "$targetFile"
+ fi
+}
+
+InstallPrebuiltOpenssl $ndkVersionDefault $prebuiltOpensslNdkShaDefault
+SetEnvVar "OPENSSL_ANDROID_HOME_DEFAULT" "$opensslHome"
+InstallPrebuiltOpenssl $ndkVersionLatest $prebuiltOpensslNdkShaLatest
+SetEnvVar "OPENSSL_ANDROID_HOME_LATEST" "$opensslHome"
echo "OpenSSL for Android = $version" >> ~/versions.txt
diff --git a/coin/provisioning/common/unix/pyenv.rb b/coin/provisioning/common/unix/pyenv.rb
new file mode 100644
index 00000000..0c2781ff
--- /dev/null
+++ b/coin/provisioning/common/unix/pyenv.rb
@@ -0,0 +1,80 @@
+class Pyenv < Formula
+ desc "Python version management"
+ homepage "https://github.com/pyenv/pyenv"
+ url "https://github.com/pyenv/pyenv/archive/refs/tags/v2.3.15.tar.gz"
+ sha256 "cf6499e1c8f18fb3473c2afdf5f14826fd42a1c4b051219faea104e38036e4bb"
+ license "MIT"
+ version_scheme 1
+ head "https://github.com/pyenv/pyenv.git", branch: "master"
+
+ livecheck do
+ url :stable
+ regex(/^v?(\d+(?:\.\d+)+(-\d+)?)$/i)
+ end
+
+ bottle do
+ sha256 cellar: :any, arm64_ventura: "ff68efd633ee282abb0c0a6ba72f90d5248644f3143f40e15841b6ae7996e3cd"
+ sha256 cellar: :any, arm64_monterey: "af7621550cc7c005549d96218d2606a521e12595f2efc9ae9d8523cc46d318ba"
+ sha256 cellar: :any, arm64_big_sur: "69d69ceeea16fe45346d8856bf213c0a0e48220097635cf17d40b98fa8e12f83"
+ sha256 cellar: :any, ventura: "48fb21656dc11dc0a6ef25eb7cb5e8829485c1e1fac7d1ca596a46771a9ad91d"
+ sha256 cellar: :any, monterey: "96ba1d1702b7620dd9d0d2fe030af4d31c83504afea1b119910ab2e9c9fbb08c"
+ sha256 cellar: :any, big_sur: "f96dfcecefb40d4794a8ea3ef5981bdeab6e64c412f18f0c128b1d64fe87d913"
+ sha256 cellar: :any_skip_relocation, x86_64_linux: "83737a776f4828a7fb5eb289b10418b7cf829cccca3fc634d7dfe7c96aff4e7e"
+ end
+
+ depends_on "autoconf"
+ depends_on "openssl@3"
+ depends_on "pkg-config"
+ depends_on "readline"
+
+ uses_from_macos "python" => :test
+ uses_from_macos "bzip2"
+ uses_from_macos "libffi"
+ uses_from_macos "ncurses"
+ uses_from_macos "xz"
+ uses_from_macos "zlib"
+
+ def install
+ inreplace "libexec/pyenv", "/usr/local", HOMEBREW_PREFIX
+ inreplace "libexec/pyenv-rehash", "$(command -v pyenv)", opt_bin/"pyenv"
+ inreplace "pyenv.d/rehash/source.bash", "$(command -v pyenv)", opt_bin/"pyenv"
+
+ system "src/configure"
+ system "make", "-C", "src"
+
+ prefix.install Dir["*"]
+ %w[pyenv-install pyenv-uninstall python-build].each do |cmd|
+ bin.install_symlink "#{prefix}/plugins/python-build/bin/#{cmd}"
+ end
+
+ share.install prefix/"man"
+
+ # Do not manually install shell completions. See:
+ # - pyenv/pyenv#1056#issuecomment-356818337
+ # - Homebrew/homebrew-core#22727
+ end
+
+ test do
+ # Create a fake python version and executable.
+ pyenv_root = Pathname(shell_output("#{bin}/pyenv root").strip)
+ python_bin = pyenv_root/"versions/1.2.3/bin"
+ foo_script = python_bin/"foo"
+ foo_script.write "echo hello"
+ chmod "+x", foo_script
+
+ # Test versions.
+ versions = shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
+ "&& eval \"$(#{bin}/pyenv init -)\" " \
+ "&& #{bin}/pyenv versions").split("\n")
+ assert_equal 2, versions.length
+ assert_match(/\* system/, versions[0])
+ assert_equal(" 1.2.3", versions[1])
+
+ # Test rehash.
+ system bin/"pyenv", "rehash"
+ refute_match "Cellar", (pyenv_root/"shims/foo").read
+ assert_equal "hello", shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
+ "&& eval \"$(#{bin}/pyenv init -)\" " \
+ "&& PYENV_VERSION='1.2.3' foo").chomp
+ end
+end
diff --git a/coin/provisioning/common/unix/python_modules.sh b/coin/provisioning/common/unix/python_modules.sh
index c4b60867..00009836 100755
--- a/coin/provisioning/common/unix/python_modules.sh
+++ b/coin/provisioning/common/unix/python_modules.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
# needed by packaging scripts
pip3 install bs4
diff --git a/coin/provisioning/common/unix/sccache.sh b/coin/provisioning/common/unix/sccache.sh
index 7adfed32..8a403ba7 100755
--- a/coin/provisioning/common/unix/sccache.sh
+++ b/coin/provisioning/common/unix/sccache.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
set -ex
@@ -50,7 +13,7 @@ function installSccache {
targetVersion=$2
sha1=$3
targetFile=sccache-$targetVersion-$targetArch.tar.gz
- primaryUrl=http://ci-files01-hki.intra.qt.io/input/sccache/$targetFile
+ primaryUrl=http://ci-files01-hki.ci.qt.io/input/sccache/$targetFile
cacheUrl=https://github.com/mozilla/sccache/releases/download/$targetVersion/$targetFile
DownloadURL "$primaryUrl" "$cacheUrl" "$sha1" "$targetFile"
@@ -62,4 +25,11 @@ function installSccache {
# disable sccache server from shutting down after being idle
SetEnvVar "SCCACHE_IDLE_TIMEOUT" "0"
+
+ # copy sccache wrapper and place as a first in PATH
+ mkdir -p "$HOME/sccache_wrapper"
+ cp "${BASH_SOURCE%/*}/sccache_wrapper" "$HOME/sccache_wrapper/sccache"
+ chmod 755 "$HOME/sccache_wrapper/sccache"
+ SetEnvVar "PATH" "$HOME/sccache_wrapper:\$PATH"
+
}
diff --git a/coin/provisioning/common/unix/sccache_wrapper b/coin/provisioning/common/unix/sccache_wrapper
new file mode 100755
index 00000000..52e39513
--- /dev/null
+++ b/coin/provisioning/common/unix/sccache_wrapper
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+# Call real sccache with original arguments
+# sccache /opt/android/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none ......
+real_sccache=/usr/local/sccache/sccache
+$real_sccache "$@"
+retval=$?
+
+if test $retval -ne 0
+then
+ echo "Sccache command failed, re-try calling build tool directly"
+ "$@"
+ retval=$?
+fi
+exit $retval
diff --git a/coin/provisioning/common/unix/squishInstall.sh b/coin/provisioning/common/unix/squishInstall.sh
index 6f165e8b..0195d84a 100755
--- a/coin/provisioning/common/unix/squishInstall.sh
+++ b/coin/provisioning/common/unix/squishInstall.sh
@@ -1,43 +1,6 @@
#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
# shellcheck source=./DownloadURL.sh
source "${BASH_SOURCE%/*}/DownloadURL.sh"
@@ -47,46 +10,50 @@ set -ex
# This script will fetch and extract pre-buildt squish package for Linux and Mac.
# Squish is need by Release Test Automation (RTA)
-version="6.7.1"
-qtBranch="62x"
+version="7.2.1"
+qtBranch="66x"
installFolder="/opt"
squishFolder="$installFolder/squish"
-preBuildCacheUrl="ci-files01-hki.intra.qt.io:/hdd/www/input/squish/jenkins_build/stable"
-licenseUrl="http://ci-files01-hki.intra.qt.io/input/squish/coin/515x/.squish-3-license"
-licenseSHA="e000d2f95b30b82f405b9dcbeb233cd43710a41a"
+preBuildCacheUrl="ci-files01-hki.ci.qt.io:/hdd/www/input/squish/jenkins_build/stable"
+licenseFile=".squish-license"
+licenseBranch="squish_license"
+licenseUrl="http://ci-files01-hki.ci.qt.io/input/squish/coin/$licenseBranch/$licenseFile"
+licenseSHA="e84b499a2011f9bb1a6eefc7b2338d7ae770927a"
+testSuiteUrl="ci-files01-hki.ci.qt.io:/hdd/www/input/squish/coin/suite_test_squish"
+testSuiteLocal="/tmp/squish_test_suite"
if uname -a |grep -q Darwin; then
- compressedFolder="prebuild-squish-$version-515x-macx86_64.tar.gz"
- sha1="1526d4d57f8025f83aad836a43e8fa0317dbddc2"
+ compressedFolder="prebuild-squish-$version-$qtBranch-mac.tar.gz"
+ sha1="7467c974b65255c86b8fccaeca90e0590d4f7c96"
else
compressedFolder="prebuild-squish-$version-$qtBranch-linux64.tar.gz"
- sha1="d412c3389d95a65341b51d2e14cba47ce3b54a86"
+ sha1="950a6035c777c8ce0a50a0b3ad468044d07f898b"
fi
mountFolder="/tmp/squish"
sudo mkdir "$mountFolder"
+sudo mkdir "$testSuiteLocal"
# Check which platform
if uname -a |grep -q Darwin; then
usersGroup="staff"
- squishLicenseDir="/Users/qt"
elif uname -a |grep -q "el7"; then
usersGroup="qt"
- squishLicenseDir="/root"
elif uname -a |grep -q "Ubuntu"; then
usersGroup="users"
- squishLicenseDir="/home/qt"
else
usersGroup="users"
- squishLicenseDir="/root"
fi
targetFileMount="$mountFolder"/"$compressedFolder"
-echo "Mounting $preBuildCacheUrl to $mountFolder"
+echo "Mounting Squish packages from $preBuildCacheUrl to $mountFolder"
+echo "Mounting Squish test suite from $testSuiteUrl to $testSuiteLocal"
if uname -a |grep -q Darwin; then
sudo mount -o locallocks "$preBuildCacheUrl" "$mountFolder"
+ sudo mount -o locallocks "$testSuiteUrl" "$testSuiteLocal"
else
sudo mount "$preBuildCacheUrl" "$mountFolder"
+ sudo mount "$testSuiteUrl" "$testSuiteLocal"
fi
echo "Create $installFolder if needed"
if [ ! -d "$installFolder" ]; then
@@ -98,10 +65,6 @@ VerifyHash "$targetFileMount" "$sha1"
echo "Uncompress $compressedFolder"
sudo tar -xzf "$targetFileMount" --directory "$installFolder"
-echo "Unmounting $mountFolder"
-sudo diskutil unmount force "$mountFolder" || sudo umount -f "$mountFolder"
-
-sudo mv "$installFolder/rta_squish_$version" "$squishFolder"
if uname -a |grep -q Darwin; then
sudo xattr -r -c "$squishFolder"
fi
@@ -109,40 +72,35 @@ fi
if uname -a |grep -q "Ubuntu"; then
if [ ! -e "/usr/lib/tcl8.6" ]; then
sudo mkdir /usr/lib/tcl8.6
- #this needs to be copied only to squish_for_qt6
- sudo cp "$squishFolder/squish_for_qt6/tcl/lib/tcl8.6/init.tcl" /usr/lib/tcl8.6/
+ #this needs to be copied only to squish_for_qt65
+ sudo cp "$squishFolder/squish_for_qt66/tcl/lib/tcl8.6/init.tcl" /usr/lib/tcl8.6/
fi
fi
-DownloadURL "$licenseUrl" "$licenseUrl" "$licenseSHA" "$HOME/.squish-3-license"
+echo "Download Squish license"
+DownloadURL "$licenseUrl" "$licenseUrl" "$licenseSHA" "$HOME/$licenseFile"
echo "Changing ownerships"
sudo chown -R qt:$usersGroup "$squishFolder"
-sudo chown qt:$usersGroup "$HOME/.squish-3-license"
+sudo chown qt:$usersGroup "$HOME/$licenseFile"
-echo "Set commands for environment variables in .bashrc"
-if uname -a |grep -q "Ubuntu"; then
- echo "export SQUISH_PATH=$squishFolder/squish_for_qt6" >> ~/.profile
- echo "export PATH=\$PATH:$squishFolder/squish_for_qt6/bin" >> ~/.profile
-else
- echo "export SQUISH_PATH=$squishFolder/squish_for_qt6" >> ~/.bashrc
- echo "export PATH=\$PATH:$squishFolder/squish_for_qt6/bin" >> ~/.bashrc
-fi
echo "Verifying Squish, available installations:"
ls -la $squishFolder
-
-if "$squishFolder/squish_for_qt5/bin/squishrunner" --testsuite "$squishFolder/suite_test_squish" | grep "Squish test run successfully" ; then
- echo "Squish for Qt5 installation tested successfully"
-else
- echo "Squish for Qt5 test failed! Package wasn't installed correctly."
- exit 1
-fi
-if "$squishFolder/squish_for_qt6/bin/squishrunner" --testsuite "$squishFolder/suite_test_squish" | grep "Squish test run successfully" ; then
- echo "Squish for Qt6 installation tested successfully"
-else
- echo "Squish for Qt6 test failed! Package wasn't installed correctly."
- exit 1
-fi
-
-
+cd $squishFolder
+
+for squishInstallation in */ ; do
+ if "$squishInstallation/bin/squishrunner" --testsuite "$testSuiteLocal" | grep "Squish test run successfully" ; then
+ echo "Squish in $squishInstallation tested successfully"
+ else
+ echo "Testing Squish in $squishInstallation failed! Squish wasn't installed correctly."
+ exit 1
+ fi
+done
+
+echo "Clean up installation temp dirs"
+echo "- Unmounting $mountFolder"
+sudo diskutil unmount force "$mountFolder" || sudo umount -f "$mountFolder" || true
+
+echo "- Unmounting $testSuiteLocal"
+sudo diskutil unmount force "$testSuiteLocal" || sudo umount -f "$testSuiteLocal" || true
diff --git a/coin/provisioning/common/unix/telegraf_install.sh b/coin/provisioning/common/unix/telegraf_install.sh
index 6436c8f8..7e1f8a47 100755
--- a/coin/provisioning/common/unix/telegraf_install.sh
+++ b/coin/provisioning/common/unix/telegraf_install.sh
@@ -1,43 +1,6 @@
-#!/bin/sh
-
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
# This script installs telegraf and ioping and our script telegraf-ioping.sh
@@ -52,46 +15,56 @@
######################## BOILERPLATE ###########################
set -e
-
PROVISIONING_DIR="$(dirname "$0")/../../"
-. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
-
-. "$PROVISIONING_DIR"/common/unix/DownloadURL.sh
+# shellcheck source=./common.sourced.sh
+source "$PROVISIONING_DIR"/common/unix/common.sourced.sh
+# shellcheck source=./DownloadURL.sh
+source "$PROVISIONING_DIR"/common/unix/DownloadURL.sh
-is_script_executed telegraf_install.sh \
+is_script_executed telegraf_install.sh \
|| fatal "Script telegraf_install.sh should be executed, not sourced"
################################################################
-[ "$PROVISIONING_OS" = linux ] \
- && ioping_sha256=259abf04bcb84f4126ff97c04b6651e1cf5ea6d8a9ff364c769a26c95b6eeb44 \
- || ioping_sha256=55de6a2f1a5343e0ce8df31d82d47a9e79c7e612edbc6dfb39b5fc6fb358b2e3
-DownloadURL "http://ci-files01-hki.intra.qt.io/input/ioping/ioping.${PROVISIONING_OS}-${PROVISIONING_ARCH}" \
- '' "$ioping_sha256" ioping
+if [ "$PROVISIONING_OS" = linux ]
+then ioping_sha256=259abf04bcb84f4126ff97c04b6651e1cf5ea6d8a9ff364c769a26c95b6eeb44
+else ioping_sha256=55de6a2f1a5343e0ce8df31d82d47a9e79c7e612edbc6dfb39b5fc6fb358b2e3
+fi
+
+DownloadURL "http://ci-files01-hki.ci.qt.io/input/ioping/ioping.${PROVISIONING_OS}-${PROVISIONING_ARCH}" \
+ '' "$ioping_sha256" ioping
$CMD_INSTALL -m 755 ./ioping /usr/bin/
rm -f ioping
# 2. Install custom ioping monitoring script
-$CMD_INSTALL -m 755 "$PROVISIONING_DIR"/common/shared/telegraf/telegraf-ioping.sh /usr/bin/
+$CMD_INSTALL -m 755 "$PROVISIONING_DIR"/common/shared/telegraf/telegraf-ioping.sh /usr/bin/
# 3. Download and install telegraf
-[ x"$PROVISIONING_OS" = xmacos ] && os=darwin || os=linux
-[ x"$PROVISIONING_ARCH" = xx86 ] && arch=i386 || arch=amd64
+if [ "$PROVISIONING_OS" = macos ]
+then os=darwin
+else os=linux
+fi
+
+if [ "$PROVISIONING_ARCH" = x86 ]
+then arch=i386
+else arch=amd64
+fi
+
package_filename=telegraf-1.12.6_${os}_${arch}.tar.gz
package_sha256_list="$PROVISIONING_DIR"/common/shared/telegraf/telegraf_packages.sha256.txt
package_sha256=$(sed -n "s/.*$package_filename *//p" "$package_sha256_list")
-DownloadURL \
- http://ci-files01-hki.intra.qt.io/input/telegraf/"$package_filename" \
- https://dl.influxdata.com/telegraf/releases/"$package_filename" \
- "$package_sha256" \
+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/bin/
+$CMD_INSTALL -m 755 "$telegraf_binary" /usr/bin/
rm -rf /tmp/telegraf*
# 4. Edit config file with passwords
diff --git a/coin/provisioning/common/unix/telegraf_password.sh b/coin/provisioning/common/unix/telegraf_password.sh
index a8327de9..24df7054 100755
--- a/coin/provisioning/common/unix/telegraf_password.sh
+++ b/coin/provisioning/common/unix/telegraf_password.sh
@@ -1,51 +1,14 @@
-#!/bin/sh
-
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## 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 https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://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 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $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
######################## BOILERPLATE ###########################
set -e
-
PROVISIONING_DIR="$(dirname "$0")/../../"
-. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
+# shellcheck source=./common.sourced.sh
+source "${BASH_SOURCE%/*}/common.sourced.sh"
is_script_executed telegraf_password.sh \
|| fatal "Script telegraf_password.sh should be executed, not sourced, to avoid leaking secrets in the logs"