From 0e054635800fe510da231e16c461ee43c3f8f7a0 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/build-style/cargo.sh b/common/build-style/cargo.sh index 387e711060bc..d2f75dddc515 100644 --- a/common/build-style/cargo.sh +++ b/common/build-style/cargo.sh @@ -5,13 +5,13 @@ 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_pre} ${make_cmd} test --release --locked --target ${RUST_TARGET} ${configure_args} \ ${make_check_args} } From b19ba795daa927d4bf50c37a622f3e1c478ef0ea 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