From: Remi Gacogne Date: Mon, 2 Jun 2025 10:36:23 +0000 (+0200) Subject: dnsdist: Explicitly use the versions present in `Cargo.lock` when building X-Git-Tag: dnsdist-2.0.0-beta1~59^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15614%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Explicitly use the versions present in `Cargo.lock` when building The documentation states that only `cargo update` and `cargo install` should update the dependencies present in the `Cargo.lock` file, but it still seems safer to explictly ask `cargo build` to not update them. Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist-rust-lib/rust/Makefile.am b/pdns/dnsdistdist/dnsdist-rust-lib/rust/Makefile.am index c30191a2c5..163d29e3d4 100644 --- a/pdns/dnsdistdist/dnsdist-rust-lib/rust/Makefile.am +++ b/pdns/dnsdistdist/dnsdist-rust-lib/rust/Makefile.am @@ -10,7 +10,7 @@ if HAVE_YAML_CONFIGURATION all install: libdnsdist_rust.a libdnsdist_rust.a: src/lib.rs src/helpers.rs Cargo.toml Cargo.lock - SYSCONFDIR=$(sysconfdir) $(CARGO) build --release $(RUST_TARGET) --target-dir=$(builddir)/target --manifest-path ${srcdir}/Cargo.toml + SYSCONFDIR=$(sysconfdir) $(CARGO) build --release $(RUST_TARGET) --target-dir=$(builddir)/target --manifest-path ${srcdir}/Cargo.toml --locked cp target/release/libdnsdist_rust.a libdnsdist_rust.a cp target/cxxbridge/dnsdist-rust/src/lib.rs.h lib.rs.h cp target/cxxbridge/rust/cxx.h cxx.h diff --git a/pdns/dnsdistdist/dnsdist-rust-lib/rust/build_dnsdist_rust_library b/pdns/dnsdistdist/dnsdist-rust-lib/rust/build_dnsdist_rust_library index c1b2eda03b..6b6f4d1ffe 100644 --- a/pdns/dnsdistdist/dnsdist-rust-lib/rust/build_dnsdist_rust_library +++ b/pdns/dnsdistdist/dnsdist-rust-lib/rust/build_dnsdist_rust_library @@ -9,7 +9,7 @@ mytarget=${CARGO_TARGET_DIR-target} #echo "mytarget=${mytarget}" -$CARGO build --release $RUST_TARGET --target-dir=$builddir/target --manifest-path $srcdir/Cargo.toml +$CARGO build --release $RUST_TARGET --target-dir=$builddir/target --manifest-path $srcdir/Cargo.toml --locked cp -p target/$RUSTC_TARGET_ARCH/release/libdnsdist_rust.a $builddir/dnsdist-rust-lib/rust/libdnsdist_rust.a