From 7901fec52e864a050ddfb356df861a17a60a359d Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Sat, 16 Jul 2022 14:11:16 +0200 Subject: [PATCH] ci/lava: add wine and apitrace into amd64 rootfs container Wine is from WineHQ, with stripped i386 part, which we don't use. Signed-off-by: David Heidelberg Part-of: --- .gitlab-ci/container/create-rootfs.sh | 21 ++++++++++++++++++++- .gitlab-ci/container/lava_build.sh | 10 ++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/container/create-rootfs.sh b/.gitlab-ci/container/create-rootfs.sh index 02d04e5205e..74614cac6a6 100644 --- a/.gitlab-ci/container/create-rootfs.sh +++ b/.gitlab-ci/container/create-rootfs.sh @@ -18,6 +18,10 @@ elif [ $DEBIAN_ARCH = amd64 ]; then apt-get -y install --no-install-recommends wget 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 @@ -37,6 +41,7 @@ elif [ $DEBIAN_ARCH = amd64 ]; then spirv-tools sysvinit-core " + elif [ $DEBIAN_ARCH = armhf ]; then ARCH_PACKAGES="firmware-misc-nonfree " @@ -102,6 +107,20 @@ apt-get -y install --no-install-recommends \ xserver-xorg-core \ 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@34f4ade99434043f88e164933f570301fd18b125 @@ -236,7 +255,7 @@ rm -rf etc/dpkg # Drop directories not part of ostree # Note that /var needs to exist as ostree bind mounts the deployment /var over # it -rm -rf var/* opt srv share +rm -rf var/* srv share # ca-certificates are in /etc drop the source rm -rf usr/share/ca-certificates diff --git a/.gitlab-ci/container/lava_build.sh b/.gitlab-ci/container/lava_build.sh index 8e340ea16e8..68370dbadc4 100755 --- a/.gitlab-ci/container/lava_build.sh +++ b/.gitlab-ci/container/lava_build.sh @@ -60,7 +60,7 @@ else DEFCONFIG="arch/x86/configs/x86_64_defconfig" DEVICE_TREES="" KERNEL_IMAGE_NAME="bzImage" - ARCH_PACKAGES="libasound2-dev libcap-dev libfdt-dev libva-dev wayland-protocols" + ARCH_PACKAGES="libasound2-dev libcap-dev libfdt-dev libva-dev wayland-protocols p7zip" fi # Determine if we're in a cross build. @@ -135,6 +135,11 @@ if [[ "$DEBIAN_ARCH" = "armhf" ]]; then libxkbcommon-dev:armhf fi +############### Installing +. .gitlab-ci/container/install-wine-apitrace.sh +mkdir -p "/lava-files/rootfs-${DEBIAN_ARCH}/apitrace-msvc-win64" +mv /apitrace-msvc-win64/bin "/lava-files/rootfs-${DEBIAN_ARCH}/apitrace-msvc-win64" +rm -rf /apitrace-msvc-win64 ############### Building STRIP_CMD="${GCC_ARCH}-strip" @@ -220,8 +225,9 @@ set -e cp .gitlab-ci/container/create-rootfs.sh /lava-files/rootfs-${DEBIAN_ARCH}/. cp .gitlab-ci/container/debian/llvm-snapshot.gpg.key /lava-files/rootfs-${DEBIAN_ARCH}/. +cp .gitlab-ci/container/debian/winehq.gpg.key /lava-files/rootfs-${DEBIAN_ARCH}/. chroot /lava-files/rootfs-${DEBIAN_ARCH} sh /create-rootfs.sh -rm /lava-files/rootfs-${DEBIAN_ARCH}/llvm-snapshot.gpg.key +rm /lava-files/rootfs-${DEBIAN_ARCH}/{llvm-snapshot,winehq}.gpg.key rm /lava-files/rootfs-${DEBIAN_ARCH}/create-rootfs.sh