From ba9427d44ea0ae3d4adca31a808768d8cb3bea7c Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sat, 2 May 2020 10:59:29 +0200 Subject: [PATCH 1/6] Update console to 0.11.2 Signed-off-by: Igor Raits --- bat-fix-metadata.diff | 11 +++++++++++ rust-bat.spec | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 bat-fix-metadata.diff diff --git a/bat-fix-metadata.diff b/bat-fix-metadata.diff new file mode 100644 index 0000000..95a5e84 --- /dev/null +++ b/bat-fix-metadata.diff @@ -0,0 +1,11 @@ +--- bat-0.15.0/Cargo.toml 2020-04-25T11:49:58+00:00 ++++ bat-0.15.0/Cargo.toml 2020-05-02T08:58:34.187038+00:00 +@@ -43,7 +43,7 @@ + default-features = false + + [dependencies.console] +-version = "0.10" ++version = "0.11.2" + + [dependencies.content_inspector] + version = "0.2.4" diff --git a/rust-bat.spec b/rust-bat.spec index 117cddf..1515c18 100644 --- a/rust-bat.spec +++ b/rust-bat.spec @@ -5,13 +5,16 @@ Name: rust-%{crate} Version: 0.15.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: cat(1) clone with wings # Upstream license specification: MIT/Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/bat Source: %{crates_source} +# Initial patched metadata +# * Update console to 0.11.2, https://github.com/sharkdp/bat/commit/81af3752893b4fa2548738af9b3ad6c75be84eae +Patch0: bat-fix-metadata.diff ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -259,6 +262,9 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \ %endif %changelog +* Sat May 02 10:58:34 CEST 2020 Igor Raits - 0.15.0-2 +- Update console to 0.11.2 + * Mon Apr 27 08:12:43 CEST 2020 Igor Raits - 0.15.0-1 - Update to 0.15.0 From b5815518fb661710c8be5c5851849de9f662a981 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 12 May 2020 12:59:54 -0700 Subject: [PATCH 2/6] Update to 0.15.1 --- .gitignore | 1 + bat-fix-metadata.diff | 11 ----------- rust-bat.spec | 10 +++++----- sources | 2 +- 4 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 bat-fix-metadata.diff diff --git a/.gitignore b/.gitignore index c576315..c9ef82c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /bat-0.13.0.crate /bat-0.14.0.crate /bat-0.15.0.crate +/bat-0.15.1.crate diff --git a/bat-fix-metadata.diff b/bat-fix-metadata.diff deleted file mode 100644 index 95a5e84..0000000 --- a/bat-fix-metadata.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- bat-0.15.0/Cargo.toml 2020-04-25T11:49:58+00:00 -+++ bat-0.15.0/Cargo.toml 2020-05-02T08:58:34.187038+00:00 -@@ -43,7 +43,7 @@ - default-features = false - - [dependencies.console] --version = "0.10" -+version = "0.11.2" - - [dependencies.content_inspector] - version = "0.2.4" diff --git a/rust-bat.spec b/rust-bat.spec index 1515c18..ebb2fa9 100644 --- a/rust-bat.spec +++ b/rust-bat.spec @@ -4,17 +4,14 @@ %global crate bat Name: rust-%{crate} -Version: 0.15.0 -Release: 2%{?dist} +Version: 0.15.1 +Release: 1%{?dist} Summary: cat(1) clone with wings # Upstream license specification: MIT/Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/bat Source: %{crates_source} -# Initial patched metadata -# * Update console to 0.11.2, https://github.com/sharkdp/bat/commit/81af3752893b4fa2548738af9b3ad6c75be84eae -Patch0: bat-fix-metadata.diff ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -262,6 +259,9 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \ %endif %changelog +* Tue May 12 2020 Josh Stone - 0.15.1-1 +- Update to 0.15.1 + * Sat May 02 10:58:34 CEST 2020 Igor Raits - 0.15.0-2 - Update console to 0.11.2 diff --git a/sources b/sources index d1e318a..edc5be0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bat-0.15.0.crate) = 961c26008328a70c611379d86dafa5565243e327a0898dff24e46447eb41594d106a846e638a2aae3d2d896f0cfb4ec0c60f678ea14aa534e80bfb1f2edf551f +SHA512 (bat-0.15.1.crate) = 0671a46ebb121250e0b1689f48fe27d30ab0ff2c3296b88b7b399c29b4a46c5e14cb55d35ffae70ba2dc3bee45af04e8699fdb513626a53a7ec62976fb05427d From b6d695804266a2618594ffebb224245b697befdc Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Mon, 25 May 2020 18:52:56 +0200 Subject: [PATCH 3/6] Update to 0.15.2 Signed-off-by: Igor Raits --- .gitignore | 1 + rust-bat.spec | 8 +++++--- sources | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c9ef82c..bb95b81 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /bat-0.14.0.crate /bat-0.15.0.crate /bat-0.15.1.crate +/bat-0.15.2.crate diff --git a/rust-bat.spec b/rust-bat.spec index ebb2fa9..92512f3 100644 --- a/rust-bat.spec +++ b/rust-bat.spec @@ -1,10 +1,10 @@ -# Generated by rust2rpm 13 +# Generated by rust2rpm 15 %bcond_without check %global crate bat Name: rust-%{crate} -Version: 0.15.1 +Version: 0.15.2 Release: 1%{?dist} Summary: cat(1) clone with wings @@ -28,7 +28,6 @@ Cat(1) clone with wings.} %if ! %{__cargo_skip_build} %package -n %{crate} Summary: %{summary} -# Install all deps (without check), grab their licenses and make it simple # * ASL 2.0 # * ASL 2.0 or Boost # * ASL 2.0 or MIT @@ -259,6 +258,9 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \ %endif %changelog +* Mon May 25 18:52:24 CEST 2020 Igor Raits - 0.15.2-1 +- Update to 0.15.2 + * Tue May 12 2020 Josh Stone - 0.15.1-1 - Update to 0.15.1 diff --git a/sources b/sources index edc5be0..2ea22ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bat-0.15.1.crate) = 0671a46ebb121250e0b1689f48fe27d30ab0ff2c3296b88b7b399c29b4a46c5e14cb55d35ffae70ba2dc3bee45af04e8699fdb513626a53a7ec62976fb05427d +SHA512 (bat-0.15.2.crate) = 2769aa135bbae30ee4b0d93eaa28f36e99f1b2ab39a1cb365cb295aec75e1b7ff61b82a8c2a0ed9585d22bec5824518fedb1dd301e846577ad8d8a0ce2138c34 From ddcc7444a070ce69761c3ecc381d779fea79a336 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 21 Jun 2020 10:44:23 +0200 Subject: [PATCH 4/6] Update to 0.15.4 Signed-off-by: Igor Raits --- .gitignore | 1 + 0001-Siwtch-to-path-absolutize.patch | 58 ++++++++++++++++++++++++++++ bat-fix-metadata.diff | 14 +++++++ rust-bat.spec | 29 ++++++++------ sources | 2 +- 5 files changed, 91 insertions(+), 13 deletions(-) create mode 100644 0001-Siwtch-to-path-absolutize.patch create mode 100644 bat-fix-metadata.diff diff --git a/.gitignore b/.gitignore index bb95b81..5f8d824 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /bat-0.15.0.crate /bat-0.15.1.crate /bat-0.15.2.crate +/bat-0.15.4.crate diff --git a/0001-Siwtch-to-path-absolutize.patch b/0001-Siwtch-to-path-absolutize.patch new file mode 100644 index 0000000..880e21e --- /dev/null +++ b/0001-Siwtch-to-path-absolutize.patch @@ -0,0 +1,58 @@ +From 19996e8fdf180260ff618479ff163cbc4ecfc23c Mon Sep 17 00:00:00 2001 +From: Igor Raits +Date: Sun, 21 Jun 2020 10:16:03 +0200 +Subject: [PATCH] Siwtch to path-absolutize + +This reverts commit bd17fd571f99d52b4d76a24aee719dcd89a0244d. +Signed-off-by: Igor Raits +--- + Cargo.toml | 2 +- + src/assets.rs | 8 +++----- + 2 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index 949375b..53804d2 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -51,7 +51,7 @@ globset = "0.4" + serde = { version = "1.0", features = ["derive"] } + serde_yaml = "0.8" + semver = "0.10" +-path_abs = { version = "0.5", default-features = false } ++path-absolutize = { version = "3", features = ["lazy_static_cache"] } + + [dependencies.git2] + version = "0.13" +diff --git a/src/assets.rs b/src/assets.rs +index 86c3fe0..3899d7c 100644 +--- a/src/assets.rs ++++ b/src/assets.rs +@@ -1,3 +1,4 @@ ++use std::borrow::Cow; + use std::collections::BTreeMap; + use std::ffi::OsStr; + use std::fs::{self, File}; +@@ -8,7 +9,7 @@ use syntect::dumps::{dump_to_file, from_binary, from_reader}; + use syntect::highlighting::{Theme, ThemeSet}; + use syntect::parsing::{SyntaxReference, SyntaxSet, SyntaxSetBuilder}; + +-use path_abs::PathAbs; ++use path_absolutize::Absolutize; + + use crate::assets_metadata::AssetsMetadata; + use crate::error::*; +@@ -216,10 +217,7 @@ impl HighlightingAssets { + if let Some(path_str) = path_str { + // If a path was provided, we try and detect the syntax based on extension mappings. + let path = Path::new(path_str); +- let absolute_path = PathAbs::new(path) +- .ok() +- .map(|p| p.as_path().to_path_buf()) +- .unwrap_or_else(|| path.to_owned()); ++ let absolute_path = path.absolutize().unwrap_or(Cow::Borrowed(path)); + + match mapping.get_syntax_for(absolute_path) { + Some(MappingTarget::MapToUnknown) => line_syntax.ok_or_else(|| { +-- +2.27.0 + diff --git a/bat-fix-metadata.diff b/bat-fix-metadata.diff new file mode 100644 index 0000000..30b533b --- /dev/null +++ b/bat-fix-metadata.diff @@ -0,0 +1,14 @@ +--- bat-0.15.4/Cargo.toml 2020-05-27T10:03:57+00:00 ++++ bat-0.15.4/Cargo.toml 2020-06-21T08:43:31.589254+00:00 +@@ -71,9 +71,8 @@ + version = "1.4" + optional = true + +-[dependencies.path_abs] +-version = "0.5" +-default-features = false ++[dependencies.path-absolutize] ++version = "3" + + [dependencies.semver] + version = "0.9" diff --git a/rust-bat.spec b/rust-bat.spec index 92512f3..c907441 100644 --- a/rust-bat.spec +++ b/rust-bat.spec @@ -4,7 +4,7 @@ %global crate bat Name: rust-%{crate} -Version: 0.15.2 +Version: 0.15.4 Release: 1%{?dist} Summary: cat(1) clone with wings @@ -12,6 +12,9 @@ Summary: cat(1) clone with wings License: MIT or ASL 2.0 URL: https://crates.io/crates/bat Source: %{crates_source} +# Initial patched metadata +# * Switch to path-absolutize, https://github.com/sharkdp/bat/pull/1025 +Patch0: bat-fix-metadata.diff ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -28,17 +31,16 @@ Cat(1) clone with wings.} %if ! %{__cargo_skip_build} %package -n %{crate} Summary: %{summary} -# * ASL 2.0 -# * ASL 2.0 or Boost -# * ASL 2.0 or MIT -# * BSD -# * CC0 -# * ISC -# * LGPLv3+ -# * MIT -# * MIT or ASL 2.0 -# * Unlicense or MIT -# * zlib +# ASL 2.0 +# ASL 2.0 or Boost +# BSD +# CC0 +# ISC +# LGPLv3+ +# MIT +# MIT or ASL 2.0 +# Unlicense or MIT +# zlib License: ASL 2.0 and BSD and CC0 and ISC and LGPLv3+ and MIT and zlib %description -n %{crate} %{_description} @@ -258,6 +260,9 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \ %endif %changelog +* Sun Jun 21 10:43:31 CEST 2020 Igor Raits - 0.15.4-1 +- Update to 0.15.4 + * Mon May 25 18:52:24 CEST 2020 Igor Raits - 0.15.2-1 - Update to 0.15.2 diff --git a/sources b/sources index 2ea22ca..bf23064 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bat-0.15.2.crate) = 2769aa135bbae30ee4b0d93eaa28f36e99f1b2ab39a1cb365cb295aec75e1b7ff61b82a8c2a0ed9585d22bec5824518fedb1dd301e846577ad8d8a0ce2138c34 +SHA512 (bat-0.15.4.crate) = 159fc9483c5fbc20df1451abb748e09c8953434ace907127388f4c22ab9fb545cbe8390d25005d00685074efd097111afab91ca87ada043720bfcdf83cfa526d From 5602071ef6c3dcc12ba744193fbec10a5b8db749 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 21 Jun 2020 17:18:32 +0200 Subject: [PATCH 5/6] Actually apply patch Signed-off-by: Igor Raits --- rust-bat.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rust-bat.spec b/rust-bat.spec index c907441..492bc2e 100644 --- a/rust-bat.spec +++ b/rust-bat.spec @@ -15,6 +15,7 @@ Source: %{crates_source} # Initial patched metadata # * Switch to path-absolutize, https://github.com/sharkdp/bat/pull/1025 Patch0: bat-fix-metadata.diff +Patch0001: 0001-Siwtch-to-path-absolutize.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} From a4caa0a1b72b0aa17eaf1caea67c55e2836f71aa Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 21 Jun 2020 17:29:41 +0200 Subject: [PATCH 6/6] Update patch Signed-off-by: Igor Raits --- 0001-Siwtch-to-path-absolutize.patch | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/0001-Siwtch-to-path-absolutize.patch b/0001-Siwtch-to-path-absolutize.patch index 880e21e..2730062 100644 --- a/0001-Siwtch-to-path-absolutize.patch +++ b/0001-Siwtch-to-path-absolutize.patch @@ -1,4 +1,4 @@ -From 19996e8fdf180260ff618479ff163cbc4ecfc23c Mon Sep 17 00:00:00 2001 +From d565131b04db44067f1bf07eafc863022c6b7c55 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 21 Jun 2020 10:16:03 +0200 Subject: [PATCH] Siwtch to path-absolutize @@ -6,23 +6,9 @@ Subject: [PATCH] Siwtch to path-absolutize This reverts commit bd17fd571f99d52b4d76a24aee719dcd89a0244d. Signed-off-by: Igor Raits --- - Cargo.toml | 2 +- src/assets.rs | 8 +++----- - 2 files changed, 4 insertions(+), 6 deletions(-) + 1 file changed, 3 insertions(+), 5 deletions(-) -diff --git a/Cargo.toml b/Cargo.toml -index 949375b..53804d2 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -51,7 +51,7 @@ globset = "0.4" - serde = { version = "1.0", features = ["derive"] } - serde_yaml = "0.8" - semver = "0.10" --path_abs = { version = "0.5", default-features = false } -+path-absolutize = { version = "3", features = ["lazy_static_cache"] } - - [dependencies.git2] - version = "0.13" diff --git a/src/assets.rs b/src/assets.rs index 86c3fe0..3899d7c 100644 --- a/src/assets.rs