Update to 3.1.1

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 7 years ago
parent 633659c237
commit 5b913e2760
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

1
.gitignore vendored

@ -1,2 +1,3 @@
/ctrlc-3.0.3.crate
/ctrlc-3.1.0.crate
/ctrlc-3.1.1.crate

@ -1,53 +0,0 @@
From 485f893f851eb3eb74ba32182a579c0faf10fd94 Mon Sep 17 00:00:00 2001
From: Josh Stone <cuviper@gmail.com>
Date: Mon, 26 Feb 2018 23:58:32 -0800
Subject: [PATCH] Update to nix 0.10
---
src/platform/unix.rs | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/platform/unix.rs b/src/platform/unix.rs
index 18cf3d8..2bbd5e3 100644
--- a/src/platform/unix.rs
+++ b/src/platform/unix.rs
@@ -44,7 +44,7 @@ pub unsafe fn init_os_handler() -> Result<(), Error> {
use self::nix::fcntl;
use self::nix::sys::signal;
- PIPE = unistd::pipe2(fcntl::O_CLOEXEC).map_err(|e| Error::System(nix_err_to_io_err(e)))?;
+ PIPE = unistd::pipe2(fcntl::OFlag::O_CLOEXEC).map_err(|e| Error::System(nix_err_to_io_err(e)))?;
let close_pipe = |e: nix::Error| -> Error {
unistd::close(PIPE.1).is_ok();
@@ -53,12 +53,16 @@ pub unsafe fn init_os_handler() -> Result<(), Error> {
};
// Make sure we never block on write in the os handler.
- if let Err(e) = fcntl::fcntl(PIPE.1, fcntl::FcntlArg::F_SETFL(fcntl::O_NONBLOCK)) {
+ if let Err(e) = fcntl::fcntl(PIPE.1, fcntl::FcntlArg::F_SETFL(fcntl::OFlag::O_NONBLOCK)) {
return Err(close_pipe(e));
}
let handler = signal::SigHandler::Handler(os_handler);
- let new_action = signal::SigAction::new(handler, signal::SA_RESTART, signal::SigSet::empty());
+ let new_action = signal::SigAction::new(
+ handler,
+ signal::SaFlags::SA_RESTART,
+ signal::SigSet::empty(),
+ );
let _old = match signal::sigaction(signal::Signal::SIGINT, &new_action) {
Ok(old) => old,
@@ -97,7 +101,7 @@ pub unsafe fn block_ctrl_c() -> Result<(), Error> {
match unistd::read(PIPE.0, &mut buf[..]) {
Ok(1) => break,
Ok(_) => return Err(Error::System(io::ErrorKind::UnexpectedEof.into()).into()),
- Err(nix::Error::Sys(nix::Errno::EINTR)) => {}
+ Err(nix::Error::Sys(nix::errno::Errno::EINTR)) => {}
Err(e) => return Err(Error::System(nix_err_to_io_err(e))),
}
}
--
2.16.2

@ -1,13 +0,0 @@
--- ctrlc-3.1.0/Cargo.toml 1970-01-01T01:00:00+01:00
+++ ctrlc-3.1.0/Cargo.toml 2018-03-08T21:10:30.966416+01:00
@@ -29,9 +29,4 @@
[features]
termination = []
[target."cfg(unix)".dependencies.nix]
-version = "0.9"
-[target."cfg(windows)".dependencies.kernel32-sys]
-version = "0.2"
-
-[target."cfg(windows)".dependencies.winapi]
-version = "0.2"
+version = "0.10"

@ -0,0 +1,12 @@
--- ctrlc-3.1.1/Cargo.toml 1970-01-01T01:00:00+01:00
+++ ctrlc-3.1.1/Cargo.toml 2018-07-17T09:55:32.501826+02:00
@@ -30,9 +30,3 @@
termination = []
[target."cfg(unix)".dependencies.nix]
version = "0.11"
-[target."cfg(windows)".dependencies.winapi]
-version = "0.3"
-features = ["consoleapi", "handleapi", "synchapi", "winbase"]
-[target."cfg(windows)".dev-dependencies.winapi]
-version = "0.3"
-features = ["fileapi", "processenv", "winnt"]

@ -5,8 +5,8 @@
%global crate ctrlc
Name: rust-%{crate}
Version: 3.1.0
Release: 4%{?dist}
Version: 3.1.1
Release: 1%{?dist}
Summary: Easy Ctrl-C handler for Rust projects
License: MIT or ASL 2.0
@ -14,16 +14,13 @@ URL: https://crates.io/crates/ctrlc
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * No windows
# * Bump nix to 0.10
Patch0: ctrlc-3.1.0-fix-metadata.diff
# Make it work with nix 0.10
Patch1: 0001-Update-to-nix-0.10.patch
Patch0: ctrlc-3.1.1-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(nix) >= 0.10.0 with crate(nix) < 0.11.0)
BuildRequires: (crate(nix) >= 0.11.0 with crate(nix) < 0.12.0)
%description
%{summary}.
@ -60,6 +57,9 @@ which use %{crate} from crates.io.
%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml
%changelog
* Tue Jul 17 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.1.1-1
- Update to 3.1.1
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

@ -1 +1 @@
SHA512 (ctrlc-3.1.0.crate) = f06cc8120873289cd2c34d4209ee33dfbaada9c57bfb8d126a6cabaca9c9dbb705a0582df76488771a418eb078dc2074fce6a6b1ffbde4c32e38069af418cd1c
SHA512 (ctrlc-3.1.1.crate) = 31e7208a6e6d2b8ff2e00dd9e12cdba3ba9eac24418cd3df137648698bb9489f4bf0b7cb8b28bacf3300c44a6001b4c4fe7f87fc11d3d47e2f0cca7f8b0d70fd

Loading…
Cancel
Save