From 67eb8c5c2b6ce20cc275bc035901adfef141a555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Tue, 26 Mar 2024 15:57:37 +0100 Subject: [PATCH] CI: fix meson tarball testing with old meson version The test "tarball+meson" fails on systems with old meson version with the message "ERROR: Neither directory contains a build file meson.build". This message is raised when calling `meson dist` from the build directory. According to meson documentation, `meson dist` is supported since 0.52, and older vesions need to execute `ninja dist`. https://mesonbuild.com/Creating-releases.html Also, when using meson.add_dist_script, the env variable MESON_SOURCE_ROOT is not passed in versions < 0.54. As we don't use it in the script, don't assert for it. We claim to support down to meson 0.47.3 (we need to raise it because we are actually using a bit newer features, but that's another topic). Use `ninja dist` that will work fine on old and new meson. Fixes: 61f0531509e5 ('gitlab-ci: test re-buildability of distribution tarballs') --- .gitlab-ci/run-test.sh | 4 ++-- tools/meson-dist-data.sh | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/run-test.sh b/.gitlab-ci/run-test.sh index 01f3b8bd10..e96f57e603 100755 --- a/.gitlab-ci/run-test.sh +++ b/.gitlab-ci/run-test.sh @@ -149,8 +149,8 @@ fi if check_run_clean tarball+meson; then BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh pushd ./build - # dist with meson - meson dist + # dist with meson/ninja + ninja dist # build with autotools DISTSRC="./distsrc-$RANDOM" diff --git a/tools/meson-dist-data.sh b/tools/meson-dist-data.sh index 15ba120a63..da1e5e66df 100755 --- a/tools/meson-dist-data.sh +++ b/tools/meson-dist-data.sh @@ -21,7 +21,6 @@ fi ensure_var_path "MESON_DIST_ROOT" ensure_var_path "MESON_BUILD_ROOT" -ensure_var_path "MESON_SOURCE_ROOT" ninja -C "$MESON_BUILD_ROOT" all libnm-doc NetworkManager-doc