diff --git a/.gitignore b/.gitignore index eb0880f..f780a5a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /crossterm-0.14.1.crate /crossterm-0.14.2.crate /crossterm-0.16.0.crate +/crossterm-0.17.4.crate diff --git a/0001-Automatically-close-raw-fd-383.patch b/0001-Automatically-close-raw-fd-383.patch deleted file mode 100644 index d730ece..0000000 --- a/0001-Automatically-close-raw-fd-383.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 007063896e8b310a6711d7ab780962a9f8ed7283 Mon Sep 17 00:00:00 2001 -From: Jonathan Turner -Date: Sat, 22 Feb 2020 19:59:40 +1300 -Subject: [PATCH] Automatically close raw fd (#383) - ---- - src/event.rs | 2 +- - src/terminal/sys/unix.rs | 10 +++++----- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/event.rs b/src/event.rs -index 71eb3f3..ee2a2eb 100644 ---- a/src/event.rs -+++ b/src/event.rs -@@ -91,7 +91,7 @@ mod read; - mod source; - #[cfg(feature = "event-stream")] - mod stream; --mod sys; -+pub(crate) mod sys; - mod timeout; - - lazy_static! { -diff --git a/src/terminal/sys/unix.rs b/src/terminal/sys/unix.rs -index b5bd6e4..90fceea 100644 ---- a/src/terminal/sys/unix.rs -+++ b/src/terminal/sys/unix.rs -@@ -1,13 +1,13 @@ - //! UNIX related logic for terminal manipulation. - use std::{io, mem, process, sync::Mutex}; - -+use crate::event::sys::unix::file_descriptor::FileDesc; -+use lazy_static::lazy_static; - use libc::{ - cfmakeraw, ioctl, tcgetattr, tcsetattr, termios as Termios, winsize, STDIN_FILENO, TCSANOW, - TIOCGWINSZ, - }; - --use lazy_static::lazy_static; -- - use crate::error::{ErrorKind, Result}; - use std::fs::File; - use std::os::unix::io::IntoRawFd; -@@ -32,10 +32,10 @@ pub(crate) fn size() -> Result<(u16, u16)> { - ws_ypixel: 0, - }; - -- let file = File::open("/dev/tty").unwrap(); -+ let file = File::open("/dev/tty")?; - -- if let Ok(true) = -- wrap_with_result(unsafe { ioctl(file.into_raw_fd(), TIOCGWINSZ.into(), &mut size) }) -+ let fd = FileDesc::new(file.into_raw_fd(), true); -+ if let Ok(true) = wrap_with_result(unsafe { ioctl(fd.raw_fd(), TIOCGWINSZ.into(), &mut size) }) - { - Ok((size.ws_col, size.ws_row)) - } else { --- -2.25.1 - diff --git a/crossterm-fix-metadata.diff b/crossterm-fix-metadata.diff index be64f76..af846ac 100644 --- a/crossterm-fix-metadata.diff +++ b/crossterm-fix-metadata.diff @@ -1,5 +1,5 @@ ---- crossterm-0.16.0/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ crossterm-0.16.0/Cargo.toml 2020-03-19T00:17:11.172520+00:00 +--- crossterm-0.17.4/Cargo.toml 2020-05-02T06:10:31+00:00 ++++ crossterm-0.17.4/Cargo.toml 2020-05-10T12:37:51.042747+00:00 @@ -71,9 +71,3 @@ [target."cfg(unix)".dependencies.signal-hook] version = "0.1.13" diff --git a/rust-crossterm.spec b/rust-crossterm.spec index 8bfd6ec..f4b068d 100644 --- a/rust-crossterm.spec +++ b/rust-crossterm.spec @@ -6,8 +6,8 @@ %global crate crossterm Name: rust-%{crate} -Version: 0.16.0 -Release: 2%{?dist} +Version: 0.17.4 +Release: 1%{?dist} Summary: Crossplatform terminal library for manipulating terminals # Upstream license specification: MIT @@ -17,8 +17,6 @@ Source: %{crates_source} # Initial patched metadata # * No windows Patch0: crossterm-fix-metadata.diff -# https://github.com/crossterm-rs/crossterm/commit/007063896e8b310a6711d7ab780962a9f8ed7283 -Patch0001: 0001-Automatically-close-raw-fd-383.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -96,7 +94,6 @@ which use "serde" feature of "%{crate}" crate. %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 -find -type f -exec chmod -x '{}' '+' %cargo_prep %generate_buildrequires @@ -114,6 +111,9 @@ find -type f -exec chmod -x '{}' '+' %endif %changelog +* Sun May 10 14:37:51 CEST 2020 Igor Raits - 0.17.4-1 +- Update to 0.17.4 + * Thu Mar 19 2020 Igor Raits - 0.16.0-2 - Fix leaking fd's diff --git a/sources b/sources index f83876e..f2f0184 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (crossterm-0.16.0.crate) = bf253490940c9873529506af55de083a2352fbe01b201c04eafc1c6219a51a06d72aa59754036822be5b48fa66e54064232d9cb7f8480ea960ccd63c1ae2dba2 +SHA512 (crossterm-0.17.4.crate) = 834cf189fc9e7aa0bad22d0933241dd964b78815ed19f649398528b86cd286f17a385f12ee30609c54f99ee77ec8080cfd7c6b83d8ebe67416a7841ff763cf08