Files
qt5/coin/provisioning/qtci-linux-Ubuntu-22.04-aarch64/02-apt.sh
Tero Heikkinen 00b0638d66 Linux: Keep the IANA time zone database (tzdata/timezone) up to date
Need upgrade of the IANA db to 2022g or later with Ubuntu 22.04. Ensure
zoneinfo (tzdata/timezone) always stays up to date with all Linux OS.

Both packages (tzdata/timezone) provide the same thing:
  - the IANA TZ database under /usr/share/zoneinfo/

tzdata:
  - Debian
  - Ubuntu
  - RHEL

timezone:
  - openSUSE
  - SLES

Pick-to: 6.10 6.8 6.5
Fixes: COIN-1282
Change-Id: I6fe7d548470d8f0f63e5451a6b5203e658575f48
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 9deb066d4c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2026-02-23 05:30:23 +00:00

77 lines
2.8 KiB
Bash
Executable File

#!/usr/bin/env bash
# Copyright (C) 2025 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
# Install required packages with APT
# shellcheck source=../common/linux/apt_wait_loop.sh
source "${BASH_SOURCE%/*}/../common/linux/apt_wait_loop.sh"
echo "Disabling auto update"
sudo sed -i 's/APT::Periodic::Update-Package-Lists "1";/APT::Periodic::Update-Package-Lists "0";/' /etc/apt/apt.conf.d/10periodic
for service in apt-daily.timer apt-daily-upgrade.timer apt-daily.service apt-daily-upgrade.service; do
sudo systemctl stop $service
sudo systemctl disable $service
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 [trusted=yes] http://repo-clones-apt.ci.qt.io:8080 jammy-arm64 main restricted universe multiverse
deb [trusted=yes] http://repo-clones-apt.ci.qt.io:8080 jammy-updates-arm64 main restricted universe multiverse
deb [trusted=yes] http://repo-clones-apt.ci.qt.io:8080 jammy-backports-arm64 main restricted universe multiverse
deb [trusted=yes] http://repo-clones-apt.ci.qt.io:8080 jammy-security-arm64 main restricted universe multiverse
EOC
}
(ping -c 3 repo-clones-apt.ci.qt.io && set_internal_repo) || echo "Internal package repository not found. Using public repositories."
# Make sure needed ca-certificates are available
installPackages+=(ca-certificates)
## Tools
# Git is not needed by builds themselves, but is nice to have
# immediately as one starts debugging
installPackages+=(git)
# 7zip is a needed decompressing tool
installPackages+=(p7zip-full)
# Packages needed for RTA and Squish
installPackages+=(openjdk-17-jdk)
installPackages+=(gcc)
installPackages+=(curl)
installPackages+=(libicu-dev)
installPackages+=(python3-dev)
installPackages+=(python3-pip)
installPackages+=(python3-venv)
installPackages+=(virtualenv)
# For mounting ci-files01 for Squish
installPackages+=(nfs-common)
# Keep zoneinfo up-to-date (COIN-1282)
installPackages+=(tzdata)
echo "Running update for apt"
waitLoop
sudo apt-get update
echo "Installing packages"
waitLoop
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y -o DPkg::Lock::Timeout=300 install "${installPackages[@]}"
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
# SetEnvVar "PATH" "/usr/lib/nodejs-mozilla/bin:\$PATH"
gccVersion="$(gcc --version |grep -Eo '[0-9]+\.[0-9]+(\.[0-9]+)?' |head -n 1)"
echo "GCC = $gccVersion" >> versions.txt
glibcVersion="$(ldd --version |grep -Eo '[0-9]+\.[0-9]+(\.[0-9]+)?' |head -n 1)"
echo "glibc = $glibcVersion" >> versions.txt
OpenSSLVersion="$(openssl version |cut -b 9-14)"
echo "OpenSSL = $OpenSSLVersion" >> ~/versions.txt