From 61b31362e0fd77e831bbdd32705c6e4153206abd Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sat, 14 Sep 2024 21:40:31 +0200 Subject: [PATCH] Drop unused, benchmark-only bencher dev-dependency --- rust-url.spec | 3 +++ rust2rpm.toml | 3 +++ url-fix-metadata-auto.diff | 2 +- url-fix-metadata.diff | 24 ++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 url-fix-metadata.diff diff --git a/rust-url.spec b/rust-url.spec index 7be294b..e678a91 100644 --- a/rust-url.spec +++ b/rust-url.spec @@ -14,6 +14,9 @@ URL: https://crates.io/crates/url Source: %{crates_source} # Automatically generated patch to strip dependencies and normalize metadata Patch: url-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * drop unused, benchmark-only bencher dev-dependency +Patch: url-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 diff --git a/rust2rpm.toml b/rust2rpm.toml index 439bc00..f9af4b2 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -1,5 +1,8 @@ [package] summary = "URL library for Rust, based on the WHATWG URL Standard" +cargo-toml-patch-comments = [ + "drop unused, benchmark-only bencher dev-dependency", +] [features] hide = ["debugger_visualizer"] diff --git a/url-fix-metadata-auto.diff b/url-fix-metadata-auto.diff index 7744f89..bc8c5c5 100644 --- a/url-fix-metadata-auto.diff +++ b/url-fix-metadata-auto.diff @@ -1,5 +1,5 @@ --- url-2.5.2/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ url-2.5.2/Cargo.toml 2024-07-18T19:35:45.476337+00:00 ++++ url-2.5.2/Cargo.toml 2024-09-14T19:38:56.029755+00:00 @@ -82,5 +82,3 @@ default = [] expose_internals = [] diff --git a/url-fix-metadata.diff b/url-fix-metadata.diff new file mode 100644 index 0000000..c96a6c7 --- /dev/null +++ b/url-fix-metadata.diff @@ -0,0 +1,24 @@ +--- url-2.5.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ url-2.5.2/Cargo.toml 2024-09-14T19:40:12.947182+00:00 +@@ -48,11 +48,6 @@ + path = "tests/wpt.rs" + harness = false + +-[[bench]] +-name = "parse_url" +-path = "benches/parse_url.rs" +-harness = false +- + [dependencies.form_urlencoded] + version = "1.2.1" + +@@ -67,9 +62,6 @@ + features = ["derive"] + optional = true + +-[dev-dependencies.bencher] +-version = "0.1" +- + [dev-dependencies.serde] + version = "1.0" + features = ["derive"]