ci: Update setup-rootfs.sh for test-* containers

Update the script to make it useable for both container and rootfs jobs.
Move the rootfs-specific logic into the main lava_build.sh script, and
don't install ci-fairy, because that revision can't be used for s3cp
anymore after the migration.

v2 (Valentine)
 * Move the rootfs-specific logic instead of adding a new script

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
This commit is contained in:
Guilherme Gallo 2025-02-12 19:37:27 -03:00 committed by Marge Bot
parent 3609dbc061
commit 816b0212a8
2 changed files with 7 additions and 12 deletions

View file

@ -392,12 +392,16 @@ if [ "$DEBIAN_ARCH" = "amd64" ]; then
fi
############### Fill rootfs
export DEBIAN_FRONTEND=noninteractive
cp .gitlab-ci/setup-test-env.sh $ROOTFS/.
pip3 install --break-system-packages yq
cp .gitlab-ci/container/setup-rootfs.sh $ROOTFS/.
cp .gitlab-ci/container/strip-rootfs.sh $ROOTFS/.
cp .gitlab-ci/container/debian/llvm-snapshot.gpg.key $ROOTFS/.
cp .gitlab-ci/container/debian/winehq.gpg.key $ROOTFS/.
chroot $ROOTFS bash /setup-test-env.sh
chroot $ROOTFS bash /setup-rootfs.sh
chroot $ROOTFS bash /strip-rootfs.sh
rm $ROOTFS/{llvm-snapshot,winehq}.gpg.key
rm "$ROOTFS/setup-test-env.sh"
rm "$ROOTFS/setup-rootfs.sh"

15
.gitlab-ci/container/setup-rootfs.sh Normal file → Executable file
View file

@ -2,18 +2,11 @@
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex
. setup-test-env.sh
export DEBIAN_FRONTEND=noninteractive
# Needed for ci-fairy s3cp
pip3 install --break-system-packages "ci-fairy[s3] @ git+http://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
# Needed for manipulation with traces yaml files.
pip3 install --break-system-packages yq
set -eux -o pipefail
passwd root -d
chsh -s /bin/sh
@ -28,5 +21,3 @@ chmod +x /init
# Copy timezone file and remove tzdata package
rm -rf /etc/localtime
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
. strip-rootfs.sh