#2 Adapt %cargo_prep macro to fix builds with Rust 1.62+
Merged 3 months ago by decathorpe. Opened 3 months ago by decathorpe.
Unknown source rawhide  into  rawhide

@@ -0,0 +1,27 @@

+ From 98638813aa1e085e05092ebfcbcad7ce7fd00a44 Mon Sep 17 00:00:00 2001

+ From: Fabio Valentini <decathorpe@gmail.com>

+ Date: Fri, 1 Jul 2022 19:29:56 +0200

+ Subject: [PATCH] macros.cargo: vacuum up Cargo.toml.orig in addition to

+  Cargo.lock

+ 

+ This fixes builds with cargo from Rust 1.62+, which now complains

+ and fails our builds if the Cargo.toml.orig file already exists.

+ ---

+  data/macros.cargo | 1 +

+  1 file changed, 1 insertion(+)

+ 

+ diff --git a/data/macros.cargo b/data/macros.cargo

+ index 344b44e..206df14 100644

+ --- a/data/macros.cargo

+ +++ b/data/macros.cargo

+ @@ -44,6 +44,7 @@ registry = "https://crates.io"\

+  replace-with = "local-registry"\

+  EOF\

+  %{__rm} -f Cargo.lock \

+ +%{__rm} -f Cargo.toml.orig \

+  )

+  

+  %__cargo_parse_opts(naf:) %{shrink:\

+ -- 

+ 2.36.1

+ 

file modified
+1
@@ -15,6 +15,7 @@

  Patch:          0002-Allow-easy-overriding-of-the-opt-level-debuginfo-cod.patch

  Patch:        	0003-Fix-autodetection-of-rpmautospec.patch

  Patch:        	0004-Print-information-about-written-files.patch

+ Patch:          0005-macros.cargo-vacuum-up-Cargo.toml.orig-in-addition-t.patch

  

  ExclusiveArch:  %{rust_arches}

  

Starting with Rust 1.62, cargo fails if Cargo.toml.orig already exists, so it needs to be removed in %cargo_prep.

Upstream PR: https://pagure.io/fedora-rust/rust2rpm/pull-request/194

Pull-Request has been merged by decathorpe

3 months ago