You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-packaging/0012-Set-CARGO_HOME-to-the-...

27 lines
873 B

From b4e25038296cd57eba639a059e8baaf139a5d287 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 7 Dec 2018 13:58:41 -0800
Subject: [PATCH 12/14] Set CARGO_HOME to the local .config
---
data/macros.cargo | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/data/macros.cargo b/data/macros.cargo
index 7fb025b..e760721 100644
--- a/data/macros.cargo
+++ b/data/macros.cargo
@@ -1,4 +1,8 @@
-%__cargo %{_bindir}/cargo
+# Since cargo 1.31, install only uses $CARGO_HOME/config, ignoring $PWD.
+# https://github.com/rust-lang/cargo/issues/6397
+# But we can set CARGO_HOME locally, which is a good idea anyway to make sure
+# it never writes to ~/.cargo during rpmbuild.
+%__cargo %{_bindir}/env CARGO_HOME=.cargo %{_bindir}/cargo
%__cargo_common_opts %{?_smp_mflags}
%__cargo_inspector %{_bindir}/cargo-inspector
--
2.20.1