Provisioning: Install jq

jq is used during the provisioning of vcpkg ports to extract the version
string of packages from vcpkg.json file.

Task-number: QTBUG-115715
Change-Id: I73d95b8d8399b25a9aa58855b9d65cac968618fc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Amir Masoud Abdol
2023-11-14 17:57:39 +01:00
parent ef66175ad1
commit d591095e7c
18 changed files with 87 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# 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"
# This script installs jq
$jqProgram = "jq"
$jqVersion = "1.6"
$jqExeSHA1 = "2b7ae7b902aa251b55f2fd73ad5b067d2215ce78"
$jqInstallLocation = "C:\Utils\jq"
$jqExe = "C:\Windows\Temp\jq.exe"
$jqCacheURL = "\\ci-files01-hki.ci.qt.io\provisioning\jq\jq-win64-$jqVersion.exe"
$jqOfficialURL = "https://github.com/jqlang/jq/releases/download/jq-$jqVersion/jq-win64.exe"
Download "$jqOfficialURL" "$jqCacheURL" "$jqExe"
Verify-Checksum $jqExe $jqExeSHA1
New-Item -Path "C:\Utils" -Name "jq" -ItemType "directory" -Force
Move-Item -Path "$jqExe" -Destination "$jqInstallLocation" -Force
if(![System.IO.File]::Exists("$jqInstallLocation\jq.exe")){
Write-Host "Can't find $jqInstallLocation\jq.exe."
exit 1
}
# Add jq to Path. It is necessary to prepend it to $env:Path as well, to make
# it available during provisioning
Prepend-Path "$jqInstallLocation"
$env:Path = "$jqInstallLocation;$env:Path"
Write-Output "jq = $jqVersion" >> ~/versions.txt

View File

@@ -139,6 +139,8 @@ installPackages+=(open-vm-tools)
# cifs-utils, for mounting smb drive
installPackages+=(keyutils)
installPackages+=(cifs-utils)
# used for reading vcpkg packages version, from vcpkg.json
installPackages+=(jq)
sudo yum -y install "${installPackages[@]}"

View File

@@ -146,6 +146,8 @@ installPackages+=(nfs-utils)
# cifs-utils, for mounting smb drive
installPackages+=(keyutils)
installPackages+=(cifs-utils)
# used for reading vcpkg packages version, from vcpkg.json
installPackages+=(jq)
sudo yum -y install "${installPackages[@]}"

View File

@@ -90,6 +90,9 @@ sudo zypper -nq update open-vm-tools
# Tools to build Git
sudo zypper -nq install autoconf libcurl-devel libexpat-devel
# used for reading vcpkg packages version, from vcpkg.json
sudo zypper -nq install jq
# Nodejs - required by QtWebengine
sudo zypper -nq install nodejs18

View File

@@ -223,6 +223,8 @@ installPackages+=(keyutils)
installPackages+=(cifs-utils)
# VxWorks QEMU network setup (tunctl)
installPackages+=(uml-utilities)
# used for reading vcpkg packages version, from vcpkg.json
installPackages+=(jq)
echo "Running update for apt"
waitLoop

View File

@@ -66,6 +66,9 @@ sudo zypper -nq install autoconf libcurl-devel libexpat-devel
# OpenSSL 3
sudo zypper -nq install openssl-3
# used for reading vcpkg packages version, from vcpkg.json
sudo zypper -nq install jq
# Valgrind (Needed for testlib selftests)
sudo zypper -nq install valgrind-devel

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex
brew install jq

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex
brew install jq

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex
brew install jq

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex
brew install jq

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex
brew install jq

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex
brew install jq

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex
brew install jq

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex
brew install jq

View File

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

View File

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

View File

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

View File

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