diff --git a/0001-Use-cargo-install-no-track-with-cargo-1.41.patch b/0001-Use-cargo-install-no-track-with-cargo-1.41.patch new file mode 100644 index 0000000..95427f1 --- /dev/null +++ b/0001-Use-cargo-install-no-track-with-cargo-1.41.patch @@ -0,0 +1,37 @@ +From b4581d8f5ba5e48de9a97988d95739b364222acd Mon Sep 17 00:00:00 2001 +From: Josh Stone +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 + diff --git a/rust-packaging.spec b/rust-packaging.spec index 854fcbd..2c28984 100644 --- a/rust-packaging.spec +++ b/rust-packaging.spec @@ -4,13 +4,16 @@ Name: rust-packaging Version: 13 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Rust packages on various architectures License: MIT URL: https://pagure.io/fedora-rust/rust2rpm 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} # gawk is needed for stripping dev-deps in macro @@ -18,7 +21,7 @@ Requires: gawk Requires: python3-rust2rpm = %{?epoch:%{epoch}:}%{version}-%{release} Requires: rust-srpm-macros = %{version} Requires: rust -Requires: cargo +Requires: cargo >= 1.41 %description The package provides macros for building projects in Rust @@ -69,6 +72,9 @@ py.test-%{python3_version} -vv test.py %{python3_sitelib}/rust2rpm/ %changelog +* Mon Feb 03 2020 Josh Stone - 13-3 +- Use 'cargo install --no-track' with cargo 1.41 + * Thu Jan 30 2020 Fedora Release Engineering - 13-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild