From 0596569722e72c14f0d0770f306fb35e23b86bf5 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 19 Mar 2026 12:53:40 -0700 Subject: [PATCH] ci: Build a working wine installation in build-wine.sh. The wine prefix is dropped from build-vkd3d-proton, where it's not needed (no remaining references in the tree). We do set up a /wineprefix (as a more obvious name) in the wine installation, and include /usr/lib/*/wine in test-vk container images and in a tarball uploaded as a LAVA rootfs overlay. With this, one should be able to run "wine" successfully. Part-of: --- .gitlab-ci/conditional-build-image-tags.yml | 1 + .gitlab-ci/container/build-vkd3d-proton.sh | 8 +-- .gitlab-ci/container/build-wine.sh | 60 +++++++++++++++++++++ .gitlab-ci/container/debian/test-vk.sh | 9 +++- .gitlab-ci/container/fdo_cntr_export.sh | 3 +- .gitlab-ci/container/gitlab-ci-inc.yml | 8 ++- .gitlab-ci/container/setup-wine.sh | 30 ----------- .gitlab-ci/container/strip-rootfs.sh | 1 - .gitlab-ci/lava/lava-submit.sh | 10 ++++ .gitlab-ci/test/gitlab-ci-inc.yml | 4 ++ 10 files changed, 92 insertions(+), 42 deletions(-) create mode 100644 .gitlab-ci/container/build-wine.sh delete mode 100755 .gitlab-ci/container/setup-wine.sh diff --git a/.gitlab-ci/conditional-build-image-tags.yml b/.gitlab-ci/conditional-build-image-tags.yml index cc32d01d236..4d225e70f9f 100644 --- a/.gitlab-ci/conditional-build-image-tags.yml +++ b/.gitlab-ci/conditional-build-image-tags.yml @@ -5,3 +5,4 @@ variables: CONDITIONAL_BUILD_FLUSTER_TAG: e13f8521875ebd70e207ec0f6f3d3e5b CONDITIONAL_BUILD_PIGLIT_TAG: 7c554632e450496da9382764f449abae CONDITIONAL_BUILD_VKD3D_PROTON_TAG: 3c680463034cc7273d9e98393861c61c + CONDITIONAL_BUILD_WINE_TAG: 2b47b2d3460e7f2c8d6bacccaee3902d diff --git a/.gitlab-ci/container/build-vkd3d-proton.sh b/.gitlab-ci/container/build-vkd3d-proton.sh index c6575e14b6c..eb7295dd854 100644 --- a/.gitlab-ci/container/build-vkd3d-proton.sh +++ b/.gitlab-ci/container/build-vkd3d-proton.sh @@ -15,14 +15,8 @@ VKD3D_PROTON_COMMIT="a83811bf228ec4e7fc09727388521c725126d868" VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests" VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src" -VKD3D_PROTON_WINE_DIR="/vkd3d-proton-wine64" VKD3D_PROTON_S3_ARTIFACT="vkd3d-proton.tar.zst" -if [ ! -d "$VKD3D_PROTON_WINE_DIR" ]; then - echo "Fatal: Directory '$VKD3D_PROTON_WINE_DIR' does not exist. Aborting." - exit 1 -fi - mkdir -p "$VKD3D_PROTON_SRC_DIR" pushd "$VKD3D_PROTON_SRC_DIR" git init @@ -54,7 +48,7 @@ if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then echo "Found vkd3d-proton at: ${FOUND_ARTIFACT_URL}, skipping upload" else echo "Uploaded vkd3d-proton not found, reuploading..." - tar --zstd -cf "$VKD3D_PROTON_S3_ARTIFACT" -C / "${VKD3D_PROTON_DST_DIR#/}" "${VKD3D_PROTON_WINE_DIR#/}" + tar --zstd -cf "$VKD3D_PROTON_S3_ARTIFACT" -C / "${VKD3D_PROTON_DST_DIR#/}" ci-fairy s3cp --token-file "${S3_JWT_FILE}" "$VKD3D_PROTON_S3_ARTIFACT" \ "https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}" rm "$VKD3D_PROTON_S3_ARTIFACT" diff --git a/.gitlab-ci/container/build-wine.sh b/.gitlab-ci/container/build-wine.sh new file mode 100644 index 00000000000..7f559a7b026 --- /dev/null +++ b/.gitlab-ci/container/build-wine.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# When changing this file, you need to bump the following +# .gitlab-ci/image-tags.yml tags: +# DEBIAN_TEST_VK_TAG +set -eux + +# This script sets up the wine components and the wine prefix that will be used +# when running wine. All of this gets bundled up into a tarball that's +# conditionally overlaid on LAVA runners when we need wine (container-based jobs +# will have the wine contents in them). Everything that's included in the +# WINE_S3_ARTIFACT (other than the debian wine packages) must go in this script, +# because that determines the cached hash it's uploaded under for LAVA runners. + +section_start wine "Setting up Wine" + +# Do a very early check to make sure the tag is correct without the need of +# setting up the environment variables locally +ci_tag_build_time_check "WINE_TAG" + +export WINEPREFIX="/wineprefix" +export WINEDEBUG="-all" + +# We don't want crash dialogs +cat >crashdialog.reg <crashdialog.reg <