From 816b0212a82c378aa765a1f0e47ea4f4000ee9fc Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Wed, 12 Feb 2025 19:37:27 -0300 Subject: [PATCH] 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 Signed-off-by: Valentine Burley Part-of: --- .gitlab-ci/container/lava_build.sh | 4 ++++ .gitlab-ci/container/setup-rootfs.sh | 15 +++------------ 2 files changed, 7 insertions(+), 12 deletions(-) mode change 100644 => 100755 .gitlab-ci/container/setup-rootfs.sh diff --git a/.gitlab-ci/container/lava_build.sh b/.gitlab-ci/container/lava_build.sh index bd054fb56ce..cb6fb92f9d3 100755 --- a/.gitlab-ci/container/lava_build.sh +++ b/.gitlab-ci/container/lava_build.sh @@ -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" diff --git a/.gitlab-ci/container/setup-rootfs.sh b/.gitlab-ci/container/setup-rootfs.sh old mode 100644 new mode 100755 index 7a433ff6579..01b294afb59 --- a/.gitlab-ci/container/setup-rootfs.sh +++ b/.gitlab-ci/container/setup-rootfs.sh @@ -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