From dbd7280c5e1ff582868ce3eae2879c7eedb5c263 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 19 Oct 2024 17:45:51 +0100 Subject: [PATCH] CI: Rebuild a slightly newer version of ninja for debian-stable-i386 The version of ninja-build in Debian 12 isn't built with large file support, and therefore is not compatible with filesystems with large inode numbers. Unfortunately, that includes the overlay mounts used by Docker. I've suggested a stable update for this as part of the next Debian 12 point release. Until/unless that happens, we can build our own. Signed-off-by: Simon McVittie --- .gitlab-ci.yml | 2 +- .gitlab-ci/debian-stable.Dockerfile | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e95c9bda4..f59642391 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ variables: FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v39.5" COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7" DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v23" - DEBIAN_I386_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable-i386:v1" + DEBIAN_I386_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable-i386:v2" ALPINE_IMAGE: "registry.gitlab.gnome.org/gnome/glib/alpine:v7" MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v39.5" GOBJECT_INTROSPECTION_TAG: "1.80.1" diff --git a/.gitlab-ci/debian-stable.Dockerfile b/.gitlab-ci/debian-stable.Dockerfile index 572e3bea6..bb4788baa 100644 --- a/.gitlab-ci/debian-stable.Dockerfile +++ b/.gitlab-ci/debian-stable.Dockerfile @@ -74,6 +74,24 @@ ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 RUN pip3 install --break-system-packages meson==1.4.2 +# ninja-build 1.11.1 didn't build with large file support on 32-bit, +# breaking the i386 image when used with overlayfs. +# The fix from upstream 1.12.0 was backported to Debian in 1.11.1-2, +# but too late for Debian 12. https://bugs.debian.org/1041897 +RUN if [ "$(dpkg --print-architecture)" = i386 ]; then \ + apt-get install --no-install-recommends -qq -y \ + debhelper \ + re2c \ + && mkdir /run/build \ + && git clone --depth=1 -b debian/1.11.1-2 https://salsa.debian.org/debian/ninja-build.git /run/build/ninja-build \ + && cd /run/build/ninja-build \ + && git checkout e39b5f01229311916302300449d951735e4a3e3f \ + && dpkg-buildpackage -B -Pnodoc \ + && dpkg -i ../*.deb \ + && cd / \ + && rm -fr /run/build; \ +fi + ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} RUN useradd -u $HOST_USER_ID -ms /bin/bash user