mirror of
git://code.qt.io/qt/qt5.git
synced 2026-03-19 21:11:11 +08:00
Fix shellcheck complaints about provisioning scripts
Also adds executable attributes to shell scripts that were missing it. Change-Id: Id52ef495147fdbfb5cb1a1f711fac530e0e85f3b Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
@@ -39,14 +39,14 @@ function check_for_android_device
|
||||
function check_if_fully_booted
|
||||
{
|
||||
# The "getprop" command separates lines with \r\n so we trim them
|
||||
bootanim=` timeout 1 $ADB_EXEC shell getprop init.svc.bootanim | tr -d '\r\n'`
|
||||
boot_completed=`timeout 1 $ADB_EXEC shell getprop sys.boot_completed | tr -d '\r\n'`
|
||||
bootcomplete=` timeout 1 $ADB_EXEC shell getprop dev.bootcomplete | tr -d '\r\n'`
|
||||
bootanim=$( timeout 1 "$ADB_EXEC" shell getprop init.svc.bootanim | tr -d '\r\n')
|
||||
boot_completed=$(timeout 1 "$ADB_EXEC" shell getprop sys.boot_completed | tr -d '\r\n')
|
||||
bootcomplete=$( timeout 1 "$ADB_EXEC" shell getprop dev.bootcomplete | tr -d '\r\n')
|
||||
echo "bootanim=$bootanim boot_completed=$boot_completed bootcomplete=$bootcomplete"
|
||||
[ "$bootanim" = stopped ] && [ "$boot_completed" = 1 ] && [ "$bootcomplete" = 1 ]
|
||||
}
|
||||
|
||||
for counter in `seq ${EMULATOR_MAX_RETRIES}`
|
||||
for counter in $(seq ${EMULATOR_MAX_RETRIES})
|
||||
do
|
||||
$ADB_EXEC kill-server
|
||||
$ADB_EXEC start-server
|
||||
@@ -62,22 +62,22 @@ do
|
||||
EMULATOR_RUN_LOG_PATH=${EMULATOR_RUN_LOG_PATH//%iter/${counter}}
|
||||
|
||||
echo "Starting emulator ${ANDROID_EMULATOR}, try ${counter}/${EMULATOR_MAX_RETRIES}" \
|
||||
| tee ${EMULATOR_RUN_LOG_PATH}
|
||||
$EMULATOR_EXEC -avd $ANDROID_EMULATOR \
|
||||
| tee "${EMULATOR_RUN_LOG_PATH}"
|
||||
$EMULATOR_EXEC -avd "$ANDROID_EMULATOR" \
|
||||
-gpu swiftshader_indirect -no-audio -no-window -no-boot-anim \
|
||||
-cores 4 -memory 16000 -partition-size 4096 \
|
||||
-detect-image-hang -restart-when-stalled -no-snapshot-save \
|
||||
-no-nested-warnings -logcat-output ${LOGCAT_PATH} \
|
||||
</dev/null >${EMULATOR_RUN_LOG_PATH} 2>&1 &
|
||||
-no-nested-warnings -logcat-output "${LOGCAT_PATH}" \
|
||||
</dev/null >"${EMULATOR_RUN_LOG_PATH}" 2>&1 &
|
||||
emulator_pid=$!
|
||||
disown $emulator_pid
|
||||
|
||||
echo "Waiting ${ADB_MAX_TIMEOUT} seconds for emulated device to appear..."
|
||||
timeout ${ADB_MAX_TIMEOUT} $ADB_EXEC wait-for-device
|
||||
timeout ${ADB_MAX_TIMEOUT} "$ADB_EXEC" wait-for-device
|
||||
|
||||
echo "Waiting a few minutes for the emulator to fully boot..."
|
||||
emulator_status=down
|
||||
for i in `seq ${ADB_MAX_TIMEOUT}`
|
||||
for _ in $(seq ${ADB_MAX_TIMEOUT})
|
||||
do
|
||||
sleep 1
|
||||
|
||||
@@ -95,13 +95,13 @@ do
|
||||
echo "Emulator started successfully"
|
||||
break
|
||||
else
|
||||
if [ $counter -lt $EMULATOR_MAX_RETRIES ]
|
||||
if [ "$counter" -lt "$EMULATOR_MAX_RETRIES" ]
|
||||
then
|
||||
echo "Emulator failed to start," \
|
||||
"forcefully killing current instance and re-starting emulator"
|
||||
kill $emulator_pid || true
|
||||
sleep 5
|
||||
elif [ $counter -eq $EMULATOR_MAX_RETRIES ]
|
||||
elif [ "$counter" -eq "$EMULATOR_MAX_RETRIES" ]
|
||||
then
|
||||
echo "Emulator failed to start, reached maximum number of retries. Aborting\!"
|
||||
exit 2
|
||||
|
||||
@@ -15,12 +15,10 @@ source "${BASH_SOURCE%/*}/../unix/check_and_set_proxy.sh"
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
||||
|
||||
emulator_script="${BASH_SOURCE%/*}/android_emulator_launcher.sh"
|
||||
|
||||
targetFolder="/opt/android"
|
||||
sdkTargetFolder="$targetFolder/sdk"
|
||||
|
||||
sudo mkdir -p $sdkTargetFolder
|
||||
sudo mkdir -p "$sdkTargetFolder"
|
||||
|
||||
basePath="http://ci-files01-hki.ci.qt.io/input/android"
|
||||
|
||||
@@ -54,7 +52,7 @@ function InstallNdk() {
|
||||
ndkVersion=$1
|
||||
ndkSha1=$2
|
||||
|
||||
if [[ ! -d $targetFolder/android-ndk-$ndkVersion ]]; then
|
||||
if [[ ! -d "$targetFolder/android-ndk-$ndkVersion" ]]; then
|
||||
|
||||
ndkFile="android-ndk-$ndkVersion-linux.zip"
|
||||
ndkTargetFile="/tmp/$ndkFile"
|
||||
@@ -97,11 +95,11 @@ if [ "$http_proxy" != "" ]; then
|
||||
echo "y" | "$sdkTargetFolder/cmdline-tools/tools/bin/sdkmanager" --sdk_root=$sdkTargetFolder \
|
||||
--no_https --proxy=http --proxy_host="$proxy_host" --proxy_port="$proxy_port" \
|
||||
"platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
|
||||
| eval $sdkmanager_no_progress_bar_cmd
|
||||
| eval "$sdkmanager_no_progress_bar_cmd"
|
||||
else
|
||||
echo "y" | "$sdkTargetFolder/cmdline-tools/tools/bin/sdkmanager" --sdk_root=$sdkTargetFolder \
|
||||
"platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
|
||||
| eval $sdkmanager_no_progress_bar_cmd
|
||||
| eval "$sdkmanager_no_progress_bar_cmd"
|
||||
fi
|
||||
|
||||
echo "Checking the contents of Android SDK..."
|
||||
@@ -112,19 +110,22 @@ SetEnvVar "ANDROID_NDK_HOST" "linux-x86_64"
|
||||
SetEnvVar "ANDROID_API_VERSION" "$sdkApiLevel"
|
||||
|
||||
# shellcheck disable=SC2129
|
||||
echo "Android SDK tools = $toolsVersion" >> ~/versions.txt
|
||||
echo "Android SDK Build Tools = $sdkBuildToolsVersion" >> ~/versions.txt
|
||||
echo "Android SDK API level = $sdkApiLevel" >> ~/versions.txt
|
||||
echo "Android NDK = $ndkVersion" >> ~/versions.txt
|
||||
cat <<EOB >>~/versions.txt
|
||||
Android SDK tools = $toolsVersion
|
||||
Android SDK Build Tools = $sdkBuildToolsVersion
|
||||
Android SDK API level = $sdkApiLevel
|
||||
Android NDK = $ndkVersion
|
||||
EOB
|
||||
|
||||
cd "$sdkTargetFolder/cmdline-tools/tools/bin"
|
||||
./sdkmanager --install "emulator" --sdk_root=$sdkTargetFolder \
|
||||
| eval $sdkmanager_no_progress_bar_cmd
|
||||
echo "y" | ./sdkmanager --install "system-images;android-23;google_apis;x86" | eval $sdkmanager_no_progress_bar_cmd
|
||||
|
||||
echo "y" | ./sdkmanager --install "system-images;android-33;google_apis;x86_64" | eval $sdkmanager_no_progress_bar_cmd
|
||||
|
||||
echo "y" | ./sdkmanager --install "system-images;android-34;google_apis;x86_64" | eval $sdkmanager_no_progress_bar_cmd
|
||||
./sdkmanager --install "emulator" --sdk_root="$sdkTargetFolder" \
|
||||
| eval "$sdkmanager_no_progress_bar_cmd"
|
||||
echo "y" | ./sdkmanager --install "system-images;android-23;google_apis;x86" \
|
||||
| eval "$sdkmanager_no_progress_bar_cmd"
|
||||
echo "y" | ./sdkmanager --install "system-images;android-33;google_apis;x86_64" \
|
||||
| eval "$sdkmanager_no_progress_bar_cmd"
|
||||
echo "y" | ./sdkmanager --install "system-images;android-34;google_apis;x86_64" \
|
||||
| eval "$sdkmanager_no_progress_bar_cmd"
|
||||
|
||||
echo "Checking the contents of Android SDK again..."
|
||||
ls -l "$sdkTargetFolder"
|
||||
@@ -141,7 +142,7 @@ echo "no" | ./avdmanager create avd -n emulator_x86_64_api_34 -c 2048M -f \
|
||||
echo "Install $sdkApiLevelAutomotive $androidAutomotive"
|
||||
DownloadURL "$androidAutomotive12Url" "$androidAutomotive12Url" "$androidAutomotive12Sha" \
|
||||
"/tmp/${sdkApiLevelAutomotive}_automotive.tar.gz"
|
||||
sudo tar -xzf "/tmp/${sdkApiLevelAutomotive}_automotive.tar.gz" -C $sdkTargetFolder/system-images
|
||||
sudo tar -xzf "/tmp/${sdkApiLevelAutomotive}_automotive.tar.gz" -C "$sdkTargetFolder/system-images"
|
||||
echo "no" | ./avdmanager create avd -n automotive_emulator_x86_64_api_31 -c 2048M -f \
|
||||
-k "system-images;${sdkApiLevelAutomotive};${androidAutomotive};x86_64"
|
||||
|
||||
@@ -150,6 +151,6 @@ echo "no" | ./avdmanager create avd -n automotive_emulator_x86_64_api_31 -c 2048
|
||||
|
||||
# To be used by the VMs to start the emulator for tests
|
||||
emulator_script_filename="android_emulator_launcher.sh"
|
||||
cp "$(dirname "$(readlink -f "$BASH_SOURCE")")/${emulator_script_filename}" ${HOME}
|
||||
cp "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/${emulator_script_filename}" "${HOME}"
|
||||
ANDROID_EMULATOR_RUNNER="${HOME}/${emulator_script_filename}"
|
||||
SetEnvVar "ANDROID_EMULATOR_RUNNER" "$ANDROID_EMULATOR_RUNNER"
|
||||
|
||||
@@ -17,9 +17,9 @@ DownloadAndExtract () {
|
||||
file=$3
|
||||
|
||||
DownloadURL "$url" "$url" "$sha" "$file"
|
||||
tar -xzvf $file
|
||||
tar -xzvf "$file"
|
||||
|
||||
rm -rf $file
|
||||
rm -rf "$file"
|
||||
}
|
||||
|
||||
|
||||
@@ -27,13 +27,13 @@ DownloadAndExtract () {
|
||||
sourceFile="http://ci-files01-hki.ci.qt.io/input/axivion/bauhaus-suite-7_6_0-wavefront-2023-03-16-x86_64-gnu_linux.tar.gz"
|
||||
targetFile="bauhaus-suite-7_6_0-wavefront-2023-03-16-x86_64-gnu_linux.tar.gz"
|
||||
sha1="20bfa8872b90ff11394098a833d536229425535e"
|
||||
cd $HOME
|
||||
cd "$HOME"
|
||||
DownloadAndExtract "$sourceFile" "$sha1" "$targetFile" "$HOME"
|
||||
|
||||
mkdir $HOME/.bauhaus
|
||||
mkdir "$HOME/.bauhaus"
|
||||
cd "$HOME/.bauhaus"
|
||||
wget http://ci-files01-hki.ci.qt.io/input/axivion/Qt_Evaluation_20231231.key
|
||||
cd $HOME
|
||||
cd "$HOME"
|
||||
|
||||
#Axivion configuration
|
||||
configurationFile="http://ci-files01-hki.ci.qt.io/input/axivion/axivion_config.tar.gz"
|
||||
|
||||
@@ -11,10 +11,10 @@ set -ex
|
||||
wrapper="${HOME}/bootstrap-agent.sh"
|
||||
autostart_folder="${HOME}/.config/autostart"
|
||||
# This directory should exist. Created in base image (tier 1)
|
||||
mkdir -p ${autostart_folder}
|
||||
mkdir -p "${autostart_folder}"
|
||||
|
||||
# Create autostart desktop file and shell wrapper
|
||||
sudo tee ${autostart_folder}/coin-bootstrap-agent.desktop <<"EOF"
|
||||
sudo tee "${autostart_folder}/coin-bootstrap-agent.desktop" <<"EOF"
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=/home/qt/bootstrap-agent.sh
|
||||
@@ -23,7 +23,7 @@ X-GNOME-Autostart-enabled=true
|
||||
Name=Coin
|
||||
EOF
|
||||
|
||||
sudo tee $wrapper <<"EOF"
|
||||
sudo tee "$wrapper" <<"EOF"
|
||||
#!/bin/sh
|
||||
# Wait for network to come up
|
||||
x=0
|
||||
@@ -85,5 +85,5 @@ fi
|
||||
EOF
|
||||
|
||||
# set owner and permissions
|
||||
sudo chown qt:users $wrapper
|
||||
sudo chmod 755 $wrapper
|
||||
sudo chown qt:users "$wrapper"
|
||||
sudo chmod 755 "$wrapper"
|
||||
|
||||
@@ -18,7 +18,7 @@ if grep -q "^$QT_USER:" /etc/passwd; then
|
||||
else
|
||||
echo "(WW) user $QT_USER not found."
|
||||
echo "---- skipping cache cleanup."
|
||||
exit 0;
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# assume /home/qt as ~ won't expand into sudo
|
||||
@@ -32,12 +32,11 @@ if sudo [ -d "$CACHEDIR" ]; then
|
||||
echo "---- removing content:"
|
||||
|
||||
# List files and delete in a loop as wildcard won't expand into sudo
|
||||
FILES=`sudo ls -A1 $CACHEDIR`
|
||||
while read FILE;
|
||||
do
|
||||
sudo ls -A1 "$CACHEDIR" | while read -r FILE
|
||||
do
|
||||
echo "--- rm -rf $FILE"
|
||||
sudo rm -rf "$CACHEDIR/$FILE"
|
||||
done <<< $FILES
|
||||
done
|
||||
else
|
||||
echo "(**) cache in $CACHEDIR is empty."
|
||||
fi
|
||||
@@ -46,7 +45,7 @@ else
|
||||
# replace a cache file with a directory
|
||||
echo "(WW) $CACHEDIR is a file."
|
||||
echo "---- removing $CACHEDIR."
|
||||
sudo rm -rf "$CACHEDIR"
|
||||
sudo rm -r "$CACHEDIR"
|
||||
else
|
||||
echo "(WW) cache directory $CACHEDIR not found."
|
||||
fi
|
||||
|
||||
@@ -8,9 +8,9 @@ echo "Disable Network Time Protocol (NTP)"
|
||||
|
||||
if uname -a |grep -q "Ubuntu\|Debian" ; then
|
||||
sudo timedatectl set-ntp false
|
||||
elif cat /etc/os-release | grep "PRETTY_NAME" | grep -q "Leap 15"; then
|
||||
elif grep "PRETTY_NAME" /etc/os-release | grep -q "Leap 15"; then
|
||||
(sudo systemctl stop chronyd && sudo systemctl disable chronyd)
|
||||
elif cat /etc/os-release |grep "SUSE Linux Enterprise Server 15"; then
|
||||
elif grep -q "SUSE Linux Enterprise Server 15" /etc/os-release; then
|
||||
sudo timedatectl set-ntp false
|
||||
else
|
||||
sudo systemctl disable ntpd || sudo /sbin/chkconfig ntpd off
|
||||
|
||||
@@ -7,7 +7,7 @@ set -f
|
||||
QT_USER="qt"
|
||||
CONFDIR=".config"
|
||||
KWINRC="kwinrc"
|
||||
KWC5=`which kwriteconfig5`
|
||||
KWC5=$(which kwriteconfig5)
|
||||
|
||||
if [ -z "$KWC5" ]; then
|
||||
echo "(WW) kwriteconfig5 script not found."
|
||||
|
||||
@@ -4,37 +4,38 @@
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
PROVISIONING_DIR="$(dirname "$0")/../../"
|
||||
. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
|
||||
. "$PROVISIONING_DIR"/common/unix/DownloadURL.sh
|
||||
|
||||
# shellcheck source=../unix/common.sourced.sh
|
||||
source "$PROVISIONING_DIR"/common/unix/common.sourced.sh
|
||||
# shellcheck source=../unix/DownloadURL.sh
|
||||
source "$PROVISIONING_DIR"/common/unix/DownloadURL.sh
|
||||
|
||||
localRepo=http://ci-files01-hki.ci.qt.io/input/docker
|
||||
upstreamRepo=https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/
|
||||
|
||||
echo '
|
||||
2666840157bab3b77a850236fbf323c423fb564a containerd.io_1.6.9-1_amd64.deb
|
||||
ec6a1ad99b19b6a674349fb13bcc10d62c54c404 docker-ce_23.0.0-1~ubuntu.20.04~focal_amd64.deb
|
||||
130774916fa7e2c9997b8fcb4e7696a343f12fb0 docker-ce-cli_23.0.0-1~ubuntu.20.04~focal_amd64.deb
|
||||
' \
|
||||
| xargs -n2 | while read sha f
|
||||
do
|
||||
DownloadURL $localRepo/$f $upstreamRepo/$f $sha
|
||||
done
|
||||
function getEachUpstream () {
|
||||
while read -r sha f
|
||||
do DownloadURL "$localRepo/$f" "$upstreamRepo/$f" "$sha"
|
||||
done
|
||||
}
|
||||
cat <<EOF | getEachUpstream
|
||||
2666840157bab3b77a850236fbf323c423fb564a containerd.io_1.6.9-1_amd64.deb
|
||||
ec6a1ad99b19b6a674349fb13bcc10d62c54c404 docker-ce_23.0.0-1~ubuntu.20.04~focal_amd64.deb
|
||||
130774916fa7e2c9997b8fcb4e7696a343f12fb0 docker-ce-cli_23.0.0-1~ubuntu.20.04~focal_amd64.deb
|
||||
EOF
|
||||
|
||||
sudo apt-get -y install ./containerd.io_*.deb ./docker-ce_*.deb ./docker-ce-cli_*.deb
|
||||
rm -f ./containerd.io_*.deb ./docker-ce_*.deb ./docker-ce-cli_*.deb
|
||||
|
||||
sudo usermod -a -G docker $USER
|
||||
sudo usermod -a -G docker "$USER"
|
||||
sudo docker --version
|
||||
|
||||
# Download and install the docker-compose extension from https://github.com/docker/compose/releases
|
||||
f=docker-compose-$(uname -s)-$(uname -m)
|
||||
dockerComposeVersion="v2.15.1"
|
||||
DownloadURL \
|
||||
$localRepo/$f-${dockerComposeVersion} \
|
||||
https://github.com/docker/compose/releases/download/${dockerComposeVersion}/$f \
|
||||
"$localRepo/$f-${dockerComposeVersion}" \
|
||||
"https://github.com/docker/compose/releases/download/${dockerComposeVersion}/$f" \
|
||||
bcfd9ea51dee4c19dccdfaeef0e7956ef68bf14f3d175933742061a7271ef0f5
|
||||
sudo install -m 755 ./docker-compose* /usr/local/bin/docker-compose
|
||||
sudo docker-compose --version
|
||||
@@ -44,4 +45,4 @@ rm ./docker-compose*
|
||||
sudo apt-get install avahi-daemon -y
|
||||
|
||||
# Start testserver provisioning
|
||||
sudo "$(readlink -f $(dirname ${BASH_SOURCE[0]}))/../shared/testserver/docker_testserver.sh"
|
||||
sudo "$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")/../shared/testserver/docker_testserver.sh"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# 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 cpdb from sources.
|
||||
# This script installs cpdb from sources.
|
||||
# Requires GCC and Perl to be in PATH.
|
||||
# The following dependencies should be pre-installed:
|
||||
# make, autoconf, autopoint, libglib2.0-dev, libdbus-1-dev, libtool
|
||||
@@ -13,14 +13,14 @@ gitUrl="https://github.com/openprinting/$repName.git"
|
||||
tmpdir="/tmp"
|
||||
repDir="$tmpdir/$repName"
|
||||
prefix="/usr"
|
||||
rm -rf $repDir
|
||||
cd $tmpdir
|
||||
git clone $gitUrl >/dev/null
|
||||
cd $repDir
|
||||
rm -rf "$repDir"
|
||||
cd "$tmpdir"
|
||||
git clone -q "$gitUrl"
|
||||
cd "$repDir"
|
||||
# cpdb-libs v2.0b4 with build bug fixed
|
||||
git checkout ce848f1571a82ec03881fce127ff28bec8da239e > /dev/null
|
||||
git checkout -q ce848f1571a82ec03881fce127ff28bec8da239e
|
||||
./autogen.sh > /dev/null
|
||||
./configure --prefix=$prefix > /dev/null
|
||||
make -j$(nproc) > /dev/null && sudo make install > /dev/null
|
||||
./configure --prefix="$prefix" > /dev/null
|
||||
make "-j$(nproc)" > /dev/null && sudo make install > /dev/null
|
||||
sudo ldconfig
|
||||
rm -rf $repDir
|
||||
rm -rf "$repDir"
|
||||
|
||||
@@ -16,11 +16,11 @@ gitUrl="https://github.com/festvox/$repName.git"
|
||||
tmpdir="/tmp"
|
||||
repDir="$tmpdir/$repName"
|
||||
prefix="/usr"
|
||||
rm -rf $repDir
|
||||
cd $tmpdir
|
||||
git clone $gitUrl >/dev/null
|
||||
cd $repDir
|
||||
git checkout v2.2 > /dev/null
|
||||
./configure --with-pic --enable-shared --prefix=$prefix > /dev/null
|
||||
make -j$(nproc) > /dev/null && sudo make install > /dev/null
|
||||
rm -rf $repDir
|
||||
rm -rf "$repDir"
|
||||
cd "$tmpdir"
|
||||
git clone -q "$gitUrl"
|
||||
cd "$repDir"
|
||||
git checkout -q v2.2
|
||||
./configure --with-pic --enable-shared --prefix="$prefix" > /dev/null
|
||||
make "-j$(nproc)" > /dev/null && sudo make install > /dev/null
|
||||
rm -rf "$repDir"
|
||||
|
||||
@@ -18,16 +18,16 @@ targetFile="/tmp/git-$version.tar.gz"
|
||||
sha="a17c11da2968f280a13832d97f48e9039edac354"
|
||||
DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile"
|
||||
sourceDir="/tmp/git-$version-source"
|
||||
mkdir $sourceDir
|
||||
tar -xzf "$targetFile" -C $sourceDir
|
||||
mkdir "$sourceDir"
|
||||
tar -xzf "$targetFile" -C "$sourceDir"
|
||||
|
||||
cd "$sourceDir/git-$version"
|
||||
installDir="$HOME/git"
|
||||
make configure
|
||||
./configure --prefix=$installDir
|
||||
./configure --prefix="$installDir"
|
||||
make all
|
||||
sudo make install
|
||||
|
||||
SetEnvVar "PATH" "\"$installDir/bin:\$PATH\""
|
||||
|
||||
$installDir/bin/git --version
|
||||
"$installDir/bin/git" --version
|
||||
|
||||
@@ -26,7 +26,7 @@ InstallFromCompressedFileFromURL "$urlToolchainEs7" "$urlToolchainEs7" "$SHA1_to
|
||||
echo "Install Integrity toolchain addons"
|
||||
DownloadURL "$urlLibeglmegapack" "$urlLibeglmegapack" "$SHA1_Libeglmegapack" "/tmp/integrity_libeglmegapack.zip"
|
||||
unzip "/tmp/integrity_libeglmegapack.zip" -d "/tmp"
|
||||
mv /tmp/toolchain/* $targetFolder/toolchain
|
||||
mv $targetFolder/toolchain $targetFolder/integrity_toolchain
|
||||
cp $toolchain_file "$targetFolder/integrity_toolchain/toolchain.cmake"
|
||||
mv /tmp/toolchain/* "$targetFolder/toolchain"
|
||||
mv "$targetFolder/toolchain" "$targetFolder/integrity_toolchain"
|
||||
cp "$toolchain_file" "$targetFolder/integrity_toolchain/toolchain.cmake"
|
||||
sudo rm -fr /tmp/toolchain
|
||||
|
||||
@@ -7,8 +7,10 @@ set -e
|
||||
SSL_VER=$1
|
||||
PACK_TYPE=$2
|
||||
PROVISIONING_DIR="$(dirname "$0")/../../"
|
||||
. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
|
||||
. "$PROVISIONING_DIR"/common/unix/DownloadURL.sh
|
||||
# shellcheck source=../unix/common.sourced.sh
|
||||
source "${BASH_SOURCE%/*}/../unix/common.sourced.sh"
|
||||
# shellcheck source=../unix/DownloadURL.sh
|
||||
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
|
||||
|
||||
|
||||
localRepo=http://ci-files01-hki.ci.qt.io/input/docker
|
||||
|
||||
@@ -18,9 +18,9 @@ DownloadAndExtract () {
|
||||
folder=$4
|
||||
|
||||
DownloadURL "$url" "$url" "$sha" "$file"
|
||||
sudo tar -C $folder -Jxf $file
|
||||
sudo tar -C "$folder" -Jxf "$file"
|
||||
|
||||
rm -rf $file
|
||||
rm -rf "$file"
|
||||
}
|
||||
|
||||
aarch64le_toolchain="${BASH_SOURCE%/*}/../shared/cmake_toolchain_files/qnx-toolchain-aarch64le.cmake"
|
||||
@@ -33,13 +33,13 @@ folderName="qnx710"
|
||||
targetPath="$targetFolder$folderName"
|
||||
qemuTargetPath="$HOME/QNX"
|
||||
qemuIpAddress="172.31.1.10"
|
||||
qemuNetwork="172.31.1.1"
|
||||
export qemuNetwork="172.31.1.1"
|
||||
qemuSSHuser="root"
|
||||
qemuSSHurl="$qemuSSHuser@$qemuIpAddress"
|
||||
qemuLDpath="/proc/boot:/system/lib:/system/lib/dll:/home/qt/work/install/target/lib"
|
||||
|
||||
if [ ! -d "$targetFolder" ]; then
|
||||
mkdir -p $targetFolder
|
||||
mkdir -p "$targetFolder"
|
||||
fi
|
||||
|
||||
# QNX SDP
|
||||
@@ -48,10 +48,10 @@ targetFile="qnx710.tar.xz"
|
||||
sha1="134af2e0f75d7b7c516f824fafee265b89e51d48"
|
||||
DownloadAndExtract "$sourceFile" "$sha1" "$targetFile" "$targetFolder"
|
||||
|
||||
sudo cp $aarch64le_toolchain $targetPath
|
||||
sudo cp $armv7le_toolchain $targetPath
|
||||
sudo cp $x8664_toolchain $targetPath
|
||||
cp -R $QNX_qemu_bld_files_dir $qemuTargetPath
|
||||
sudo cp "$aarch64le_toolchain" "$targetPath"
|
||||
sudo cp "$armv7le_toolchain" "$targetPath"
|
||||
sudo cp "$x8664_toolchain" "$targetPath"
|
||||
cp -R "$QNX_qemu_bld_files_dir" "$qemuTargetPath"
|
||||
# fc-match tool is missing from QNX SDP and tst_qfont requires it to work corretly
|
||||
# Download code-only package from https://www.iana.org/time-zones and follow README
|
||||
# to build tools for QNX x86_64. If need to build new tool create new qnx_qemu_utils
|
||||
@@ -60,9 +60,9 @@ sourceFile="http://ci-files01-hki.ci.qt.io/input/qnx/qnx_qemu_utils_20211208.tar
|
||||
targetFile="qnx_qemu_utils.tar.xz"
|
||||
targetFolder="$qemuTargetPath/local/misc_files"
|
||||
sha1="7653f5d50f61f1591d7785c3ec261228ecc9dd22"
|
||||
if [ ! -d "$targetFolder" ]; then
|
||||
mkdir -p $targetFolder
|
||||
fi
|
||||
|
||||
mkdir -p "$targetFolder"
|
||||
|
||||
DownloadAndExtract "$sourceFile" "$sha1" "$targetFile" "$targetFolder"
|
||||
|
||||
# Add ssl certificates. Expects Ubuntu 20.04 LTS with ca-certificates package installed
|
||||
@@ -73,10 +73,10 @@ cp -PR /etc/ssl/certs/* "$targetFolder/etc/ssl/certs"
|
||||
sudo chown -R qt:users "$targetPath"
|
||||
|
||||
# Verify that we have last files in tars
|
||||
if [ ! -f $targetPath/qnxsdp-env.sh ] || [ ! -f $targetPath/qnx-toolchain-x8664.cmake ]
|
||||
if [ ! -f "$targetPath/qnxsdp-env.sh" ] || [ ! -f "$targetPath/qnx-toolchain-x8664.cmake" ]
|
||||
then
|
||||
echo "QNX toolchain installation failed!"
|
||||
exit -1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set env variables
|
||||
|
||||
@@ -11,7 +11,7 @@ function InstallPKGFromURL {
|
||||
targetDirectory=$4
|
||||
|
||||
echo "Creating temporary file"
|
||||
package_basename=$(echo "$url" | sed 's|^.*/||')
|
||||
package_basename="${url/*\//}"
|
||||
tmpdir=$(mktemp -d)
|
||||
targetFile="$tmpdir/$package_basename"
|
||||
echo "Downloading PKG from primary URL '$url'"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
set -ex
|
||||
|
||||
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
||||
|
||||
targetFolder="/opt/android"
|
||||
@@ -58,7 +58,7 @@ sudo mv "$sdkTargetFolder/tools" "$sdkTargetFolder/cmdline-tools"
|
||||
echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
|
||||
(echo "y"; echo "y") | "$sdkTargetFolder/cmdline-tools/tools/bin/sdkmanager" "--sdk_root=$sdkTargetFolder" \
|
||||
"platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
|
||||
| eval $sdkmanager_no_progress_bar_cmd
|
||||
| eval "$sdkmanager_no_progress_bar_cmd"
|
||||
|
||||
echo "Checking the contents of Android SDK..."
|
||||
ls -l "$sdkTargetFolder"
|
||||
@@ -69,7 +69,9 @@ SetEnvVar "ANDROID_NDK_ROOT_LATEST" "$targetFolder/android-ndk-$ndkVersionLatest
|
||||
SetEnvVar "ANDROID_NDK_HOST" "darwin-x86_64"
|
||||
SetEnvVar "ANDROID_API_VERSION" "$sdkApiLevel"
|
||||
|
||||
echo "Android SDK tools = $toolsVersion" >> ~/versions.txt
|
||||
echo "Android SDK Build Tools = $sdkBuildToolsVersion" >> ~/versions.txt
|
||||
echo "Android SDK API level = $sdkApiLevel" >> ~/versions.txt
|
||||
echo "Android NDK = $ndkVersionDefault" >> ~/versions.txt
|
||||
cat << EOT >>~/versions.txt
|
||||
Android SDK tools = $toolsVersion
|
||||
Android SDK Build Tools = $sdkBuildToolsVersion
|
||||
Android SDK API level = $sdkApiLevel
|
||||
Android NDK = $ndkVersionDefault
|
||||
EOT
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Copyright (C) 2021 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
echo """<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
sudo tee -a /Library/LaunchDaemons/net_tcp_tso_off.plist > /dev/null <<EOB
|
||||
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
|
||||
<plist version=\"1.0\">
|
||||
<dict>
|
||||
@@ -30,4 +31,4 @@ echo """<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
""" | sudo tee -a /Library/LaunchDaemons/net_tcp_tso_off.plist
|
||||
EOB
|
||||
|
||||
@@ -19,7 +19,7 @@ echo "Installing Docker for $chip chip"
|
||||
urlOccifical="https://desktop.docker.com/mac/main/${chip}/Docker.dmg?utm_source=docker"
|
||||
urlCache="http://ci-files01-hki.ci.qt.io/input/mac/Docker_${chip}.dmg"
|
||||
|
||||
DownloadURL $urlCache $urlOccifical $sha "/tmp/Docker_${chip}.dmg"
|
||||
DownloadURL "$urlCache" "$urlOccifical" "$sha" "/tmp/Docker_${chip}.dmg"
|
||||
|
||||
sudo hdiutil attach "/tmp/Docker_${chip}.dmg"
|
||||
sudo /Volumes/Docker/Docker.app/Contents/MacOS/install --accept-license --user qt
|
||||
@@ -27,7 +27,7 @@ sudo hdiutil detach /Volumes/Docker
|
||||
|
||||
# Add registry mirror for docker images
|
||||
mkdir "$HOME/.docker"
|
||||
sudo tee -a $HOME/.docker/daemon.json <<"EOF"
|
||||
sudo tee -a "$HOME/.docker/daemon.json" <<"EOF"
|
||||
{
|
||||
"builder": { "gc": { "defaultKeepStorage": "20GB", "enabled": true } },
|
||||
"experimental": false,
|
||||
|
||||
0
coin/provisioning/common/macos/enable_zsh_history_and_viminfo.sh
Normal file → Executable file
0
coin/provisioning/common/macos/enable_zsh_history_and_viminfo.sh
Normal file → Executable file
@@ -9,7 +9,7 @@ set -ex
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
||||
|
||||
version="2016.1.2"
|
||||
#version="2016.1.2"
|
||||
fileName="fbx20161_2_fbxsdk_clang_mac.pkg_nospace.tgz"
|
||||
cachedUrl="/net/ci-files01-hki.ci.qt.io/hdd/www/input/fbx/$fileName"
|
||||
# officialUrl="http://download.autodesk.com/us/fbx_release_older/$version/fbx20161_2_fbxsdk_clang_mac.pkg.tgz"
|
||||
@@ -18,7 +18,7 @@ targetFolder="/tmp"
|
||||
echo "Extracting '$cachedUrl'"
|
||||
tar -xzf "$cachedUrl" -C "$targetFolder"
|
||||
|
||||
rm -rf "$targetFolder/$fileName"
|
||||
rm -rf "${targetFolder:?}/${fileName}"
|
||||
echo "Copying preinstalled FBX SDK to Applications"
|
||||
sudo cp -r "$targetFolder/Autodesk" /Applications
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#Copyright (C) 2023 The Qt Company Ltd
|
||||
#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
. "$(dirname "$0")"/../../common/unix/DownloadURL.sh
|
||||
source "$(dirname "$0")"/../../common/unix/DownloadURL.sh
|
||||
|
||||
|
||||
DownloadURL \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/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
|
||||
|
||||
@@ -11,16 +11,16 @@
|
||||
set -e
|
||||
|
||||
PROVISIONING_DIR="$(dirname "$0")/../../"
|
||||
. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
|
||||
|
||||
# shellcheck source=../unix/common.sourced.sh
|
||||
source "$PROVISIONING_DIR"/common/unix/common.sourced.sh
|
||||
|
||||
echo "Current limits are:"
|
||||
ulimit -a
|
||||
launchctl limit
|
||||
|
||||
$CMD_INSTALL -m 644 -o root -g wheel \
|
||||
$PROVISIONING_DIR/common/macos/limit.maxfiles.plist \
|
||||
$PROVISIONING_DIR/common/macos/limit.maxproc.plist \
|
||||
"$PROVISIONING_DIR/common/macos/limit.maxfiles.plist" \
|
||||
"$PROVISIONING_DIR/common/macos/limit.maxproc.plist" \
|
||||
/Library/LaunchDaemons/
|
||||
|
||||
# Activate the new limits immediately (not for the current session though)
|
||||
|
||||
@@ -25,7 +25,7 @@ function InstallXCode() {
|
||||
cd /Applications/ && sudo tar -zxf "$sourceFile"
|
||||
elif [[ $sourceFile =~ "xip" ]]; then
|
||||
if [[ $sourceFile =~ "http" ]]; then
|
||||
Download $sourceFile /Applications/Xcode_$version.xip
|
||||
Download "$sourceFile" "/Applications/Xcode_$version.xip"
|
||||
cd /Applications/ && xip -x "Xcode_$version.xip"
|
||||
else
|
||||
cd /Applications/ && xip -x "$sourceFile"
|
||||
@@ -35,12 +35,12 @@ function InstallXCode() {
|
||||
fi
|
||||
|
||||
echo "Versioning application bundle"
|
||||
majorVersion=$(echo $version | cut -d '.' -f 1)
|
||||
majorVersion=$(echo "$version" | cut -d '.' -f 1)
|
||||
versionedAppBundle="/Applications/Xcode${majorVersion}.app"
|
||||
sudo mv /Applications/Xcode*.app ${versionedAppBundle}
|
||||
sudo mv /Applications/Xcode*.app "${versionedAppBundle}"
|
||||
|
||||
echo "Selecting Xcode"
|
||||
sudo xcode-select --switch ${versionedAppBundle}
|
||||
sudo xcode-select --switch "${versionedAppBundle}"
|
||||
|
||||
echo "Accept license"
|
||||
sudo xcodebuild -license accept
|
||||
|
||||
@@ -9,11 +9,11 @@ set -ex
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
||||
|
||||
brew install --formula ${BASH_SOURCE%/*}/libiodbc.rb $*
|
||||
brew install --formula "${BASH_SOURCE%/*}/libiodbc.rb" "$@"
|
||||
|
||||
# CPLUS_INCLUDE_PATH is set so clang and configure can find libiodbc
|
||||
|
||||
read -r -a arr <<< $(brew list --versions libiodbc)
|
||||
read -r -a arr <<< "$(brew list --versions libiodbc)"
|
||||
version=${arr[1]}
|
||||
|
||||
SetEnvVar "CPLUS_INCLUDE_PATH" "/usr/local/Cellar/libiodbc/$version/include${CPLUS_INCLUDE_PATH:+:}${CPLUS_INCLUDE_PATH}"
|
||||
|
||||
@@ -7,7 +7,7 @@ set -ex
|
||||
|
||||
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
||||
brew install libusb
|
||||
read -r -a arr <<< $(brew list --versions libusb)
|
||||
read -r -a arr <<< "$(brew list --versions libusb)"
|
||||
version=${arr[1]}
|
||||
echo "libusb = $version" >> ~/versions.txt
|
||||
|
||||
@@ -21,15 +21,15 @@ case $(sw_vers -productVersion) in
|
||||
14*) codename=sonoma;;
|
||||
esac
|
||||
|
||||
brew fetch --bottle-tag=arm64_${codename} libusb
|
||||
brew fetch --bottle-tag=${codename} libusb
|
||||
tar xf $(brew --cache --bottle-tag=arm64_${codename} libusb) -C /tmp/arm64/
|
||||
tar xf $(brew --cache --bottle-tag=${codename} libusb) -C /tmp/amd64
|
||||
for f in /tmp/arm64/libusb/$version/lib/* ; do
|
||||
if lipo -info $f >/dev/null 2>&1; then
|
||||
file=$(basename $f)
|
||||
lipo -create -output $(brew --cellar)/libusb/$version/lib/$file \
|
||||
/tmp/arm64/libusb/$version/lib/$file \
|
||||
/tmp/amd64/libusb/$version/lib/$file
|
||||
brew fetch --bottle-tag=arm64_"${codename}" libusb
|
||||
brew fetch --bottle-tag="${codename}" libusb
|
||||
tar xf "$(brew --cache --bottle-tag=arm64_"${codename}" libusb)" -C /tmp/arm64/
|
||||
tar xf "$(brew --cache --bottle-tag="${codename}" libusb)" -C /tmp/amd64
|
||||
for f in /tmp/arm64/libusb/"$version"/lib/* ; do
|
||||
if lipo -info "$f" >/dev/null 2>&1; then
|
||||
file="$(basename "$f")"
|
||||
lipo -create -output "$(brew --cellar)/libusb/$version/lib/$file" \
|
||||
"/tmp/arm64/libusb/$version/lib/$file" \
|
||||
"/tmp/amd64/libusb/$version/lib/$file"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
set -ex
|
||||
|
||||
# Print all build machines versions to provision log
|
||||
echo "*********************************************" >> ~/versions.txt
|
||||
echo "***** macOS version *****" >> ~/versions.txt
|
||||
sw_vers >> ~/versions.txt
|
||||
echo "***** All installed packages *****" >> ~/versions.txt
|
||||
echo "***** HomeBrew *****" >> ~/versions.txt
|
||||
brew list --versions >> ~/versions.txt
|
||||
echo "***** Apple's installer *****" >> ~/versions.txt
|
||||
pkgutil --pkgs >> ~/versions.txt
|
||||
echo "*********************************************" >> ~/versions.txt
|
||||
|
||||
( echo "*********************************************"
|
||||
echo "***** macOS version *****"
|
||||
sw_vers
|
||||
echo "***** All installed packages *****"
|
||||
echo "***** HomeBrew *****"
|
||||
brew list --versions
|
||||
echo "***** Apple's installer *****"
|
||||
pkgutil --pkgs
|
||||
echo "*********************************************"
|
||||
) >> ~/versions.txt
|
||||
"$(dirname "$0")/version.sh"
|
||||
|
||||
@@ -8,18 +8,18 @@ set -e
|
||||
|
||||
for dir in "$@"; do
|
||||
echo "Processing files in $dir ..."
|
||||
pushd $dir >/dev/null
|
||||
find . -type f | while read f; do
|
||||
pushd "$dir" >/dev/null
|
||||
find . -type f | while read -r f; do
|
||||
dst="${f:1}"
|
||||
dstdir=$(dirname $dst)
|
||||
mkdir -p $dstdir
|
||||
if [[ ! -f $dst ]]; then
|
||||
dstdir="$(dirname "$dst")"
|
||||
mkdir -p "$dstdir"
|
||||
if [[ ! -f "$dst" ]]; then
|
||||
echo "Copying $dir/$f to $dst"
|
||||
cp -c $f $dst
|
||||
elif lipo -info $f >/dev/null 2>&1; then
|
||||
cp -c "$f" "$dst"
|
||||
elif lipo -info "$f" >/dev/null 2>&1; then
|
||||
echo "Lipoing $dir/$f into $dst"
|
||||
lipo -create -output $dst $dst $f
|
||||
elif ! diff $f $dst; then
|
||||
lipo -create -output "$dst" "$dst" "$f"
|
||||
elif ! diff "$f" "$dst"; then
|
||||
echo "Error: File $f in $dir doesn't match destination $dst"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -7,6 +7,6 @@ set -ex
|
||||
|
||||
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
||||
brew install pkgconfig
|
||||
read -r -a arr <<< $(brew list --versions pkgconfig)
|
||||
read -r -a arr <<< "$(brew list --versions pkgconfig)"
|
||||
version=${arr[1]}
|
||||
echo "pkgconfig = $version" >> ~/versions.txt
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
set -ex
|
||||
|
||||
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
||||
# shellcheck source=../common/unix/DownloadURL.sh
|
||||
# shellcheck source=../unix/DownloadURL.sh
|
||||
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
|
||||
|
||||
psqlAppVersion="2.5"
|
||||
@@ -21,7 +21,6 @@ packageName="Postgres-$psqlAppVersion-$psqlVersion.dmg"
|
||||
PrimaryUrl="http://ci-files01-hki.ci.qt.io/input/mac/macos_10.12_sierra/$packageName"
|
||||
AltUrl="https://github.com/PostgresApp/PostgresApp/releases/download/v$psqlAppVersion/$packageName"
|
||||
SHA1="04cb6939704c5ede5646c1da8a686da3ded98a26"
|
||||
appPrefix=""
|
||||
|
||||
DownloadURL "$PrimaryUrl" "$AltUrl" "$SHA1" "/tmp/$packageName"
|
||||
|
||||
|
||||
@@ -24,5 +24,5 @@ renice -n -10 -p $$ >/dev/null 2>&1 || true
|
||||
rlatency="$(/usr/local/bin/ioping -B -k -c 3 -i 0.1 "$1" | cut -d " " -f 5)"
|
||||
wlatency="$(/usr/local/bin/ioping -B -k -c 3 -i 0.1 -W "$1" | cut -d " " -f 5)"
|
||||
|
||||
printf "ioping,path=$1 read_latency_ns=%u,write_latency_ns=%u\n" \
|
||||
"$rlatency" "$wlatency"
|
||||
printf "ioping,path=$1 read_latency_ns=%u,write_latency_ns=%u\n" \
|
||||
"$rlatency" "$wlatency"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# Copyright (C) 2023 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
|
||||
# This script installs telegraf and ioping and our script telegraf-ioping.sh
|
||||
# to the /usr/bin directory.
|
||||
#
|
||||
|
||||
4
coin/provisioning/common/shared/telegraf/telegraf-ioping.sh
Normal file → Executable file
4
coin/provisioning/common/shared/telegraf/telegraf-ioping.sh
Normal file → Executable file
@@ -14,7 +14,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
[ x"$1" = x ] && echo "$0 takes a path as a first argument" && exit 1
|
||||
[ -z "$1" ] && echo "$0 takes a path as a first argument" && exit 1
|
||||
|
||||
# Try to run in high priority to avoid slow-downs because of
|
||||
# factors other than I/O.
|
||||
@@ -25,4 +25,4 @@ rlatency="$(ioping -B -k -c 3 -i 0.1 "$1" | cut -d " " -f 5)"
|
||||
wlatency="$(ioping -B -k -c 3 -i 0.1 -W "$1" | cut -d " " -f 5)"
|
||||
|
||||
printf "ioping,path=$1 read_latency_ns=%u,write_latency_ns=%u\n" \
|
||||
$rlatency $wlatency
|
||||
"$rlatency" "$wlatency"
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
PROVISIONING_DIR="$(dirname "$0")/../../../"
|
||||
. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
|
||||
. "$PROVISIONING_DIR"/common/unix/DownloadURL.sh
|
||||
|
||||
# shellcheck source=../../../common/unix/common.sourced.sh
|
||||
source "$PROVISIONING_DIR"/common/unix/common.sourced.sh
|
||||
# shellcheck source=../../../common/unix/DownloadURL.sh
|
||||
source "$PROVISIONING_DIR"/common/unix/DownloadURL.sh
|
||||
|
||||
# Sort files by their SHA-1, and then return the accumulated result
|
||||
sha1tree () {
|
||||
@@ -16,14 +16,14 @@ sha1tree () {
|
||||
[ -x "$(command -v sha1sum)" ] || SHASUM=shasum
|
||||
|
||||
find "$@" -type f -print0 | \
|
||||
xargs -0 ${SHASUM-sha1sum} | cut -d ' ' -f 1 | \
|
||||
sort | ${SHASUM-sha1sum} | cut -d ' ' -f 1
|
||||
xargs -0 "${SHASUM-sha1sum}" | cut -d ' ' -f 1 | \
|
||||
sort | "${SHASUM-sha1sum}" | cut -d ' ' -f 1
|
||||
}
|
||||
|
||||
|
||||
SERVER_PATH="$PROVISIONING_DIR/common/shared/testserver"
|
||||
|
||||
. "$SERVER_PATH/settings.sh"
|
||||
source "$SERVER_PATH/settings.sh"
|
||||
|
||||
|
||||
# Download all necessary dependencies outside of the dockerfiles, so that we
|
||||
@@ -87,10 +87,10 @@ do
|
||||
# backwards-incompatible changes across repositories.
|
||||
|
||||
context="$SERVER_PATH/$server"
|
||||
tag=$(sha1tree $context)
|
||||
docker build -t qt-test-server-$server:latest \
|
||||
-t qt-test-server-$server:$tag \
|
||||
$context
|
||||
tag=$(sha1tree "$context")
|
||||
docker build -t "qt-test-server-$server:latest" \
|
||||
-t "qt-test-server-$server:$tag" \
|
||||
"$context"
|
||||
done
|
||||
|
||||
docker images
|
||||
|
||||
@@ -7,16 +7,16 @@ set -ex
|
||||
TestMachine='qt-test-server'
|
||||
|
||||
# Deploy docker virtual machine (Boot2Docker) into VirtualBox only if it doesn't exist
|
||||
if [ -z $(docker-machine ls -q --filter "name=$TestMachine") ]
|
||||
if [ -z "$(docker-machine ls -q --filter "name=$TestMachine")" ]
|
||||
then
|
||||
docker-machine create $@ $TestMachine
|
||||
docker-machine ip $TestMachine
|
||||
docker-machine create "$@" "$TestMachine"
|
||||
docker-machine ip "$TestMachine"
|
||||
else
|
||||
# Otherwise, start the docker machine and update with new TLS certificates.
|
||||
docker-machine start $TestMachine && docker-machine regenerate-certs -f $TestMachine
|
||||
docker-machine start "$TestMachine" && docker-machine regenerate-certs -f "$TestMachine"
|
||||
fi
|
||||
|
||||
# Switch the docker engine to $TestMachine
|
||||
eval $(docker-machine env $TestMachine)
|
||||
eval "$(docker-machine env "$TestMachine")"
|
||||
|
||||
docker-machine ls
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
set -ex
|
||||
|
||||
[ -x "$(command -v realpath)" ] && FILE=$(realpath ${BASH_SOURCE[0]}) || FILE=${BASH_SOURCE[0]}
|
||||
[ -x "$(command -v realpath)" ] && FILE=$(realpath "${BASH_SOURCE[0]}") || FILE="${BASH_SOURCE[0]}"
|
||||
case $FILE in
|
||||
*/*) SERVER_PATH="${FILE%/*}" ;;
|
||||
*) SERVER_PATH="." ;;
|
||||
@@ -23,4 +23,4 @@ esac
|
||||
docker info
|
||||
|
||||
# Create images
|
||||
$SERVER_PATH/docker_images.sh
|
||||
"$SERVER_PATH/docker_images.sh"
|
||||
|
||||
1
coin/provisioning/common/shared/testserver/settings.sh
Normal file → Executable file
1
coin/provisioning/common/shared/testserver/settings.sh
Normal file → Executable file
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2019 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/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
|
||||
|
||||
@@ -21,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 () {
|
||||
@@ -61,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
|
||||
|
||||
@@ -37,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" ]
|
||||
}
|
||||
|
||||
|
||||
@@ -48,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 ]
|
||||
@@ -69,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)"
|
||||
|
||||
@@ -10,7 +10,7 @@ source "${BASH_SOURCE%/*}/DownloadURL.sh"
|
||||
|
||||
version="3.1.37"
|
||||
versionNode="v14.18.2"
|
||||
tarBallVersion=$(sed "s/\./\_/g" <<<"$version")
|
||||
tarBallVersion="${version//./_}"
|
||||
if uname -a |grep -q Darwin; then
|
||||
tarBallPackage="emsdk_macos_${tarBallVersion}.tar.gz"
|
||||
sha="fe9900b0f27ada608f25552dbd4a58bf62c6f05b"
|
||||
|
||||
@@ -61,11 +61,8 @@ build_ffmpeg_android() {
|
||||
sysroot=${toolchain}/sysroot
|
||||
cxx=${toolchain_bin}/${target_toolchain_arch}${api_version}-clang++
|
||||
cc=${toolchain_bin}/${target_toolchain_arch}${api_version}-clang
|
||||
ld=${toolchain_bin}/ld
|
||||
ar=${toolchain_bin}/llvm-ar
|
||||
ranlib=${toolchain_bin}/llvm-ranlib
|
||||
nm=${toolchain_bin}/llvm-nm
|
||||
strip=${toolchain_bin}/llvm-strip
|
||||
|
||||
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-pthreads --enable-neon --disable-asm --disable-indev=android_camera"
|
||||
@@ -76,7 +73,8 @@ build_ffmpeg_android() {
|
||||
sudo mkdir -p "$build_dir"
|
||||
pushd "$build_dir"
|
||||
|
||||
sudo $ffmpeg_source_dir/configure $ffmpeg_config_options --prefix="$target_dir"
|
||||
# shellcheck disable=SC2086
|
||||
sudo "$ffmpeg_source_dir/configure" $ffmpeg_config_options --prefix="$target_dir"
|
||||
|
||||
sudo make install -j4
|
||||
popd
|
||||
|
||||
@@ -21,7 +21,7 @@ target_dir="$HOME"
|
||||
app_prefix=""
|
||||
ffmpeg_source_dir="$target_dir/$ffmpeg_name"
|
||||
|
||||
if [ ! -d "$ffmpeg_source_dir" ];
|
||||
if [ ! -d "$ffmpeg_source_dir" ]
|
||||
then
|
||||
InstallFromCompressedFileFromURL "$url_cached" "$url_public" "$sha1" "$target_dir" "$app_prefix"
|
||||
fi
|
||||
@@ -35,7 +35,7 @@ install_ff_nvcodec_headers() {
|
||||
nv_codec_sha1="bfaa2801725a2eea476939f2177ab50817c3a6ad"
|
||||
#nv_codec_sha1="4f30539f8dd31945da4c3da32e66022f9ca59c08" // 12.0
|
||||
nv_codec_dir="$target_dir/nv-codec-headers-sdk-$nv_codec_version"
|
||||
if [ ! -d "$nv_codec_dir" ];
|
||||
if [ ! -d "$nv_codec_dir" ]
|
||||
then
|
||||
InstallFromCompressedFileFromURL "$nv_codec_url_cached" "$nv_codec_url_public" "$nv_codec_sha1" "$target_dir" ""
|
||||
fi
|
||||
@@ -62,11 +62,12 @@ build_ffmpeg() {
|
||||
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"
|
||||
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
|
||||
make install DESTDIR="$build_dir/installed" -j4
|
||||
popd
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ if [[ "$os" == "linux" ]]; then
|
||||
echo "export LD_LIBRARY_PATH=$opensslHome/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc
|
||||
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"
|
||||
@@ -45,13 +45,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=11
|
||||
|
||||
opensslBuild="${opensslHome}-build"
|
||||
opensslDestdir="${opensslHome}-destdir"
|
||||
mkdir -p $opensslBuild
|
||||
mkdir -p "$opensslBuild"
|
||||
|
||||
if [ "$os" == "macos-universal" ]; then
|
||||
archs="x86_64 arm64"
|
||||
@@ -60,10 +60,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
|
||||
@@ -75,19 +75,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\""
|
||||
@@ -96,8 +96,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
|
||||
|
||||
|
||||
|
||||
15
coin/provisioning/common/unix/install_grpc.sh
Normal file → Executable file
15
coin/provisioning/common/unix/install_grpc.sh
Normal file → Executable file
@@ -12,12 +12,15 @@ 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
|
||||
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
|
||||
|
||||
@@ -39,7 +42,7 @@ if uname -a |grep -qv "Darwin"; then
|
||||
fi
|
||||
|
||||
if uname -a |grep -q Darwin; then
|
||||
extraCMakeArgs="-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11"
|
||||
extraCMakeArgs=("-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=11)
|
||||
SetEnvVar PATH "\$PATH:$installPrefix/bin"
|
||||
fi
|
||||
|
||||
@@ -56,12 +59,12 @@ echo "Configuring and building gRPC"
|
||||
buildDir="$HOME/build-grpc-$version"
|
||||
mkdir -p "$buildDir"
|
||||
cd "$buildDir"
|
||||
cmake $targetDir -G"Ninja Multi-Config" \
|
||||
cmake "$targetDir" -G"Ninja Multi-Config" \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||
-DCMAKE_CONFIGURATION_TYPES="Release;Debug;RelWithDebugInfo" \
|
||||
-DCMAKE_INSTALL_PREFIX=$installPrefix \
|
||||
$extraCMakeArgs \
|
||||
$extraOpenSslArg \
|
||||
-DCMAKE_INSTALL_PREFIX="$installPrefix" \
|
||||
"${extraCMakeArgs[@]}" \
|
||||
"$extraOpenSslArg" \
|
||||
-DgRPC_BUILD_TESTS=OFF \
|
||||
-DgRPC_PROTOBUF_PROVIDER="package" \
|
||||
-DgRPC_SSL_PROVIDER="package" \
|
||||
|
||||
@@ -40,17 +40,17 @@ 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=11"
|
||||
extraCMakeArgs=("-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=11)
|
||||
SetEnvVar PATH "\$PATH:$installPrefix/bin"
|
||||
fi
|
||||
|
||||
buildDir="$HOME/build-protobuf-$version"
|
||||
mkdir "$buildDir"
|
||||
cd "$buildDir"
|
||||
cmake $targetDir -G"Ninja Multi-Config" \
|
||||
cmake "$targetDir" -G"Ninja Multi-Config" \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=$installPrefix \
|
||||
$extraCMakeArgs \
|
||||
"${extraCMakeArgs[@]}" \
|
||||
-Dprotobuf_BUILD_TESTS=OFF \
|
||||
-Dprotobuf_BUILD_EXAMPLES=OFF \
|
||||
-Dprotobuf_BUILD_PROTOC_BINARIES=ON \
|
||||
|
||||
@@ -38,7 +38,7 @@ 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
|
||||
|
||||
@@ -17,7 +17,8 @@ source "${BASH_SOURCE%/*}/SetEnvVar.sh"
|
||||
source "${BASH_SOURCE%/*}/DownloadURL.sh"
|
||||
|
||||
PROVISIONING_DIR="$(dirname "$0")/../../"
|
||||
. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
|
||||
# shellcheck source=./common.sourced.sh
|
||||
source "$PROVISIONING_DIR"/common/unix/common.sourced.sh
|
||||
|
||||
libclang_version="15.0.0"
|
||||
|
||||
@@ -26,7 +27,7 @@ if uname -a |grep -q Darwin; 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 && cat /etc/redhat-release | grep "Red Hat" | grep -v "8" ; then
|
||||
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-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"
|
||||
|
||||
@@ -17,7 +17,7 @@ ndkVersionDefault=$ndkVersionLatest
|
||||
prebuiltOpensslNdkShaLatest="17085b1ef76ba116466213703e38a9d2274ec859"
|
||||
prebuiltOpensslNdkShaDefault=$prebuiltOpensslNdkShaLatest
|
||||
|
||||
: ' SOURCE BUILD INSTRUCTIONS - Openssl prebuilt was made using Android NDK 25
|
||||
: <<'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.
|
||||
@@ -50,7 +50,7 @@ fi
|
||||
cd "$opensslHome"
|
||||
PATH=$TOOLCHAIN:$PATH CC=clang ./Configure android-arm
|
||||
PATH=$TOOLCHAIN:$PATH CC=clang make build_generated
|
||||
'
|
||||
EOB
|
||||
|
||||
function InstallPrebuiltOpenssl() {
|
||||
|
||||
@@ -64,7 +64,7 @@ function InstallPrebuiltOpenssl() {
|
||||
|
||||
DownloadURL "$prebuiltUrl" "$prebuiltUrl" "$sha" "$targetFile"
|
||||
unzip -o "$targetFile" -d "${HOME}"
|
||||
sudo rm -f $targetFile
|
||||
sudo rm -f "$targetFile"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ ndkVersionDefault=$ndkVersionLatest
|
||||
prebuiltOpensslNdkShaLatest="17085b1ef76ba116466213703e38a9d2274ec859"
|
||||
prebuiltOpensslNdkShaDefault=$prebuiltOpensslNdkShaLatest
|
||||
|
||||
: ' SOURCE BUILD INSTRUCTIONS - Openssl prebuilt was made using Android NDK 25
|
||||
: <<'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.
|
||||
@@ -50,7 +50,7 @@ fi
|
||||
cd "$opensslHome"
|
||||
PATH=$TOOLCHAIN:$PATH CC=clang ./Configure android-arm
|
||||
PATH=$TOOLCHAIN:$PATH CC=clang make build_generated
|
||||
'
|
||||
EOB
|
||||
|
||||
function InstallPrebuiltOpenssl() {
|
||||
|
||||
@@ -64,7 +64,7 @@ function InstallPrebuiltOpenssl() {
|
||||
|
||||
DownloadURL "$prebuiltUrl" "$prebuiltUrl" "$sha" "$targetFile"
|
||||
unzip -o "$targetFile" -d "${HOME}"
|
||||
sudo rm -f $targetFile
|
||||
sudo rm -f "$targetFile"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ function installSccache {
|
||||
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
|
||||
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"
|
||||
|
||||
}
|
||||
|
||||
@@ -32,16 +32,16 @@ sudo mkdir "$mountFolder"
|
||||
# Check which platform
|
||||
if uname -a |grep -q Darwin; then
|
||||
usersGroup="staff"
|
||||
squishLicenseDir="/Users/qt"
|
||||
# squishLicenseDir="/Users/qt"
|
||||
elif uname -a |grep -q "el7"; then
|
||||
usersGroup="qt"
|
||||
squishLicenseDir="/root"
|
||||
# squishLicenseDir="/root"
|
||||
elif uname -a |grep -q "Ubuntu"; then
|
||||
usersGroup="users"
|
||||
squishLicenseDir="/home/qt"
|
||||
# squishLicenseDir="/home/qt"
|
||||
else
|
||||
usersGroup="users"
|
||||
squishLicenseDir="/root"
|
||||
# squishLicenseDir="/root"
|
||||
fi
|
||||
|
||||
targetFileMount="$mountFolder"/"$compressedFolder"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/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
|
||||
|
||||
@@ -15,46 +15,56 @@
|
||||
######################## BOILERPLATE ###########################
|
||||
set -e
|
||||
|
||||
|
||||
PROVISIONING_DIR="$(dirname "$0")/../../"
|
||||
. "$PROVISIONING_DIR"/common/unix/common.sourced.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
|
||||
|
||||
. "$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.ci.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.ci.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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/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
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
######################## 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"
|
||||
|
||||
2
coin/provisioning/qtci-linux-Debian-11.6-aarch64/92-sbuild.sh
Normal file → Executable file
2
coin/provisioning/qtci-linux-Debian-11.6-aarch64/92-sbuild.sh
Normal file → Executable file
@@ -36,7 +36,7 @@ tee ~/.sbuildrc << EOF
|
||||
EOF
|
||||
|
||||
# Add user group
|
||||
sudo sbuild-adduser $LOGNAME
|
||||
sudo sbuild-adduser "$LOGNAME"
|
||||
newgrp sbuild
|
||||
|
||||
# Create chroot
|
||||
|
||||
0
coin/provisioning/qtci-linux-RHEL-8.2-x86_64/90-install-ffmpeg.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.2-x86_64/90-install-ffmpeg.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.4-x86_64/60-install_protobuf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.4-x86_64/60-install_protobuf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.4-x86_64/61-install_grpc.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.4-x86_64/61-install_grpc.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.6-x86_64/60-install_protobuf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.6-x86_64/60-install_protobuf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.6-x86_64/61-install_grpc.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.6-x86_64/61-install_grpc.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-disable-automounting.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-disable-automounting.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-disable_net_lso.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-disable_net_lso.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-install_telegraf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-install_telegraf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-refresh-subscription-manager.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-refresh-subscription-manager.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-remove_network_manager_secret_key.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-remove_network_manager_secret_key.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-remove_stable-privacy.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-remove_stable-privacy.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-set-ulimit.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-set-ulimit.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-systemsetup.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/01-systemsetup.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/03-enable-repos.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/03-enable-repos.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/03-install-gcc-toolset.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/03-install-gcc-toolset.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/04-install-packages.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/04-install-packages.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/04-p7zip.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/04-p7zip.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/05-libclang-v100-dyn.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/05-libclang-v100-dyn.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/05-libclang.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/05-libclang.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/09-disable_selinux.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/09-disable_selinux.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/09-openssl.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/09-openssl.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/20-sccache.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/20-sccache.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/22-mqtt_broker.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/22-mqtt_broker.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/30-fbx.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/30-fbx.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/30-install-conan.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/30-install-conan.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/30-install-git.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/30-install-git.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/30-install_icu.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/30-install_icu.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/35-install-breakpad.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/35-install-breakpad.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/40-android_linux.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/40-android_linux.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/40-install-cmake.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/40-install-cmake.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/50-openssl_for_android_linux.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/50-openssl_for_android_linux.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/60-install_protobuf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/60-install_protobuf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/61-install_grpc.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/61-install_grpc.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/70-install_QemuGA.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/70-install_QemuGA.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/70-install_dwz.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/70-install_dwz.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/90-bootstrap-autostart.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/90-bootstrap-autostart.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/90-install-ffmpeg.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/90-install-ffmpeg.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/90-squish.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/90-squish.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/99-cleanup.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/99-cleanup.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/99-version.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-8.8-x86_64/99-version.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.0-x86_64/60-install_protobuf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.0-x86_64/60-install_protobuf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.0-x86_64/61-install_grpc.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.0-x86_64/61-install_grpc.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.0-x86_64/90-install-ffmpeg.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.0-x86_64/90-install-ffmpeg.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.2-x86_64/01-disable_net_lso.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.2-x86_64/01-disable_net_lso.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.2-x86_64/01-install_telegraf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.2-x86_64/01-install_telegraf.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.2-x86_64/01-refresh-subscription-manager.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.2-x86_64/01-refresh-subscription-manager.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.2-x86_64/01-remove_network_manager_secret_key.sh
Normal file → Executable file
0
coin/provisioning/qtci-linux-RHEL-9.2-x86_64/01-remove_network_manager_secret_key.sh
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user