diff --git a/0001-drop-deny-warnings-from-doctests.patch b/0001-drop-deny-warnings-from-doctests.patch new file mode 100644 index 0000000..9aaa7d1 --- /dev/null +++ b/0001-drop-deny-warnings-from-doctests.patch @@ -0,0 +1,25 @@ +From 2c0498c888d111ed23e19673d180ddab448e81b1 Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Tue, 21 May 2024 16:25:06 +0200 +Subject: [PATCH] drop deny(warnings) from doctests + +--- + src/lib.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib.rs b/src/lib.rs +index 86786e8..51d71ed 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -280,7 +280,7 @@ + #![cfg_attr(feature = "docs", feature(doc_cfg))] + #![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] + #![allow(clippy::mutex_atomic, clippy::module_inception)] +-#![doc(test(attr(deny(rust_2018_idioms, warnings))))] ++#![doc(test(attr(deny(rust_2018_idioms))))] + #![doc(test(attr(allow(unused_extern_crates, unused_variables))))] + #![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")] + +-- +2.45.1 + diff --git a/async-std-fix-metadata-auto.diff b/async-std-fix-metadata-auto.diff index d0e02c8..8dcf9e2 100644 --- a/async-std-fix-metadata-auto.diff +++ b/async-std-fix-metadata-auto.diff @@ -1,5 +1,5 @@ --- async-std-1.12.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ async-std-1.12.0/Cargo.toml 2023-08-06T13:00:23.061570+00:00 ++++ async-std-1.12.0/Cargo.toml 2024-05-21T14:27:05.181583+00:00 @@ -142,7 +142,6 @@ "kv-log-macro", "log", diff --git a/async-std-fix-metadata.diff b/async-std-fix-metadata.diff index c43f8e4..0009af8 100644 --- a/async-std-fix-metadata.diff +++ b/async-std-fix-metadata.diff @@ -1,5 +1,5 @@ --- async-std-1.12.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ async-std-1.12.0/Cargo.toml 2023-08-06T13:01:27.146892+00:00 ++++ async-std-1.12.0/Cargo.toml 2024-05-21T14:27:24.443691+00:00 @@ -46,10 +46,6 @@ [[example]] name = "tcp-ipv4-and-6-echo" diff --git a/rust-async-std.spec b/rust-async-std.spec index 3dd6179..2f0b1f8 100644 --- a/rust-async-std.spec +++ b/rust-async-std.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} @@ -13,7 +13,7 @@ Summary: Async version of the Rust standard library License: Apache-2.0 OR MIT URL: https://crates.io/crates/async-std Source: %{crates_source} -# Automatically generated patch to strip foreign dependencies +# Automatically generated patch to strip dependencies and normalize metadata Patch: async-std-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * drop windows-specific dependencies and features @@ -21,8 +21,10 @@ Patch: async-std-fix-metadata-auto.diff # * drop tokio v0.2 and v0.3 features # * drop optional surf dependency Patch: async-std-fix-metadata.diff +# * fix building tests with Rust 1.78+ +Patch: 0001-drop-deny-warnings-from-doctests.patch -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Async version of the Rust standard library.} @@ -335,10 +337,10 @@ use the "unstable" 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 # remove example that depends on the optional surf dependency rm examples/surf-web.rs -%cargo_prep %generate_buildrequires %cargo_generate_buildrequires @@ -351,7 +353,7 @@ rm examples/surf-web.rs %if %{with check} %check -# skip one failing test (probably related to mock environment) +# * skip one failing test (probably related to mock environment) %cargo_test -- -- --skip io_timeout_timedout %endif diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..fabab90 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,18 @@ +[package] +cargo-toml-patch-comments = [ + "drop windows-specific dependencies and features", + "drop WASM-specific dependencies and features", + "drop tokio v0.2 and v0.3 features", + "drop optional surf dependency", +] + +[scripts] +prep.post = [ + "# remove example that depends on the optional surf dependency", + "rm examples/surf-web.rs", +] + +[tests] +skip = ["io_timeout_timedout"] +comments = ["skip one failing test (probably related to mock environment)"] +