]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Fix release builds by updating the locked Rust lib version 16188/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 29 Sep 2025 08:24:45 +0000 (10:24 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 29 Sep 2025 08:24:45 +0000 (10:24 +0200)
Compare #16180 for dnsdist

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
builder-support/dockerfiles/Dockerfile.recursor
pdns/recursordist/meson-dist-script.sh

index 3533a7ef04aae5dcf1ffbdc21c8615be91a64e1f..7488a2cad8815d648f9cac60d75a09fa7e68e2fa 100644 (file)
@@ -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
index 55bae65435327e78653ad5c60164e0482d25d186..127c040bcae6b62252e9498c55d8fb04033323e5 100755 (executable)
@@ -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"