diff options
author | Liang Qi <liang.qi@qt.io> | 2018-07-02 13:12:35 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-07-02 13:12:35 +0200 |
commit | c6d9e433dfa899890b4279c773779659f8cb2626 (patch) | |
tree | 1335a5742b5c6eed239f26e616fdad30e1af6271 /coin/provisioning/common | |
parent | 7784f89036afca51292ab0cc3aadff59b3004f5f (diff) | |
parent | 3e044c71b92617eb8eb794edd30d94f57d9524ac (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
coin/provisioning/qtci-linux-RHEL-6.6-x86_64/30-install_icu.sh
Change-Id: I00d0ccd138eb8d89e30e7e57632c6fc8f83e0001
Diffstat (limited to 'coin/provisioning/common')
-rw-r--r-- | coin/provisioning/common/shared/sw_versions.txt | 1 | ||||
-rwxr-xr-x | coin/provisioning/common/unix/libclang.sh | 41 | ||||
-rw-r--r-- | coin/provisioning/common/unix/mqtt_broker.sh | 4 | ||||
-rwxr-xr-x | coin/provisioning/common/unix/squishInstall.sh | 21 | ||||
-rw-r--r-- | coin/provisioning/common/windows/helpers.ps1 | 1 | ||||
-rw-r--r-- | coin/provisioning/common/windows/libclang.ps1 | 69 | ||||
-rw-r--r-- | coin/provisioning/common/windows/mqtt_broker.ps1 | 10 | ||||
-rw-r--r-- | coin/provisioning/common/windows/python.ps1 | 28 | ||||
-rw-r--r-- | coin/provisioning/common/windows/python3.ps1 | 25 |
9 files changed, 111 insertions, 89 deletions
diff --git a/coin/provisioning/common/shared/sw_versions.txt b/coin/provisioning/common/shared/sw_versions.txt deleted file mode 100644 index fb2fecb9..00000000 --- a/coin/provisioning/common/shared/sw_versions.txt +++ /dev/null @@ -1 +0,0 @@ -libclang_version="6.0" diff --git a/coin/provisioning/common/unix/libclang.sh b/coin/provisioning/common/unix/libclang.sh index f6ff4507..645cf6ec 100755 --- a/coin/provisioning/common/unix/libclang.sh +++ b/coin/provisioning/common/unix/libclang.sh @@ -42,30 +42,37 @@ set -e # shellcheck source=./check_and_set_proxy.sh source "${BASH_SOURCE%/*}/check_and_set_proxy.sh" +# shellcheck source=./SetEnvVar.sh source "${BASH_SOURCE%/*}/SetEnvVar.sh" +# shellcheck source=./DownloadURL.sh +source "${BASH_SOURCE%/*}/DownloadURL.sh" -BASEDIR=$(dirname "$0") -# shellcheck source=../shared/sw_versions.txt -. "$BASEDIR/../shared/sw_versions.txt" -url=$1 -sha1=$2 -version=$3 -if [ $# -eq 0 ] - then - # The default values are for macOS package - echo "Using macOS defaults" +libclang_version=6.0 +libclang_version_Rhel6=4.0 + +if uname -a |grep -q Darwin; then + version=$libclang_version + url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version//\./}-mac.7z" + url_cached="http://ci-files01-hki.intra.qt.io/input/libclang/qt/libclang-release_${version//\./}-mac.7z" + sha1="0af8ab8c1174faf4b721d079587190fc32ea8364" +elif uname -a |grep -q "el6"; then + version=$libclang_version_Rhel6 + url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version//\./}-linux-Rhel6.6-gcc4.9-x86_64.7z" + url_cached="http://ci-files01-hki.intra.qt.io/input/libclang/qt/libclang-release_${version//\./}-linux-Rhel6.6-gcc4.9-x86_64.7z" + sha1="c7466109628418a6aa3db8b3f5825f847f1c4952" +else version=$libclang_version - url="https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_${version//\./}-mac.7z" - sha1="10e48167b61726b20517172f8aff80fa1d9a379b" + url="https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_${version//\./}-linux-Rhel7.2-gcc5.3-x86_64.7z" + url_cached="http://ci-files01-hki.intra.qt.io/input/libclang/qt/libclang-release_${version//\./}-linux-Rhel7.2-gcc5.3-x86_64.7z" + sha1="ef59b699f4fcce2e45108b3ff04cc7471c1c4abe" fi -zip="libclang.7z" +zip="/tmp/libclang.7z" destination="/usr/local/libclang-$version" -curl --fail -L --retry 5 --retry-delay 5 -o "$zip" "$url" -echo "$sha1 $zip" | sha1sum --check -7z x "$zip" -o/tmp/ -rm -rf "$zip" +DownloadURL $url_cached $url $sha1 $zip +7z x $zip -o/tmp/ +rm -rf $zip sudo mv /tmp/libclang "$destination" diff --git a/coin/provisioning/common/unix/mqtt_broker.sh b/coin/provisioning/common/unix/mqtt_broker.sh index c64c0fec..0f3e32aa 100644 --- a/coin/provisioning/common/unix/mqtt_broker.sh +++ b/coin/provisioning/common/unix/mqtt_broker.sh @@ -39,10 +39,10 @@ source "${BASH_SOURCE%/*}/InstallFromCompressedFileFromURL.sh" source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" -CommitSHA="c342c09dadc7a664d0a8befad1ca031f5a0b0bc0" +CommitSHA="ef4dbc182ddd06247e4b2618d5ad0a57df12ab25" PrimaryUrl="http://ci-files01-hki.ci.local/input/mqtt_broker/paho.mqtt.testing-$CommitSHA.zip" AltUrl="https://github.com/eclipse/paho.mqtt.testing/archive/$CommitSHA.zip" -SHA1="532fe145096cdd8d679f425cbfd883289150c968" +SHA1="ba2b7d05afe4e13446d40cd4e753dda7f325a587" targetFolder="/opt/paho_broker" appPrefix="paho.mqtt.testing-$CommitSHA" diff --git a/coin/provisioning/common/unix/squishInstall.sh b/coin/provisioning/common/unix/squishInstall.sh index ab0102ec..c946dfdc 100755 --- a/coin/provisioning/common/unix/squishInstall.sh +++ b/coin/provisioning/common/unix/squishInstall.sh @@ -90,6 +90,11 @@ function MountAndInstall { squishLicenseDir="/root" fi + function UnMount { + echo "Unmounting $mountFolder" + sudo diskutil unmount force "$mountFolder" || sudo umount -f "$mountFolder" + } + targetFileMount="$mountFolder"/"$targetFile" echo "Mounting $url to $mountFolder" @@ -111,20 +116,20 @@ function MountAndInstall { target="$targetDirectory" fi sudo tar -xzf "$targetFileMount" --directory "$target" - echo "Unmounting $mountFolder" - sudo umount "$mountFolder" + UnMount elif [[ $targetFile == *.dmg ]]; then echo "'dmg-file', no need to uncompress" - sudo cp "$targetFileMount" /tmp - sudo umount "$mountFolder" + sudo cp $targetFileMount /tmp + UnMount sudo hdiutil attach "/tmp/$targetFile" sudo /Volumes/froglogic\ Squish/Install\ Squish.app/Contents/MacOS/Squish unattended=1 targetdir="$targetDirectory/package" qtpath="$targetDirectory" - sudo hdiutil unmount /Volumes/froglogic\ Squish/ + mountFolder="/Volumes/froglogic Squish" + UnMount elif [[ $targetFile == *.run ]]; then echo "'run-file', no need to uncompress" - sudo cp "$targetFileMount" "$targetDirectory" - sudo umount "$mountFolder" - sudo "$targetDirectory/$targetFile" unattended=1 targetdir="$targetDirectory/package" qtpath="$targetDirectory" > /dev/null 2>&1 + sudo cp $targetFileMount $targetDirectory + UnMount + sudo $targetDirectory/$targetFile unattended=1 targetdir="$targetDirectory/package" qtpath="$targetDirectory" > /dev/null 2>&1 sudo rm -fr "$targetDirectory/$targetFile" if uname -a |grep -q "Ubuntu"; then sudo mkdir /usr/lib/tcl8.6 diff --git a/coin/provisioning/common/windows/helpers.ps1 b/coin/provisioning/common/windows/helpers.ps1 index 28ccaeaf..794f1b5d 100644 --- a/coin/provisioning/common/windows/helpers.ps1 +++ b/coin/provisioning/common/windows/helpers.ps1 @@ -87,6 +87,7 @@ function Download [string] $Destination = $(BadParam("a download target location")) ) $ProgressPreference = 'SilentlyContinue' + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 try { Write-Host "Downloading from cached location ($CachedUrl) to $Destination" if ($CachedUrl.StartsWith("http")) { diff --git a/coin/provisioning/common/windows/libclang.ps1 b/coin/provisioning/common/windows/libclang.ps1 index b0705105..dd21f424 100644 --- a/coin/provisioning/common/windows/libclang.ps1 +++ b/coin/provisioning/common/windows/libclang.ps1 @@ -5,79 +5,66 @@ param( ) . "$PSScriptRoot\helpers.ps1" +$libclang_version="6.0" + # 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. # Starting from Qt 5.11 QDoc requires Clang to parse C++ -Get-Content "$PSScriptRoot\..\shared\sw_versions.txt" | Foreach-Object { - $var = $_.Split('=') - New-Variable -Name $var[0] -Value $var[1] -Force - $libclang_version = $libclang_version -replace '["."]' -} - -$zip = Get-DownloadLocation "libclang.7z" $baseDestination = "C:\Utils\libclang-" + $libclang_version + "-" + $toolchain -function setURL() { - $script:url = "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_$libclang_version-windows-$toolchain`_$archVer.7z" +function install() { + + param( + [string]$sha1=$1, + [string]$destination=$2 + ) + + $zip = "c:\users\qt\downloads\libclang.7z" + + $libclang_version = $libclang_version -replace '["."]' + $script:OfficialUrl = "https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_$libclang_version-windows-$toolchain`_$archVer.7z" + $script:CachedUrl = "http://ci-files01-hki.intra.qt.io/input/libclang/qt/libclang-release_$libclang_version-windows-$toolchain`_$archVer.7z" + + Download $OfficialUrl $CachedUrl $zip + Verify-Checksum $zip $sha1 + Extract-7Zip $zip C:\Utils\ + Rename-Item C:\Utils\libclang $destination + Remove-Item -Force -Path $zip } $toolchainSuffix = "" if ( $toolchain -eq "vs2015" ) { if ( $archVer -eq 64 ) { - $sha1 = "37afa18d243a50c05bee5c6e16b409ed526ec17a" + $sha1 = "a399af949271e6d3bfc578ea2c17ff1d6c6318b9" $destination = $baseDestination + "-64" - setURL - Download $url $url $zip - Verify-Checksum $zip $sha1 - - Extract-7Zip $zip C:\Utils\ - Rename-Item C:\Utils\libclang $destination - Remove-Item -Force -Path $zip + install $sha1 $destination } $archVer=32 - $sha1 = "812b6089c6da99ced9ebebbd42923bd96590519d" + $sha1 = "aa3f68f1cfa87780a4631a98ce883d3d9cb94330" $destination = $baseDestination + "-32" - setURL - Download $url $url $zip - Verify-Checksum $zip $sha1 - - Extract-7Zip $zip C:\Utils\ - Rename-Item C:\Utils\libclang $destination - Remove-Item -Force -Path $zip + install $sha1 $destination $toolchainSuffix = "msvc" } if ( $toolchain -eq "mingw" ) { if ( $archVer -eq 64 ) { - $sha1 = "1233e6c008b90d89483df0291a597a0bac426d29" + $sha1 = "b382502f82d1cfa7d3cc3016d909d37edc19c22c" $destination = $baseDestination + "-64" - setURL - Download $url $url $zip - Verify-Checksum $zip $sha1 - - Extract-7Zip $zip C:\Utils\ - Rename-Item C:\Utils\libclang $destination - Remove-Item -Force -Path $zip + install $sha1 $destination } $archVer=32 - $sha1 = "2d6ceab0e1a05e2b19fe615c57b64d36977b4933" + $sha1 = "cbc68e0f93f4cb0ed7084a045b7c07a1980a2a44" $destination = $baseDestination + "-32" - setURL - Download $url $url $zip - Verify-Checksum $zip $sha1 - - Extract-7Zip $zip C:\Utils\ - Rename-Item C:\Utils\libclang $destination - Remove-Item -Force -Path $zip + install $sha1 $destination $toolchainSuffix = "mingw" } diff --git a/coin/provisioning/common/windows/mqtt_broker.ps1 b/coin/provisioning/common/windows/mqtt_broker.ps1 index a80e23dd..7cb8dd7c 100644 --- a/coin/provisioning/common/windows/mqtt_broker.ps1 +++ b/coin/provisioning/common/windows/mqtt_broker.ps1 @@ -35,9 +35,11 @@ Write-Host "MQTT: Downloading Paho test broker..." $zip = Get-DownloadLocation "pahotest.zip" -$externalUrl = "http://ci-files01-hki.ci.local/input/mqtt_broker/paho.mqtt.testing-c342c09dadc7a664d0a8befad1ca031f5a0b0bc0.zip" -$internalUrl = "https://github.com/eclipse/paho.mqtt.testing/archive/c342c09dadc7a664d0a8befad1ca031f5a0b0bc0.zip" -$sha1 = "532fe145096cdd8d679f425cbfd883289150c968" +$commitSHA = "ef4dbc182ddd06247e4b2618d5ad0a57df12ab25" +$sha1 = "ba2b7d05afe4e13446d40cd4e753dda7f325a587" + +$externalUrl = "http://ci-files01-hki.ci.local/input/mqtt_broker/paho.mqtt.testing-$commitSHA.zip" +$internalUrl = "https://github.com/eclipse/paho.mqtt.testing/archive/$commitSHA.zip" Download $externalUrl $internalUrl $zip Verify-Checksum $zip $sha1 @@ -46,4 +48,4 @@ Write-Host "MQTT: Installing $zip..." Extract-7Zip $zip C:\Utils Remove-Item -Path $zip -Set-EnvironmentVariable "MQTT_TEST_BROKER_LOCATION" "C:\Utils\paho.mqtt.testing-c342c09dadc7a664d0a8befad1ca031f5a0b0bc0\interoperability\startbroker.py" +Set-EnvironmentVariable "MQTT_TEST_BROKER_LOCATION" "C:\Utils\paho.mqtt.testing-$commitSHA\interoperability\startbroker.py" diff --git a/coin/provisioning/common/windows/python.ps1 b/coin/provisioning/common/windows/python.ps1 index 05811c58..e2855c75 100644 --- a/coin/provisioning/common/windows/python.ps1 +++ b/coin/provisioning/common/windows/python.ps1 @@ -30,13 +30,17 @@ ## $QT_END_LICENSE$ ## ############################################################################# -. "$PSScriptRoot\helpers.ps1" # This script installs Python $version. # Python is required for building Qt 5 from source. +param( + [Int32]$archVer=32, + [string]$targetDir="C:\Python27" +) +. "$PSScriptRoot\helpers.ps1" $version = "2.7.13" -if (Is64BitWinHost) { +if ( $archVer -eq 64 ) { $arch = ".amd64" $sha1 = "d9113142bae8829365c595735e1ad1f9f5e2894c" } else { @@ -51,17 +55,25 @@ Write-Host "Fetching from URL..." Download $externalUrl $internalUrl $package Verify-Checksum $package $sha1 Write-Host "Installing $package..." -Run-Executable "msiexec" "/passive /i $package ALLUSERS=1" +Run-Executable "msiexec" "/passive /i $package TARGETDIR=$targetDir ALLUSERS=1" # We need to change allowZip64 from 'False' to 'True' to be able to create ZIP files that use the ZIP64 extensions when the zipfile is larger than 2 GB Write-Host "Changing allowZip64 value to 'True'..." -(Get-Content C:\Python27\lib\zipfile.py) | ForEach-Object { $_ -replace "allowZip64=False", "allowZip64=True" } | Set-Content C:\Python27\lib\zipfile.py +(Get-Content $targetDir\lib\zipfile.py) | ForEach-Object { $_ -replace "allowZip64=False", "allowZip64=True" } | Set-Content $targetDir\lib\zipfile.py Write-Host "Remove $package..." Remove-Item -Path $package -Add-Path "C:\Python27;C:\Python27\Scripts" +# When installing 32 bit python to 64 bit host, we want to keep only default python in path +# For cross-compilation we export some helper env variable +if (($archVer -eq 32) -And (Is64BitWinHost)) { + Set-EnvironmentVariable "PYTHON2_32_PATH" "$targetDir" + Set-EnvironmentVariable "PIP2_32_PATH" "$targetDir\Scripts" +} else { + Add-Path "$targetDir;$targetDir\Scripts" +} + -Run-Executable "C:\Python27\python.exe" "-m ensurepip" +Run-Executable "$targetDir\python.exe" "-m ensurepip" # Install python virtual env if (IsProxyEnabled) { @@ -69,6 +81,6 @@ if (IsProxyEnabled) { Write-Host "Using proxy ($proxy) with pip" $pip_args = "--proxy=$proxy" } -Run-Executable "C:\Python27\Scripts\pip.exe" "$pip_args install virtualenv" +Run-Executable "$targetDir\Scripts\pip.exe" "$pip_args install virtualenv" -Write-Output "Python = $version" >> ~/versions.txt +Write-Output "Python-$archVer = $version" >> ~/versions.txt diff --git a/coin/provisioning/common/windows/python3.ps1 b/coin/provisioning/common/windows/python3.ps1 index d5d5998a..473fe65c 100644 --- a/coin/provisioning/common/windows/python3.ps1 +++ b/coin/provisioning/common/windows/python3.ps1 @@ -32,18 +32,20 @@ ## ############################################################################# -. "$PSScriptRoot\helpers.ps1" - # This script installs Python $version. # Python3 is required for building some qt modules. +param( + [Int32]$archVer=32, + [string]$install_path = "C:\Python36" +) +. "$PSScriptRoot\helpers.ps1" $version = "3.6.1" $package = "C:\Windows\temp\python-$version.exe" -$install_path = "C:\Python36" # check bit version -if (Is64BitWinHost) { - Write-Host "Running in 64 bit system" +if ( $archVer -eq 64 ) { + Write-Host "Installing 64 bit Python" $externalUrl = "https://www.python.org/ftp/python/$version/python-$version-amd64.exe" $internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/python-$version-amd64.exe" $sha1 = "bf54252c4065b20f4a111cc39cf5215fb1edccff" @@ -61,8 +63,15 @@ Run-Executable "$package" "/q TargetDir=$install_path" Write-Host "Remove $package..." Remove-Item -Path $package -Set-EnvironmentVariable "PYTHON3_PATH" "$install_path" -Set-EnvironmentVariable "PIP3_PATH" "$install_path\Scripts" +# For cross-compilation we export some helper env variable +if (($archVer -eq 32) -And (Is64BitWinHost)) { + Set-EnvironmentVariable "PYTHON3_32_PATH" "$install_path" + Set-EnvironmentVariable "PIP3_32_PATH" "$install_path\Scripts" +} else { + Set-EnvironmentVariable "PYTHON3_PATH" "$install_path" + Set-EnvironmentVariable "PIP3_PATH" "$install_path\Scripts" +} + # Install python virtual env if (IsProxyEnabled) { @@ -72,5 +81,5 @@ if (IsProxyEnabled) { } Run-Executable "$install_path\Scripts\pip3.exe" "$pip_args install virtualenv" -Write-Output "Python3 = $version" >> ~/versions.txt +Write-Output "Python3-$archVer = $version" >> ~/versions.txt |