From f3757051ddb65f933239b20a5bbea61510a6a9e8 Mon Sep 17 00:00:00 2001 From: Heikki Halmet Date: Mon, 18 Nov 2019 12:56:26 +0200 Subject: Workaround broken local apt mirror for Ubuntu 16.04 Local mirror is mirroring a public mirror, and for some reason there is a mismatch of file sizes and file hashes for the dep-11 metadata files. More info: https://askubuntu.com/questions/823329/how-do-i-disable-fetching-of-dep-11-files Task-number: QTQAINFRA-3351 Change-Id: I736b0c9627399839d713ec637cab9403a368601f Reviewed-by: Jukka Jokiniva (cherry picked from commit b0fb9bbc72ab560f9f338693e92f84f79add82be) Reviewed-by: Jani Heikkinen --- coin/provisioning/qtci-linux-Ubuntu-16.04-x86/02-apt.sh | 3 +++ coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh | 3 +++ 2 files changed, 6 insertions(+) (limited to 'coin') diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86/02-apt.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86/02-apt.sh index bfbb6a8e..909e4288 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86/02-apt.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86/02-apt.sh @@ -44,6 +44,9 @@ for service in apt-daily.timer apt-daily-upgrade.timer apt-daily.service apt-dai sudo systemctl disable $service done +# Stop fetching the dep-11 metadata, since our mirrors do not handle them well +sudo mv /etc/apt/apt.conf.d/50appstream{,.disabled} + installPackages+=(git) installPackages+=(p7zip-full) installPackages+=(expect) diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh index f2eb6e60..da6d3f5a 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh @@ -44,6 +44,9 @@ for service in apt-daily.timer apt-daily-upgrade.timer apt-daily.service apt-dai sudo systemctl disable $service done +# Stop fetching the dep-11 metadata, since our mirrors do not handle them well +sudo mv /etc/apt/apt.conf.d/50appstream{,.disabled} + # aptdaemon is used by update notifiers and similar and there is no point in having those (the symptom is aptd holding a lock) for i in $(seq 10); do echo attempting to remove aptdaemon -- cgit v1.2.3 From 47e7ec95abab600c5ec1cdd5ab148ca26350308b Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Wed, 13 Nov 2019 19:55:51 +0100 Subject: Workaround broken local apt mirror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Local mirror is mirroring a public mirror, and for some reason there is a mismatch of file sizes and file hashes for the dep-11 metadata files. More info: https://askubuntu.com/questions/823329/how-do-i-disable-fetching-of-dep-11-files Task-number: QTQAINFRA-3351 Change-Id: Ia48936e7d0b9efb2f86fbe001f22f2bd28a7ea3d Reviewed-by: Tony Sarajärvi (cherry picked from commit ef7481b9cd514d0e3d73c5211193d1d100acfe74) Reviewed-by: Jukka Jokiniva Reviewed-by: Jani Heikkinen --- coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'coin') diff --git a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh index c85c989d..32995dd8 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh @@ -46,6 +46,10 @@ for service in apt-daily.timer apt-daily-upgrade.timer apt-daily.service apt-dai done function set_internal_repo { + + # Stop fetching the dep-11 metadata, since our mirrors do not handle them well + sudo mv /etc/apt/apt.conf.d/50appstream{,.disabled} + sudo tee "/etc/apt/sources.list" > /dev/null <<-EOC deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ bionic main restricted universe multiverse deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ bionic main restricted universe multiverse -- cgit v1.2.3 From 2cd2ec8723c312e6437fc3caf6963c4f0591d29c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Wed, 30 Oct 2019 09:30:46 +0000 Subject: Change local Ubuntu repo mirror in provisioning The old mirror host Qt company used to sync their local mirror from, stopped syncing from Ubuntu in October 2018. The mirror mechanism was changed so that in the future if addresses change, we don't have to touch the provisioning scripts as the address is more general. Also a duplicate entry was removed. Task-number: QTQAINFRA-3279 Change-Id: I65ada052d308eaef0411eb9caad893304eb05ab6 Reviewed-by: Heikki Halmet (cherry picked from commit 5b77e74a5e66be1b0b529ad872d2d80457ef4a84) Reviewed-by: Liang Qi (cherry picked from commit 439fbad1c9b80522435ecaceba96a394aaea5bdb) --- .../qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh | 16 ++++++++-------- .../qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh | 9 ++++----- 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'coin') diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh index da6d3f5a..226b1ebf 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh @@ -165,14 +165,14 @@ installPackages+=(dkms) installPackages+=(python-pypdf2) sudo tee "/etc/apt/sources.list" > /dev/null <<-EOC -deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ xenial main restricted universe multiverse -deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ xenial-updates main restricted universe multiverse -deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ xenial-backports main restricted universe -deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ xenial-security main restricted universe multiverse -deb [arch=i386] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ xenial main restricted universe multiverse -deb [arch=i386] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ xenial-updates main restricted universe multiverse -deb [arch=i386] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ xenial-backports main restricted universe -deb [arch=i386] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ xenial-security main restricted universe multiverse +deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ xenial main restricted universe multiverse +deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ xenial-updates main restricted universe multiverse +deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ xenial-backports main restricted universe +deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ xenial-security main restricted universe multiverse +deb [arch=i386] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ xenial main restricted universe multiverse +deb [arch=i386] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ xenial-updates main restricted universe multiverse +deb [arch=i386] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ xenial-backports main restricted universe +deb [arch=i386] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ xenial-security main restricted universe multiverse EOC echo "Running update for apt" diff --git a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh index 32995dd8..59df5a6b 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/02-apt.sh @@ -51,11 +51,10 @@ function set_internal_repo { sudo mv /etc/apt/apt.conf.d/50appstream{,.disabled} sudo tee "/etc/apt/sources.list" > /dev/null <<-EOC - deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ bionic main restricted universe multiverse - deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ bionic main restricted universe multiverse - deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ bionic-updates main restricted universe multiverse - deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ bionic-backports main restricted universe - deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu.trumpetti.atm.tut.fi/ubuntu/ bionic-security main restricted universe multiverse + deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ bionic main restricted universe multiverse + deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ bionic-updates main restricted universe multiverse + deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ bionic-backports main restricted universe + deb [arch=amd64] http://repo-clones.ci.qt.io/apt-mirror/mirror/ubuntu/ bionic-security main restricted universe multiverse EOC } -- cgit v1.2.3 From fcf4ccab367faea7692ceecd02f802e62d8638a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Thu, 31 Oct 2019 13:32:28 +0000 Subject: Remove more of update notifiers Change-Id: I507f584ef82b5f41f6b1cbc22fdd4ff6eff5e911 Reviewed-by: Heikki Halmet (cherry picked from commit 2eab420e807d5fa4e39d4437879b9a35a2cdc88e) (cherry picked from commit 7285bbee64b24f7aef86fa109334448f1ddbf49b) --- coin/provisioning/common/linux/remove-update_notifier.sh | 2 +- .../qtci-linux-Ubuntu-16.04-x86_64/02-remove-update_notifier.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-remove-update_notifier.sh (limited to 'coin') diff --git a/coin/provisioning/common/linux/remove-update_notifier.sh b/coin/provisioning/common/linux/remove-update_notifier.sh index 152d7fa8..4ee32d61 100755 --- a/coin/provisioning/common/linux/remove-update_notifier.sh +++ b/coin/provisioning/common/linux/remove-update_notifier.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -sudo apt -q -y remove update-notifier update-manager +sudo apt -q -y remove update-notifier update-manager python3-distupgrade python3-update-manager ubuntu-release-upgrader-core update-manager-core diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-remove-update_notifier.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-remove-update_notifier.sh new file mode 100755 index 00000000..55c6ce79 --- /dev/null +++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-remove-update_notifier.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# shellcheck source=../common/linux/remove-update_notifier.sh +source "${BASH_SOURCE%/*}/../common/linux/remove-update_notifier.sh" -- cgit v1.2.3 From 8ed03772f79b47675428ae4b9d24af79ef188bc3 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Wed, 11 Sep 2019 19:24:25 +0200 Subject: Refactor DownloadURL.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-detects and verifies all kinds of hashes, not only SHA1. Hash verification is now an autonomous function. If the file is found at the destination, skip redownloading it if the hash is OK. Runs on POSIX sh, not requiring bash. Retain compatibility with previous version. Change-Id: I9930336030aa776f49dc460fe766f3e831700255 Reviewed-by: Tony Sarajärvi (cherry picked from commit c0fce7a3b37db53289ffd1e44c58f0bfc0601229) Reviewed-by: Heikki Halmet --- coin/provisioning/common/unix/DownloadURL.sh | 84 ++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 23 deletions(-) (limited to 'coin') diff --git a/coin/provisioning/common/unix/DownloadURL.sh b/coin/provisioning/common/unix/DownloadURL.sh index 996c99da..da6d772f 100755 --- a/coin/provisioning/common/unix/DownloadURL.sh +++ b/coin/provisioning/common/unix/DownloadURL.sh @@ -1,8 +1,8 @@ -#!/usr/bin/env bash +#!/bin/sh ############################################################################# ## -## 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,31 +33,69 @@ ## ############################################################################# + # A helper script used for downloading a file from a URL or an alternative -# URL. Also the SHA1 is checked for the file. Target filename should also -# be given. -# -# If called directly from another script, it will exit the parent script -# as well, if not called in its own subshell with parentheses. +# URL. Also the SHA is checked for the file (SHA algorithm is autodetected +# 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' +######################################################################## + + +VerifyHash () { + file=$1 + expectedHash=$2 + + if [ ! -f "$file" ] + then return 2 # file does not exist + fi -set -ex -function DownloadURL { + hashLength="$(echo "$expectedHash" | wc -c | sed 's/ *//g')" + # Use backticks because of bug with bash-3 (default on macOS), + # caused when there are unbalanced parentheses inside $() + # shellcheck disable=SC2006 + hash=`case "$hashLength" in + 41) sha1sum "$file" ;; + 65) sha256sum "$file" ;; + 97) sha384sum "$file" ;; + 129) sha512sum "$file" ;; + *) echo "FATAL! Unknown hash length: $hashLength" 1>&2 && exit 1 ;; + esac | cut -d ' ' -f 1` + + if [ ! "$expectedHash" = "$hash" ] + then + echo "FAIL! wrong file hash: $file $hash" 1>&2 + return 1 + fi + echo "OK verified integrity of: $file" +} + +# Check if file already exists and is good, otherwise download it +DownloadURL () { url=$1 - url_alt=$2 - expectedSha1=$3 + url2=$2 + expectedHash=$3 targetFile=$4 - echo "Downloading from primary URL '$url'" - curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" || { - echo "Failed to download '$url' multiple times" - echo "Downloading from alternative URL '$url_alt'" - curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url_alt" || { echo 'Failed to download even from alternative url'; exit 1; } - } - - echo "Checking SHA1 on PKG '$targetFile'" - echo "$expectedSha1 *$targetFile" > "$targetFile.sha1" - sha1sum --check "$targetFile.sha1" - rm -f "$targetFile.sha1" + if VerifyHash "$targetFile" "$expectedHash" + then + echo "Skipping download, found and validated existing file: $targetFile" + else + echo "Downloading from primary URL: $url" + if ! curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" + then + echo "FAIL! to download, trying alternative URL: $url2" 1>&2 + if ! curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url2" + then + echo 'FAIL! to download even from alternative url' 1>&2 + return 1 + fi + fi + VerifyHash "$targetFile" "$expectedHash" + fi } - -- cgit v1.2.3 From 2217a2db89be1b74849585f6ad14a7212d35e0f2 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Fri, 20 Sep 2019 13:00:12 +0200 Subject: DownloadURL now works with either wget or curl The reason is that Ubuntu does not have curl at the very beginning of provisioning scripts, and also does not have the repositories configured in order to install it. Change-Id: Ia485c1672f894bc800f199b742d238b2945938e5 Reviewed-by: Heikki Halmet (cherry picked from commit 4e3a0f79fbe8bea7915b267e132ba1e0d4b67733) --- coin/provisioning/common/unix/DownloadURL.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'coin') diff --git a/coin/provisioning/common/unix/DownloadURL.sh b/coin/provisioning/common/unix/DownloadURL.sh index da6d772f..0579451f 100755 --- a/coin/provisioning/common/unix/DownloadURL.sh +++ b/coin/provisioning/common/unix/DownloadURL.sh @@ -46,6 +46,15 @@ command -v sha512sum >/dev/null || alias sha512sum='shasum -a 512' ######################################################################## +Download () { + url="$1" + targetFile="$2" + + command -v curl >/dev/null \ + && curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" \ + || wget --tries 5 -O "$targetFile" "$url" +} + VerifyHash () { file=$1 expectedHash=$2 @@ -87,10 +96,10 @@ DownloadURL () { echo "Skipping download, found and validated existing file: $targetFile" else echo "Downloading from primary URL: $url" - if ! curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" + if ! Download "$url" "$targetFile" then echo "FAIL! to download, trying alternative URL: $url2" 1>&2 - if ! curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url2" + if ! Download "$url" "$targetFile" then echo 'FAIL! to download even from alternative url' 1>&2 return 1 -- cgit v1.2.3 From 1f1832b5da305ccc5b863ebb6264af0766e91071 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Fri, 11 Oct 2019 11:30:38 +0200 Subject: Fix for DownloadURL to try alternative URL Change-Id: I7e9a77815ef8f4c258dda44bda6fdd4eb3736ef4 Reviewed-by: Heikki Halmet (cherry picked from commit 518e114dc71fb58d175a15afb282ac7f6dff6adc) --- coin/provisioning/common/unix/DownloadURL.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coin') diff --git a/coin/provisioning/common/unix/DownloadURL.sh b/coin/provisioning/common/unix/DownloadURL.sh index 0579451f..ac1fd971 100755 --- a/coin/provisioning/common/unix/DownloadURL.sh +++ b/coin/provisioning/common/unix/DownloadURL.sh @@ -99,9 +99,9 @@ DownloadURL () { if ! Download "$url" "$targetFile" then echo "FAIL! to download, trying alternative URL: $url2" 1>&2 - if ! Download "$url" "$targetFile" + if ! Download "$url2" "$targetFile" then - echo 'FAIL! to download even from alternative url' 1>&2 + echo 'FAIL! to download even from alternative URL' 1>&2 return 1 fi fi -- cgit v1.2.3 From 74195b12e6863821f133295288e955cfa3d932c9 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Tue, 5 Nov 2019 12:09:12 +0100 Subject: DownloadURL last argument (targetFile) is now optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0864bcb052cddcc9753c056758b6e65fd561d928 Reviewed-by: Tony Sarajärvi (cherry picked from commit 6cc2215b8ce6da477cf23f01ff5b88c0d12c2b88) Reviewed-by: Heikki Halmet --- coin/provisioning/common/unix/DownloadURL.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'coin') 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 -- cgit v1.2.3 From 255e87ea249a503ee7136e34d9845a0d2c59447e Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Tue, 5 Nov 2019 12:45:45 +0100 Subject: Docker installation: do not depend on external repositories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also updated the docker-compose binary to the latest one. Task-number: QTQAINFRA-3279 Change-Id: Ie09a772ca8247aa5f5bd6d36774b68b6bb846386 Reviewed-by: Tony Sarajärvi (cherry picked from commit a270bcdb6beb34d7590378899805391cfcfe7091) Reviewed-by: Heikki Halmet --- coin/provisioning/common/linux/docker.sh | 37 ++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'coin') diff --git a/coin/provisioning/common/linux/docker.sh b/coin/provisioning/common/linux/docker.sh index 16af0a0a..466cb7b8 100755 --- a/coin/provisioning/common/linux/docker.sh +++ b/coin/provisioning/common/linux/docker.sh @@ -35,18 +35,37 @@ 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 + +. $(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 info -# 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 +rm ./docker-compose* # Start testserver provisioning source "${BASH_SOURCE%/*}/testserver/docker_testserver.sh" -- cgit v1.2.3