From aef5f47929a700caf030923fa0787cd0494c1160 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 15 Jul 2019 08:22:38 +0200 Subject: [PATCH] Update to 0.9.0 Signed-off-by: Igor Gnatenko --- .gitignore | 1 + 0001-Bump-users-crate-version.patch | 46 ------------- 0001-Fix-usages-of-number_prefix.patch | 37 ---------- ...ate-log-to-0.4-and-env_logger-to-0.5.patch | 39 ----------- 0001-Upgrade-libgit2.patch | 54 --------------- exa-fix-metadata.diff | 68 ------------------- rust-exa.spec | 32 +++------ sources | 2 +- 8 files changed, 12 insertions(+), 267 deletions(-) delete mode 100644 0001-Bump-users-crate-version.patch delete mode 100644 0001-Fix-usages-of-number_prefix.patch delete mode 100644 0001-Update-log-to-0.4-and-env_logger-to-0.5.patch delete mode 100644 0001-Upgrade-libgit2.patch delete mode 100644 exa-fix-metadata.diff diff --git a/.gitignore b/.gitignore index a2e8028..e7af3fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /exa-0.8.0.crate +/exa-0.9.0.crate diff --git a/0001-Bump-users-crate-version.patch b/0001-Bump-users-crate-version.patch deleted file mode 100644 index 74afdb6..0000000 --- a/0001-Bump-users-crate-version.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 058b4a57bdb1e25cbdacc0fbd1eefc09bc5f1e95 Mon Sep 17 00:00:00 2001 -From: Benjamin Sago -Date: Fri, 7 Dec 2018 00:59:05 +0000 -Subject: [PATCH] Bump users crate version -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -And remove an unnecessary allocation while we’re at it. Fixes #442 ---- - src/output/render/groups.rs | 4 ++-- - src/output/render/users.rs | 2 +- - 4 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/src/output/render/groups.rs b/src/output/render/groups.rs -index 6504e889..a3a25e70 100644 ---- a/src/output/render/groups.rs -+++ b/src/output/render/groups.rs -@@ -19,12 +19,12 @@ impl f::Group { - let current_uid = users.get_current_uid(); - if let Some(current_user) = users.get_user_by_uid(current_uid) { - if current_user.primary_group_id() == group.gid() -- || group.members().contains(¤t_user.name().to_owned()) { -+ || group.members().iter().any(|u| u == current_user.name()) { - style = colours.yours(); - } - } - -- TextCell::paint(style, group.name().to_owned()) -+ TextCell::paint(style, group.name().to_string_lossy().into()) - } - } - -diff --git a/src/output/render/users.rs b/src/output/render/users.rs -index 75ff4c6f..d7edefac 100644 ---- a/src/output/render/users.rs -+++ b/src/output/render/users.rs -@@ -9,7 +9,7 @@ use output::cell::TextCell; - impl f::User { - pub fn render(&self, colours: &C, users: &U) -> TextCell { - let user_name = match users.get_user_by_uid(self.0) { -- Some(user) => user.name().to_owned(), -+ Some(user) => user.name().to_string_lossy().into(), - None => self.0.to_string(), - }; - diff --git a/0001-Fix-usages-of-number_prefix.patch b/0001-Fix-usages-of-number_prefix.patch deleted file mode 100644 index 6127412..0000000 --- a/0001-Fix-usages-of-number_prefix.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 2d0768c8d2c4ab28f8b6bb7fb8b2fdcce2af987f Mon Sep 17 00:00:00 2001 -From: Bernardo Meurer -Date: Tue, 16 Apr 2019 22:54:06 -0700 -Subject: [PATCH] Fix usages of number_prefix - ---- - src/output/render/size.rs | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/src/output/render/size.rs b/src/output/render/size.rs -index 25b2007..da9c709 100644 ---- a/src/output/render/size.rs -+++ b/src/output/render/size.rs -@@ -9,8 +9,7 @@ use output::table::SizeFormat; - - impl f::Size { - pub fn render(&self, colours: &C, size_format: SizeFormat, numerics: &NumericLocale) -> TextCell { -- use number_prefix::{binary_prefix, decimal_prefix}; -- use number_prefix::{Prefixed, Standalone, PrefixNames}; -+ use number_prefix::{Prefixed, Standalone, NumberPrefix, PrefixNames}; - - let size = match *self { - f::Size::Some(s) => s, -@@ -19,8 +18,8 @@ impl f::Size { - }; - - let result = match size_format { -- SizeFormat::DecimalBytes => decimal_prefix(size as f64), -- SizeFormat::BinaryBytes => binary_prefix(size as f64), -+ SizeFormat::DecimalBytes => NumberPrefix::decimal(size as f64), -+ SizeFormat::BinaryBytes => NumberPrefix::binary(size as f64), - SizeFormat::JustBytes => { - let string = numerics.format_int(size); - return TextCell::paint(colours.size(size), string); --- -2.21.0 - diff --git a/0001-Update-log-to-0.4-and-env_logger-to-0.5.patch b/0001-Update-log-to-0.4-and-env_logger-to-0.5.patch deleted file mode 100644 index 1749fe9..0000000 --- a/0001-Update-log-to-0.4-and-env_logger-to-0.5.patch +++ /dev/null @@ -1,39 +0,0 @@ -From eff7122bb25f9fdad836785d3b2a6f29cdcdd040 Mon Sep 17 00:00:00 2001 -From: Laurent Arnoud -Date: Thu, 3 May 2018 19:34:20 +0200 -Subject: [PATCH] Update log to 0.4 and env_logger to 0.5 - -No change needed for ansi_term to 0.11 ---- - src/bin/main.rs | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/src/bin/main.rs b/src/bin/main.rs -index 4140a27..ffb40a8 100644 ---- a/src/bin/main.rs -+++ b/src/bin/main.rs -@@ -62,17 +62,15 @@ pub fn configure_logger() { - None => false, - }; - -- let mut logs = env_logger::LogBuilder::new(); -+ let mut logs = env_logger::Builder::new(); - if present { -- logs.filter(None, log::LogLevelFilter::Debug); -+ logs.filter(None, log::LevelFilter::Debug); - } - else { -- logs.filter(None, log::LogLevelFilter::Off); -+ logs.filter(None, log::LevelFilter::Off); - } - -- if let Err(e) = logs.init() { -- writeln!(stderr(), "Failed to initialise logger: {}", e).unwrap(); -- } -+ logs.init() - } - - --- -2.20.1 - diff --git a/0001-Upgrade-libgit2.patch b/0001-Upgrade-libgit2.patch deleted file mode 100644 index 6915a25..0000000 --- a/0001-Upgrade-libgit2.patch +++ /dev/null @@ -1,54 +0,0 @@ -From f757300718b1861852d4a33459385eaf921d69e7 Mon Sep 17 00:00:00 2001 -From: Benjamin Sago -Date: Sun, 11 Mar 2018 11:25:06 +0000 -Subject: [PATCH] Upgrade libgit2 - -The ogham/git2-rs repository that exa uses in the Vagrant VM has also been updated. The only casualty was that some constants got namespaced. ---- - src/fs/feature/git.rs | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -diff --git a/src/fs/feature/git.rs b/src/fs/feature/git.rs -index 6ecf8e9..9cc1b7f 100644 ---- a/src/fs/feature/git.rs -+++ b/src/fs/feature/git.rs -@@ -274,12 +274,12 @@ fn reorient(path: &Path) -> PathBuf { - /// The character to display if the file has been modified, but not staged. - fn working_tree_status(status: git2::Status) -> f::GitStatus { - match status { -- s if s.contains(git2::STATUS_WT_NEW) => f::GitStatus::New, -- s if s.contains(git2::STATUS_WT_MODIFIED) => f::GitStatus::Modified, -- s if s.contains(git2::STATUS_WT_DELETED) => f::GitStatus::Deleted, -- s if s.contains(git2::STATUS_WT_RENAMED) => f::GitStatus::Renamed, -- s if s.contains(git2::STATUS_WT_TYPECHANGE) => f::GitStatus::TypeChange, -- _ => f::GitStatus::NotModified, -+ s if s.contains(git2::Status::WT_NEW) => f::GitStatus::New, -+ s if s.contains(git2::Status::WT_MODIFIED) => f::GitStatus::Modified, -+ s if s.contains(git2::Status::WT_DELETED) => f::GitStatus::Deleted, -+ s if s.contains(git2::Status::WT_RENAMED) => f::GitStatus::Renamed, -+ s if s.contains(git2::Status::WT_TYPECHANGE) => f::GitStatus::TypeChange, -+ _ => f::GitStatus::NotModified, - } - } - -@@ -287,11 +287,11 @@ fn working_tree_status(status: git2::Status) -> f::GitStatus { - /// has been staged. - fn index_status(status: git2::Status) -> f::GitStatus { - match status { -- s if s.contains(git2::STATUS_INDEX_NEW) => f::GitStatus::New, -- s if s.contains(git2::STATUS_INDEX_MODIFIED) => f::GitStatus::Modified, -- s if s.contains(git2::STATUS_INDEX_DELETED) => f::GitStatus::Deleted, -- s if s.contains(git2::STATUS_INDEX_RENAMED) => f::GitStatus::Renamed, -- s if s.contains(git2::STATUS_INDEX_TYPECHANGE) => f::GitStatus::TypeChange, -- _ => f::GitStatus::NotModified, -+ s if s.contains(git2::Status::INDEX_NEW) => f::GitStatus::New, -+ s if s.contains(git2::Status::INDEX_MODIFIED) => f::GitStatus::Modified, -+ s if s.contains(git2::Status::INDEX_DELETED) => f::GitStatus::Deleted, -+ s if s.contains(git2::Status::INDEX_RENAMED) => f::GitStatus::Renamed, -+ s if s.contains(git2::Status::INDEX_TYPECHANGE) => f::GitStatus::TypeChange, -+ _ => f::GitStatus::NotModified, - } - } --- -2.16.2 - diff --git a/exa-fix-metadata.diff b/exa-fix-metadata.diff deleted file mode 100644 index e016470..0000000 --- a/exa-fix-metadata.diff +++ /dev/null @@ -1,68 +0,0 @@ ---- exa-0.8.0/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ exa-0.8.0/Cargo.toml 2019-05-07T11:57:04.087644+00:00 -@@ -40,7 +40,7 @@ - version = "0.4.5" - - [dependencies.lazy_static] --version = "0.2" -+version = "1" - - [dependencies.term_grid] - version = "0.1.6" -@@ -51,26 +51,23 @@ - [dependencies.unicode-width] - version = "0.1.4" - --[dependencies.getopts] --version = "0.2.14" -- - [dependencies.glob] --version = "0.2" -+version = "0.3" - - [dependencies.log] --version = "0.3" -+version = "0.4" - - [dependencies.num_cpus] - version = "1.3.0" - - [dependencies.users] --version = "0.5.2" -+version = "0.9" - - [dependencies.term_size] - version = "0.3.0" - - [dependencies.ansi_term] --version = "0.8.0" -+version = "0.11" - - [dependencies.libc] - version = "0.2.9" -@@ -79,21 +76,21 @@ - version = "1.0.7" - - [dependencies.git2] --version = "0.6.4" -+version = "0.9" - optional = true - default-features = false - - [dependencies.env_logger] --version = "0.3" -+version = "0.6" - - [dependencies.locale] - version = "0.2.1" - - [dependencies.scoped_threadpool] --version = "0.1.*" -+version = "0.1" - - [dependencies.number_prefix] --version = "0.2.3" -+version = "0.3" - - [features] - git = ["git2"] diff --git a/rust-exa.spec b/rust-exa.spec index b63db37..613979d 100644 --- a/rust-exa.spec +++ b/rust-exa.spec @@ -7,33 +7,14 @@ %global crate exa Name: rust-%{crate} -Version: 0.8.0 -Release: 17%{?dist} +Version: 0.9.0 +Release: 1%{?dist} Summary: Modern replacement for ls # Upstream license specification: MIT License: MIT URL: https://crates.io/crates/exa Source: %{crates_source} -# Initial patched metadata -# * Bump ansi_term to 0.11, remove getopts, https://github.com/ogham/exa/commit/4c3fd5483d2eff2ea1e623878ede54eaa396e09e -# * Bump env_logger to 0.6, https://github.com/ogham/exa/pull/315 -# https://github.com/ogham/exa/pull/469 -# * Bump users to 0.9, https://github.com/ogham/exa/pull/495 -# * Bump lazy_static, https://github.com/ogham/exa/pull/322 -# * Bump git2 to 0.9, https://github.com/ogham/exa/commit/f757300718b1861852d4a33459385eaf921d69e7 -# https://github.com/ogham/exa/pull/461 -# * Bump number_prefix to 0.3, https://github.com/ogham/exa/pull/494 -# * Bump glob to 0.2, https://github.com/ogham/exa/pull/494 -Patch0: exa-fix-metadata.diff -# Make it work with new git2 -Patch1: 0001-Upgrade-libgit2.patch -# Make it work with new env_logger -Patch2: 0001-Update-log-to-0.4-and-env_logger-to-0.5.patch -# Make it work with new users -Patch3: 0001-Bump-users-crate-version.patch -# Make it work with new number_prefix -Patch4: 0001-Fix-usages-of-number_prefix.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -43,7 +24,11 @@ BuildArch: noarch BuildRequires: rust-packaging %global _description %{expand: -Modern replacement for ls.} +exa is a modern replacement for the command-line program ls that ships +with Unix and Linux operating systems, with more features and better defaults. +It uses colours to distinguish file types and metadata. +It knows about symlinks, extended attributes, and Git. And it’s small, fast, +and just one single binary.} %description %{_description} @@ -94,6 +79,9 @@ install -Dpm0644 -T contrib/completions.zsh \ %endif %changelog +* Mon Jul 15 08:23:01 CEST 2019 Igor Gnatenko - 0.9.0-1 +- Update to 0.9.0 + * Sun Jul 14 19:34:42 CEST 2019 Igor Gnatenko - 0.8.0-17 - Regenerate diff --git a/sources b/sources index 981df52..28ed3b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (exa-0.8.0.crate) = 96671429c4b4a56021eb0f33a6a84eb332946690fe1bfde273ccbfa3b86d0cf0d1a47a5f28677dcd39bbfcf77d20070355428eaf6226b27313a7752ce09e773c +SHA512 (exa-0.9.0.crate) = fa798e962e4a70f98fc78ccc8eb4ae7dfd4c3c0fabca2d7f6627301ffa5042f4437c98c5698f3b4ddc77acc4162b9141e6dc2e7d2f2818ff4f03ba755a6278d6