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 new file mode 100644 index 0000000..1749fe9 --- /dev/null +++ b/0001-Update-log-to-0.4-and-env_logger-to-0.5.patch @@ -0,0 +1,39 @@ +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/exa-fix-metadata.diff b/exa-fix-metadata.diff index c1ba1dc..29c9e46 100644 --- a/exa-fix-metadata.diff +++ b/exa-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 2019-02-10T10:39:37.636572+01:00 ++++ exa-0.8.0/Cargo.toml 2019-02-10T11:25:06.307236+01:00 @@ -40,7 +40,7 @@ version = "0.4.5" @@ -9,17 +9,21 @@ [dependencies.term_grid] version = "0.1.6" -@@ -50,9 +50,6 @@ - +@@ -51,26 +51,23 @@ [dependencies.unicode-width] version = "0.1.4" -- + -[dependencies.getopts] -version = "0.2.14" - +- [dependencies.glob] version = "0.2" -@@ -64,13 +61,13 @@ + + [dependencies.log] +-version = "0.3" ++version = "0.4" + + [dependencies.num_cpus] version = "1.3.0" [dependencies.users] diff --git a/rust-exa.spec b/rust-exa.spec index c699c0e..f3f6571 100644 --- a/rust-exa.spec +++ b/rust-exa.spec @@ -22,6 +22,8 @@ Source: %{crates_source} 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 ExclusiveArch: %{rust_arches} @@ -34,7 +36,7 @@ BuildRequires: (crate(glob/default) >= 0.2.0 with crate(glob/default) < 0.3.0) BuildRequires: (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0) BuildRequires: (crate(libc/default) >= 0.2.9 with crate(libc/default) < 0.3.0) BuildRequires: (crate(locale/default) >= 0.2.1 with crate(locale/default) < 0.3.0) -BuildRequires: (crate(log/default) >= 0.3.0 with crate(log/default) < 0.4.0) +BuildRequires: (crate(log/default) >= 0.4.0 with crate(log/default) < 0.5.0) BuildRequires: (crate(natord/default) >= 1.0.7 with crate(natord/default) < 2.0.0) BuildRequires: (crate(num_cpus/default) >= 1.3.0 with crate(num_cpus/default) < 2.0.0) BuildRequires: (crate(number_prefix/default) >= 0.2.3 with crate(number_prefix/default) < 0.3.0)