The package rpms/rust-heatseeker.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-heatseeker.git/commit/?id=10....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 10506b66316b4c32482c394db1b9c14daff9ddf4
Author: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
Date: Sat Mar 9 11:20:48 2019 +0100
Initial import
Signed-off-by: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..10b44f6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/heatseeker-1.6.0.crate
diff --git a/0001-Update-crossbeam-to-0.7-and-drop-crossbeam-channel.patch
b/0001-Update-crossbeam-to-0.7-and-drop-crossbeam-channel.patch
new file mode 100644
index 0000000..c6b5abc
--- /dev/null
+++ b/0001-Update-crossbeam-to-0.7-and-drop-crossbeam-channel.patch
@@ -0,0 +1,38 @@
+From 79dc9d039a079c3b4ce2ce70092bca87f15e821e Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <i.gnatenko.brain(a)gmail.com>
+Date: Sat, 9 Mar 2019 09:14:19 +0100
+Subject: [PATCH] Update crossbeam to 0.7 and drop crossbeam-channel
+
+The latter is not used at all.
+
+Closes:
https://github.com/rschmitt/heatseeker/issues/34
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain(a)gmail.com>
+---
+ src/matching.rs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/matching.rs b/src/matching.rs
+index b8ee9d3..c085972 100644
+--- a/src/matching.rs
++++ b/src/matching.rs
+@@ -55,7 +55,7 @@ pub fn compute_matches_multi_threaded<'a>(choices:
&[&'a str], query: &str, filt
+ crossbeam::scope(|scope| {
+ for current_worker in 0..workers {
+ let tx = tx.clone();
+- scope.spawn(move || {
++ scope.spawn(move |_| {
+ let (lower_bound, upper_bound) = get_slice_indices(choices.len(),
workers, current_worker);
+ for i in lower_bound..upper_bound {
+ let score = if filter_only { filter(choices[i], query) } else {
score(choices[i], query) };
+@@ -63,7 +63,7 @@ pub fn compute_matches_multi_threaded<'a>(choices:
&[&'a str], query: &str, filt
+ }
+ });
+ }
+- });
++ }).unwrap();
+
+ let mut ret = Vec::new();
+ for _ in 0..choices.len() {
+--
+2.21.0
+
diff --git a/heatseeker-fix-metadata.diff b/heatseeker-fix-metadata.diff
new file mode 100644
index 0000000..4b4cb48
--- /dev/null
+++ b/heatseeker-fix-metadata.diff
@@ -0,0 +1,37 @@
+--- heatseeker-1.6.0/Cargo.toml 1970-01-01T01:00:00+01:00
++++ heatseeker-1.6.0/Cargo.toml 2019-03-09T09:20:46.124873+01:00
+@@ -15,7 +15,7 @@
+ version = "1.6.0"
+ authors = ["Ryan Schmitt <rschmitt(a)pobox.com>"]
+ build = "build.rs"
+-exclude = ["*.nuspec", "*.bat", "*.rb",
"*.yml"]
++exclude = ["/ci/*", "/Cross.toml", "/VERIFICATION.txt",
"*.nuspec", "*.bat", "*.rb", "*.yml"]
+ description = "A fast, robust, and portable fuzzy finder."
+ homepage = "https://github.com/rschmitt/heatseeker"
+ documentation = "https://github.com/rschmitt/heatseeker"
+@@ -27,7 +27,7 @@
+ name = "hs"
+ path = "src/main.rs"
+ [dependencies.crossbeam]
+-version = "0.3.0"
++version = "0.7"
+
+ [dependencies.getopts]
+ version = "0.2.15"
+@@ -39,16 +39,8 @@
+ version = "0.1.4"
+ [build-dependencies.time]
+ version = "0.1.38"
+-[target."cfg(not(windows))".dependencies.crossbeam-channel]
+-version = "0.2"
+-
+ [target."cfg(not(windows))".dependencies.libc]
+ version = "0.2.31"
+
+ [target."cfg(not(windows))".dependencies.signal-hook]
+ version = "0.1.3"
+-[target."cfg(windows)".dependencies.kernel32-sys]
+-version = "0.2.2"
+-
+-[target."cfg(windows)".dependencies.winapi]
+-version = "0.2.8"
diff --git a/rust-heatseeker.spec b/rust-heatseeker.spec
new file mode 100644
index 0000000..90bdf2e
--- /dev/null
+++ b/rust-heatseeker.spec
@@ -0,0 +1,67 @@
+# Generated by rust2rpm
+%bcond_without check
+
+%global crate heatseeker
+
+Name: rust-%{crate}
+Version: 1.6.0
+Release: 1%{?dist}
+Summary: Fast, robust, and portable fuzzy finder
+
+License: MIT
+URL:
https://crates.io/crates/heatseeker
+Source: %{crates_source}
+# Initial patched metadata
+# * Exclude unneeded files,
https://github.com/rschmitt/heatseeker/pull/33
+# * Update crossbeam to 0.7,
https://github.com/rschmitt/heatseeker/pull/35
+Patch0: heatseeker-fix-metadata.diff
+# Make it work with new crossbeam
+Patch0001: 0001-Update-crossbeam-to-0.7-and-drop-crossbeam-channel.patch
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+BuildRequires: (crate(crossbeam/default) >= 0.7.0 with crate(crossbeam/default) <
0.8.0)
+BuildRequires: (crate(getopts/default) >= 0.2.15 with crate(getopts/default) <
0.3.0)
+BuildRequires: (crate(libc/default) >= 0.2.31 with crate(libc/default) < 0.3.0)
+BuildRequires: (crate(num_cpus/default) >= 1.7.0 with crate(num_cpus/default) <
2.0.0)
+BuildRequires: (crate(signal-hook/default) >= 0.1.3 with crate(signal-hook/default)
< 0.2.0)
+BuildRequires: (crate(time/default) >= 0.1.38 with crate(time/default) < 0.2.0)
+BuildRequires: (crate(unicode-width/default) >= 0.1.4 with
crate(unicode-width/default) < 0.2.0)
+
+%global _description \
+A fast, robust, and portable fuzzy finder.
+
+%description %{_description}
+
+%package -n %{crate}
+Summary: %{summary}
+
+%description -n %{crate}
+%{summary}.
+
+%files -n %{crate}
+%license LICENSE
+%doc README.md
+%{_bindir}/hs
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -N
+find -type f -name '*.rs' -exec sed -i -e 's/\r$//' {} +
+%autopatch -p1
+%cargo_prep
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+env TRAVIS=1 %cargo_test
+%endif
+
+%changelog
+* Sat Mar 09 2019 Igor Gnatenko <ignatenkobrain(a)fedoraproject.org> - 1.6.0-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..10303e6
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (heatseeker-1.6.0.crate) =
4e3c05da54583c136f91bc9f59d1fc1e79dbd9fd98c099611a55a2fa4a783267a9ac261cf5ce4a22acd5eaf402b74e09a83ffbd4577efa3de72b0e9de6ab6a79