From ba608745073186aefc39c40e3521be9b258168b8 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sat, 14 Sep 2024 16:28:38 +0200 Subject: [PATCH] Remove reference to readme file that is not included in published crates --- rust-strum_macros0.21.spec | 9 ++++++--- rust2rpm.toml | 9 +++++++++ strum_macros-fix-metadata.diff | 10 ++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 rust2rpm.toml create mode 100644 strum_macros-fix-metadata.diff diff --git a/rust-strum_macros0.21.spec b/rust-strum_macros0.21.spec index 7e31849..bece97c 100644 --- a/rust-strum_macros0.21.spec +++ b/rust-strum_macros0.21.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 26 # * tests can only be run in-tree %bcond_with check %global debug_package %{nil} @@ -13,8 +13,11 @@ Summary: Helpful macros for working with enums and strings License: MIT URL: https://crates.io/crates/strum_macros Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * remove reference to readme file that is not included in published crates +Patch: strum_macros-fix-metadata.diff -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Helpful macros for working with enums and strings.} @@ -47,7 +50,7 @@ use the "default" feature of the "%{crate}" crate. %ghost %{crate_instdir}/Cargo.toml %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..c7fc7d3 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,9 @@ +[package] +cargo-toml-patch-comments = [ + "remove reference to readme file that is not included in published crates", +] + +[tests] +run = ["none"] +comments = ["tests can only be run in-tree"] + diff --git a/strum_macros-fix-metadata.diff b/strum_macros-fix-metadata.diff new file mode 100644 index 0000000..79b4d01 --- /dev/null +++ b/strum_macros-fix-metadata.diff @@ -0,0 +1,10 @@ +--- strum_macros-0.21.1/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ strum_macros-0.21.1/Cargo.toml 2024-09-14T14:27:08.127903+00:00 +@@ -18,7 +18,6 @@ + description = "Helpful macros for working with enums and strings" + homepage = "https://github.com/Peternator7/strum" + documentation = "https://docs.rs/strum" +-readme = "../README.md" + keywords = ["enum", "string", "macros", "proc-macros"] + categories = ["development-tools::procedural-macro-helpers", "parsing"] + license = "MIT"