From cd907d71a34cc1c01828c0a868c97ea2469178e3 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 26 Mar 2018 14:22:59 -0700 Subject: [PATCH] Update to 7.0.0 --- .gitignore | 1 + 0001-Update-to-regex-syntax-0.5.patch | 66 --------------------------- fd-find-6.3.0-fix-metadata.diff | 41 ----------------- fd-find-7.0.0-fix-metadata.diff | 14 ++++++ rust-fd-find.spec | 26 +++++------ sources | 2 +- 6 files changed, 29 insertions(+), 121 deletions(-) delete mode 100644 0001-Update-to-regex-syntax-0.5.patch delete mode 100644 fd-find-6.3.0-fix-metadata.diff create mode 100644 fd-find-7.0.0-fix-metadata.diff diff --git a/.gitignore b/.gitignore index 0a262e8..bc2d351 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /fd-find-6.0.0.crate /fd-find-6.2.0.crate /fd-find-6.3.0.crate +/fd-find-7.0.0.crate diff --git a/0001-Update-to-regex-syntax-0.5.patch b/0001-Update-to-regex-syntax-0.5.patch deleted file mode 100644 index fec482d..0000000 --- a/0001-Update-to-regex-syntax-0.5.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 5616ca398ffa54643ae3c139518060d4523be687 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Wed, 7 Mar 2018 21:48:02 -0800 -Subject: [PATCH] Update to regex-syntax 0.5 - -The new regex 0.2.7 has updated to regex-syntax 0.5, so it seems prudent -to update fd's dependency too, if only to avoid duplication. ---- - src/internal.rs | 28 +++++++++++++++++----------- - 1 file changed, 17 insertions(+), 11 deletions(-) - -diff --git a/src/internal.rs b/src/internal.rs -index fe9a43db5640..a2bb96a89772 100644 ---- a/src/internal.rs -+++ b/src/internal.rs -@@ -15,7 +15,8 @@ use std::io::Write; - use exec::CommandTemplate; - use lscolors::LsColors; - use walk::FileType; --use regex_syntax::{Expr, ExprBuilder}; -+use regex_syntax::Parser; -+use regex_syntax::hir::Hir; - use regex::RegexSet; - - /// Configuration options for *fd*. -@@ -83,22 +84,27 @@ pub fn error(message: &str) -> ! { - - /// Determine if a regex pattern contains a literal uppercase character. - pub fn pattern_has_uppercase_char(pattern: &str) -> bool { -- ExprBuilder::new() -+ Parser::new() - .parse(pattern) -- .map(|expr| expr_has_uppercase_char(&expr)) -+ .map(|hir| hir_has_uppercase_char(&hir)) - .unwrap_or(false) - } - - /// Determine if a regex expression contains a literal uppercase character. --fn expr_has_uppercase_char(expr: &Expr) -> bool { -- match *expr { -- Expr::Literal { ref chars, .. } => chars.iter().any(|c| c.is_uppercase()), -- Expr::Class(ref ranges) => ranges -+fn hir_has_uppercase_char(hir: &Hir) -> bool { -+ use regex_syntax::hir::*; -+ -+ match *hir.kind() { -+ HirKind::Literal(Literal::Unicode(c)) => c.is_uppercase(), -+ HirKind::Class(Class::Unicode(ref ranges)) => ranges - .iter() -- .any(|r| r.start.is_uppercase() || r.end.is_uppercase()), -- Expr::Group { ref e, .. } | Expr::Repeat { ref e, .. } => expr_has_uppercase_char(e), -- Expr::Concat(ref es) => es.iter().any(expr_has_uppercase_char), -- Expr::Alternate(ref es) => es.iter().any(expr_has_uppercase_char), -+ .any(|r| r.start().is_uppercase() || r.end().is_uppercase()), -+ HirKind::Group(Group { ref hir, .. }) | HirKind::Repetition(Repetition { ref hir, .. }) => { -+ hir_has_uppercase_char(hir) -+ } -+ HirKind::Concat(ref hirs) | HirKind::Alternation(ref hirs) => { -+ hirs.iter().any(hir_has_uppercase_char) -+ } - _ => false, - } - } --- -2.14.3 - diff --git a/fd-find-6.3.0-fix-metadata.diff b/fd-find-6.3.0-fix-metadata.diff deleted file mode 100644 index 61e7bae..0000000 --- a/fd-find-6.3.0-fix-metadata.diff +++ /dev/null @@ -1,41 +0,0 @@ ---- fd-find-6.3.0/Cargo.toml 1969-12-31T16:00:00-08:00 -+++ fd-find-6.3.0/Cargo.toml 2018-03-08T10:21:06.328193-08:00 -@@ -28,7 +28,7 @@ - name = "fd" - path = "src/main.rs" - [dependencies.ansi_term] --version = "0.9" -+version = "0.10" - - [dependencies.atty] - version = "0.2" -@@ -41,7 +41,7 @@ - version = "3.0" - - [dependencies.ignore] --version = "0.2" -+version = "0.4" - - [dependencies.lazy_static] - version = "1" -@@ -53,7 +53,7 @@ - version = "0.2" - - [dependencies.regex-syntax] --version = "0.4" -+version = "0.5" - [dev-dependencies.diff] - version = "0.1" - -@@ -66,11 +66,7 @@ - version = "0.1.3" - [target."cfg(all(unix, not(target_os = \"redox\")))".dependencies.libc] - version = "0.2" --[target."cfg(windows)".dependencies.kernel32-sys] --version = "0.2" - --[target."cfg(windows)".dependencies.winapi] --version = "0.2" - [badges.appveyor] - repository = "sharkdp/fd" - diff --git a/fd-find-7.0.0-fix-metadata.diff b/fd-find-7.0.0-fix-metadata.diff new file mode 100644 index 0000000..55cfe64 --- /dev/null +++ b/fd-find-7.0.0-fix-metadata.diff @@ -0,0 +1,14 @@ +--- fd-find-7.0.0/Cargo.toml 1969-12-31T16:00:00-08:00 ++++ fd-find-7.0.0/Cargo.toml 2018-03-26T13:04:08.087983-07:00 +@@ -66,11 +66,6 @@ + version = "0.1.3" + [target."cfg(all(unix, not(target_os = \"redox\")))".dependencies.libc] + version = "0.2" +-[target."cfg(windows)".dependencies.kernel32-sys] +-version = "0.2" +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.2" + [badges.appveyor] + repository = "sharkdp/fd" + diff --git a/rust-fd-find.spec b/rust-fd-find.spec index 03b002d..b8d1cff 100644 --- a/rust-fd-find.spec +++ b/rust-fd-find.spec @@ -4,36 +4,33 @@ %global crate fd-find Name: rust-%{crate} -Version: 6.3.0 -Release: 2%{?dist} +Version: 7.0.0 +Release: 1%{?dist} Summary: Simple, fast and user-friendly alternative to find License: MIT or ASL 2.0 URL: https://crates.io/crates/fd-find Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata -# * Bump ansi_term to 0.10, ignore to 0.4: https://github.com/sharkdp/fd/pull/173 -# * Bump regex-syntax to 0.5: https://github.com/sharkdp/fd/pull/254 # * No windows -Patch0: fd-find-6.3.0-fix-metadata.diff -Patch1: 0001-Update-to-regex-syntax-0.5.patch +Patch0: fd-find-7.0.0-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] -BuildRequires: (crate(ansi_term) >= 0.10.0 with crate(ansi_term) < 0.11.0) +BuildRequires: (crate(ansi_term) >= 0.11.0 with crate(ansi_term) < 0.12.0) BuildRequires: (crate(atty) >= 0.2.0 with crate(atty) < 0.3.0) -BuildRequires: ((crate(clap) >= 2.26.0 with crate(clap) < 3.0.0) with crate(clap/suggestions) with crate(clap/color) with crate(clap/wrap_help)) +BuildRequires: ((crate(clap) >= 2.30.0 with crate(clap) < 3.0.0) with crate(clap/suggestions) with crate(clap/color) with crate(clap/wrap_help)) BuildRequires: (crate(ctrlc) >= 3.0.0 with crate(ctrlc) < 4.0.0) -BuildRequires: (crate(ignore) >= 0.4.0 with crate(ignore) < 0.5.0) +BuildRequires: (crate(ignore) >= 0.4.1 with crate(ignore) < 0.5.0) BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) -BuildRequires: (crate(num_cpus) >= 1.6.2 with crate(num_cpus) < 2.0.0) -BuildRequires: (crate(regex) >= 0.2.0 with crate(regex) < 0.3.0) +BuildRequires: (crate(num_cpus) >= 1.8.0 with crate(num_cpus) < 2.0.0) +BuildRequires: (crate(regex) >= 0.2.7 with crate(regex) < 0.3.0) BuildRequires: (crate(regex-syntax) >= 0.5.0 with crate(regex-syntax) < 0.6.0) # [build-dependencies] -BuildRequires: (crate(clap) >= 2.26.0 with crate(clap) < 3.0.0) +BuildRequires: (crate(clap) >= 2.30.0 with crate(clap) < 3.0.0) BuildRequires: (crate(version_check) >= 0.1.3 with crate(version_check) < 0.2.0) %if %{with check} # [dev-dependencies] @@ -88,7 +85,10 @@ Summary: %{summary} %{_datadir}/zsh/site-functions/_fd %changelog -* Wed Mar 14 2018 Josh Stone - 0.2.9-1 +* Mon Mar 26 2018 Josh Stone - 7.0.0-1 +- Update to 7.0.0 + +* Wed Mar 14 2018 Josh Stone - 6.3.0-2 - Bump regex-syntax to 0.5 * Mon Feb 12 2018 Igor Gnatenko - 6.3.0-1 diff --git a/sources b/sources index 4a94edd..49543d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fd-find-6.3.0.crate) = 0eb9ecc62711a8c8bd42d0726767cc1b5a408fac7361eea3aa851a545e771fc55416b036473b84418c6a6dafb8efc038425cd1fce072aa02af6e527d85b12b41 +SHA512 (fd-find-7.0.0.crate) = 2f5ceb1d15cab45dc8a47e036fbcd9a754ae968ac7efd9592b72d801cb6ea03afdf1159c64d6b5868faba2258ab0509d23fe834df1e5ef3f978a0107141293d2