From d4992d4da4d50874b64d7ad0073adce2cc3dade2 Mon Sep 17 00:00:00 2001 From: Elias Toivola Date: Wed, 15 Apr 2026 16:39:51 +0300 Subject: [PATCH] Linux: add a distro version check to prevent unintentional updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a helper script to check the reported distro version at /etc/os-release at the start of a provisioning and at the end of it, compare them, and throw an error if there is any difference even at the most minor patch level e.g. Ubuntu 24.04.0 -> 24.04.1. Task-number: QTQAINFRA-7810 Pick-to: 6.12 6.11 6.8 Change-Id: If4f1e997aef40037ee876bc3843ed09a5412615f Reviewed-by: Simo Fält --- .../common/linux/distro_version_check.sh | 66 +++++++++++++++++++ .../01-systemsetup.sh | 5 ++ .../qtci-linux-RHEL-10.0-x86_64/99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../qtci-linux-RHEL-8.10-x86_64/99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../qtci-linux-RHEL-9.4-x86_64/99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../qtci-linux-RHEL-9.6-x86_64/99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../99-version.sh | 6 ++ .../01-systemsetup.sh | 5 ++ .../99-version.sh | 7 ++ .../01-systemsetup.sh | 5 ++ .../99-version.sh | 7 ++ 25 files changed, 209 insertions(+) create mode 100644 coin/provisioning/common/linux/distro_version_check.sh diff --git a/coin/provisioning/common/linux/distro_version_check.sh b/coin/provisioning/common/linux/distro_version_check.sh new file mode 100644 index 00000000..e8748b4d --- /dev/null +++ b/coin/provisioning/common/linux/distro_version_check.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +# Copyright (C) 2026 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 -e + +OS_STATE_DIR="/var/lib/qtciid" +OS_STATE_FILE="$OS_STATE_DIR/os-version" + +get_os_id() { + if [[ -r /etc/os-release ]]; then + # shellcheck disable=SC1091 + . /etc/os-release + # os-release contains ID of the distro (e.g. 'ubuntu') + # VERSION e.g. '24.04.1 LTS (Noble Numbat)' + if [[ -n "${ID:-}" && -n "${VERSION:-}" ]]; then + echo "${ID}:${VERSION}" + return 0 + fi + fi + + echo "unknown:unknown" + return 1 +} + +record_os_version() { + local os_id + + os_id="$(get_os_id)" + + if [[ "$os_id" == "unknown:unknown" ]]; then + echo "ERROR: Unable to determine OS version" + exit 1 + fi + + sudo mkdir -p "$OS_STATE_DIR" + echo "$os_id" | sudo tee "$OS_STATE_FILE" > /dev/null + + echo "OS version: $os_id" +} + +verify_os_version_unchanged() { + if [[ ! -f "$OS_STATE_FILE" ]]; then + echo "ERROR: OS version state file missing: $OS_STATE_FILE" + exit 1 + fi + + local start_version current_version + + start_version="$(cat "$OS_STATE_FILE")" + current_version="$(get_os_id)" + + if [[ "$current_version" == "unknown:unknown" ]]; then + echo "ERROR: Unable to determine current OS version" + exit 1 + fi + + if [[ "$start_version" != "$current_version" ]]; then + echo "ERROR: OS version changed during provisioning!" + echo " Start version : $start_version" + echo " End version : $current_version" + exit 1 + fi + + echo "OS version unchanged ($current_version)" +} diff --git a/coin/provisioning/qtci-linux-RHEL-10.0-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-RHEL-10.0-x86_64/01-systemsetup.sh index 532241d6..b2aac627 100755 --- a/coin/provisioning/qtci-linux-RHEL-10.0-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-RHEL-10.0-x86_64/01-systemsetup.sh @@ -7,6 +7,11 @@ set -ex BASEDIR=$(dirname "$0") # shellcheck source=../common/shared/network_test_server_ip.txt source "$BASEDIR/../common/shared/network_test_server_ip.txt" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version echo "Set Network Test Server address to $network_test_server_ip in /etc/hosts" echo "$network_test_server_ip qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts diff --git a/coin/provisioning/qtci-linux-RHEL-10.0-x86_64/99-version.sh b/coin/provisioning/qtci-linux-RHEL-10.0-x86_64/99-version.sh index 6d6ab9a0..b8b16e6c 100755 --- a/coin/provisioning/qtci-linux-RHEL-10.0-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-RHEL-10.0-x86_64/99-version.sh @@ -8,6 +8,13 @@ set -ex +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + # shellcheck disable=SC2129 source "${BASH_SOURCE%/*}/../common/linux/verify-release-packages.sh" diff --git a/coin/provisioning/qtci-linux-RHEL-8.10-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-RHEL-8.10-x86_64/01-systemsetup.sh index 4f9e20dc..ecabe3a8 100755 --- a/coin/provisioning/qtci-linux-RHEL-8.10-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-RHEL-8.10-x86_64/01-systemsetup.sh @@ -8,6 +8,11 @@ set -ex BASEDIR=$(dirname "$0") # shellcheck source=../common/shared/network_test_server_ip.txt source "$BASEDIR/../common/shared/network_test_server_ip.txt" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version echo "Set Network Test Server address to $network_test_server_ip in /etc/hosts" echo "$network_test_server_ip qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts diff --git a/coin/provisioning/qtci-linux-RHEL-8.10-x86_64/99-version.sh b/coin/provisioning/qtci-linux-RHEL-8.10-x86_64/99-version.sh index 725351ae..f4b70b28 100755 --- a/coin/provisioning/qtci-linux-RHEL-8.10-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-RHEL-8.10-x86_64/99-version.sh @@ -9,6 +9,13 @@ set -ex +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + # shellcheck disable=SC2129 echo "*********************************************" >> ~/versions.txt echo "***** All installed RPM packages *****" >> ~/versions.txt diff --git a/coin/provisioning/qtci-linux-RHEL-9.4-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-RHEL-9.4-x86_64/01-systemsetup.sh index 128d6afb..e4d79803 100755 --- a/coin/provisioning/qtci-linux-RHEL-9.4-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-RHEL-9.4-x86_64/01-systemsetup.sh @@ -7,6 +7,11 @@ set -ex BASEDIR=$(dirname "$0") # shellcheck source=../common/shared/network_test_server_ip.txt source "$BASEDIR/../common/shared/network_test_server_ip.txt" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version echo "Set Network Test Server address to $network_test_server_ip in /etc/hosts" echo "$network_test_server_ip qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts diff --git a/coin/provisioning/qtci-linux-RHEL-9.4-x86_64/99-version.sh b/coin/provisioning/qtci-linux-RHEL-9.4-x86_64/99-version.sh index b12622c6..8c4a6be2 100755 --- a/coin/provisioning/qtci-linux-RHEL-9.4-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-RHEL-9.4-x86_64/99-version.sh @@ -8,6 +8,13 @@ set -ex +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + # shellcheck disable=SC2129 echo "*********************************************" >> ~/versions.txt echo "***** All installed RPM packages *****" >> ~/versions.txt diff --git a/coin/provisioning/qtci-linux-RHEL-9.6-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-RHEL-9.6-x86_64/01-systemsetup.sh index 128d6afb..e4d79803 100755 --- a/coin/provisioning/qtci-linux-RHEL-9.6-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-RHEL-9.6-x86_64/01-systemsetup.sh @@ -7,6 +7,11 @@ set -ex BASEDIR=$(dirname "$0") # shellcheck source=../common/shared/network_test_server_ip.txt source "$BASEDIR/../common/shared/network_test_server_ip.txt" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version echo "Set Network Test Server address to $network_test_server_ip in /etc/hosts" echo "$network_test_server_ip qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts diff --git a/coin/provisioning/qtci-linux-RHEL-9.6-x86_64/99-version.sh b/coin/provisioning/qtci-linux-RHEL-9.6-x86_64/99-version.sh index b12622c6..8c4a6be2 100755 --- a/coin/provisioning/qtci-linux-RHEL-9.6-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-RHEL-9.6-x86_64/99-version.sh @@ -8,6 +8,13 @@ set -ex +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + # shellcheck disable=SC2129 echo "*********************************************" >> ~/versions.txt echo "***** All installed RPM packages *****" >> ~/versions.txt diff --git a/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/01-systemsetup.sh index 4fb3c37d..2b94cb50 100755 --- a/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/01-systemsetup.sh @@ -9,6 +9,11 @@ BASEDIR=$(dirname "$0") source "$BASEDIR/../common/shared/network_test_server_ip.txt" # shellcheck source=../common/unix/check_and_set_proxy.sh source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version echo "Set timezone to UTC." sudo timedatectl set-timezone Etc/UTC diff --git a/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/99-version.sh b/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/99-version.sh index 00d06674..1914883b 100755 --- a/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-SLES-15_SP5-x86_64/99-version.sh @@ -8,6 +8,13 @@ set -ex +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + # shellcheck disable=SC2129 echo "*********************************************" >> ~/versions.txt echo "***** All installed RPM packages *****" >> ~/versions.txt diff --git a/coin/provisioning/qtci-linux-SLES-15_SP6-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-SLES-15_SP6-x86_64/01-systemsetup.sh index 32da6844..494a38a9 100755 --- a/coin/provisioning/qtci-linux-SLES-15_SP6-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-SLES-15_SP6-x86_64/01-systemsetup.sh @@ -11,6 +11,11 @@ source "$BASEDIR/../common/shared/network_test_server_ip.txt" source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh" # shellcheck source=../common/unix/SetEnvVar.sh source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version echo "Set timezone to UTC." sudo timedatectl set-timezone Etc/UTC diff --git a/coin/provisioning/qtci-linux-SLES-15_SP6-x86_64/99-version.sh b/coin/provisioning/qtci-linux-SLES-15_SP6-x86_64/99-version.sh index a31c9280..b595f77f 100755 --- a/coin/provisioning/qtci-linux-SLES-15_SP6-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-SLES-15_SP6-x86_64/99-version.sh @@ -8,6 +8,13 @@ set -ex +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + # shellcheck disable=SC2129 echo "*********************************************" >> ~/versions.txt echo "***** All installed RPM packages *****" >> ~/versions.txt diff --git a/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/01-systemsetup.sh index 169de531..48a1369a 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/01-systemsetup.sh @@ -9,6 +9,11 @@ set -ex BASEDIR=$(dirname "$0") # shellcheck source=../common/unix/check_and_set_proxy.sh source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version NTS_IP=10.212.2.216 diff --git a/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/99-version.sh b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/99-version.sh index 31821f6b..5399859f 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/99-version.sh @@ -2,5 +2,12 @@ #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 +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + BASEDIR=$(dirname "$0") "$BASEDIR/../common/linux/ubuntu-version.sh" diff --git a/coin/provisioning/qtci-linux-Ubuntu-24.04-aarch64/01-systemsetup.sh b/coin/provisioning/qtci-linux-Ubuntu-24.04-aarch64/01-systemsetup.sh index fdbfe546..c2c2ba7c 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-24.04-aarch64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-24.04-aarch64/01-systemsetup.sh @@ -9,6 +9,11 @@ set -ex BASEDIR=$(dirname "$0") # shellcheck source=../common/unix/check_and_set_proxy.sh source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version NTS_IP=10.212.2.216 diff --git a/coin/provisioning/qtci-linux-Ubuntu-24.04-aarch64/99-version.sh b/coin/provisioning/qtci-linux-Ubuntu-24.04-aarch64/99-version.sh index 31821f6b..5399859f 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-24.04-aarch64/99-version.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-24.04-aarch64/99-version.sh @@ -2,5 +2,12 @@ #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 +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + BASEDIR=$(dirname "$0") "$BASEDIR/../common/linux/ubuntu-version.sh" diff --git a/coin/provisioning/qtci-linux-Ubuntu-24.04-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-Ubuntu-24.04-x86_64/01-systemsetup.sh index fdbfe546..c2c2ba7c 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-24.04-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-24.04-x86_64/01-systemsetup.sh @@ -9,6 +9,11 @@ set -ex BASEDIR=$(dirname "$0") # shellcheck source=../common/unix/check_and_set_proxy.sh source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version NTS_IP=10.212.2.216 diff --git a/coin/provisioning/qtci-linux-Ubuntu-24.04-x86_64/99-version.sh b/coin/provisioning/qtci-linux-Ubuntu-24.04-x86_64/99-version.sh index 31821f6b..5399859f 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-24.04-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-24.04-x86_64/99-version.sh @@ -2,5 +2,12 @@ #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 +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + BASEDIR=$(dirname "$0") "$BASEDIR/../common/linux/ubuntu-version.sh" diff --git a/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/01-systemsetup.sh index da2900c0..2674c275 100755 --- a/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/01-systemsetup.sh @@ -8,6 +8,11 @@ BASEDIR=$(dirname "$0") source "$BASEDIR/../common/shared/network_test_server_ip.txt" # shellcheck source=../common/unix/check_and_set_proxy.sh source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version # https://bugzilla.opensuse.org/show_bug.cgi?id=1032027 sudo btrfs quota disable / diff --git a/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/99-version.sh b/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/99-version.sh index 00d06674..51732325 100755 --- a/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-openSUSE-15.5-x86_64/99-version.sh @@ -8,6 +8,12 @@ set -ex +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version + # shellcheck disable=SC2129 echo "*********************************************" >> ~/versions.txt echo "***** All installed RPM packages *****" >> ~/versions.txt diff --git a/coin/provisioning/qtci-linux-openSUSE-15.6-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-openSUSE-15.6-x86_64/01-systemsetup.sh index e5eb3480..05790107 100755 --- a/coin/provisioning/qtci-linux-openSUSE-15.6-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-openSUSE-15.6-x86_64/01-systemsetup.sh @@ -10,6 +10,11 @@ source "$BASEDIR/../common/shared/network_test_server_ip.txt" source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh" # shellcheck source=../common/unix/SetEnvVar.sh source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version # https://bugzilla.opensuse.org/show_bug.cgi?id=1032027 sudo btrfs quota disable / diff --git a/coin/provisioning/qtci-linux-openSUSE-15.6-x86_64/99-version.sh b/coin/provisioning/qtci-linux-openSUSE-15.6-x86_64/99-version.sh index a31c9280..345df60b 100755 --- a/coin/provisioning/qtci-linux-openSUSE-15.6-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-openSUSE-15.6-x86_64/99-version.sh @@ -8,6 +8,13 @@ set -ex +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version + # shellcheck disable=SC2129 echo "*********************************************" >> ~/versions.txt echo "***** All installed RPM packages *****" >> ~/versions.txt diff --git a/coin/provisioning/qtci-linux-openSUSE-16.0-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-openSUSE-16.0-x86_64/01-systemsetup.sh index 0520f9c6..207c10a7 100755 --- a/coin/provisioning/qtci-linux-openSUSE-16.0-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-openSUSE-16.0-x86_64/01-systemsetup.sh @@ -10,6 +10,11 @@ source "$BASEDIR/../common/shared/network_test_server_ip.txt" source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh" # shellcheck source=../common/unix/SetEnvVar.sh source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Get distro version to later check if version has changed at the end of the provisioning +record_os_version # https://bugzilla.opensuse.org/show_bug.cgi?id=1032027 sudo btrfs quota disable / diff --git a/coin/provisioning/qtci-linux-openSUSE-16.0-x86_64/99-version.sh b/coin/provisioning/qtci-linux-openSUSE-16.0-x86_64/99-version.sh index a31c9280..b595f77f 100755 --- a/coin/provisioning/qtci-linux-openSUSE-16.0-x86_64/99-version.sh +++ b/coin/provisioning/qtci-linux-openSUSE-16.0-x86_64/99-version.sh @@ -8,6 +8,13 @@ set -ex +BASEDIR=$(dirname "$0") +# shellcheck source=../common/linux/distro_version_check.sh +source "$BASEDIR/../common/linux/distro_version_check.sh" + +# Check distro version if it has changed +verify_os_version_unchanged + # shellcheck disable=SC2129 echo "*********************************************" >> ~/versions.txt echo "***** All installed RPM packages *****" >> ~/versions.txt