From c11f7f670705c8cc5772cc722fa442588fd2c0d0 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sat, 14 Sep 2024 16:19:18 +0200 Subject: [PATCH] Remove reference to readme file that is not included in published crates --- rust-strum0.21.spec | 9 ++++++--- rust2rpm.toml | 5 +++++ strum-fix-metadata.diff | 10 ++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 rust2rpm.toml create mode 100644 strum-fix-metadata.diff diff --git a/rust-strum0.21.spec b/rust-strum0.21.spec index 16f9453..2e11fe3 100644 --- a/rust-strum0.21.spec +++ b/rust-strum0.21.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} @@ -12,8 +12,11 @@ Summary: Helpful macros for working with enums and strings License: MIT URL: https://crates.io/crates/strum 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-fix-metadata.diff -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Helpful macros for working with enums and strings.} @@ -70,7 +73,7 @@ use the "strum_macros" 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..0034818 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,5 @@ +[package] +cargo-toml-patch-comments = [ + "remove reference to readme file that is not included in published crates", +] + diff --git a/strum-fix-metadata.diff b/strum-fix-metadata.diff new file mode 100644 index 0000000..6734994 --- /dev/null +++ b/strum-fix-metadata.diff @@ -0,0 +1,10 @@ +--- strum-0.21.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ strum-0.21.0/Cargo.toml 2024-09-14T14:17:30.666101+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"