summaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-11-27 09:23:05 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-11-28 19:44:30 +0100
commit63c515a6cbb002e96eea0134a77c380e5ef7b7c9 (patch)
tree2322b3189c4ae04e1ac0c7fc21354e1fd59a8749 /coin/provisioning/common
parent3ba8bdeda0fd23bec9de10cb4cf962b50a535af6 (diff)
parent0d6ae070f44236fdceda6241e9564dba93c91d0b (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Also update the Windows config to use MSVC2019 instead of 2017 to circumvent the issue that vcpkg is building libraries with the latest compiler it finds (MSVC 2019), but Qt is building with 2017. Conflicts: coin/platform_configs/default.yaml coin/platform_configs/qt5.yaml coin/platform_configs/qtsaferenderer.yaml Change-Id: I88deb114e171046b50fc617ab6bc18b707d61486
Diffstat (limited to 'coin/provisioning/common')
-rwxr-xr-xcoin/provisioning/common/linux/docker.sh41
-rwxr-xr-xcoin/provisioning/common/unix/DownloadURL.sh9
-rwxr-xr-xcoin/provisioning/common/unix/python_modules.sh (renamed from coin/provisioning/common/windows/50-openssl_for_android_linux.sh)11
-rwxr-xr-xcoin/provisioning/common/windows/09-install-openssl.sh6
-rw-r--r--coin/provisioning/common/windows/disable-schedule-tasks.ps188
-rw-r--r--coin/provisioning/common/windows/disable-update-orchestrator.ps116
-rw-r--r--coin/provisioning/common/windows/disable-windows-file-protector.ps14
-rw-r--r--coin/provisioning/common/windows/disable-windows-update-medic.ps125
-rw-r--r--coin/provisioning/common/windows/install-jdk.ps13
-rw-r--r--coin/provisioning/common/windows/install_telegraf.ps12
10 files changed, 45 insertions, 160 deletions
diff --git a/coin/provisioning/common/linux/docker.sh b/coin/provisioning/common/linux/docker.sh
index 9be84e38..9ce8b73b 100755
--- a/coin/provisioning/common/linux/docker.sh
+++ b/coin/provisioning/common/linux/docker.sh
@@ -33,21 +33,40 @@
##
#############################################################################
-set -ex
-
-# Download and install the docker engine.
-sudo apt-get install curl -y
-curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
-sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
-sudo apt-get update
-sudo apt-get install docker-ce -y
+set -e
+
+
+. $(dirname "$0")/../../common/unix/DownloadURL.sh
+
+
+localRepo=http://ci-files01-hki.intra.qt.io/input/docker
+upstreamRepo=https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64
+
+echo '
+ f4c941807310e3fa470dddfb068d599174a3daec containerd.io_1.2.10-3_amd64.deb
+ ee640d9258fd4d3f4c7017ab2a71da63cbbead55 docker-ce_19.03.4~3-0~ubuntu-bionic_amd64.deb
+ 09402bf5dac40f0c50f1071b17f38f6584a42ad1 docker-ce-cli_19.03.4~3-0~ubuntu-bionic_amd64.deb
+' \
+ | xargs -n2 | while read sha f
+do
+ DownloadURL $localRepo/$f $upstreamRepo/$f $sha
+done
+
+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 docker --version
-# Download and install the docker-compose extension.
-sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
-sudo chmod +x /usr/local/bin/docker-compose
+# Download and install the docker-compose extension from https://github.com/docker/compose/releases
+f=docker-compose-$(uname -s)-$(uname -m)
+DownloadURL \
+ $localRepo/$f \
+ https://github.com/docker/compose/releases/download/1.24.1/$f \
+ cfb3439956216b1248308141f7193776fcf4b9c9b49cbbe2fb07885678e2bb8a
+sudo install -m 755 ./docker-compose* /usr/local/bin/docker-compose
sudo docker-compose --version
+rm ./docker-compose*
# Install Avahi to discover Docker containers in the test network
sudo apt-get install avahi-daemon -y
diff --git a/coin/provisioning/common/unix/DownloadURL.sh b/coin/provisioning/common/unix/DownloadURL.sh
index ac1fd971..5bafc33d 100755
--- a/coin/provisioning/common/unix/DownloadURL.sh
+++ b/coin/provisioning/common/unix/DownloadURL.sh
@@ -89,7 +89,14 @@ DownloadURL () {
url=$1
url2=$2
expectedHash=$3
- targetFile=$4
+ # Optional argument $4: destination filename
+ if [ x"$4" = x ]
+ then
+ # defaults to the last component of $url
+ targetFile=$(echo $url | sed 's|^.*/||')
+ else
+ targetFile=$4
+ fi
if VerifyHash "$targetFile" "$expectedHash"
then
diff --git a/coin/provisioning/common/windows/50-openssl_for_android_linux.sh b/coin/provisioning/common/unix/python_modules.sh
index 81ea3b17..dbf26a85 100755
--- a/coin/provisioning/common/windows/50-openssl_for_android_linux.sh
+++ b/coin/provisioning/common/unix/python_modules.sh
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env bash
#############################################################################
##
-## Copyright (C) 2017 The Qt Company Ltd.
+## Copyright (C) 2019 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the provisioning scripts of the Qt Toolkit.
@@ -33,7 +33,6 @@
##
#############################################################################
-set -ex
-
-# shellcheck source=../common/linux/openssl_for_android_linux.sh
-source "${BASH_SOURCE%/*}/../common/linux/openssl_for_android_linux.sh"
+# needed by packaging scripts
+sudo pip3 install bs4
+sudo pip3 install sh
diff --git a/coin/provisioning/common/windows/09-install-openssl.sh b/coin/provisioning/common/windows/09-install-openssl.sh
deleted file mode 100755
index 4f1d3768..00000000
--- a/coin/provisioning/common/windows/09-install-openssl.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-set -ex
-
-# shellcheck source=../common/unix/install-openssl.sh
-source "${BASH_SOURCE%/*}/../common/unix/install-openssl.sh" "linux"
diff --git a/coin/provisioning/common/windows/disable-schedule-tasks.ps1 b/coin/provisioning/common/windows/disable-schedule-tasks.ps1
deleted file mode 100644
index 351f10c6..00000000
--- a/coin/provisioning/common/windows/disable-schedule-tasks.ps1
+++ /dev/null
@@ -1,88 +0,0 @@
-. "$PSScriptRoot\helpers.ps1"
-
-# This script will remove unneeded Tasks from Task Scheduler
-
-# Application Experience 'Microsoft Compatibility Appraiser' - "Collects program telemetry information if opted-in to the Microsoft Customer Experience Improvement Program."
-DisableSchedulerTask "Application Experience\Microsoft Compatibility Appraiser"
-
-# Application Experience 'ProgramDataUpdater' - "Collects program telemetry information if opted-in to the Microsoft Customer Experience Improvement Program"
-DisableSchedulerTask "Application Experience\ProgramDataUpdater"
-
-# Autochk 'Proxy' - "This task collects and uploads autochk SQM data if opted-in to the Microsoft Customer Experience Improvement Program."
-DisableSchedulerTask "Autochk\Proxy"
-
-# Chkdsk 'ProactiveScan' - "NTFS Volume Health Scan"
-DisableSchedulerTask "Chkdsk\ProactiveScan"
-
-# Chkdsk 'SyspartRepair'
-DeleteSchedulerTask "Chkdsk\SyspartRepair"
-
-# Customer Experience Improvement Program 'Consolidator' - "If the user has consented to participate in the Windows Customer Experience Improvement Program, this job collects and sends usage data to Microsoft."
-DisableSchedulerTask "Customer Experience Improvement Program\Consolidator"
-
-# Customer Experience Improvement Program 'sbCeip' - "The USB CEIP (Customer Experience Improvement Program) task collects Universal Serial Bus related statistics and information about your machine and sends it to the Windows Device Connectivity engineering group at Microsoft. The information received is used to help improve the reliability, stability, and overall functionality of USB in Windows. If the user has not consented to participate in Windows CEIP, this task does not do anything."
-DisableSchedulerTask "Customer Experience Improvement Program\UsbCeip"
-
-# Device Information 'Device'
-DisableSchedulerTask "Device Information\Device"
-
-# Diagnosis 'Scheduled' - "The Windows Scheduled Maintenance Task performs periodic maintenance of the computer system by fixing problems automatically or reporting them through Security and Maintenance."
-DisableSchedulerTask "Diagnosis\Scheduled"
-
-# DiskDiagnostic 'Microsoft-Windows-DiskDiagnosticDataCollector' - "The Windows Disk Diagnostic reports general disk and system information to Microsoft for users participating in the Customer Experience Program."
-DisableSchedulerTask "DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector"
-
-# ExploitGuard 'ExploitGuard MDM policy Refresh' - "Task for applying changes to the machine's Exploit Protection settings."
-DisableSchedulerTask "ExploitGuard\ExploitGuard MDM policy Refresh"
-
-# Feedback/Siuf 'DmClient'
-DisableSchedulerTask "Feedback\Siuf\DmClient"
-
-# Feedback/Siuf 'DmClient'OnScenarioDownload'
-DisableSchedulerTask "Feedback\Siuf\DmClientOnScenarioDownload"
-
-# File Classification Infrastructure 'Property Definition Sync'
-DisableSchedulerTask "File Classification Infrastructure\Property Definition Sync"
-
-# InstallService 'ScanForUpdates'
-DisableSchedulerTask "InstallService\ScanForUpdates"
-
-# InstallService 'ScanForUpdatesAsUser'
-DisableSchedulerTask "InstallService\ScanForUpdatesAsUser"
-
-# LanguageComponentsInstaller 'Installation' - "Install language components that match the user's language list."
-DisableSchedulerTask "LanguageComponentsInstaller\Installation"
-
-# LanguageComponentsInstaller 'ReconcileLanguageResources' - "Install language components that match the user's language list."
-DisableSchedulerTask "LanguageComponentsInstaller\ReconcileLanguageResources"
-
-# PI 'Secure-Boot-Update' - "This task updates the Secure Boot variables."
-DisableSchedulerTask "PI\Secure-Boot-Update"
-
-# PI 'Sqm-Tasks' - "This task gathers information about the Trusted Platform Module (TPM), Secure Boot, and Measured Boot."
-DisableSchedulerTask "PI\Sqm-Tasks"
-
-# Power Efficiency Diagnotics 'AnalyzeSystem' - "This task analyzes the system looking for conditions that may cause high energy use."
-DisableSchedulerTask "PushToInstall\Registration"
-
-# Servicing 'StartComponentCleanup'
-DisableSchedulerTask "Servicing\StartComponentCleanup"
-
-# SettingSync 'BackgroundUploadTask'
-DeleteSchedulerTask "SettingSync\BackgroundUploadTask"
-
-# SoftwareProtectionPlatform 'SvcRestartTask' - "This task restarts the Software Protection Platform service at the specified time"
-DeleteSchedulerTask "SoftwareProtectionPlatform\SvcRestartTask"
-
-# SoftwareProtectionPlatform 'SvcRestartTaskLogon' - "This task restarts the Software Protection Platform service at the specified time"
-DisableSchedulerTask "SoftwareProtectionPlatform\SvcRestartTaskLogon"
-
-# SoftwareProtectionPlatform 'SvcRestartTaskNetwork' - "This task restarts the Software Protection Platform service when a new network is detected"
-DisableSchedulerTask "SoftwareProtectionPlatform\SvcRestartTaskNetwork"
-
-# UNP 'RunUpdateNotificationMgr'
-DeleteSchedulerTask "UNP\RunUpdateNotificationMgr"
-
-
-
-
diff --git a/coin/provisioning/common/windows/disable-update-orchestrator.ps1 b/coin/provisioning/common/windows/disable-update-orchestrator.ps1
deleted file mode 100644
index 5ae8fb0d..00000000
--- a/coin/provisioning/common/windows/disable-update-orchestrator.ps1
+++ /dev/null
@@ -1,16 +0,0 @@
-# Disable UpdateOrchestrator
-
-$name = "UpdateOrchestrator"
-$path = "C:\Windows\System32\Tasks\Microsoft\Windows\$name"
-
-takeown /F $path /A /R
-icacls $path /grant Administrators:F /T
-SCHTASKS /Change /TN "Microsoft\Windows\$name\Reboot" /DISABLE
-del "$path\Schedule Scan"
-del "$path\Schedule Scan Static Task"
-del "$path\Backup Scan"
-del "$path\UpdateModelTask"
-del "$path\USO_UxBroker"
-
-# Disable Update orchestrator service
-reg.exe ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsoSvc" /V Start /T REG_dWORD /D 4 /F
diff --git a/coin/provisioning/common/windows/disable-windows-file-protector.ps1 b/coin/provisioning/common/windows/disable-windows-file-protector.ps1
deleted file mode 100644
index f1d09fb5..00000000
--- a/coin/provisioning/common/windows/disable-windows-file-protector.ps1
+++ /dev/null
@@ -1,4 +0,0 @@
-# Disable Windows File Protection
-# Windows File Protection feature in Microsoft Windows prevents programs from replacing critical Windows system files.
-
-reg.exe ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /V SFCDisable /T REG_dWORD /D 0xffffff9d /F
diff --git a/coin/provisioning/common/windows/disable-windows-update-medic.ps1 b/coin/provisioning/common/windows/disable-windows-update-medic.ps1
deleted file mode 100644
index 6accbd3b..00000000
--- a/coin/provisioning/common/windows/disable-windows-update-medic.ps1
+++ /dev/null
@@ -1,25 +0,0 @@
-# Windows Update Medic Service (WaaSMedicSvc)'PerformRemediation' helps recover update-related services to the supported configuration.
-# WaasMedicSvc keeps re-starting Windows Update, even if it disabled manually.
-# Even Admin user don't have privileged to disable PerformRemediation from Task Scheduler which means that WaaSMedicSvc.dll need's to be removed from the system
-
-$limit = (Get-Date).AddMinutes(20)
-$path = "C:\Windows\System32\WaaSMedicSvc.dll"
-
-DO {
- takeown /F $path
- icacls $path /grant Administrators:f
- Write-host "Deleting $path"
-
- Try {
- del $path
- }
- Catch [System.UnauthorizedAccessException] {
- Write-host "Access to the path '$path' is denied."
- Continue
- }
-
- if ((Get-Date) -gt $limit) {
- exit 1
- }
-
-}while (Test-Path -Path "$path")
diff --git a/coin/provisioning/common/windows/install-jdk.ps1 b/coin/provisioning/common/windows/install-jdk.ps1
index 0c548e63..ce1abdd5 100644
--- a/coin/provisioning/common/windows/install-jdk.ps1
+++ b/coin/provisioning/common/windows/install-jdk.ps1
@@ -68,8 +68,7 @@ try {
Verify-Checksum $javaPackage $sha1
Run-Executable "$javaPackage" "/s SPONSORS=0"
-Write-Host "Cleaning $javaPackage.."
-Remove-Item -Recurse -Force -Path "$javaPackage"
+Remove "$javaPackage"
Write-Host "Remove Java update from startup"
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run" /v SunJavaUpdateSched /f
diff --git a/coin/provisioning/common/windows/install_telegraf.ps1 b/coin/provisioning/common/windows/install_telegraf.ps1
index 258c6c59..fee550b1 100644
--- a/coin/provisioning/common/windows/install_telegraf.ps1
+++ b/coin/provisioning/common/windows/install_telegraf.ps1
@@ -49,7 +49,7 @@ if (Is64BitWinHost) {
$filename = "telegraf-" + $version + "_windows_" + $arch + ".zip"
-$url_cache = "\\ci-files01-hki.intra.qt.io\provisioning\windows\" + $filename
+$url_cache = "http://ci-files01-hki.intra.qt.io/input/telegraf/" + $filename
$url_official = "https://dl.influxdata.com/telegraf/releases/" + $filename
$tempfile = "C:\Windows\Temp\" + $filename