#66 Set CARGO_HOME to fix Cargo 1.31 install
Merged 5 years ago by ignatenkobrain. Opened 5 years ago by jistone.
fedora-rust/ jistone/rust2rpm cargo-1.31  into  master

file modified
+8 -2
@@ -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

  
@@ -16,6 +20,9 @@ 

  rustdoc = "%{__rustdoc}"\

  rustflags = %{__global_rustflags_toml}\

  \

+ [install]\

+ root = "%{buildroot}%{_prefix}"\

+ \

  [term]\

  verbose = true\

  \
@@ -77,7 +84,6 @@ 

    %{shrink:%{__cargo} install                                       \

      %{__cargo_common_opts}                                          \

      --path .                                                        \

-     --root %{buildroot}%{_prefix}                                   \

      %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}}                \

      %*                                                              \

    }\

Also move the install root into .cargo/config.

Pull-Request has been merged by ignatenkobrain

5 years ago
Metadata