#!/usr/bin/env bash # Prepares the Debian container of the «prove» job (debian:trixie, plain Debian 13: no JavaScript action, hence no # Node) so that no test is skipped: the distribution's real Chromium (on Ubuntu it is a snap, which does not work in # containers) with its languages, Xvfb, the it_IT.UTF-8 locale, time zones and the same fonts as the Febe image; ICU, # OpenSSL, zlib and libstdc++ for the .NET SDK (dotnet.sh). git, curl and the certificates are installed by the step # before the sources. setpriv, getent and the nobody user (65534) come with Debian (tests of the container start). # # .gitea/scripts/ambiente-prove.sh set -euo pipefail sudo="" [[ "$(id -u)" == 0 ]] || sudo="sudo" export DEBIAN_FRONTEND=noninteractive $sudo apt-get update -qq $sudo apt-get install -y -qq --no-install-recommends \ chromium chromium-l10n \ xvfb \ locales tzdata libicu76 libssl3t64 zlib1g libstdc++6 ca-certificates curl git \ fonts-noto-color-emoji fonts-dejavu-core \ util-linux procps > /dev/null $sudo sed -i 's/^# *\(it_IT.UTF-8 UTF-8\)/\1/' /etc/locale.gen $sudo locale-gen > /dev/null echo "== Strumenti delle prove" chromium --version command -v Xvfb locale -a | grep -i '^it_IT\.utf8$' for strumento in setpriv getent stat chown sh awk sort; do command -v "$strumento" > /dev/null || { echo "Manca $strumento." >&2; exit 1; }; done if command -v node > /dev/null; then echo "C'è node in questo contenitore: la CI non deve usarlo (nessuna azione JavaScript, nessuno script Node)." >&2 exit 1 fi getent passwd 65534 > /dev/null && getent group 65534 > /dev/null || { echo "Mancano l'utente o il gruppo 65534 (nobody)." >&2; exit 1; }