From c6c76bb80bbdba66aef5b140759820ae430ab930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Sun, 2 Apr 2023 16:25:24 +0200 Subject: [PATCH 1/2] common/build-style/cargo.sh: use --locked for build and check as well --- common/build-style/cargo.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/build-style/cargo.sh b/common/build-style/cargo.sh index 387e711060bc..751911d8dbee 100644 --- a/common/build-style/cargo.sh +++ b/common/build-style/cargo.sh @@ -5,14 +5,14 @@ do_build() { : ${make_cmd:=cargo auditable} - ${make_cmd} build --release --target ${RUST_TARGET} ${configure_args} + ${make_cmd} build --release --locked --target ${RUST_TARGET} ${configure_args} } do_check() { : ${make_cmd:=cargo auditable} - ${make_check_pre} ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \ - ${make_check_args} + ${make_check_pre} ${make_cmd} test --release --locked --target ${RUST_TARGET} \ + ${configure_args} ${make_check_args} } do_install() { From 3e910761af342f77a420ee6fd0d3f94625b2b578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Mon, 3 Apr 2023 08:49:10 +0200 Subject: [PATCH 2/2] cargo-update: generate lockfile to fix build --- srcpkgs/cargo-update/template | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/srcpkgs/cargo-update/template b/srcpkgs/cargo-update/template index ea2c25272a88..bbbd137af127 100644 --- a/srcpkgs/cargo-update/template +++ b/srcpkgs/cargo-update/template @@ -17,6 +17,13 @@ if [ "$XBPS_TARGET_MACHINE" == "i686" ]; then make_check_args="-- --skip ops::assert_index_path" fi +post_patch() { + # Upstream does not ship a lockfile and is very vocal about that being + # the right way: + # https://github.com/nabijaczleweli/cargo-update/issues/50 + cargo generate-lockfile +} + post_install() { vlicense LICENSE vdoc README.md