From ef3d1df27728920078bd49d7f7e980d713b9f9e4 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 13 Oct 2024 14:21:51 +0200 Subject: [PATCH] Drop unused compat support for futures 0.1 and tokio 0.1 --- futures-util-fix-metadata.diff | 48 +++++++++++++++++++++++++++++++ rust-futures-util.spec | 52 +++------------------------------- rust2rpm.toml | 6 ++++ 3 files changed, 58 insertions(+), 48 deletions(-) create mode 100644 futures-util-fix-metadata.diff diff --git a/futures-util-fix-metadata.diff b/futures-util-fix-metadata.diff new file mode 100644 index 0000000..1d4d388 --- /dev/null +++ b/futures-util-fix-metadata.diff @@ -0,0 +1,48 @@ +--- futures-util-0.3.31/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ futures-util-0.3.31/Cargo.toml 2024-10-13T12:18:31.343712+00:00 +@@ -84,11 +84,6 @@ + version = "0.3.31" + default-features = false + +-[dependencies.futures_01] +-version = "0.1.25" +-optional = true +-package = "futures" +- + [dependencies.memchr] + version = "2.2" + optional = true +@@ -101,10 +96,6 @@ + + [dependencies.slab] + version = "0.4.2" +-optional = true +- +-[dependencies.tokio-io] +-version = "0.1.9" + optional = true + + [dev-dependencies.tokio] +@@ -126,10 +117,6 @@ + "std", + "futures-channel", + ] +-compat = [ +- "std", +- "futures_01", +-] + default = [ + "std", + "async-await", +@@ -139,11 +126,6 @@ + "std", + "futures-io", + "memchr", +-] +-io-compat = [ +- "io", +- "compat", +- "tokio-io", + ] + portable-atomic = ["futures-core/portable-atomic"] + sink = ["futures-sink"] diff --git a/rust-futures-util.spec b/rust-futures-util.spec index d2cfadd..0121530 100644 --- a/rust-futures-util.spec +++ b/rust-futures-util.spec @@ -13,6 +13,10 @@ Summary: Common utilities and extension traits for the futures-rs library License: MIT OR Apache-2.0 URL: https://crates.io/crates/futures-util Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop unused compat support for futures 0.1 +# * drop unused compat support for tokio 0.1 +Patch: futures-util-fix-metadata.diff # * revert upstream change that broke compilation with Rust < 1.81: # https://github.com/rust-lang/futures-rs/issues/2892 Patch10: 0001-revert-removal-of-unstable-io_slice_advance-feature-.patch @@ -123,18 +127,6 @@ use the "channel" feature of the "%{crate}" crate. %files -n %{name}+channel-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+compat-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+compat-devel %{_description} - -This package contains library source intended for building other packages which -use the "compat" feature of the "%{crate}" crate. - -%files -n %{name}+compat-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+futures-channel-devel Summary: %{summary} BuildArch: noarch @@ -183,18 +175,6 @@ use the "futures-sink" feature of the "%{crate}" crate. %files -n %{name}+futures-sink-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+futures_01-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+futures_01-devel %{_description} - -This package contains library source intended for building other packages which -use the "futures_01" feature of the "%{crate}" crate. - -%files -n %{name}+futures_01-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+io-devel Summary: %{summary} BuildArch: noarch @@ -207,18 +187,6 @@ use the "io" feature of the "%{crate}" crate. %files -n %{name}+io-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+io-compat-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+io-compat-devel %{_description} - -This package contains library source intended for building other packages which -use the "io-compat" feature of the "%{crate}" crate. - -%files -n %{name}+io-compat-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+memchr-devel Summary: %{summary} BuildArch: noarch @@ -279,18 +247,6 @@ use the "std" feature of the "%{crate}" crate. %files -n %{name}+std-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+tokio-io-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+tokio-io-devel %{_description} - -This package contains library source intended for building other packages which -use the "tokio-io" feature of the "%{crate}" crate. - -%files -n %{name}+tokio-io-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+unstable-devel Summary: %{summary} BuildArch: noarch diff --git a/rust2rpm.toml b/rust2rpm.toml index 5f3a208..1cfe3cf 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -1,3 +1,9 @@ +[package] +cargo-toml-patch-comments = [ + "drop unused compat support for futures 0.1", + "drop unused compat support for tokio 0.1", +] + [[package.extra-patches]] number = 10 file = "0001-revert-removal-of-unstable-io_slice_advance-feature-.patch"