The package rpms/rust-skim.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-skim.git/commit/?id=f5b920ef....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit f5b920efe54d5d755a85a6cb2ca80468944b9fef
Author: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
Date: Wed Apr 24 08:39:10 2019 +0200
Initial import
Signed-off-by: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..89637f9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/skim-0.6.6.crate
diff --git a/rust-skim.spec b/rust-skim.spec
new file mode 100644
index 0000000..b9e0336
--- /dev/null
+++ b/rust-skim.spec
@@ -0,0 +1,140 @@
+# Generated by rust2rpm
+%bcond_without check
+
+%global crate skim
+
+Name: rust-%{crate}
+Version: 0.6.6
+Release: 1%{?dist}
+Summary: Fuzzy Finder in Rust
+
+License: MIT
+URL:
https://crates.io/crates/skim
+Source: %{crates_source}
+# Initial patched metadata
+#
https://github.com/lotabout/skim/pull/160
+# - Bump lazy_static to 1.3.0
+# - Bump nix to 0.13.0
+# - Bump regex to 1.1.5
+Patch0: skim-fix-metadata.diff
+# - Bump log to 0.4.6
+Patch1: skim-0.6.6-bump_log.patch
+# - Bump env_logger to 0.6.1
+Patch2: skim-0.6.6-bump_env_logger.patch
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+BuildRequires: (crate(bitflags/default) >= 1.0.4 with crate(bitflags/default) <
2.0.0)
+BuildRequires: (crate(chrono/default) >= 0.4.0 with crate(chrono/default) <
0.5.0)
+BuildRequires: (crate(clap/default) >= 2.26.2 with crate(clap/default) < 3.0.0)
+BuildRequires: (crate(derive_builder/default) >= 0.7.1 with
crate(derive_builder/default) < 0.8.0)
+BuildRequires: (crate(env_logger/default) >= 0.6.1 with crate(env_logger/default)
< 0.7.0)
+BuildRequires: (crate(fuzzy-matcher/default) >= 0.2.1 with
crate(fuzzy-matcher/default) < 0.3.0)
+BuildRequires: (crate(lazy_static/default) >= 1.3.0 with crate(lazy_static/default)
< 2.0.0)
+BuildRequires: (crate(log/default) >= 0.4.6 with crate(log/default) < 0.5.0)
+BuildRequires: (crate(nix/default) >= 0.13.0 with crate(nix/default) < 0.14.0)
+BuildRequires: (crate(rayon/default) >= 1.0.3 with crate(rayon/default) < 2.0.0)
+BuildRequires: (crate(regex/default) >= 1.1.5 with crate(regex/default) < 2.0.0)
+BuildRequires: (crate(shlex/default) >= 0.1.1 with crate(shlex/default) < 0.2.0)
+BuildRequires: (crate(time/default) >= 0.1.38 with crate(time/default) < 0.2.0)
+BuildRequires: (crate(timer/default) >= 0.2.0 with crate(timer/default) < 0.3.0)
+BuildRequires: (crate(tuikit/default) >= 0.2.6 with crate(tuikit/default) <
0.3.0)
+BuildRequires: (crate(unicode-width/default) >= 0.1.4 with
crate(unicode-width/default) < 0.2.0)
+BuildRequires: (crate(vte/default) >= 0.3.3 with crate(vte/default) < 0.4.0)
+
+%global _description \
+Fuzzy Finder in Rust.
+
+%description %{_description}
+
+%package -n %{crate}
+Summary: %{summary}
+
+%description -n %{crate} %{_description}
+
+%files -n %{crate}
+%license LICENSE
+%doc CHANGELOG.md README.md
+%{_bindir}/sk
+%{_bindir}/sk-tmux
+%{_mandir}/man1/sk.1.*
+%{_mandir}/man1/sk-tmux.1.*
+%{_datadir}/skim/
+%{_datadir}/vim/vimfiles/plugin/skim.vim
+%{_datadir}/nvim/site/plugin/skim.vim
+%dir %{_datadir}/bash-completion
+%dir %{_datadir}/bash-completion/completions
+%{_datadir}/bash-completion/completions/sk
+%dir %{_datadir}/zsh
+%dir %{_datadir}/zsh/site-functions
+%{_datadir}/zsh/site-functions/_sk
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages
+which use "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%doc CHANGELOG.md README.md
+%{cargo_registry}/%{crate}-%{version}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "default" feature of "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+# Cleanup interpreters
+sed -i -e '/^#!\//, 1d' shell/completion.*
+sed -i -e '1d;2i#!/bin/bash' bin/sk-tmux
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+install -Dpm0755 bin/sk-tmux %{buildroot}%{_bindir}/
+install -d %{buildroot}%{_mandir}/man1/
+install -Dpm0644 man/man1/*.1 %{buildroot}%{_mandir}/man1/
+
+install -d %{buildroot}%{_datadir}/skim
+
+# Install vim plugin
+install -d %{buildroot}%{_datadir}/vim/vimfiles/plugin
+install -Dpm0644 plugin/skim.vim %{buildroot}%{_datadir}/vim/vimfiles/plugin/
+install -d %{buildroot}%{_datadir}/nvim/site/plugin
+install -Dpm0644 plugin/skim.vim %{buildroot}%{_datadir}/nvim/site/plugin/
+
+# Install shell completion
+install -d %{buildroot}%{_datadir}/bash-completion/completions
+install -Dpm0644 shell/completion.bash
%{buildroot}%{_datadir}/bash-completion/completions/sk
+install -d %{buildroot}%{_datadir}/zsh/site-functions
+install -Dpm0644 shell/completion.zsh %{buildroot}%{_datadir}/zsh/site-functions/_sk
+
+# Install shell key bindings (not enabled)
+install -d %{buildroot}%{_datadir}/skim/shell
+install -Dpm0644 shell/key-bindings.* %{buildroot}%{_datadir}/skim/shell/
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+* Sun Apr 14 2019 Robert-Andr Mauchin <zebob.m(a)gmail.com> - 0.6.6-1
+- Initial package
diff --git a/skim-0.6.6-bump_env_logger.patch b/skim-0.6.6-bump_env_logger.patch
new file mode 100644
index 0000000..d11e4f4
--- /dev/null
+++ b/skim-0.6.6-bump_env_logger.patch
@@ -0,0 +1,45 @@
+diff -up skim-0.6.6/Cargo.toml.bump_env_logger skim-0.6.6/Cargo.toml
+--- skim-0.6.6/Cargo.toml.bump_env_logger 2019-04-14 15:27:10.000000000 +0200
++++ skim-0.6.6/Cargo.toml 2019-04-14 15:27:55.997046254 +0200
+@@ -46,7 +46,7 @@ version = "2.26.2"
+ version = "0.7.1"
+
+ [dependencies.env_logger]
+-version = "0.4.3"
++version = "0.6.1"
+
+ [dependencies.fuzzy-matcher]
+ version = "0.2.1"
+diff -up skim-0.6.6/src/main.rs.bump_env_logger skim-0.6.6/src/main.rs
+--- skim-0.6.6/src/main.rs.bump_env_logger 2019-04-14 15:27:10.000000000 +0200
++++ skim-0.6.6/src/main.rs 2019-04-14 16:59:10.765065637 +0200
+@@ -101,11 +101,14 @@ Usage: sk [options]
+
+ fn main() {
+ use env_logger::Builder;
++ use env_logger::fmt::Formatter;
+ use log::{LevelFilter, Record};
++ use std::io::Write;
+
+- let format = |record: &Record| {
++ let format = |buf: &mut Formatter, record: &Record| {
+ let t = time::now();
+- format!(
++ writeln!(
++ buf,
+ "{},{:03} - {} - {}",
+ time::strftime("%Y-%m-%d %H:%M:%S", &t).expect("main:
time format error"),
+ t.tm_nsec / 1_000_000,
+@@ -118,10 +121,10 @@ fn main() {
+ builder.format(format).filter(None, LevelFilter::Info);
+
+ if env::var("RUST_LOG").is_ok() {
+- builder.parse(&env::var("RUST_LOG").unwrap());
++ builder.parse_filters(&env::var("RUST_LOG").unwrap());
+ }
+
+- builder.init().expect("failed to initialize logger builder");
++ builder.try_init().expect("failed to initialize logger builder");
+
+ let exit_code = real_main();
+ std::process::exit(exit_code);
diff --git a/skim-0.6.6-bump_log.patch b/skim-0.6.6-bump_log.patch
new file mode 100644
index 0000000..2c69867
--- /dev/null
+++ b/skim-0.6.6-bump_log.patch
@@ -0,0 +1,40 @@
+diff -up skim-0.6.6/Cargo.toml.bump_log skim-0.6.6/Cargo.toml
+--- skim-0.6.6/Cargo.toml.bump_log 2019-04-14 14:39:36.949614838 +0200
++++ skim-0.6.6/Cargo.toml 2019-04-14 14:40:01.341591754 +0200
+@@ -55,7 +55,7 @@ version = "0.2.1"
+ version = "1.3.0"
+
+ [dependencies.log]
+-version = "0.3.8"
++version = "0.4.6"
+
+ [dependencies.nix]
+ version = "0.13.0"
+diff -up skim-0.6.6/src/main.rs.bump_log skim-0.6.6/src/main.rs
+--- skim-0.6.6/src/main.rs.bump_log 2019-03-25 16:57:35.000000000 +0100
++++ skim-0.6.6/src/main.rs 2019-04-14 14:41:00.982535315 +0200
+@@ -100,10 +100,10 @@ Usage: sk [options]
+ ";
+
+ fn main() {
+- use env_logger::LogBuilder;
+- use log::{LogLevelFilter, LogRecord};
++ use env_logger::Builder;
++ use log::{LevelFilter, Record};
+
+- let format = |record: &LogRecord| {
++ let format = |record: &Record| {
+ let t = time::now();
+ format!(
+ "{},{:03} - {} - {}",
+@@ -114,8 +114,8 @@ fn main() {
+ )
+ };
+
+- let mut builder = LogBuilder::new();
+- builder.format(format).filter(None, LogLevelFilter::Info);
++ let mut builder = Builder::new();
++ builder.format(format).filter(None, LevelFilter::Info);
+
+ if env::var("RUST_LOG").is_ok() {
+ builder.parse(&env::var("RUST_LOG").unwrap());
diff --git a/skim-fix-metadata.diff b/skim-fix-metadata.diff
new file mode 100644
index 0000000..d4a6d89
--- /dev/null
+++ b/skim-fix-metadata.diff
@@ -0,0 +1,25 @@
+--- skim-0.6.6/Cargo.toml 1970-01-01T01:00:00+01:00
++++ skim-0.6.6/Cargo.toml 2019-04-14T15:26:29.767154+02:00
+@@ -52,19 +52,19 @@
+ version = "0.2.1"
+
+ [dependencies.lazy_static]
+-version = "0.2.8"
++version = "1.3.0"
+
+ [dependencies.log]
+ version = "0.3.8"
+
+ [dependencies.nix]
+-version = "0.11.0"
++version = "0.13.0"
+
+ [dependencies.rayon]
+ version = "1.0.3"
+
+ [dependencies.regex]
+-version = "0.2"
++version = "1.1.5"
+
+ [dependencies.shlex]
+ version = "0.1.1"
diff --git a/sources b/sources
new file mode 100644
index 0000000..25a6f45
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (skim-0.6.6.crate) =
34b212bc3a9df78db40ccfb77c5e31ed525bd076acea1aa87131716659b1df0374cd02c76c4a57c8b8458dcd092499cf3381e87c1a349decf9e4b17282900657