From ca8c4fb08f16e529f6c7b0bdd2fc594050e6cdcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Tue, 1 Nov 2022 22:29:59 +0100 Subject: [PATCH] build-style/cargo: produce auditable binaries --- common/build-style/cargo.sh | 6 +++--- common/environment/build-style/cargo.sh | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/common/build-style/cargo.sh b/common/build-style/cargo.sh index 4c456394df5..387e711060b 100644 --- a/common/build-style/cargo.sh +++ b/common/build-style/cargo.sh @@ -3,20 +3,20 @@ # do_build() { - : ${make_cmd:=cargo} + : ${make_cmd:=cargo auditable} ${make_cmd} build --release --target ${RUST_TARGET} ${configure_args} } do_check() { - : ${make_cmd:=cargo} + : ${make_cmd:=cargo auditable} ${make_check_pre} ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \ ${make_check_args} } do_install() { - : ${make_cmd:=cargo} + : ${make_cmd:=cargo auditable} : ${make_install_args:=--path .} ${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \ diff --git a/common/environment/build-style/cargo.sh b/common/environment/build-style/cargo.sh index c7c9863a055..473750c7a35 100644 --- a/common/environment/build-style/cargo.sh +++ b/common/environment/build-style/cargo.sh @@ -1,5 +1,9 @@ hostmakedepends+=" cargo" +if ! [[ "$pkgname" =~ ^cargo-auditable(-bootstrap)?$ ]]; then + hostmakedepends+=" cargo-auditable" +fi + if [ "$CROSS_BUILD" ]; then makedepends+=" rust-std" fi