Merge remote-tracking branch 'origin/5.14' into 5.15

Change-Id: I604824d346aed06b2e4e62b401fdc1d7040145c2
This commit is contained in:
Liang Qi
2020-02-16 12:04:36 +01:00
30 changed files with 176 additions and 56 deletions

View File

@@ -37,6 +37,8 @@
# It also runs update for SDK API, latest SDK tools, latest platform-tools and build-tools version
set -e
# shellcheck source=../unix/DownloadURL.sh
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
# shellcheck source=../unix/check_and_set_proxy.sh
@@ -80,8 +82,11 @@ else
sudo chown -R qt:users "$targetFolder"
fi
# Run the following command under `eval` or `sh -c` so that the shell properly splits it
# Stop the sdkmanager from printing thousands of lines of #hashmarks.
# Run the following command under `eval` or `sh -c` so that the shell properly splits it.
sdkmanager_no_progress_bar_cmd="tr '\r' '\n' | grep -v '^\[[ =]*\]'"
# But don't let the pipeline hide sdkmanager failures.
set -o pipefail
echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
# shellcheck disable=SC2031

View File

@@ -41,3 +41,9 @@ echo "*********************************************"
echo "***** SW VERSIONS *****"
cat ~/versions.txt
echo "*********************************************"
echo "*************** mount ***********************"
mount
echo "*********************************************"
echo "*************** df **************************"
df -hT
echo "*********************************************"

View File

@@ -42,7 +42,9 @@ function InstallPKGFromURL {
targetDirectory=$4
echo "Creating temporary file"
targetFile=$(mktemp "$TMPDIR$(uuidgen).pkg")
package_basename=$(echo "$url" | sed 's|^.*/||')
tmpdir=$(mktemp -d)
targetFile="$tmpdir/$package_basename"
echo "Downloading PKG from primary URL '$url'"
curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" || (
echo "Failed to download '$url' multiple times"
@@ -50,10 +52,12 @@ function InstallPKGFromURL {
curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url_alt"
)
echo "Checking SHA1 on PKG '$targetFile'"
echo "$expectedSha1 *$targetFile" > "$targetFile.sha1"
/usr/bin/shasum --check "$targetFile.sha1"
echo "$expectedSha1 *$targetFile" > "$targetFile".sha1
/usr/bin/shasum --check "$targetFile".sha1
echo "Run installer on PKG"
sudo installer -package "$targetFile" -target "$targetDirectory"
echo "Removing file '$targetFile'"
rm "$targetFile"
rm -f "$targetFile".sha1
rm -f "$targetFile"
rmdir "$tmpdir"
}

View File

@@ -1,12 +1,21 @@
#!/usr/bin/env bash
#!/bin/sh
# Will install homebrew package manager for macOS.
# WARNING: Requires commandlinetools
# TODO audit and cache this file locally, see QTQAINFRA-3134
curl -L -o /tmp/homebrew_install https://raw.githubusercontent.com/Homebrew/install/master/install
set -e
. "$(dirname "$0")"/../../common/unix/DownloadURL.sh
DownloadURL \
http://ci-files01-hki.intra.qt.io/input/mac/homebrew-install.c744a716f9845988d01e6e238eee7117b8c366c9.rb \
https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \
b9782cc0b550229de77b429b56ffce04157e60486ab9df00461ccf3dad565b0a \
/tmp/homebrew_install
/usr/bin/ruby /tmp/homebrew_install </dev/null
brew update
# No need to manually do `brew update`, the homebrew installer script does it.
### brew update

View File

@@ -24,7 +24,13 @@
# collect_cpu_time = false
# report_active = false
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
# macOS needs two extra filesystem exceptions:
# + cd9660: This is a read-only filesystem, and always 100% full
# + msdos: Sometimes at boot a short-lived unique mount of type "msdos"
# is performed, at the random directory
# /Volumes/firmwaresyncd.XXXXXX.
# The uniqueness of the path bloats the cardinality of InfluxDB.
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs", "cd9660", "msdos"]
#[[inputs.diskio]] # linux-only
[[inputs.kernel]]
[[inputs.mem]]

View File

@@ -41,3 +41,9 @@ echo "*********************************************"
echo "***** SW VERSIONS *****"
cat ~/versions.txt
echo "*********************************************"
echo "*************** mount ***********************"
mount
echo "*********************************************"
echo "*************** df **************************"
df -h
echo "*********************************************"

View File

@@ -9,7 +9,7 @@ argh==0.26.2
click==6.7
coloredlogs==10.0
humanfriendly==4.15.1
Jinja2==2.10
Jinja2==2.10.3
MarkupSafe==1.0
path.py==11.0.1
pathtools==0.1.2

View File

@@ -1,6 +1,4 @@
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.1_windows_i386.zip d2dea67a28fd7a9e21395d14f0b7ce1b6413e85cc9ffd89cc7ff8f35e8af5837
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.1_windows_amd64.zip 88d8c8146b561f43726e61688b42d0b5ab88fc22607b94df5a2c8245bbb27e29
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.1_darwin_amd64.tar.gz 58a2b294c1b6408c396b5526719cf7cad557f7075fed10ff0b2a74141ea2d629
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.1_linux_amd64.tar.gz 070a76800d1a5f33413b8948286f75caa55ebd924f6fb6996a753b9979799ef5
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.1_linux_i386.tar.gz 964077b6846708f579a100d7ea6090e2d8350ace75ec735d539bc452bc551038
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.1-static_linux_amd64.tar.gz bb03814c99c037ce0758e3884660910f2f6fd78f3d49a8e1ef531693b3cfe25d
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.6_darwin_amd64.tar.gz 2bc056e1ad38af2ba95d2cb1d43b513cc611fdd3b851b2ff5e09991d52b01253
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.6_linux_amd64.tar.gz b33cf0f5935a5c225ab0de69db1e6b249d581f3213313de62a8de928aedadbec
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.6_windows_amd64.zip 5d025d85070e8c180c443580afa8a27421a7bbcf14b5044894e9f3298d0ce97a
https://dl.influxdata.com/telegraf/releases/telegraf-1.12.6_windows_i386.zip 5178a0bdaab448c2ef965b0e36f835849cea731ccd87c4a4527f0f05fbbdf271

View File

@@ -39,10 +39,12 @@
# based on the SHA length). Target filename should also be given.
############################ BOILERPLATE ###############################
command -v sha1sum >/dev/null || alias sha1sum='shasum -a 1'
command -v sha256sum >/dev/null || alias sha256sum='shasum -a 256'
command -v sha384sum >/dev/null || alias sha384sum='shasum -a 384'
command -v sha512sum >/dev/null || alias sha512sum='shasum -a 512'
command -v sha1sum >/dev/null || sha1sum () { shasum -a 1 "$@" ; }
command -v sha256sum >/dev/null || sha256sum () { shasum -a 256 "$@" ; }
command -v sha384sum >/dev/null || sha384sum () { shasum -a 384 "$@" ; }
command -v sha512sum >/dev/null || sha512sum () { shasum -a 512 "$@" ; }
########################################################################
@@ -98,20 +100,27 @@ DownloadURL () {
targetFile=$4
fi
if VerifyHash "$targetFile" "$expectedHash"
# If a non-empty file already exists
if [ -s "$targetFile" ]
then
echo "Skipping download, found and validated existing file: $targetFile"
else
echo "Downloading from primary URL: $url"
if ! Download "$url" "$targetFile"
if VerifyHash "$targetFile" "$expectedHash"
then
echo "FAIL! to download, trying alternative URL: $url2" 1>&2
if ! Download "$url2" "$targetFile"
then
echo 'FAIL! to download even from alternative URL' 1>&2
return 1
fi
echo "Skipping download, found and validated existing file: $targetFile"
return
else
echo "WARNING: Non-empty but different file found at destination; will re-download and overwrite file: $targetFile"
fi
VerifyHash "$targetFile" "$expectedHash"
fi
echo "Downloading from primary URL: $url"
if ! Download "$url" "$targetFile"
then
echo "FAIL! to download, trying alternative URL: $url2" 1>&2
if ! Download "$url2" "$targetFile"
then
echo 'FAIL! to download even from alternative URL' 1>&2
return 1
fi
fi
VerifyHash "$targetFile" "$expectedHash"
}

View File

@@ -65,10 +65,10 @@ zip="/tmp/libclang.7z"
destination="/usr/local/libclang-$version"
DownloadURL $url_cached $url $sha1 $zip
7z x $zip -o/tmp/
sudo 7z x $zip -o/usr/local/
sudo mv /usr/local/libclang "$destination"
rm -rf $zip
sudo mv /tmp/libclang "$destination"
echo "export LLVM_INSTALL_DIR=$destination" >> ~/.bash_profile
echo "libClang = $version" >> ~/versions.txt

View File

@@ -73,7 +73,7 @@ $CMD_INSTALL -m 755 "$PROVISIONING_DIR"/common/shared/telegraf/telegraf-ioping.
[ x"$PROVISIONING_OS" = xmacos ] && os=darwin || os=linux
[ x"$PROVISIONING_ARCH" = xx86 ] && arch=i386 || arch=amd64
package_filename=telegraf-1.12.1_${os}_${arch}.tar.gz
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")

View File

@@ -95,9 +95,12 @@ Out-File -FilePath C:\Utils\Android\licenses\android-sdk-license -Encoding utf8
# Get a PATH where Java's path is defined from previous provisioning
[Environment]::SetEnvironmentVariable("PATH", [Environment]::GetEnvironmentVariable("PATH", "Machine"), "Process")
# Attempt to catch all errors of sdkmanager.bat, even when hidden behind a pipeline.
$ErrorActionPreference = "Stop"
cd $toolsFolder\bin\
$sdkmanager_args += "platforms;$sdkApiLevel", "platform-tools", "build-tools;$sdkBuildToolsVersion"
$command = 'for($i=0;$i -lt 6;$i++) { $response += "y`n"}; $response | .\sdkmanager.bat @sdkmanager_args'
$command = 'for($i=0;$i -lt 6;$i++) { $response += "y`n"}; $response | .\sdkmanager.bat @sdkmanager_args | Out-Null'
Invoke-Expression $command
$command = 'for($i=0;$i -lt 6;$i++) { $response += "y`n"}; $response | .\sdkmanager.bat --licenses'
iex $command

View File

@@ -37,14 +37,14 @@
# Install a specific version of Telegraf
# https://github.com/influxdata/telegraf/releases
$version = "1.12.1"
$version = "1.12.6"
if (Is64BitWinHost) {
$arch = "amd64"
$sha256 = "88d8c8146b561f43726e61688b42d0b5ab88fc22607b94df5a2c8245bbb27e29"
$sha256 = "5d025d85070e8c180c443580afa8a27421a7bbcf14b5044894e9f3298d0ce97a"
} else {
$arch = "i386"
$sha256 = "d2dea67a28fd7a9e21395d14f0b7ce1b6413e85cc9ffd89cc7ff8f35e8af5837"
$sha256 = "5178a0bdaab448c2ef965b0e36f835849cea731ccd87c4a4527f0f05fbbdf271"
}
$filename = "telegraf-" + $version + "_windows_" + $arch + ".zip"

View File

@@ -0,0 +1,6 @@
Write-Host '******************** SW VERSIONS ********************'
type ~/versions.txt
Write-Host '*****************************************************'
Write-Host '******************** Get-PSDrive ********************'
Get-PSDrive
Write-Host '*****************************************************'

View File

@@ -120,6 +120,8 @@ installPackages+=(xz-devel)
installPackages+=(zlib-devel)
installPackages+=(libffi-devel)
installPackages+=(libsqlite3x-devel)
# Build.pl
installPackages+=(perl-Data-Dumper)
sudo yum -y install "${installPackages[@]}"

View File

@@ -59,10 +59,12 @@ echo 'export DISPLAY=":0"' >> ~/.bashrc
sudo systemctl stop packagekit
sudo systemctl disable packagekit
sudo systemctl mask packagekit
while sudo fuser /usr/lib/packagekitd >/dev/null 2>&1 ; do
echo "Waiting for PackageKit to finish..."
sleep 5
done
sudo zypper -nq remove gnome-software
# shellcheck disable=SC2031
if [ "$http_proxy" != "" ]; then

View File

@@ -35,10 +35,9 @@
set -ex
sudo zypper -nq install elfutils binutils
sudo zypper -nq install git gcc gcc-c++
sudo zypper -nq install git gcc gcc-c++ make patch wget tar
sudo zypper -nq install bison flex gperf \
zlib-devel \

View File

@@ -39,13 +39,57 @@
set -ex
sudo zypper -nq install python-devel
PROVISIONING_DIR="$(dirname "$0")/../"
. "$PROVISIONING_DIR"/common/unix/common.sourced.sh
. "$PROVISIONING_DIR"/common/unix/DownloadURL.sh
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Python3/build_python3.sh
bash build_python3.sh
export
python3 --version
# Python 2
$CMD_PKG_INSTALL python-devel
# Selected installation instructions coming from:
# https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Python3/build_python3.sh
export PACKAGE_NAME="python"
export PACKAGE_VERSION="3.7.6"
export PACKAGE_SHA=55a2cce72049f0794e9a11a84862e9039af9183603b78bc60d89539f82cf533f
(
$CMD_PKG_INSTALL ncurses zlib-devel libffi-devel libopenssl-devel
echo 'Configuration and Installation started'
#Download Source code
DownloadURL \
http://ci-files01-hki.intra.qt.io/input/python/Python-${PACKAGE_VERSION}.tar.xz \
https://www.python.org/ftp/${PACKAGE_NAME}/${PACKAGE_VERSION}/Python-${PACKAGE_VERSION}.tar.xz \
$PACKAGE_SHA
tar -xf "Python-${PACKAGE_VERSION}.tar.xz"
#Configure and Build
cd "Python-${PACKAGE_VERSION}"
./configure --prefix=/usr/local --exec-prefix=/usr/local
make
sudo make install
echo 'Installed python successfully'
#Cleanup
cd -
rm "Python-${PACKAGE_VERSION}.tar.xz"
#Verify python installation
export PATH="/usr/local/bin:${PATH}"
if command -V "$PACKAGE_NAME"${PACKAGE_VERSION:0:1} >/dev/null
then
printf -- "%s installation completed. Please check the Usage to start the service.\n" "$PACKAGE_NAME"
else
printf -- "Error while installing %s, exiting with 127 \n" "$PACKAGE_NAME"
exit 127
fi
)
python3 --version | fgrep "$PACKAGE_VERSION"
pip3 install --user wheel
pip3 install --user virtualenv

View File

@@ -23,6 +23,9 @@ echo 'export DISPLAY=":0"' >> ~/.bashrc
echo "Disabling file indexing."
sudo balooctl disable
sudo systemctl stop packagekit
sudo systemctl disable packagekit
sudo systemctl mask packagekit
while sudo fuser /usr/lib/packagekitd >/dev/null 2>&1 ; do
echo "Waiting for PackageKit to finish..."
sleep 0.5

View File

@@ -5,11 +5,10 @@
set -ex
sudo pkcon -y refresh
sudo pkcon -y install python-devel python-virtualenv
sudo zypper -nq install python-devel python-virtualenv
# install python3
sudo pkcon -y install libpython3_4m1_0 python3-base python3 python3-pip python3-devel python3-virtualenv python3-wheel
sudo zypper -nq install python3-base python3 python3-pip python3-devel python3-virtualenv python3-wheel
# Install all needed packages in a special wheel cache directory
pip3 wheel --wheel-dir "$HOME/python3-wheels" -r "${BASH_SOURCE%/*}/../common/shared/requirements.txt"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -ex
set -e
BASEDIR=$(dirname "$0")
"$BASEDIR/../common/macos/homebrew.sh"

View File

@@ -37,7 +37,7 @@
# It also runs update for SDK API, latest SDK tools, latest platform-tools and build-tools version
set -ex
set -e
# shellcheck source=../common/unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
@@ -68,8 +68,16 @@ sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder"
echo "Changing ownership of Android files."
sudo chown -R qt:wheel "$targetFolder"
# Stop the sdkmanager from printing thousands of lines of #hashmarks.
# Run the following command under `eval` or `sh -c` so that the shell properly splits it.
sdkmanager_no_progress_bar_cmd="tr '\r' '\n' | grep -v '^\[[ =]*\]'"
# But don't let the pipeline hide sdkmanager failures.
set -o pipefail
echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
(echo "y"; echo "y") |"$sdkTargetFolder/tools/bin/sdkmanager" "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion"
(echo "y"; echo "y") | "$sdkTargetFolder/tools/bin/sdkmanager" \
"platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
| eval $sdkmanager_no_progress_bar_cmd
echo "Checking the contents of Android SDK..."
ls -l "$sdkTargetFolder"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -ex
set -e
BASEDIR=$(dirname "$0")
"$BASEDIR/../common/macos/homebrew.sh"

View File

@@ -68,8 +68,13 @@ sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder"
echo "Changing ownership of Android files."
sudo chown -R qt:wheel "$targetFolder"
# Run the following command under `eval` or `sh -c` so that the shell properly splits it
sdkmanager_no_progress_bar_cmd="tr '\r' '\n' | grep -v '^\[[ =]*\]'"
echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
(echo "y"; echo "y") |"$sdkTargetFolder/tools/bin/sdkmanager" "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion"
(echo "y"; echo "y") | "$sdkTargetFolder/tools/bin/sdkmanager" \
"platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
| eval $sdkmanager_no_progress_bar_cmd
echo "Checking the contents of Android SDK..."
ls -l "$sdkTargetFolder"

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\version.ps1"

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\version.ps1"

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\version.ps1"

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\version.ps1"

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\version.ps1"

View File

@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\version.ps1"