diff --git a/.gitignore b/.gitignore index 6a1484a..18b1efa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pbr-1.0.1.crate +/pbr-1.0.2.crate diff --git a/0001-Fix-doctests.patch b/0001-Fix-doctests.patch deleted file mode 100644 index 76cf666..0000000 --- a/0001-Fix-doctests.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 7f2afc2458950b928bd3ca54bba3a9fd205bfb86 Mon Sep 17 00:00:00 2001 -From: nabijaczleweli -Date: Fri, 6 Jul 2018 08:02:13 +0200 -Subject: [PATCH] Fix doctests - -Closes #71 ---- - src/multi.rs | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/src/multi.rs b/src/multi.rs -index 86707ea..8dc33e1 100644 ---- a/src/multi.rs -+++ b/src/multi.rs -@@ -25,10 +25,12 @@ impl MultiBar { - /// ```no_run - /// use std::thread; - /// use pbr::MultiBar; -+ /// use std::time::Duration; - /// - /// let mut mb = MultiBar::new(); - /// mb.println("Application header:"); - /// -+ /// # let count = 250; - /// let mut p1 = mb.create_bar(count); - /// let _ = thread::spawn(move || { - /// for _ in 0..count { -@@ -97,12 +99,13 @@ impl MultiBar { - /// let mut mb = MultiBar::new(); - /// mb.println("Application header:"); - /// -- /// let mut p1 = MultiBar::create_bar(count); -+ /// # let count = 250; -+ /// let mut p1 = mb.create_bar(count); - /// // ... - /// - /// mb.println("Text line between bar1 and bar2"); - /// -- /// let mut p2 = MultiBar::create_bar(count); -+ /// let mut p2 = mb.create_bar(count); - /// // ... - /// - /// mb.println("Text line between bar2 and bar3"); -@@ -131,17 +134,18 @@ impl MultiBar { - /// use pbr::MultiBar; - /// - /// let mut mb = MultiBar::new(); -+ /// # let (count1, count2, count3) = (250, 62500, 15625000); - /// - /// // progress bar in level 1 -- /// let mut p1 = MultiBar::create_bar(count1); -+ /// let mut p1 = mb.create_bar(count1); - /// // ... - /// - /// // progress bar in level 2 -- /// let mut p2 = MultiBar::create_bar(count2); -+ /// let mut p2 = mb.create_bar(count2); - /// // ... - /// - /// // progress bar in level 3 -- /// let mut p3 = MultiBar::create_bar(count3); -+ /// let mut p3 = mb.create_bar(count3); - /// - /// // ... - /// mb.listen(); -@@ -172,6 +176,7 @@ impl MultiBar { - /// # Examples - /// - /// ```no_run -+ /// use std::thread; - /// use pbr::MultiBar; - /// - /// let mut mb = MultiBar::new(); --- -2.21.0 - diff --git a/0001-deps-update-rand-to-0.5.patch b/0001-deps-update-rand-to-0.5.patch deleted file mode 100644 index 38d9534..0000000 --- a/0001-deps-update-rand-to-0.5.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 1f1cd1858c568cbc9b06eaa916850331711c2473 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Sun, 15 Jul 2018 08:37:14 +0200 -Subject: [PATCH] deps: update rand to 0.5 - -Signed-off-by: Igor Gnatenko ---- - examples/multi.rs | 8 ++++---- - examples/simple.rs | 4 ++-- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/examples/multi.rs b/examples/multi.rs -index c6969b2..9860728 100644 ---- a/examples/multi.rs -+++ b/examples/multi.rs -@@ -1,6 +1,6 @@ - extern crate rand; - extern crate pbr; --use rand::Rng; -+use rand::prelude::*; - use pbr::MultiBar; - use std::thread; - use std::time::Duration; -@@ -23,7 +23,7 @@ fn main() { - pb.tick(); - } - for _ in 0..20 { -- let n = rand::thread_rng().gen_range(0, 100); -+ let n = thread_rng().gen_range(0, 100); - pb.message("Connected: "); - thread::sleep(Duration::from_millis(n)); - pb.inc(); -@@ -49,7 +49,7 @@ fn main() { - thread::spawn(move || { - for _ in 0..count { - pb.inc(); -- let n = rand::thread_rng().gen_range(0, 100); -+ let n = thread_rng().gen_range(0, 100); - thread::sleep(Duration::from_millis(n)); - } - pb.finish(); -@@ -64,7 +64,7 @@ fn main() { - fn rand_string() -> String { - let mut v = Vec::new(); - while v.len() < 12 { -- let b = rand::random::(); -+ let b = random::(); - // [0-9a-f] - if b > 47 && b < 58 || b > 96 && b < 103 { - v.push(b); -diff --git a/examples/simple.rs b/examples/simple.rs -index 3cacff6..bb3d34b 100644 ---- a/examples/simple.rs -+++ b/examples/simple.rs -@@ -1,6 +1,6 @@ - extern crate rand; - extern crate pbr; --use rand::Rng; -+use rand::prelude::*; - use pbr::ProgressBar; - use std::thread; - use std::time::Duration; -@@ -11,7 +11,7 @@ fn main() { - pb.format("╢▌▌░╟"); - for _ in 0..count { - pb.inc(); -- let n = rand::thread_rng().gen_range(0, 100); -+ let n = thread_rng().gen_range(0, 100); - thread::sleep(Duration::from_millis(n)); - } - pb.finish_println("done!"); --- -2.21.0 - diff --git a/pbr-fix-metadata.diff b/pbr-fix-metadata.diff index 1fe84fd..5059385 100644 --- a/pbr-fix-metadata.diff +++ b/pbr-fix-metadata.diff @@ -1,16 +1,11 @@ ---- pbr-1.0.1/Cargo.toml 2018-05-05T17:08:12+00:00 -+++ pbr-1.0.1/Cargo.toml 2019-06-22T10:50:42.039501+00:00 -@@ -12,12 +12,5 @@ - libc = "0.2" - time = "0.1.35" - --[target.'cfg(target_os = "windows")'.dependencies] --winapi = "0.2" --kernel32-sys = "0.2" -- --[target.'cfg(target_os = "redox")'.dependencies] --termion = "1.4" -- - [dev-dependencies] --rand = "0.3.14" -+rand = "0.5" +--- pbr-1.0.2/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ pbr-1.0.2/Cargo.toml 2019-09-23T05:55:38.658252+00:00 +@@ -26,8 +26,3 @@ + version = "0.1.35" + [dev-dependencies.rand] + version = "0.5" +-[target."cfg(target_os = \"redox\")".dependencies.termion] +-version = "1.4" +-[target."cfg(target_os = \"windows\")".dependencies.winapi] +-version = "0.3" +-features = ["wincon", "processenv", "winbase"] diff --git a/rust-pbr.spec b/rust-pbr.spec index b58e594..2c1d881 100644 --- a/rust-pbr.spec +++ b/rust-pbr.spec @@ -6,8 +6,8 @@ %global crate pbr Name: rust-%{crate} -Version: 1.0.1 -Release: 3%{?dist} +Version: 1.0.2 +Release: 1%{?dist} Summary: Console progress bar for Rust # Upstream license specification: MIT @@ -15,12 +15,8 @@ License: MIT URL: https://crates.io/crates/pbr Source: %{crates_source} # Initial patched metadata -# * Update rand to 0.5, https://github.com/a8m/pb/commit/1f1cd1858c568cbc9b06eaa916850331711c2473 +# * No non-linux deps Patch0: pbr-fix-metadata.diff -# Make it work with new rand -Patch0001: 0001-deps-update-rand-to-0.5.patch -# https://github.com/a8m/pb/commit/7f2afc2458950b928bd3ca54bba3a9fd205bfb86 -Patch0002: 0001-Fix-doctests.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -79,6 +75,9 @@ which use "default" feature of "%{crate}" crate. %endif %changelog +* Mon Sep 23 07:55:38 CEST 2019 Igor Gnatenko - 1.0.2-1 +- Update to 1.0.2 + * Fri Jul 26 2019 Fedora Release Engineering - 1.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index d0ce7db..e0eb024 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pbr-1.0.1.crate) = 50ce256b9fc96eca15871203ba7bcf009d05ec88f06e0f14d6e6dc0601aacfc21da7fb1c153794388ae6b102da5f6041a14cf3191c4316e0fbde94385c406174 +SHA512 (pbr-1.0.2.crate) = a49d0157933df8ee77b025d22db5c5b24efd531a4080532069010fbb14cb1970d8957791e769633ed38c606eedc26f660b1cdc624247c47f8a3cee94b3662213