From 3726ae66eabe2ec0861ce2408f3fcb9c8f2cbd54 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 29 Sep 2025 10:24:45 +0200 Subject: [PATCH] rec: Fix release builds by updating the locked Rust lib version Compare #16180 for dnsdist Signed-off-by: Otto Moerbeek --- builder-support/dockerfiles/Dockerfile.recursor | 2 +- pdns/recursordist/meson-dist-script.sh | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/builder-support/dockerfiles/Dockerfile.recursor b/builder-support/dockerfiles/Dockerfile.recursor index 3533a7ef0..7488a2cad 100644 --- a/builder-support/dockerfiles/Dockerfile.recursor +++ b/builder-support/dockerfiles/Dockerfile.recursor @@ -3,7 +3,7 @@ ARG BUILDER_CACHE_BUSTER= RUN apk add --no-cache gcc g++ make tar autoconf automake protobuf-dev lua-dev \ libtool file boost-dev curl openssl-dev ragel python3 \ - flex bison git bash jq meson + flex bison git bash jq meson cargo COPY . /pdns-recursor WORKDIR /pdns-recursor diff --git a/pdns/recursordist/meson-dist-script.sh b/pdns/recursordist/meson-dist-script.sh index 55bae6543..127c040bc 100755 --- a/pdns/recursordist/meson-dist-script.sh +++ b/pdns/recursordist/meson-dist-script.sh @@ -30,8 +30,6 @@ echo Running autoreconf -vi so distfile is still usable for autotools building # Run autoconf for people using autotools to build, this creates a configure sc autoreconf -vi rm -rf "$MESON_PROJECT_DIST_ROOT"/autom4te.cache -echo Updating the version of the Rust library to ${BUILDER_VERSION} -"$MESON_SOURCE_ROOT"/../../builder-support/helpers/update-rust-library-version.py "$MESON_PROJECT_DIST_ROOT"/rec-rust-lib/rust/Cargo.toml recrust ${BUILDER_VERSION} cd "$MESON_PROJECT_BUILD_ROOT" @@ -47,6 +45,16 @@ cp -vp pubsuffix.cc "$MESON_PROJECT_DIST_ROOT" meson compile rec-rust-sources cp -vp "$MESON_SOURCE_ROOT"/rec-rust-lib/rust/src/lib.rs "$MESON_PROJECT_DIST_ROOT"/rec-rust-lib/rust/src/ +echo Updating the version of the Rust library to ${BUILDER_VERSION} +"$MESON_SOURCE_ROOT"/../../builder-support/helpers/update-rust-library-version.py "$MESON_PROJECT_DIST_ROOT"/rec-rust-lib/rust/Cargo.toml recrust ${BUILDER_VERSION} +# Update the version of the Rust library in Cargo.lock as well, +# This needs to be done AFTER the sources of the Rust library have been generated +# Unfortunately we cannot use --offline because for some reason cargo-update wants +# to check all dependencies even though we are telling it exactly what to update +cd "$MESON_PROJECT_DIST_ROOT"/rec-rust-lib/rust/ +cargo update --verbose --precise ${BUILDER_VERSION} recrust +cd "$MESON_PROJECT_BUILD_ROOT" + # Generate man pages meson compile man-pages cp -vp *.1 "$MESON_PROJECT_DIST_ROOT" -- 2.47.3