From dd90eed1f142bbaba3ccfd79e9951e2962e8a43c Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sep 10 2018 06:45:43 +0000 Subject: Switch to crossbeam-utils Signed-off-by: Igor Gnatenko --- diff --git a/0001-Switch-to-crossbeam_utils-crate-sidesteppin.patch b/0001-Switch-to-crossbeam_utils-crate-sidesteppin.patch new file mode 100644 index 0000000..427a78a --- /dev/null +++ b/0001-Switch-to-crossbeam_utils-crate-sidesteppin.patch @@ -0,0 +1,50 @@ +From b7325d011209e898466573b6e3aaf96c89f49881 Mon Sep 17 00:00:00 2001 +From: Dale Wijnand +Date: Wed, 25 Jul 2018 23:32:25 +0100 +Subject: [PATCH] Switch to crossbeam_utils crate, sidesteppin + +(cherry picked from commit 8ea90e96cf4df015722b8823b9cbfffc70ec698e) +--- + src/cargo/core/compiler/job_queue.rs | 5 +++-- + src/cargo/lib.rs | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/cargo/core/compiler/job_queue.rs b/src/cargo/core/compiler/job_queue.rs +index f7612e3c..1428ccb3 100644 +--- a/src/cargo/core/compiler/job_queue.rs ++++ b/src/cargo/core/compiler/job_queue.rs +@@ -6,7 +6,8 @@ use std::mem; + use std::sync::mpsc::{channel, Receiver, Sender}; + use std::sync::Arc; + +-use crossbeam::{self, Scope}; ++use crossbeam_utils; ++use crossbeam_utils::scoped::Scope; + use jobserver::{Acquired, HelperThread}; + + use core::profiles::Profile; +@@ -154,7 +155,7 @@ impl<'a> JobQueue<'a> { + }) + .chain_err(|| "failed to create helper thread for jobserver management")?; + +- crossbeam::scope(|scope| self.drain_the_queue(cx, plan, scope, &helper)) ++ crossbeam_utils::scoped::scope(|scope| self.drain_the_queue(cx, plan, scope, &helper)) + } + + fn drain_the_queue( +diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs +index e51dfe87..6212b0b5 100644 +--- a/src/cargo/lib.rs ++++ b/src/cargo/lib.rs +@@ -9,7 +9,7 @@ extern crate clap; + #[cfg(target_os = "macos")] + extern crate core_foundation; + extern crate crates_io as registry; +-extern crate crossbeam; ++extern crate crossbeam_utils; + extern crate curl; + #[macro_use] + extern crate failure; +-- +2.19.0.rc1 + diff --git a/cargo-0.29.0-fix-metadata.diff b/cargo-0.29.0-fix-metadata.diff deleted file mode 100644 index a6b7055..0000000 --- a/cargo-0.29.0-fix-metadata.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- cargo-0.29.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ cargo-0.29.0/Cargo.toml 2018-08-04T16:48:37.026515+02:00 -@@ -86,7 +86,7 @@ - version = "1.0.0" - - [dependencies.lazycell] --version = "0.6" -+version = "1.0" - - [dependencies.libc] - version = "0.2" -@@ -133,7 +133,7 @@ - version = "3.0" - - [dependencies.termcolor] --version = "0.3" -+version = "1.0" - - [dependencies.toml] - version = "0.4.2" -@@ -142,12 +142,3 @@ - version = "1.1" - [dev-dependencies.bufstream] - version = "0.1" --[target."cfg(target_os = \"macos\")".dependencies.core-foundation] --version = "0.6.0" --features = ["mac_os_10_7_support"] --[target."cfg(windows)".dependencies.miow] --version = "0.3" -- --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["handleapi", "jobapi", "jobapi2", "minwindef", "ntdef", "ntstatus", "processenv", "processthreadsapi", "psapi", "synchapi", "winerror", "winbase", "wincon", "winnt"] diff --git a/cargo-fix-metadata.diff b/cargo-fix-metadata.diff new file mode 100644 index 0000000..26f40d6 --- /dev/null +++ b/cargo-fix-metadata.diff @@ -0,0 +1,44 @@ +--- cargo-0.29.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ cargo-0.29.0/Cargo.toml 2018-09-10T08:42:03.817587+02:00 +@@ -37,8 +37,8 @@ + [dependencies.crates-io] + version = "0.17" + +-[dependencies.crossbeam] +-version = "0.3" ++[dependencies.crossbeam-utils] ++version = "0.5" + + [dependencies.crypto-hash] + version = "0.3.1" +@@ -86,7 +86,7 @@ + version = "1.0.0" + + [dependencies.lazycell] +-version = "0.6" ++version = "1.0" + + [dependencies.libc] + version = "0.2" +@@ -133,7 +133,7 @@ + version = "3.0" + + [dependencies.termcolor] +-version = "0.3" ++version = "1.0" + + [dependencies.toml] + version = "0.4.2" +@@ -142,12 +142,3 @@ + version = "1.1" + [dev-dependencies.bufstream] + version = "0.1" +-[target."cfg(target_os = \"macos\")".dependencies.core-foundation] +-version = "0.6.0" +-features = ["mac_os_10_7_support"] +-[target."cfg(windows)".dependencies.miow] +-version = "0.3" +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["handleapi", "jobapi", "jobapi2", "minwindef", "ntdef", "ntstatus", "processenv", "processthreadsapi", "psapi", "synchapi", "winerror", "winbase", "wincon", "winnt"] diff --git a/rust-cargo.spec b/rust-cargo.spec index 1908da7..580facd 100644 --- a/rust-cargo.spec +++ b/rust-cargo.spec @@ -7,9 +7,10 @@ Name: rust-%{crate} Version: 0.29.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Cargo, a package manager for Rust +# Upstream license specification: MIT OR Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/cargo Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate @@ -17,7 +18,9 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ # * No windows/macos # * Bump lazycell to 1.0 # * Bump termcolor to 1.0 -Patch0: cargo-0.29.0-fix-metadata.diff +# * Switch to crossbeam-utils +Patch0: cargo-fix-metadata.diff +Patch0001: 0001-Switch-to-crossbeam_utils-crate-sidesteppin.patch ExclusiveArch: %{rust_arches} @@ -26,7 +29,7 @@ BuildRequires: rust-packaging BuildRequires: (crate(atty) >= 0.2.0 with crate(atty) < 0.3.0) BuildRequires: (crate(clap) >= 2.31.2 with crate(clap) < 3.0.0) BuildRequires: (crate(crates-io) >= 0.17.0 with crate(crates-io) < 0.18.0) -BuildRequires: (crate(crossbeam) >= 0.3.0 with crate(crossbeam) < 0.4.0) +BuildRequires: (crate(crossbeam-utils) >= 0.5.0 with crate(crossbeam-utils) < 0.6.0) BuildRequires: (crate(crypto-hash) >= 0.3.1 with crate(crypto-hash) < 0.4.0) BuildRequires: (crate(curl) >= 0.4.12 with crate(curl) < 0.5.0) BuildRequires: (crate(env_logger) >= 0.5.4 with crate(env_logger) < 0.6.0) @@ -103,6 +106,9 @@ which use %{crate} from crates.io. %exclude %{_bindir}/cargo %changelog +* Mon Sep 10 2018 Igor Gnatenko - 0.29.0-2 +- Switch to crossbeam-utils + * Sat Aug 04 2018 Igor Gnatenko - 0.29.0-1 - Update to 0.29.0