From 87df4febaf19976c5782884db83be1b12ec23f34 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 1 Sep 2024 02:31:19 +0200 Subject: [PATCH] Drop unused compat support for tokio 0.1 --- ...tests-with-io-compat-feature-removed.patch | 24 +++++++++++++++++++ futures-fix-metadata.diff | 23 +++++++++++++++++- rust-futures.spec | 18 ++++---------- 3 files changed, 51 insertions(+), 14 deletions(-) create mode 100644 0001-Fix-compiling-tests-with-io-compat-feature-removed.patch diff --git a/0001-Fix-compiling-tests-with-io-compat-feature-removed.patch b/0001-Fix-compiling-tests-with-io-compat-feature-removed.patch new file mode 100644 index 0000000..22dc56f --- /dev/null +++ b/0001-Fix-compiling-tests-with-io-compat-feature-removed.patch @@ -0,0 +1,24 @@ +From 93f1802ce721d4eaf170b04237488b76312e5d8a Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Sun, 1 Sep 2024 02:28:28 +0200 +Subject: [PATCH] Fix compiling tests with io-compat feature removed + +--- + tests/_require_features.rs | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tests/_require_features.rs b/tests/_require_features.rs +index 8046cc9..21e2b68 100644 +--- a/tests/_require_features.rs ++++ b/tests/_require_features.rs +@@ -3,7 +3,6 @@ + feature = "alloc", + feature = "async-await", + feature = "compat", +- feature = "io-compat", + feature = "executor", + feature = "thread-pool", + )))] +-- +2.46.0 + diff --git a/futures-fix-metadata.diff b/futures-fix-metadata.diff index 2b317b5..01e2f42 100644 --- a/futures-fix-metadata.diff +++ b/futures-fix-metadata.diff @@ -1,5 +1,5 @@ --- futures-0.3.30/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ futures-0.3.30/Cargo.toml 2023-12-27T21:28:33.470398+00:00 ++++ futures-0.3.30/Cargo.toml 2024-09-01T00:15:31.426758+00:00 @@ -80,6 +80,9 @@ [dev-dependencies.assert_matches] version = "1.3.0" @@ -10,3 +10,24 @@ [dev-dependencies.pin-project] version = "1.0.11" +@@ -88,9 +91,6 @@ + + [dev-dependencies.static_assertions] + version = "1" +- +-[dev-dependencies.tokio] +-version = "0.1.11" + + [features] + alloc = [ +@@ -119,10 +119,6 @@ + "std", + "futures-executor/std", + ] +-io-compat = [ +- "compat", +- "futures-util/io-compat", +-] + std = [ + "alloc", + "futures-core/std", diff --git a/rust-futures.spec b/rust-futures.spec index a3d94ce..34fe113 100644 --- a/rust-futures.spec +++ b/rust-futures.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} @@ -14,7 +14,9 @@ URL: https://crates.io/crates/futures Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * add missing futures-test dev-dependency +# * drop unused compat support for tokio 0.1 Patch: futures-fix-metadata.diff +Patch: 0001-Fix-compiling-tests-with-io-compat-feature-removed.patch BuildRequires: cargo-rpm-macros >= 24 @@ -135,18 +137,6 @@ use the "futures-executor" feature of the "%{crate}" crate. %files -n %{name}+futures-executor-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}+std-devel Summary: %{summary} BuildArch: noarch @@ -198,6 +188,8 @@ use the "write-all-vectored" feature of the "%{crate}" crate. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep +# drop single test that depends on tokio 0.1 +rm tests/compat.rs %generate_buildrequires %cargo_generate_buildrequires -a