Compare commits

...

3 Commits

@ -0,0 +1,25 @@
From a47cd6fd89e913310bdca752ca6a69f53c140747 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Thu, 29 Aug 2024 16:21:45 +0200
Subject: [PATCH] Port from rustix 0.37 to 0.38
---
src/unix.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/unix.rs b/src/unix.rs
index 59af979..0a3de13 100644
--- a/src/unix.rs
+++ b/src/unix.rs
@@ -6,7 +6,7 @@ use rustix::fd::BorrowedFd;
///
/// If STDOUT is not a tty, returns `None`
pub fn terminal_size() -> Option<(Width, Height)> {
- terminal_size_using_fd(rustix::io::raw_stdout())
+ terminal_size_using_fd(rustix::stdio::raw_stdout())
}
/// Returns the size of the terminal using the given file descriptor, if available.
--
2.46.0

@ -1,4 +1,4 @@
# Generated by rust2rpm 24 # Generated by rust2rpm 26
%bcond_without check %bcond_without check
%global debug_package %{nil} %global debug_package %{nil}
@ -12,10 +12,14 @@ Summary: Gets the size of your Linux or Windows terminal
License: MIT OR Apache-2.0 License: MIT OR Apache-2.0
URL: https://crates.io/crates/terminal_size URL: https://crates.io/crates/terminal_size
Source: %{crates_source} Source: %{crates_source}
# Automatically generated patch to strip foreign dependencies # Automatically generated patch to strip dependencies and normalize metadata
Patch: terminal_size-fix-metadata-auto.diff Patch: terminal_size-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * bump rustix dependency from 0.37 to 0.38
Patch: terminal_size-fix-metadata.diff
Patch: 0001-Port-from-rustix-0.37-to-0.38.patch
BuildRequires: rust-packaging >= 21 BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand: %global _description %{expand:
Gets the size of your Linux or Windows terminal.} Gets the size of your Linux or Windows terminal.}
@ -50,7 +54,7 @@ use the "default" feature of the "%{crate}" crate.
%ghost %{crate_instdir}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%prep %prep
%autosetup -n %{crate}-%{version_no_tilde} -p1 %autosetup -n %{crate}-%{version} -p1
%cargo_prep %cargo_prep
%generate_buildrequires %generate_buildrequires
@ -64,7 +68,7 @@ use the "default" feature of the "%{crate}" crate.
%if %{with check} %if %{with check}
%check %check
# skip tests that don't work without a TTY # * skip tests that don't work without a TTY
%cargo_test -- -- --skip unix::compare_with_stty %cargo_test -- -- --skip unix::compare_with_stty
%endif %endif

@ -0,0 +1,9 @@
[package]
cargo-toml-patch-comments = [
"bump rustix dependency from 0.37 to 0.38",
]
[tests]
skip = ["unix::compare_with_stty"]
comments = ["skip tests that don't work without a TTY"]

@ -1,5 +1,5 @@
--- terminal_size-0.2.6/Cargo.toml 1970-01-01T00:00:01+00:00 --- terminal_size-0.2.6/Cargo.toml 1970-01-01T00:00:01+00:00
+++ terminal_size-0.2.6/Cargo.toml 2023-09-20T09:58:34.443659+00:00 +++ terminal_size-0.2.6/Cargo.toml 2024-08-29T14:23:13.991642+00:00
@@ -31,9 +31,3 @@ @@ -31,9 +31,3 @@
version = "0.37.0" version = "0.37.0"
features = ["termios"] features = ["termios"]

@ -0,0 +1,11 @@
--- terminal_size-0.2.6/Cargo.toml 1970-01-01T00:00:01+00:00
+++ terminal_size-0.2.6/Cargo.toml 2024-08-29T14:23:25.182709+00:00
@@ -28,6 +28,6 @@
repository = "https://github.com/eminence/terminal-size"
[target."cfg(not(windows))".dependencies.rustix]
-version = "0.37.0"
-features = ["termios"]
+version = "0.38.0"
+features = ["stdio", "termios"]
Loading…
Cancel
Save