Use 'cargo install --no-track' with cargo 1.41

epel9
Josh Stone 5 years ago
parent e610310150
commit ea408f2a21

@ -0,0 +1,37 @@
From b4581d8f5ba5e48de9a97988d95739b364222acd Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 30 Jan 2020 22:02:59 -0800
Subject: [PATCH] Use `cargo install --no-track` with cargo 1.41
In cargo 1.41, `cargo install` adds a new `.crates2.json` file in the
install root for tracking version upgrades. This would be another file
that `%cargo_install` should remove afterward, but there is also a new
`--no-track` option which disables such metadata files altogether.
This update should be coordinated with the Rust toolchain update in the
distro, e.g. with rust-packaging `Requires: cargo >= 1.41`. The new
option will be rejected as an unstable option on earlier versions.
---
data/macros.cargo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/macros.cargo b/data/macros.cargo
index 5f601114a893..a916699b806b 100644
--- a/data/macros.cargo
+++ b/data/macros.cargo
@@ -101,11 +101,11 @@ fi \
%{shrink:\
%{__cargo} install \
%{__cargo_common_opts} \
+ --no-track \
--path . \
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
%* \
} \
- %{__rm} %{buildroot}%{_prefix}/.crates.toml \
fi \
%endif \
)
--
2.24.1

@ -4,13 +4,16 @@
Name: rust-packaging Name: rust-packaging
Version: 13 Version: 13
Release: 2%{?dist} Release: 3%{?dist}
Summary: RPM macros for building Rust packages on various architectures Summary: RPM macros for building Rust packages on various architectures
License: MIT License: MIT
URL: https://pagure.io/fedora-rust/rust2rpm URL: https://pagure.io/fedora-rust/rust2rpm
Source: https://releases.pagure.org/fedora-rust/rust2rpm/rust2rpm-%{version}.tar.xz Source: https://releases.pagure.org/fedora-rust/rust2rpm/rust2rpm-%{version}.tar.xz
# https://pagure.io/fedora-rust/rust2rpm/pull-request/107
Patch1: 0001-Use-cargo-install-no-track-with-cargo-1.41.patch
ExclusiveArch: %{rust_arches} ExclusiveArch: %{rust_arches}
# gawk is needed for stripping dev-deps in macro # gawk is needed for stripping dev-deps in macro
@ -18,7 +21,7 @@ Requires: gawk
Requires: python3-rust2rpm = %{?epoch:%{epoch}:}%{version}-%{release} Requires: python3-rust2rpm = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: rust-srpm-macros = %{version} Requires: rust-srpm-macros = %{version}
Requires: rust Requires: rust
Requires: cargo Requires: cargo >= 1.41
%description %description
The package provides macros for building projects in Rust The package provides macros for building projects in Rust
@ -69,6 +72,9 @@ py.test-%{python3_version} -vv test.py
%{python3_sitelib}/rust2rpm/ %{python3_sitelib}/rust2rpm/
%changelog %changelog
* Mon Feb 03 2020 Josh Stone <jistone@redhat.com> - 13-3
- Use 'cargo install --no-track' with cargo 1.41
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 13-2 * Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

Loading…
Cancel
Save