From 00768dcb2d2880d4a433bb4677822b26502aa4dd Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 19 Jan 2024 20:17:33 +0100 Subject: [PATCH] Drop unused optional feature for supporting encoding --- rust-url1.spec | 31 ++++--------------------------- rust2rpm.toml | 7 +++++++ url-fix-metadata.diff | 25 ++++++++++++++++++++++--- 3 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 rust2rpm.toml diff --git a/rust-url1.spec b/rust-url1.spec index a5e8c70..ee99ce8 100644 --- a/rust-url1.spec +++ b/rust-url1.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 25 # * outdated dev-dependencies: serde_json ^0.6.1 %bcond_with check %global debug_package %{nil} @@ -16,10 +16,11 @@ URL: https://crates.io/crates/url Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * drop unused optional feature for supporting serde 0.9 +# * drop unused optional feature for supporting encoding # * exclude files that are only useful for upstream development Patch: url-fix-metadata.diff -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: URL library for Rust, based on the WHATWG URL Standard.} @@ -54,18 +55,6 @@ use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-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}+heap_size-devel Summary: %{summary} BuildArch: noarch @@ -90,18 +79,6 @@ use the "heapsize" feature of the "%{crate}" crate. %files -n %{name}+heapsize-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+query_encoding-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+query_encoding-devel %{_description} - -This package contains library source intended for building other packages which -use the "query_encoding" feature of the "%{crate}" crate. - -%files -n %{name}+query_encoding-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+rustc-serialize-devel Summary: %{summary} BuildArch: noarch @@ -115,7 +92,7 @@ use the "rustc-serialize" 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..993398e --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,7 @@ +[package] +summary = "URL library for Rust, based on the WHATWG URL Standard" + +[tests] +run = ["none"] +comments = ["outdated dev-dependencies: serde_json ^0.6.1"] + diff --git a/url-fix-metadata.diff b/url-fix-metadata.diff index 720d58c..8f98516 100644 --- a/url-fix-metadata.diff +++ b/url-fix-metadata.diff @@ -1,14 +1,25 @@ --- url-1.7.2/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ url-1.7.2/Cargo.toml 2023-05-17T10:09:00.047183+00:00 -@@ -21,6 +21,7 @@ ++++ url-1.7.2/Cargo.toml 2024-01-19T19:11:15.829242+00:00 +@@ -21,6 +21,8 @@ categories = ["parser-implementations", "web-programming", "encoding"] license = "MIT/Apache-2.0" repository = "https://github.com/servo/rust-url" +exclude = ["/docs/*", "/.travis.yml", "/appveyor.yml"] ++ [package.metadata.docs.rs] features = ["query_encoding"] -@@ -58,9 +59,6 @@ +@@ -37,9 +39,6 @@ + [[bench]] + name = "parse_url" + harness = false +-[dependencies.encoding] +-version = "0.2" +-optional = true + + [dependencies.heapsize] + version = ">=0.4.1, <0.5" +@@ -58,9 +57,6 @@ version = "0.3" optional = true @@ -18,3 +29,11 @@ [dev-dependencies.bencher] version = "0.1" +@@ -75,7 +71,6 @@ + + [features] + heap_size = ["heapsize"] +-query_encoding = ["encoding"] + [badges.appveyor] + repository = "Manishearth/rust-url" +