From 600d70ab2643712213bd48d16124ed9bbc62b456 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 17 May 2023 13:14:53 +0200 Subject: [PATCH] Update to version 1.0.0; Fixes RHBZ#1939192 --- .gitignore | 1 + 0001-Avoid-using-python-in-the-tests.patch | 47 ---------------------- rust-shared_child.spec | 8 ++-- shared_child-fix-metadata-auto.diff | 6 +-- sources | 2 +- 5 files changed, 8 insertions(+), 56 deletions(-) delete mode 100644 0001-Avoid-using-python-in-the-tests.patch diff --git a/.gitignore b/.gitignore index d2efc54..39c89bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /shared_child-0.3.3.crate /shared_child-0.3.4.crate +/shared_child-1.0.0.crate diff --git a/0001-Avoid-using-python-in-the-tests.patch b/0001-Avoid-using-python-in-the-tests.patch deleted file mode 100644 index 28ca8da..0000000 --- a/0001-Avoid-using-python-in-the-tests.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 7860be68defbae89ac2baab06b8052abac1cc946 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Sun, 7 Jul 2019 16:36:34 +0200 -Subject: [PATCH] Avoid using python in the tests - -References: https://github.com/oconnor663/shared_child.rs/issues/16 -Signed-off-by: Igor Gnatenko ---- - src/lib.rs | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/src/lib.rs b/src/lib.rs -index ee77aa4..e9c7118 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -39,8 +39,8 @@ - //! - //! // Spawn a child that will just sleep for a long time, - //! // and put it in an Arc to share between threads. --//! let mut command = Command::new("python"); --//! command.arg("-c").arg("import time; time.sleep(1000000000)"); -+//! let mut command = Command::new("sleep"); -+//! command.arg("infinity"); - //! let shared_child = SharedChild::spawn(&mut command).unwrap(); - //! let child_arc = Arc::new(shared_child); - //! -@@ -232,14 +232,12 @@ mod tests { - use std::sync::Arc; - - pub fn true_cmd() -> Command { -- let mut cmd = Command::new("python"); -- cmd.arg("-c").arg(""); -- cmd -+ Command::new("true") - } - - pub fn sleep_forever_cmd() -> Command { -- let mut cmd = Command::new("python"); -- cmd.arg("-c").arg("import time; time.sleep(1000000)"); -+ let mut cmd = Command::new("sleep"); -+ cmd.arg("infinity"); - cmd - } - --- -2.23.0 - diff --git a/rust-shared_child.spec b/rust-shared_child.spec index ce0ab6c..333eae2 100644 --- a/rust-shared_child.spec +++ b/rust-shared_child.spec @@ -5,7 +5,7 @@ %global crate shared_child Name: rust-shared_child -Version: 0.3.4 +Version: 1.0.0 Release: %autorelease Summary: Library for using child processes from multiple threads @@ -14,9 +14,6 @@ URL: https://crates.io/crates/shared_child Source: %{crates_source} # Automatically generated patch to strip foreign dependencies Patch: shared_child-fix-metadata-auto.diff -# * replace usage of /usr/bin/python with simple /usr/bin/sleep: -# https://github.com/oconnor663/shared_child.rs/issues/16 -Patch: 0001-Avoid-using-python-in-the-tests.patch BuildRequires: rust-packaging >= 21 @@ -66,7 +63,8 @@ use the "default" feature of the "%{crate}" crate. %if %{with check} %check -%cargo_test +# * doctests try to run unversioned "python" +%cargo_test -- --lib %endif %changelog diff --git a/shared_child-fix-metadata-auto.diff b/shared_child-fix-metadata-auto.diff index 2ceea12..8a0ec98 100644 --- a/shared_child-fix-metadata-auto.diff +++ b/shared_child-fix-metadata-auto.diff @@ -1,6 +1,6 @@ ---- shared_child-0.3.4/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ shared_child-0.3.4/Cargo.toml 2023-04-12T16:58:16.048194+00:00 -@@ -22,6 +22,3 @@ +--- shared_child-1.0.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ shared_child-1.0.0/Cargo.toml 2023-05-17T11:08:05.223912+00:00 +@@ -23,6 +23,3 @@ repository = "https://github.com/oconnor663/shared_child.rs" [target."cfg(not(windows))".dependencies.libc] version = "0.2.42" diff --git a/sources b/sources index 88392e5..e1b2d53 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (shared_child-0.3.4.crate) = 590d269b8177d1df3e47e209a632e7d7a8c044e00cb93e393e4d4d0804adbf50a01e0764bdcca2d3583209cb3c6db4f963bd5fb5c43f25a27851c1f754267e84 +SHA512 (shared_child-1.0.0.crate) = d0e16cc7253271e6468659db0d7344c2d75772dd3428f686c49ce34bfea6ba8fa010b1ba83375241bf019e77c842001c6e1ab5096af54af03586e05c3f8fc476