From f2efc38815946c845007725ff03328f5735b8f11 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 4 Oct 2024 14:32:14 +0200 Subject: [PATCH] Drop outdated, example-only rand v0.4 dependency and example code --- rust-tendril.spec | 5 ++++- rust2rpm.toml | 12 ++++++++++++ tendril-fix-metadata.diff | 11 ++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/rust-tendril.spec b/rust-tendril.spec index 589ad2d..da138aa 100644 --- a/rust-tendril.spec +++ b/rust-tendril.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} @@ -14,6 +14,7 @@ License: MIT OR Apache-2.0 URL: https://crates.io/crates/tendril Source: %{crates_source} # Manually created patch for downstream crate metadata changes +# * drop outdated, example-only rand dev-dependency # * drop unused support for the obsolete "encoding" crate Patch: tendril-fix-metadata.diff @@ -78,6 +79,8 @@ use the "encoding_rs" feature of the "%{crate}" crate. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep +# drop unused example program that pulls in outdated dependencies +rm -rv examples/ %generate_buildrequires %cargo_generate_buildrequires diff --git a/rust2rpm.toml b/rust2rpm.toml index cc50e03..391be85 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -1,4 +1,16 @@ +[package] +cargo-toml-patch-comments = [ + "drop outdated, example-only rand dev-dependency", + "drop unused support for the obsolete \"encoding\" crate", +] + [tests] skip = ["assert_sizes"] comments = ["skip test for exact size of a struct / enum that fails with Rust 1.64+: https://github.com/servo/tendril/issues/66"] +[scripts] +prep.post = [ + "# drop unused example program that pulls in outdated dependencies", + "rm -rv examples/", +] + diff --git a/tendril-fix-metadata.diff b/tendril-fix-metadata.diff index e7dafe5..d17369e 100644 --- a/tendril-fix-metadata.diff +++ b/tendril-fix-metadata.diff @@ -1,5 +1,5 @@ --- tendril-0.4.3/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ tendril-0.4.3/Cargo.toml 2024-01-19T19:09:07.549735+00:00 ++++ tendril-0.4.3/Cargo.toml 2024-10-04T12:31:15.531369+00:00 @@ -17,9 +17,6 @@ readme = "README.md" license = "MIT/Apache-2.0" @@ -10,3 +10,12 @@ [dependencies.encoding_rs] version = "0.8.12" +@@ -33,8 +30,6 @@ + + [dependencies.utf-8] + version = "0.7" +-[dev-dependencies.rand] +-version = "0.4" + + [features] + bench = []