The package rpms/rust-rpick.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-rpick.git/commit/?id=9fbd382....
Change:
+%ifarch %{arm} ppc64le
Thanks.
Full change:
============
commit 9fbd3820ae8f99e8a1320eb46826b222f92842d7
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Wed Jan 11 18:34:52 2023 +0100
disable doctests on ppc64le to work around a compiler crash on LLVM 15
diff --git a/rust-rpick.spec b/rust-rpick.spec
index f6b4bfe..9a90ddf 100644
--- a/rust-rpick.spec
+++ b/rust-rpick.spec
@@ -5,7 +5,7 @@
Name: rust-%{crate}
Version: 0.8.11
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Helps you pick items from a list by various algorithms
# Upstream license specification: GPL-3.0-only
@@ -85,9 +85,11 @@ use the "default" feature of the "%{crate}" crate.
%if %{with check}
%check
-%ifarch %{arm}
-# * skip doctests on armv7hl due to rustc / LLVM 14 crashes:
+%ifarch %{arm} ppc64le
+# * doctests fail to compile on armv7hl with LLVM 14:
#
https://bugzilla.redhat.com/show_bug.cgi?id=2086106
+# * doctests fail to compile on ppc64le with LLVM 15:
+#
https://bugzilla.redhat.com/show_bug.cgi?id=2142648
%cargo_test -- --lib
%else
%cargo_test
@@ -95,6 +97,9 @@ use the "default" feature of the "%{crate}" crate.
%endif
%changelog
+* Wed Jan 11 2023 Fabio Valentini <decathorpe(a)gmail.com> - 0.8.11-2
+- Disable doctests on ppc64le to work around a compiler crash on LLVM 15.
+
* Sun Sep 11 2022 Randy Barlow <bowlofeggs(a)fedoraproject.org> - 0.8.11-1
- Update to 0.8.11 (#2060236).
commit 9574a952979dab6bcf39fee1aef9f4821712062a
Author: Randy Barlow <randy(a)electronsweatshop.com>
Date: Sun Sep 11 11:25:51 2022 -0400
Update to 0.8.11 (#2060236)
Signed-off-by: Randy Barlow <randy(a)electronsweatshop.com>
diff --git a/.gitignore b/.gitignore
index d77e0c8..7e3a4a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@
/rpick-0.6.1.crate
/rpick-0.8.7.crate
/rpick-0.8.10.crate
+/rpick-0.8.11.crate
diff --git a/rust-rpick.spec b/rust-rpick.spec
index c502843..f6b4bfe 100644
--- a/rust-rpick.spec
+++ b/rust-rpick.spec
@@ -4,12 +4,12 @@
%global crate rpick
Name: rust-%{crate}
-Version: 0.8.10
+Version: 0.8.11
Release: 1%{?dist}
Summary: Helps you pick items from a list by various algorithms
-# Upstream license specification: GPL-3.0
-License: GPLv3
+# Upstream license specification: GPL-3.0-only
+License: GPL-3.0-only
URL:
https://crates.io/crates/rpick
Source: %{crates_source}
@@ -33,7 +33,7 @@ Summary: %{summary}
# * MIT or ASL 2.0
# * Unlicense or MIT
# * zlib or ASL 2.0 or MIT
-License: GPLv3 and ASL 2.0 and BSD and MIT
+License: GPL-3.0-only AND Apache-2.0 AND BSD AND MIT
%description -n %{crate} %{_description}
@@ -95,6 +95,9 @@ use the "default" feature of the "%{crate}" crate.
%endif
%changelog
+* Sun Sep 11 2022 Randy Barlow <bowlofeggs(a)fedoraproject.org> - 0.8.11-1
+- Update to 0.8.11 (#2060236).
+
* Tue Aug 02 2022 Randy Barlow <bowlofeggs(a)fedoraproject.org> - 0.8.10-1
- Update to 0.8.10.
diff --git a/sources b/sources
index 603cc0b..7eb86f0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (rpick-0.8.10.crate) =
086a0ed2660aa985a492166e880710b19e430531a8894f318b725efca56ec5b3447163739e8a80707edfabcb3638786683ee267126e252628fd56d1e30d52a31
+SHA512 (rpick-0.8.11.crate) =
0fbd1e15c2e6a29acd8f135af165d1129a7e7c4075ba3045b9832caf2065956a8c2ebea98b2e2148568edc7a9592077aebd1bbb56c7513588023828a8580456e
commit 0940e79ba83e76f39246dce57d6ecc156d6518ef
Author: Randy Barlow <randy(a)electronsweatshop.com>
Date: Tue Aug 2 18:57:37 2022 -0400
Update to 0.8.10
Signed-off-by: Randy Barlow <randy(a)electronsweatshop.com>
diff --git a/.gitignore b/.gitignore
index bdbd663..d77e0c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/rpick-0.5.1.crate
/rpick-0.6.1.crate
/rpick-0.8.7.crate
+/rpick-0.8.10.crate
diff --git a/0000-Make-most-tests-be-arch-independent.patch
b/0000-Make-most-tests-be-arch-independent.patch
deleted file mode 100644
index 552d9cd..0000000
--- a/0000-Make-most-tests-be-arch-independent.patch
+++ /dev/null
@@ -1,282 +0,0 @@
-From 9d3e9b704e48b9dedb3612f40735f24dfc94f598 Mon Sep 17 00:00:00 2001
-From: Randy Barlow <randy(a)electronsweatshop.com>
-Date: Tue, 24 Mar 2020 23:42:41 -0400
-Subject: [PATCH] Add a test RNG that is arch-independent
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Prior to this commit, we were using SmallRng with hardcoded seeds
-to get deterministic test results. This led to problems when
-running the tests on 32-bit architectures, as they would cause the
-RNG to pick different values in the tests and cause the assertions
-to fail.
-
-This commit adds a new FakeRng for testing that always returns the
-values 0, 1, 2…, no matter whether the host is a 32-bit or 64-bit
-system. This way the test results on both architectures end up
-picking the same values, which makes testing a bit easier to
-maintain going forward.
-
-Signed-off-by: Randy Barlow <randy(a)electronsweatshop.com>
----
- Cargo.lock | 1 +
- Cargo.toml | 1 +
- src/lib.rs | 104 +++++++++++++++++++++++++++++------------------------
- 3 files changed, 60 insertions(+), 46 deletions(-)
-
-diff --git a/Cargo.lock b/Cargo.lock
-index 8c9f59b..f22f398 100644
---- a/Cargo.lock
-+++ b/Cargo.lock
-@@ -307,6 +307,7 @@ version = "0.5.1"
- dependencies = [
- "dirs",
- "rand",
-+ "rand_core",
- "rand_distr",
- "serde",
- "serde_yaml",
-diff --git a/Cargo.toml b/Cargo.toml
-index 766f44f..4c8a9cb 100644
---- a/Cargo.toml
-+++ b/Cargo.toml
-@@ -43,3 +43,5 @@
- [dev-dependencies.rand]
- version = "0.7"
- features = ["small_rng"]
-+[dev-dependencies.rand_core]
-+version = "0"
-diff --git a/src/lib.rs b/src/lib.rs
-index 42dacb4..9df0de2 100644
---- a/src/lib.rs
-+++ b/src/lib.rs
-@@ -456,9 +456,36 @@ fn default_weight() -> u64 {
- #[cfg(test)]
- mod tests {
- use rand::SeedableRng;
-+ use rand_core;
-
- use super::*;
-
-+ struct FakeRng(u32);
-+
-+ /// This allows our tests to have predictable results, and to have the same
predictable results
-+ /// on both 32-bit and 64-bit architectures. This is used for all tests except for
the Gaussian
-+ /// tests, since those do behave differently between 32-bit and 64-bit systems when
using this
-+ /// rng.
-+ impl rand::RngCore for FakeRng {
-+ fn next_u32(&mut self) -> u32 {
-+ self.0 += 1;
-+ self.0 - 1
-+ }
-+
-+ fn next_u64(&mut self) -> u64 {
-+ self.next_u32() as u64
-+ }
-+
-+ fn fill_bytes(&mut self, dest: &mut [u8]) {
-+ rand_core::impls::fill_bytes_via_next(self, dest)
-+ }
-+
-+ fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(),
rand_core::Error> {
-+ self.fill_bytes(dest);
-+ Ok(())
-+ }
-+ }
-+
- #[test]
- fn test_defaults() {
- assert!((default_stddev_scaling_factor() - 3.0).abs() < 0.000_001);
-@@ -474,8 +501,7 @@ mod tests {
-
- for (input, expected_output) in tests.iter() {
- let output = Vec::new();
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(42));
-+ let mut engine = Engine::new(input.as_bytes(), output, FakeRng(0));
-
- assert_eq!(engine.get_consent("do you want this"),
*expected_output);
-
-@@ -488,14 +514,7 @@ mod tests {
- fn test_pick() {
- let input = String::from("N\ny");
- let output = Vec::new();
-- // We need to seed the engine differently for 32-bit architectures than for
64-bit so that
-- // they each pick the same result for this test.
-- #[cfg(target_pointer_width = "64")]
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(42));
-- #[cfg(target_pointer_width = "32")]
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(32));
-+ let mut engine = Engine::new(input.as_bytes(), output, FakeRng(0));
- let choices = vec![String::from("this"),
String::from("that"), String::from("the other")];
- let category = ConfigCategory::Even{choices};
- let mut config = BTreeMap::new();
-@@ -503,17 +522,16 @@ mod tests {
-
- let choice = engine.pick(&mut config,
"things".to_string()).expect("unexpected");
-
-- assert_eq!(choice, "the other");
-+ assert_eq!(choice, "that");
- let output = String::from_utf8(engine.output).expect("Not UTF-8");
-- assert_eq!(output, "Choice is this. Accept? (Y/n) Choice is the other.
Accept? (Y/n) ");
-+ assert_eq!(output, "Choice is this. Accept? (Y/n) Choice is that. Accept?
(Y/n) ");
- }
-
- #[test]
- fn test_pick_nonexistant_category() {
- let input = String::from("N\ny");
- let output = Vec::new();
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(42));
-+ let mut engine = Engine::new(input.as_bytes(), output, FakeRng(0));
- let choices = vec![String::from("this"),
String::from("that"), String::from("the other")];
- let category = ConfigCategory::Even{choices};
- let mut config = BTreeMap::new();
-@@ -533,29 +551,28 @@ mod tests {
- fn test_pick_even() {
- let input = String::from("y");
- let output = Vec::new();
-- // We need to seed the engine differently for 32-bit architectures than for
64-bit so that
-- // they each pick the same result for this test.
-- #[cfg(target_pointer_width = "64")]
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(1));
-- #[cfg(target_pointer_width = "32")]
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(5));
-+ let mut engine = Engine::new(input.as_bytes(), output, FakeRng(0));
- let choices = vec![String::from("this"),
String::from("that"), String::from("the other")];
-
- let result = engine.pick_even(&choices);
-
- let output = String::from_utf8(engine.output).expect("Not UTF-8");
-- assert_eq!(output, "Choice is the other. Accept? (Y/n) ");
-- assert_eq!(result, "the other");
-+ assert_eq!(output, "Choice is this. Accept? (Y/n) ");
-+ assert_eq!(result, "this");
- }
-
- #[test]
- fn test_pick_gaussian() {
- let input = String::from("y");
- let output = Vec::new();
-- // We need to seed the engine differently for 32-bit architectures than for
64-bit so that
-- // they each pick the same result for this test.
-+ // Unfortunately, the FakeRng we wrote above causes the Gaussian distribution to
often
-+ // pick outside of the distribution for 32-bit values on 64-bit systems. Since
it is a
-+ // u32, this means that the user saying no here will make the implementation
loop forever
-+ // until it hits MAXINT on 64-bit systems. If we made the FakeRng be a 64 bit
value, then
-+ // the test results on 32-bit systems would overflow. Ideally we'd have a
better way than
-+ // the below to get consistent test results between 32-bit and 64-bit systems,
but for now
-+ // this works OK. We seed the engine differently for 32-bit architectures than
for
-+ // 64-bit so that they each pick the same result for this test.
- #[cfg(target_pointer_width = "64")]
- let mut engine = Engine::new(input.as_bytes(), output,
- rand::rngs::SmallRng::seed_from_u64(1));
-@@ -579,8 +596,7 @@ mod tests {
- // The user says no to the first one and yes to the second.
- let input = String::from("n\ny");
- let output = Vec::new();
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(1));
-+ let mut engine = Engine::new(input.as_bytes(), output, FakeRng(0));
- let mut choices = vec![
- String::from("this"), String::from("that"),
String::from("the other")];
-
-@@ -597,8 +613,7 @@ mod tests {
- fn test_pick_lottery() {
- let input = String::from("y");
- let output = Vec::new();
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(2));
-+ let mut engine = Engine::new(input.as_bytes(), output, FakeRng(0));
- let mut choices = vec![
- LotteryChoice{name: "this".to_string(), tickets: 1, weight: 1},
- LotteryChoice{name: "that".to_string(), tickets: 2, weight: 4},
-@@ -607,14 +622,14 @@ mod tests {
- let result = engine.pick_lottery(&mut choices);
-
- let output = String::from_utf8(engine.output).expect("Not UTF-8");
-- assert_eq!(output, "Choice is the other. Accept? (Y/n) ");
-- assert_eq!(result, "the other");
-+ assert_eq!(output, "Choice is this. Accept? (Y/n) ");
-+ assert_eq!(result, "this");
- assert_eq!(
- choices,
- vec![
-- LotteryChoice{name: "this".to_string(), tickets: 2, weight:
1},
-+ LotteryChoice{name: "this".to_string(), tickets: 0, weight:
1},
- LotteryChoice{name: "that".to_string(), tickets: 6, weight:
4},
-- LotteryChoice{name: "the other".to_string(), tickets: 0,
weight: 9}]);
-+ LotteryChoice{name: "the other".to_string(), tickets: 12,
weight: 9}]);
- }
-
- /// If the user says no to all the choices, rpick should print out an emoji and
start over.
-@@ -624,8 +639,7 @@ mod tests {
- fn test_pick_lottery_no_to_all_one_no_chance() {
- let input = String::from("n\nn\nn\ny\n");
- let output = Vec::new();
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(2));
-+ let mut engine = Engine::new(input.as_bytes(), output, FakeRng(0));
- let mut choices = vec![
- LotteryChoice{name: "this".to_string(), tickets: 0, weight: 1},
- LotteryChoice{name: "that".to_string(), tickets: 2, weight: 4},
-@@ -634,7 +648,7 @@ mod tests {
- let result = engine.pick_lottery(&mut choices);
-
- let output = String::from_utf8(engine.output).expect("Not UTF-8");
-- assert_eq!(output, "Choice is the other. Accept? (Y/n) Choice is that.
Accept? (Y/n) 🤨\n\
-+ assert_eq!(output, "Choice is that. Accept? (Y/n) Choice is the other.
Accept? (Y/n) 🤨\n\
- Choice is that. Accept? (Y/n) Choice is the other. Accept?
(Y/n) ");
- assert_eq!(result, "the other");
- assert_eq!(
-@@ -649,8 +663,7 @@ mod tests {
- fn test_pick_weighted() {
- let input = String::from("y");
- let output = Vec::new();
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(3));
-+ let mut engine = Engine::new(input.as_bytes(), output, FakeRng(0));
- let choices = vec![
- WeightedChoice{name: "this".to_string(), weight: 1},
- WeightedChoice{name: "that".to_string(), weight: 4},
-@@ -659,8 +672,8 @@ mod tests {
- let result = engine.pick_weighted(&choices);
-
- let output = String::from_utf8(engine.output).expect("Not UTF-8");
-- assert_eq!(output, "Choice is that. Accept? (Y/n) ");
-- assert_eq!(result, "that");
-+ assert_eq!(output, "Choice is this. Accept? (Y/n) ");
-+ assert_eq!(result, "this");
- }
-
- /// There was a bug wherein saying no to all weighted options crashed rpick rather
than
-@@ -669,8 +682,7 @@ mod tests {
- fn test_pick_weighted_no_to_all() {
- let input = String::from("n\nn\nn\ny\n");
- let output = Vec::new();
-- let mut engine = Engine::new(input.as_bytes(), output,
-- rand::rngs::SmallRng::seed_from_u64(3));
-+ let mut engine = Engine::new(input.as_bytes(), output, FakeRng(0));
- let choices = vec![
- WeightedChoice{name: "this".to_string(), weight: 1},
- WeightedChoice{name: "that".to_string(), weight: 4},
-@@ -679,8 +691,8 @@ mod tests {
- let result = engine.pick_weighted(&choices);
-
- let output = String::from_utf8(engine.output).expect("Not UTF-8");
-- assert_eq!(output, "Choice is that. Accept? (Y/n) Choice is the other.
Accept? (Y/n) \
-- Choice is this. Accept? (Y/n) 🤨\nChoice is that. Accept?
(Y/n) ");
-- assert_eq!(result, "that");
-+ assert_eq!(output, "Choice is this. Accept? (Y/n) Choice is that. Accept?
(Y/n) \
-+ Choice is the other. Accept? (Y/n) 🤨\nChoice is this.
Accept? (Y/n) ");
-+ assert_eq!(result, "this");
- }
- }
---
-2.25.1
-
diff --git a/rpick-fix-metadata.diff b/rpick-fix-metadata.diff
deleted file mode 100644
index b6e1c56..0000000
--- a/rpick-fix-metadata.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpick-0.8.7/Cargo.toml 1970-01-01T00:00:01+00:00
-+++ rpick-0.8.7/Cargo.toml 2022-07-15T08:44:28.174533+00:00
-@@ -58,7 +58,7 @@
- version = "2"
-
- [dev-dependencies.mockall]
--version = "0.10"
-+version = "0.11"
-
- [dev-dependencies.rand]
- version = "0.8"
diff --git a/rust-rpick.spec b/rust-rpick.spec
index 06adc47..c502843 100644
--- a/rust-rpick.spec
+++ b/rust-rpick.spec
@@ -4,18 +4,14 @@
%global crate rpick
Name: rust-%{crate}
-Version: 0.8.7
-Release: 6%{?dist}
+Version: 0.8.10
+Release: 1%{?dist}
Summary: Helps you pick items from a list by various algorithms
# Upstream license specification: GPL-3.0
License: GPLv3
URL:
https://crates.io/crates/rpick
Source: %{crates_source}
-# Initial patched metadata
-# * bump mockall dev-dependency from 0.10 to 0.11:
-#
https://github.com/bowlofeggs/rpick/commit/e3fdb95
-Patch0: rpick-fix-metadata.diff
ExclusiveArch: %{rust_arches}
@@ -99,6 +95,9 @@ use the "default" feature of the "%{crate}" crate.
%endif
%changelog
+* Tue Aug 02 2022 Randy Barlow <bowlofeggs(a)fedoraproject.org> - 0.8.10-1
+- Update to 0.8.10.
+
* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.8.7-6
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
diff --git a/sources b/sources
index 5cd59bf..603cc0b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (rpick-0.8.7.crate) =
95630eafe1e2a4dd085a1ac20b45379ad5ca50de1bedc3651366139581f69840e7c70d8518942892c5ecfb2475730fb6dfb39fe505636749177aca70f34c7134
+SHA512 (rpick-0.8.10.crate) =
086a0ed2660aa985a492166e880710b19e430531a8894f318b725efca56ec5b3447163739e8a80707edfabcb3638786683ee267126e252628fd56d1e30d52a31
commit 25aef6c03f1a2b64dff442def95f1b296acc8eb8
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sat Jul 23 06:17:55 2022 +0000
Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/rust-rpick.spec b/rust-rpick.spec
index 6b0d689..06adc47 100644
--- a/rust-rpick.spec
+++ b/rust-rpick.spec
@@ -5,7 +5,7 @@
Name: rust-%{crate}
Version: 0.8.7
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Helps you pick items from a list by various algorithms
# Upstream license specification: GPL-3.0
@@ -99,6 +99,9 @@ use the "default" feature of the "%{crate}" crate.
%endif
%changelog
+* Sat Jul 23 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.8.7-6
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
+
* Fri Jul 15 2022 Fabio Valentini <decathorpe(a)gmail.com> - 0.8.7-5
- Skip doctests on armv7hl due to rustc / LLVM 14 crashes.