diff --git a/0001-Upgrade-libgit2.patch b/0001-Upgrade-libgit2.patch new file mode 100644 index 0000000..6915a25 --- /dev/null +++ b/0001-Upgrade-libgit2.patch @@ -0,0 +1,54 @@ +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-0.8.0-fix-metadata.diff b/exa-0.8.0-fix-metadata.diff index 6621351..da4cd51 100644 --- a/exa-0.8.0-fix-metadata.diff +++ b/exa-0.8.0-fix-metadata.diff @@ -1,5 +1,5 @@ --- exa-0.8.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ exa-0.8.0/Cargo.toml 2017-11-30T23:37:17.982905+01:00 ++++ exa-0.8.0/Cargo.toml 2018-03-12T11:29:30.660423+01:00 @@ -40,7 +40,7 @@ version = "0.4.5" @@ -35,7 +35,13 @@ [dependencies.libc] version = "0.2.9" -@@ -84,7 +81,7 @@ +@@ -79,12 +76,12 @@ + version = "1.0.7" + + [dependencies.git2] +-version = "0.6.4" ++version = "0.7" + optional = true default-features = false [dependencies.env_logger] diff --git a/rust-exa.spec b/rust-exa.spec index db507ec..b9e7a56 100644 --- a/rust-exa.spec +++ b/rust-exa.spec @@ -16,7 +16,10 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ # * Bump env_logger to 0.4, https://github.com/ogham/exa/pull/315 # * Bump users to 0.6, https://github.com/ogham/exa/pull/317 # * Bump lazy_static, https://github.com/ogham/exa/pull/322 +# * Bump git2 to 0.7, https://github.com/ogham/exa/commit/f757300718b1861852d4a33459385eaf921d69e7 Patch0: exa-0.8.0-fix-metadata.diff +# Make it work with new git2 +Patch1: 0001-Upgrade-libgit2.patch ExclusiveArch: %{rust_arches} @@ -25,7 +28,7 @@ BuildRequires: rust-packaging BuildRequires: (crate(ansi_term) >= 0.10.2 with crate(ansi_term) < 0.11.0) BuildRequires: (crate(datetime) >= 0.4.5 with crate(datetime) < 0.5.0) BuildRequires: (crate(env_logger) >= 0.4.0 with crate(env_logger) < 0.5.0) -BuildRequires: (crate(git2) >= 0.6.4 with crate(git2) < 0.7.0) +BuildRequires: (crate(git2) >= 0.7.0 with crate(git2) < 0.8.0) BuildRequires: (crate(glob) >= 0.2.0 with crate(glob) < 0.3.0) BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) BuildRequires: (crate(libc) >= 0.2.9 with crate(libc) < 0.3.0) @@ -105,6 +108,9 @@ which use %{crate} from crates.io. %exclude %{cargo_registry}/%{crate}-%{version}/{Makefile,Vagrantfile,contrib,devtools,screenshots.png,xtests} %changelog +* Mon Mar 12 2018 Igor Gnatenko - 0.8.0-5 +- Bump git2 to 0.7 + * Fri Feb 09 2018 Fedora Release Engineering - 0.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild