diff --git a/.gitignore b/.gitignore index efbc8cc..d6cec81 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /anstream-0.6.11.crate /anstream-0.6.12.crate /anstream-0.6.13.crate +/anstream-0.6.14.crate diff --git a/0001-drop-is_terminal_polyfill-and-replace-with-std-io-Is.patch b/0001-drop-is_terminal_polyfill-and-replace-with-std-io-Is.patch new file mode 100644 index 0000000..c0f8e74 --- /dev/null +++ b/0001-drop-is_terminal_polyfill-and-replace-with-std-io-Is.patch @@ -0,0 +1,25 @@ +From e0641952e15e81afd101652240828d30d7ee6726 Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Tue, 2 Jul 2024 14:24:40 +0200 +Subject: [PATCH] drop is_terminal_polyfill and replace with + std::io::IsTerminal + +--- + src/stream.rs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/stream.rs b/src/stream.rs +index b30d232..e8472c1 100644 +--- a/src/stream.rs ++++ b/src/stream.rs +@@ -1,5 +1,7 @@ + //! Higher-level traits to describe writeable streams + ++use std::io as is_terminal_polyfill; ++ + /// Required functionality for underlying [`std::io::Write`] for adaptation + #[cfg(not(all(windows, feature = "wincon")))] + pub trait RawStream: std::io::Write + IsTerminal + private::Sealed {} +-- +2.45.2 + diff --git a/anstream-fix-metadata-auto.diff b/anstream-fix-metadata-auto.diff index e854038..cce84cb 100644 --- a/anstream-fix-metadata-auto.diff +++ b/anstream-fix-metadata-auto.diff @@ -1,12 +1,20 @@ ---- anstream-0.6.13/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ anstream-0.6.13/Cargo.toml 2024-02-29T10:44:04.583536+00:00 -@@ -133,8 +133,5 @@ +--- anstream-0.6.14/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ anstream-0.6.14/Cargo.toml 2024-07-02T12:18:12.596325+00:00 +@@ -141,11 +141,7 @@ "wincon", ] test = [] -wincon = ["dep:anstyle-wincon"] -+wincon = [] - +- -[target."cfg(windows)".dependencies.anstyle-wincon] -version = "3.0.1" -optional = true ++wincon = [] + + [lints.clippy] + bool_assert_comparison = "allow" +@@ -216,3 +212,4 @@ + unused_lifetimes = "warn" + unused_macro_rules = "warn" + unused_qualifications = "warn" ++ diff --git a/anstream-fix-metadata.diff b/anstream-fix-metadata.diff index f483b73..0561061 100644 --- a/anstream-fix-metadata.diff +++ b/anstream-fix-metadata.diff @@ -1,8 +1,8 @@ ---- anstream-0.6.13/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ anstream-0.6.13/Cargo.toml 2024-02-29T10:44:20.697603+00:00 -@@ -83,18 +83,6 @@ - [Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD""" - search = "" +--- anstream-0.6.14/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ anstream-0.6.14/Cargo.toml 2024-07-02T12:20:01.373905+00:00 +@@ -88,18 +88,6 @@ + name = "query-stream" + required-features = ["auto"] -[[bench]] -name = "strip" @@ -19,13 +19,18 @@ [dependencies.anstyle] version = "1.0.0" -@@ -110,9 +98,6 @@ +@@ -113,14 +101,8 @@ + [dependencies.colorchoice] + version = "1.0.0" +-[dependencies.is_terminal_polyfill] +-version = "1.48" +- [dependencies.utf8parse] version = "0.2.1" - --[dev-dependencies.criterion] --version = "0.5.1" +-[dev-dependencies.divan] +-version = "0.1.11" [dev-dependencies.lexopt] version = "0.3.0" diff --git a/rust-anstream.spec b/rust-anstream.spec index 5a4fda7..e8f3b73 100644 --- a/rust-anstream.spec +++ b/rust-anstream.spec @@ -5,7 +5,7 @@ %global crate anstream Name: rust-anstream -Version: 0.6.13 +Version: 0.6.14 Release: %autorelease Summary: Simple cross platform library for writing colored text to a terminal @@ -15,8 +15,10 @@ Source: %{crates_source} # Automatically generated patch to strip dependencies and normalize metadata Patch: anstream-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes -# * drop unused, benchmark-only criterion dev-dependency +# * drop unused, benchmark-only divan dev-dependency +# * drop unnecessary is-terminal polyfill (MSRV 1.65 -> 1.70 is OK downstream) Patch: anstream-fix-metadata.diff +Patch: 0001-drop-is_terminal_polyfill-and-replace-with-std-io-Is.patch BuildRequires: cargo-rpm-macros >= 24 diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..f1be50a --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,6 @@ +[package] +cargo-toml-patch-comments = [ + "drop unused, benchmark-only divan dev-dependency", + "drop unnecessary is-terminal polyfill (MSRV 1.65 -> 1.70 is OK downstream)", +] + diff --git a/sources b/sources index 8114015..f2c0603 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (anstream-0.6.13.crate) = 4f9ccfd135de9be22a01230f39d571c8d8ccf7c3eba837fbf0868c9660693b60ee0c1c2f9490a587d5307e892ed45cb946da7a0690a9f972619c94fb050bde09 +SHA512 (anstream-0.6.14.crate) = 65ece20958e3fb1ed4a5ff1d45f5bfdcb942c64994a3d14eefb0dfd5b04f433f6e1b06ebff240c67ed8ff7cc01d93ca0acf8c8ea29cb41309c6c882e7c192b34