diff --git a/coin/provisioning/common/linux/install-golang.sh b/coin/provisioning/common/linux/install-golang.sh new file mode 100755 index 00000000000..a4f4cd0dcce --- /dev/null +++ b/coin/provisioning/common/linux/install-golang.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +# shellcheck source=../unix/DownloadURL.sh +source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh" +# shellcheck source=../unix/SetEnvVar.sh +source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" + +# This script will install go 1.22.4 +version="1.22.4" + +uname_m="$(uname -m)" +case "$uname_m" in + x86_64|amd64) + sha256="ba79d4526102575196273416239cca418a651e049c2b099f3159db85e7bade7d" + pkgname="go$version.linux-amd64.tar.gz" + dirname="go$version.linux-amd64" + ;; + arm64|aarch64) + sha256="a8e177c354d2e4a1b61020aca3562e27ea3e8f8247eca3170e3fa1e0c2f9e771" + pkgname="go$version.linux-arm64.tar.gz" + dirname="go$version.linux-arm64" + ;; + *) fatal "Unknown architecture in uname: $uname_m" 43 ;; +esac + +internalUrl="http://ci-files01-hki.ci.qt.io/input/go/$pkgname" +externalUrl="https://go.dev/dl/$pkgname" + +targetFile="$HOME/$pkgname" +DownloadURL "$internalUrl" "$externalUrl" "$sha256" "$targetFile" +echo "Installing Go" +tar -xzf "$targetFile" -C "$HOME" +rm "$targetFile" + +installPrefix="/opt/$dirname" +sudo mv "$HOME/go" "$installPrefix" + +SetEnvVar "PATH" "$installPrefix/bin:\$PATH" + +echo "Go = $version" >> ~/versions.txt diff --git a/coin/provisioning/common/linux/install-upx.sh b/coin/provisioning/common/linux/install-upx.sh new file mode 100755 index 00000000000..e2225f09370 --- /dev/null +++ b/coin/provisioning/common/linux/install-upx.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +# shellcheck source=../unix/DownloadURL.sh +source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh" +# shellcheck source=../unix/SetEnvVar.sh +source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" + +# This script will install UPX 4.2.4 +version="4.2.4" + +uname_m="$(uname -m)" +case "$uname_m" in + x86_64|amd64) + sha256="75cab4e57ab72fb4585ee45ff36388d280c7afd72aa03e8d4b9c3cbddb474193" + pkgname="upx-$version-amd64_linux.tar.xz" + dirname="upx-$version-amd64_linux" + ;; + arm64|aarch64) + sha256="6bfeae6714e34a82e63245289888719c41fd6af29f749a44ae3d3d166ba6a1c9" + pkgname="upx-$version-arm64_linux.tar.xz" + dirname="upx-$version-arm64_linux" + ;; + *) fatal "Unknown architecture in uname: $uname_m" 43 ;; +esac + +internalUrl="http://ci-files01-hki.ci.qt.io/input/upx/$pkgname" +externalUrl="https://github.com/upx/upx/releases/download/v$version/$pkgname" + +targetFile="$HOME/$pkgname" +DownloadURL "$internalUrl" "$externalUrl" "$sha256" "$targetFile" +echo "Installing UPX" +tar -xJf "$targetFile" -C "$HOME" +rm "$targetFile" + +installPrefix="/opt/$dirname" +sudo mv "$HOME/$dirname" "$installPrefix" + +SetEnvVar "PATH" "$installPrefix:\$PATH" + +echo "UPX = $version" >> ~/versions.txt diff --git a/coin/provisioning/common/windows/install-golang.ps1 b/coin/provisioning/common/windows/install-golang.ps1 new file mode 100644 index 00000000000..d40bcce2844 --- /dev/null +++ b/coin/provisioning/common/windows/install-golang.ps1 @@ -0,0 +1,24 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +. "$PSScriptRoot\helpers.ps1" + +# Install Git + +$version = "1.22.4" +if (Is64BitWinHost) { + $arch = "amd64" + $sha256 = "3c21105d7b584759b6e266383b777caf6e87142d304a10b539dbc66ab482bb5f" +} else { + $arch = "386" + $sha256 = "5c6446e2ea80bc6a971d2b34446f16e6517e638b0ff8d3ea229228d1931790b0" +} +$goPackage = "C:\Windows\Temp\Go-" + $version + $arch + ".msi" +$url_cache = "\\ci-files01-hki.ci.qt.io\provisioning\windows\Go-" + $version + $arch + ".exe" +$url_official = "https://go.dev/dl/go" + $version + ".windows-" + $arch + ".msi" + +Write-Host "Fetching Go $version..." +Download $url_official $url_cache $goPackage +Verify-Checksum $goPackage $sha256 sha256 +Write-Host "Installing Go $version..." +Run-Executable "msiexec" "/quiet /i $goPackage" +Write-Output "Go = $version" >> ~\versions.txt diff --git a/coin/provisioning/common/windows/install-upx.ps1 b/coin/provisioning/common/windows/install-upx.ps1 new file mode 100644 index 00000000000..e29cc07b488 --- /dev/null +++ b/coin/provisioning/common/windows/install-upx.ps1 @@ -0,0 +1,41 @@ +# 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 + +. "$PSScriptRoot\helpers.ps1" + +$majorminorversion = "4.2" +$version = "4.2.4" + +$cpu_arch = Get-CpuArchitecture +Write-Host "Installing UPX for architecture $cpu_arch" +switch ($cpu_arch) { + x64 { + $arch = "win64" + $sha1 = "204ae110a84d0046b242222f97b19cf3f5594f4b" + } + default { + throw "Unknown architecture $cpu_arch" + } +} + +$filename = "upx-" + $version + "-" + $arch +$filename_zip = $filename + ".zip" + +$zip = Get-DownloadLocation ($filename_zip) +$officialurl = "https://github.com/upx/upx/releases/download/v" + $version + "/" + $filename_zip +$cachedurl = "https://ci-files01-hki.ci.qt.io/input/upx/" + $filename_zip + +Write-Host "Removing old UPX" +Remove "C:\UPX" + +Download $officialurl $cachedurl $zip +Verify-Checksum $zip $sha1 + +Extract-7Zip $zip C: +$defaultinstallfolder = "C:\" + $filename +Rename-Item $defaultinstallfolder C:\UPX + +Add-Path "C:\UPX" + +Write-Output "UPX = $version" >> ~\versions.txt + diff --git a/coin/provisioning/qtci-linux-Debian-11.6-aarch64/41-install-golang.sh b/coin/provisioning/qtci-linux-Debian-11.6-aarch64/41-install-golang.sh new file mode 100755 index 00000000000..6b72bc47515 --- /dev/null +++ b/coin/provisioning/qtci-linux-Debian-11.6-aarch64/41-install-golang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-golang.sh" diff --git a/coin/provisioning/qtci-linux-Debian-11.6-aarch64/41-install-upx.sh b/coin/provisioning/qtci-linux-Debian-11.6-aarch64/41-install-upx.sh new file mode 100755 index 00000000000..0bccc01efac --- /dev/null +++ b/coin/provisioning/qtci-linux-Debian-11.6-aarch64/41-install-upx.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-upx.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-8.6-x86_64/41-install-golang.sh b/coin/provisioning/qtci-linux-RHEL-8.6-x86_64/41-install-golang.sh new file mode 100755 index 00000000000..6b72bc47515 --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-8.6-x86_64/41-install-golang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-golang.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-8.6-x86_64/41-install-upx.sh b/coin/provisioning/qtci-linux-RHEL-8.6-x86_64/41-install-upx.sh new file mode 100755 index 00000000000..0bccc01efac --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-8.6-x86_64/41-install-upx.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-upx.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-8.8-x86_64/41-install-golang.sh b/coin/provisioning/qtci-linux-RHEL-8.8-x86_64/41-install-golang.sh new file mode 100755 index 00000000000..6b72bc47515 --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-8.8-x86_64/41-install-golang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-golang.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-8.8-x86_64/41-install-upx.sh b/coin/provisioning/qtci-linux-RHEL-8.8-x86_64/41-install-upx.sh new file mode 100755 index 00000000000..0bccc01efac --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-8.8-x86_64/41-install-upx.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-upx.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-9.0-x86_64/41-install-golang.sh b/coin/provisioning/qtci-linux-RHEL-9.0-x86_64/41-install-golang.sh new file mode 100755 index 00000000000..6b72bc47515 --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-9.0-x86_64/41-install-golang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-golang.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-9.0-x86_64/41-install-upx.sh b/coin/provisioning/qtci-linux-RHEL-9.0-x86_64/41-install-upx.sh new file mode 100755 index 00000000000..0bccc01efac --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-9.0-x86_64/41-install-upx.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-upx.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-9.2-x86_64/41-install-golang.sh b/coin/provisioning/qtci-linux-RHEL-9.2-x86_64/41-install-golang.sh new file mode 100755 index 00000000000..6b72bc47515 --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-9.2-x86_64/41-install-golang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-golang.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-9.2-x86_64/41-install-upx.sh b/coin/provisioning/qtci-linux-RHEL-9.2-x86_64/41-install-upx.sh new file mode 100755 index 00000000000..0bccc01efac --- /dev/null +++ b/coin/provisioning/qtci-linux-RHEL-9.2-x86_64/41-install-upx.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-upx.sh" diff --git a/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/41-install-golang.sh b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/41-install-golang.sh new file mode 100755 index 00000000000..6b72bc47515 --- /dev/null +++ b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/41-install-golang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-golang.sh" diff --git a/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/41-install-upx.sh b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/41-install-upx.sh new file mode 100755 index 00000000000..0bccc01efac --- /dev/null +++ b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/41-install-upx.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2024 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +source "${BASH_SOURCE%/*}/../common/linux/install-upx.sh" diff --git a/coin/provisioning/qtci-macos-12-x86_64/31-golang.sh b/coin/provisioning/qtci-macos-12-x86_64/31-golang.sh new file mode 100755 index 00000000000..0348d7eb0e1 --- /dev/null +++ b/coin/provisioning/qtci-macos-12-x86_64/31-golang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2023 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +brew install go diff --git a/coin/provisioning/qtci-macos-12-x86_64/31-upx.sh b/coin/provisioning/qtci-macos-12-x86_64/31-upx.sh new file mode 100755 index 00000000000..519900f6dab --- /dev/null +++ b/coin/provisioning/qtci-macos-12-x86_64/31-upx.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +#Copyright (C) 2023 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# The package was disabled in brew +#brew install upx diff --git a/coin/provisioning/qtci-macos-14-arm/31-golang.sh b/coin/provisioning/qtci-macos-14-arm/31-golang.sh new file mode 100755 index 00000000000..0348d7eb0e1 --- /dev/null +++ b/coin/provisioning/qtci-macos-14-arm/31-golang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2023 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +brew install go diff --git a/coin/provisioning/qtci-macos-14-arm/31-upx.sh b/coin/provisioning/qtci-macos-14-arm/31-upx.sh new file mode 100755 index 00000000000..519900f6dab --- /dev/null +++ b/coin/provisioning/qtci-macos-14-arm/31-upx.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +#Copyright (C) 2023 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# The package was disabled in brew +#brew install upx diff --git a/coin/provisioning/qtci-macos-14-x86_64/31-golang.sh b/coin/provisioning/qtci-macos-14-x86_64/31-golang.sh new file mode 100755 index 00000000000..0348d7eb0e1 --- /dev/null +++ b/coin/provisioning/qtci-macos-14-x86_64/31-golang.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +#Copyright (C) 2023 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +brew install go diff --git a/coin/provisioning/qtci-macos-14-x86_64/31-upx.sh b/coin/provisioning/qtci-macos-14-x86_64/31-upx.sh new file mode 100755 index 00000000000..f3637b0e9ff --- /dev/null +++ b/coin/provisioning/qtci-macos-14-x86_64/31-upx.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +#Copyright (C) 2023 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# The package was disabled in brew +# brew install upx diff --git a/coin/provisioning/qtci-windows-10_22H2-x86_64/12-install-golang.ps1 b/coin/provisioning/qtci-windows-10_22H2-x86_64/12-install-golang.ps1 new file mode 100644 index 00000000000..c68f16a154e --- /dev/null +++ b/coin/provisioning/qtci-windows-10_22H2-x86_64/12-install-golang.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\install-golang.ps1" diff --git a/coin/provisioning/qtci-windows-10_22H2-x86_64/12-install-upx.ps1 b/coin/provisioning/qtci-windows-10_22H2-x86_64/12-install-upx.ps1 new file mode 100644 index 00000000000..768a15d7714 --- /dev/null +++ b/coin/provisioning/qtci-windows-10_22H2-x86_64/12-install-upx.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\install-upx.ps1" diff --git a/coin/provisioning/qtci-windows-11_23H2-x86_64/12-install-golang.ps1 b/coin/provisioning/qtci-windows-11_23H2-x86_64/12-install-golang.ps1 new file mode 100644 index 00000000000..c68f16a154e --- /dev/null +++ b/coin/provisioning/qtci-windows-11_23H2-x86_64/12-install-golang.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\install-golang.ps1" diff --git a/coin/provisioning/qtci-windows-11_23H2-x86_64/12-install-upx.ps1 b/coin/provisioning/qtci-windows-11_23H2-x86_64/12-install-upx.ps1 new file mode 100644 index 00000000000..768a15d7714 --- /dev/null +++ b/coin/provisioning/qtci-windows-11_23H2-x86_64/12-install-upx.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\install-upx.ps1"