From a3ac596df51cec50c7df181560a88ebf515926d3 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 24 Oct 2024 00:02:41 +0200 Subject: [PATCH] Bump nix dev-dependency from 0.26.2 to 0.29 --- 0001-port-from-nix-0.26-to-0.29.patch | 36 +++++++++++++++++++++++++++ bat-fix-metadata-auto.diff | 2 +- bat-fix-metadata.diff | 11 +++++++- rust-bat.spec | 2 ++ rust2rpm.toml | 1 + 5 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 0001-port-from-nix-0.26-to-0.29.patch diff --git a/0001-port-from-nix-0.26-to-0.29.patch b/0001-port-from-nix-0.26-to-0.29.patch new file mode 100644 index 0000000..9bf4cf8 --- /dev/null +++ b/0001-port-from-nix-0.26-to-0.29.patch @@ -0,0 +1,36 @@ +From b940f15dc2ba522fb2bcf40f276045ff7a92d0d2 Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Thu, 24 Oct 2024 00:00:09 +0200 +Subject: [PATCH] port from nix 0.26 to 0.29 + +--- + tests/integration_tests.rs | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs +index 8d2d362..2be33d9 100644 +--- a/tests/integration_tests.rs ++++ b/tests/integration_tests.rs +@@ -9,7 +9,7 @@ use tempfile::tempdir; + mod unix { + pub use std::fs::File; + pub use std::io::{self, Write}; +- pub use std::os::unix::io::FromRawFd; ++ pub use std::os::unix::io::{AsRawFd, FromRawFd}; + pub use std::path::PathBuf; + pub use std::process::Stdio; + pub use std::thread; +@@ -307,8 +307,8 @@ fn no_args_doesnt_break() { + // not exit, because in this case it is safe to read and write to the same fd, which is why + // this test exists. + let OpenptyResult { master, slave } = openpty(None, None).expect("Couldn't open pty."); +- let mut master = unsafe { File::from_raw_fd(master) }; +- let stdin_file = unsafe { File::from_raw_fd(slave) }; ++ let mut master = unsafe { File::from_raw_fd(master.as_raw_fd()) }; ++ let stdin_file = unsafe { File::from_raw_fd(slave.as_raw_fd()) }; + let stdout_file = stdin_file.try_clone().unwrap(); + let stdin = Stdio::from(stdin_file); + let stdout = Stdio::from(stdout_file); +-- +2.47.0 + diff --git a/bat-fix-metadata-auto.diff b/bat-fix-metadata-auto.diff index e3638a6..4aab2c3 100644 --- a/bat-fix-metadata-auto.diff +++ b/bat-fix-metadata-auto.diff @@ -1,5 +1,5 @@ --- bat-0.24.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ bat-0.24.0/Cargo.toml 2024-10-23T21:47:41.348860+00:00 ++++ bat-0.24.0/Cargo.toml 2024-10-23T22:00:42.934747+00:00 @@ -199,13 +199,8 @@ regex-fancy = ["syntect/regex-fancy"] regex-onig = ["syntect/regex-onig"] diff --git a/bat-fix-metadata.diff b/bat-fix-metadata.diff index 4429de5..de7950a 100644 --- a/bat-fix-metadata.diff +++ b/bat-fix-metadata.diff @@ -1,5 +1,5 @@ --- bat-0.24.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ bat-0.24.0/Cargo.toml 2024-10-23T21:49:08.185292+00:00 ++++ bat-0.24.0/Cargo.toml 2024-10-23T22:02:03.316147+00:00 @@ -24,7 +24,7 @@ homepage = "https://github.com/sharkdp/bat" readme = "README.md" @@ -49,3 +49,12 @@ minimal-application = [ "clap", "etcetera", +@@ -200,7 +187,7 @@ + regex-onig = ["syntect/regex-onig"] + + [target."cfg(unix)".dev-dependencies.nix] +-version = "0.26.2" ++version = "0.29" + features = ["term"] + default-features = false + diff --git a/rust-bat.spec b/rust-bat.spec index e57fc40..8882d81 100644 --- a/rust-bat.spec +++ b/rust-bat.spec @@ -18,11 +18,13 @@ Patch: bat-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * port from path_abs to path-absolutize: # https://github.com/sharkdp/bat/pull/1025 +# * bump nix from 0.26 to 0.29 # * bump nu-ansi-term from 0.49.0 to 0.50.0 # * adapt license tag to reflect bundled content # * drop unused lessopen feature and its dependencies Patch: bat-fix-metadata.diff Patch: 0001-port-from-path_abs-to-path-absolutize.patch +Patch: 0001-port-from-nix-0.26-to-0.29.patch BuildRequires: cargo-rpm-macros >= 24 diff --git a/rust2rpm.toml b/rust2rpm.toml index b937b92..c653dea 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -1,6 +1,7 @@ [package] cargo-toml-patch-comments = [ "port from path_abs to path-absolutize: https://github.com/sharkdp/bat/pull/1025", + "bump nix from 0.26 to 0.29", "bump nu-ansi-term from 0.49.0 to 0.50.0", "adapt license tag to reflect bundled content", "drop unused lessopen feature and its dependencies",