From 12697488955c01e39c9df56259d52dfd8eb1a071 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 9 Sep 2018 00:17:56 +0200 Subject: [PATCH] Update to 0.10.0 Signed-off-by: Igor Gnatenko --- .gitignore | 1 + 0001-pcre2-use-jit_if_available.patch | 29 +++++++++++++++ ripgrep-0.9.0-fix-metadata.diff | 16 --------- ripgrep-fix-metadata.diff | 21 +++++++++++ rust-ripgrep.spec | 52 ++++++++++++++------------- sources | 2 +- 6 files changed, 80 insertions(+), 41 deletions(-) create mode 100644 0001-pcre2-use-jit_if_available.patch delete mode 100644 ripgrep-0.9.0-fix-metadata.diff create mode 100644 ripgrep-fix-metadata.diff diff --git a/.gitignore b/.gitignore index 4f1d424..5bc5a7e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /ripgrep-0.8.0.crate /ripgrep-0.8.1.crate /ripgrep-0.9.0.crate +/ripgrep-0.10.0.crate diff --git a/0001-pcre2-use-jit_if_available.patch b/0001-pcre2-use-jit_if_available.patch new file mode 100644 index 0000000..3ab5b2e --- /dev/null +++ b/0001-pcre2-use-jit_if_available.patch @@ -0,0 +1,29 @@ +From eb18da04506b959c0251099eae83e16d22ce8bcb Mon Sep 17 00:00:00 2001 +From: Andrew Gallant +Date: Sat, 8 Sep 2018 17:12:14 -0400 +Subject: [PATCH] pcre2: use jit_if_available + +This will allow PCRE2 to fall back to non-JIT matching when running on +platforms without JIT support. + +ref https://github.com/BurntSushi/rust-pcre2/issues/3 +--- + src/args.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/args.rs b/src/args.rs +index 1a38d3e..7aed914 100644 +--- a/src/args.rs ++++ b/src/args.rs +@@ -633,7 +633,7 @@ impl ArgMatches { + // For whatever reason, the JIT craps out during regex compilation with + // a "no more memory" error on 32 bit systems. So don't use it there. + if !cfg!(target_pointer_width = "32") { +- builder.jit(true); ++ builder.jit_if_available(true); + } + if self.pcre2_unicode() { + builder.utf(true).ucp(true); +-- +2.19.0.rc1 + diff --git a/ripgrep-0.9.0-fix-metadata.diff b/ripgrep-0.9.0-fix-metadata.diff deleted file mode 100644 index d453411..0000000 --- a/ripgrep-0.9.0-fix-metadata.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- ripgrep-0.9.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ ripgrep-0.9.0/Cargo.toml 2018-08-04T15:54:39.175546+02:00 -@@ -95,13 +95,6 @@ - - [build-dependencies.lazy_static] - version = "1" -- --[features] --avx-accel = ["bytecount/avx-accel"] --simd-accel = ["bytecount/simd-accel", "encoding_rs/simd-accel"] --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["std", "winnt"] - [badges.appveyor] - repository = "BurntSushi/ripgrep" - diff --git a/ripgrep-fix-metadata.diff b/ripgrep-fix-metadata.diff new file mode 100644 index 0000000..cfc3c8a --- /dev/null +++ b/ripgrep-fix-metadata.diff @@ -0,0 +1,21 @@ +--- ripgrep-0.10.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ ripgrep-0.10.0/Cargo.toml 2018-09-09T00:13:34.769746+02:00 +@@ -46,7 +46,7 @@ + default-features = false + + [dependencies.grep] +-version = "0.2.2" ++version = "0.2.3" + + [dependencies.ignore] + version = "0.4.4" +@@ -82,9 +82,7 @@ + version = "1.1.0" + + [features] +-avx-accel = ["grep/avx-accel"] + pcre2 = ["grep/pcre2"] +-simd-accel = ["grep/simd-accel"] + [badges.appveyor] + repository = "BurntSushi/ripgrep" + diff --git a/rust-ripgrep.spec b/rust-ripgrep.spec index 718dbc7..36b6c75 100644 --- a/rust-ripgrep.spec +++ b/rust-ripgrep.spec @@ -4,42 +4,43 @@ %global crate ripgrep Name: rust-%{crate} -Version: 0.9.0 +Version: 0.10.0 Release: 1%{?dist} Summary: Line oriented search tool using Rust's regex library +# Upstream license specification: Unlicense OR MIT License: Unlicense or MIT URL: https://crates.io/crates/ripgrep Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * No windows # * No simd -Patch0: ripgrep-0.9.0-fix-metadata.diff +# * Use jit_if_available, https://github.com/BurntSushi/ripgrep/commit/eb18da04506b959c0251099eae83e16d22ce8bcb +Patch0: ripgrep-fix-metadata.diff +# Really use jit_if_available +Patch0001: 0001-pcre2-use-jit_if_available.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] -BuildRequires: (crate(atty) >= 0.2.11 with crate(atty) < 0.3.0) -BuildRequires: (crate(bytecount) >= 0.3.1 with crate(bytecount) < 0.4.0) -BuildRequires: ((crate(clap) >= 2.29.4 with crate(clap) < 3.0.0) with crate(clap/suggestions) with crate(clap/color)) -BuildRequires: (crate(encoding_rs) >= 0.8.0 with crate(encoding_rs) < 0.9.0) -BuildRequires: (crate(encoding_rs_io) >= 0.1.0 with crate(encoding_rs_io) < 0.2.0) -BuildRequires: (crate(globset) >= 0.4.0 with crate(globset) < 0.5.0) -BuildRequires: (crate(grep) >= 0.1.8 with crate(grep) < 0.2.0) -BuildRequires: (crate(ignore) >= 0.4.0 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(log) >= 0.4.0 with crate(log) < 0.5.0) -BuildRequires: (crate(memchr) >= 2.0.0 with crate(memchr) < 3.0.0) -BuildRequires: (crate(memmap) >= 0.6.0 with crate(memmap) < 0.7.0) -BuildRequires: (crate(num_cpus) >= 1.0.0 with crate(num_cpus) < 2.0.0) -BuildRequires: (crate(regex) >= 1.0.0 with crate(regex) < 2.0.0) -BuildRequires: (crate(same-file) >= 1.0.0 with crate(same-file) < 2.0.0) -BuildRequires: (crate(termcolor) >= 1.0.0 with crate(termcolor) < 2.0.0) +BuildRequires: ((crate(clap) >= 2.32.0 with crate(clap) < 3.0.0) with crate(clap/suggestions)) +BuildRequires: (crate(grep) >= 0.2.3 with crate(grep) < 0.3.0) +BuildRequires: (crate(ignore) >= 0.4.4 with crate(ignore) < 0.5.0) +BuildRequires: (crate(lazy_static) >= 1.1.0 with crate(lazy_static) < 2.0.0) +BuildRequires: (crate(log) >= 0.4.5 with crate(log) < 0.5.0) +BuildRequires: (crate(num_cpus) >= 1.8.0 with crate(num_cpus) < 2.0.0) +BuildRequires: (crate(regex) >= 1.0.5 with crate(regex) < 2.0.0) +BuildRequires: (crate(serde_json) >= 1.0.23 with crate(serde_json) < 2.0.0) +BuildRequires: (crate(termcolor) >= 1.0.3 with crate(termcolor) < 2.0.0) # [build-dependencies] -BuildRequires: ((crate(clap) >= 2.29.4 with crate(clap) < 3.0.0) with crate(clap/suggestions) with crate(clap/color)) -BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) +BuildRequires: ((crate(clap) >= 2.32.0 with crate(clap) < 3.0.0) with crate(clap/suggestions)) +BuildRequires: (crate(lazy_static) >= 1.1.0 with crate(lazy_static) < 2.0.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(serde) >= 1.0.77 with crate(serde) < 2.0.0) +BuildRequires: (crate(serde_derive) >= 1.0.77 with crate(serde_derive) < 2.0.0) +%endif BuildRequires: %{_bindir}/a2x %description @@ -57,10 +58,10 @@ the raw performance of grep with the usability of the silver searcher. %cargo_prep %build -%cargo_build +%cargo_build -a %install -%cargo_install +%cargo_install -a %{__install} -Dpm0644 -t %{buildroot}%{_mandir}/man1 \ target/release/build/%{crate}-*/out/rg.1 %{__install} -Dpm0644 -t %{buildroot}%{_datadir}/bash-completion/completions \ @@ -72,7 +73,7 @@ the raw performance of grep with the usability of the silver searcher. %if %{with check} %check -%cargo_test +%cargo_test -a %endif %files -n %{crate} @@ -91,6 +92,9 @@ the raw performance of grep with the usability of the silver searcher. %{_datadir}/zsh/site-functions/_rg %changelog +* Sun Sep 09 2018 Igor Gnatenko - 0.10.0-1 +- Update to 0.10.0 + * Sat Aug 04 2018 Igor Gnatenko - 0.9.0-1 - Update to 0.9.0 diff --git a/sources b/sources index e9fd212..5ac5f19 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ripgrep-0.9.0.crate) = 8adab0f95421e853b813d74d6c45cfbcf6fe9485f445fc79e34fe53ac59f81dce727d1551a2a99effdf8b7c479681927c1dbeba86bce55dab8353e8a7e0db60b +SHA512 (ripgrep-0.10.0.crate) = d96c12be497999d0db777ca5fd33f907ed01cba121e3fb43a7a6a5f3176291f04b7bcd6e26f04f98b305cf50ac422a77a10d6a34c3a7510d233fa76228784576