#!/bin/bash # shellcheck disable=SC2140 # ugly array, remove later # shellcheck disable=SC2288 # ugly array, remove later # shellcheck disable=SC2086 # we want word splitting set -ex if [ $DEBIAN_ARCH = arm64 ]; then ARCH_PACKAGES="firmware-qcom-media firmware-linux-nonfree libfontconfig1 libgl1 libglu1-mesa libvulkan-dev " elif [ $DEBIAN_ARCH = amd64 ]; then # Add llvm 13 to the build image apt-get -y install --no-install-recommends curl gnupg2 software-properties-common apt-key add /llvm-snapshot.gpg.key add-apt-repository "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main" # Debian bullseye has older wine 5.0, we want >= 7.0 for traces. apt-key add /winehq.gpg.key apt-add-repository https://dl.winehq.org/wine-builds/debian/ ARCH_PACKAGES="firmware-amd-graphics inetutils-syslogd iptables libcap2 libfontconfig1 libelf1 libfdt1 libgl1 libglu1-mesa libllvm13 libllvm11 libva2 libva-drm2 libvulkan-dev socat spirv-tools sysvinit-core " elif [ $DEBIAN_ARCH = armhf ]; then ARCH_PACKAGES="firmware-misc-nonfree " fi INSTALL_CI_FAIRY_PACKAGES="git python3-dev python3-pip python3-setuptools python3-wheel " apt-get update apt-get -y install --no-install-recommends \ $ARCH_PACKAGES \ $INSTALL_CI_FAIRY_PACKAGES \ $EXTRA_LOCAL_PACKAGES \ bash \ ca-certificates \ curl \ firmware-realtek \ initramfs-tools \ jq \ libasan6 \ libexpat1 \ libpng16-16 \ libpython3.9 \ libsensors5 \ libvulkan1 \ libwaffle-1-0 \ libx11-6 \ libx11-xcb1 \ libxcb-dri2-0 \ libxcb-dri3-0 \ libxcb-glx0 \ libxcb-present0 \ libxcb-randr0 \ libxcb-shm0 \ libxcb-sync1 \ libxcb-xfixes0 \ libxdamage1 \ libxext6 \ libxfixes3 \ libxkbcommon0 \ libxrender1 \ libxshmfence1 \ libxxf86vm1 \ netcat-openbsd \ python3 \ python3-lxml \ python3-mako \ python3-numpy \ python3-packaging \ python3-pil \ python3-renderdoc \ python3-requests \ python3-simplejson \ python3-yaml \ sntp \ strace \ waffle-utils \ weston \ xinit \ xserver-xorg-core \ xwayland \ zstd if [ "$DEBIAN_ARCH" = "amd64" ]; then # workaround wine needing 32-bit # https://bugs.winehq.org/show_bug.cgi?id=53393 apt-get install -y --no-remove wine-stable-amd64 # a requirement for wine-stable WINE_PKG="wine-stable" WINE_PKG_DROP="wine-stable-i386" apt download "${WINE_PKG}" dpkg --ignore-depends="${WINE_PKG_DROP}" -i "${WINE_PKG}"*.deb rm "${WINE_PKG}"*.deb sed -i "/${WINE_PKG_DROP}/d" /var/lib/dpkg/status apt-get install -y --no-remove winehq-stable # symlinks-only, depends on wine-stable fi # Needed for ci-fairy, this revision is able to upload files to # MinIO and doesn't depend on git pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2 # Needed for manipulation with traces yaml files. pip3 install yq apt-get purge -y \ $INSTALL_CI_FAIRY_PACKAGES passwd root -d chsh -s /bin/sh cat > /init <