ci/cross: switch from the debcrossgen to the meson env2mfile
authorDavid Heidelberg <david.heidelberg@collabora.com>
Fri, 18 Nov 2022 22:54:31 +0000 (23:54 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Dec 2022 00:33:10 +0000 (00:33 +0000)
Modern Debian recommends to use `meson env2mfile` rather than `debcrossgen`:
```
WARNING: this tool is deprecated, use "meson env2mfile" instead.
```

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7740

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19863>

.gitlab-ci/container/create-cross-file.sh
.gitlab-ci/image-tags.yml

index abfe72f..1db9aa7 100755 (executable)
@@ -2,13 +2,11 @@
 
 arch=$1
 cross_file="/cross_file-$arch.txt"
-/usr/share/meson/debcrossgen --arch "$arch" -o "$cross_file"
+meson env2mfile --cross --debarch "$arch" -o "$cross_file"
+
 # Explicitly set ccache path for cross compilers
 sed -i "s|/usr/bin/\([^-]*\)-linux-gnu\([^-]*\)-g|/usr/lib/ccache/\\1-linux-gnu\\2-g|g" "$cross_file"
-if [ "$arch" = "i386" ]; then
-    # Work around a bug in debcrossgen that should be fixed in the next release
-    sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" "$cross_file"
-fi
+
 # Rely on qemu-user being configured in binfmt_misc on the host
 # shellcheck disable=SC1003 # how this sed doesn't seems to work for me locally
 sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
@@ -29,6 +27,7 @@ elif [[ "$arch" = "s390x" ]]; then
 else
     echo "Needs rustc target mapping"
 fi
+
 # shellcheck disable=SC1003 # how this sed doesn't seems to work for me locally
 sed -i -e '/\[binaries\]/a\' -e "rust = ['rustc', '--target=$rust_target', '-C', 'linker=$cc']" "$cross_file"
 
index 8c339ee..e3e8976 100644 (file)
@@ -1,6 +1,6 @@
 variables:
    DEBIAN_X86_BUILD_BASE_IMAGE: "debian/x86_build-base"
-   DEBIAN_BASE_TAG: "2022-11-22-arm-test-split-1"
+   DEBIAN_BASE_TAG: "2022-11-26-use-meson-env2mfile"
 
    DEBIAN_X86_BUILD_IMAGE_PATH: "debian/x86_build"
    DEBIAN_BUILD_TAG: "2022-11-03-ci-fairy-s3"