From 0f0ee7e35c63be9b96521478a8fe0af3fcc71967 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 19 Jan 2024 20:17:20 +0100 Subject: [PATCH] Drop unused support for the obsolete "encoding" crate --- rust-tendril.spec | 21 ++++++--------------- rust2rpm.toml | 4 ++++ tendril-fix-metadata.diff | 12 ++++++++++++ 3 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 rust2rpm.toml create mode 100644 tendril-fix-metadata.diff diff --git a/rust-tendril.spec b/rust-tendril.spec index 2de6929..589ad2d 100644 --- a/rust-tendril.spec +++ b/rust-tendril.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 25 %bcond_without check %global debug_package %{nil} @@ -13,8 +13,11 @@ Summary: Compact buffer/string type for zero-copy parsing License: MIT OR Apache-2.0 URL: https://crates.io/crates/tendril Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop unused support for the obsolete "encoding" crate +Patch: tendril-fix-metadata.diff -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Compact buffer/string type for zero-copy parsing.} @@ -60,18 +63,6 @@ use the "bench" feature of the "%{crate}" crate. %files -n %{name}+bench-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+encoding-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+encoding-devel %{_description} - -This package contains library source intended for building other packages which -use the "encoding" feature of the "%{crate}" crate. - -%files -n %{name}+encoding-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+encoding_rs-devel Summary: %{summary} BuildArch: noarch @@ -85,7 +76,7 @@ use the "encoding_rs" 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..cc50e03 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,4 @@ +[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"] + diff --git a/tendril-fix-metadata.diff b/tendril-fix-metadata.diff new file mode 100644 index 0000000..e7dafe5 --- /dev/null +++ b/tendril-fix-metadata.diff @@ -0,0 +1,12 @@ +--- 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 +@@ -17,9 +17,6 @@ + readme = "README.md" + license = "MIT/Apache-2.0" + repository = "https://github.com/servo/tendril" +-[dependencies.encoding] +-version = "0.2" +-optional = true + + [dependencies.encoding_rs] + version = "0.8.12"