From 5ee9e2f9dfd8cda65288f13dac25e1dda7e5a8b8 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 27 Jul 2022 15:14:55 +0200 Subject: [PATCH] Update to version 0.8.2; Fixes RHBZ#2078046 --- .gitignore | 1 + ...-from-clap_generate-to-clap_complete.patch | 29 ----------- LICENSE.dependencies | 47 +++++++++++++++++ rust-zoxide.spec | 31 ++++++------ sources | 2 +- zoxide-fix-metadata-auto.diff | 11 ++++ zoxide-fix-metadata.diff | 50 +++++-------------- 7 files changed, 89 insertions(+), 82 deletions(-) delete mode 100644 0001-port-from-clap_generate-to-clap_complete.patch create mode 100644 LICENSE.dependencies create mode 100644 zoxide-fix-metadata-auto.diff diff --git a/.gitignore b/.gitignore index 97d043d..b440ff9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /zoxide-0.5.0.crate /zoxide-0.7.9.crate /zoxide-0.8.0.crate +/zoxide-0.8.2.crate diff --git a/0001-port-from-clap_generate-to-clap_complete.patch b/0001-port-from-clap_generate-to-clap_complete.patch deleted file mode 100644 index aeee3e8..0000000 --- a/0001-port-from-clap_generate-to-clap_complete.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 580486afe711a033f587114c2fc1b3727ea1f753 Mon Sep 17 00:00:00 2001 -From: Fabio Valentini -Date: Sat, 29 Jan 2022 20:47:22 +0100 -Subject: [PATCH] port from clap_generate to clap_complete - ---- - build.rs | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/build.rs b/build.rs -index deeedc6..dff9008 100644 ---- a/build.rs -+++ b/build.rs -@@ -37,9 +37,9 @@ fn generate_completions() -> io::Result<()> { - - use app::App; - use clap::IntoApp; -- use clap_generate::generate_to; -- use clap_generate::generators::{Bash, Elvish, Fish, PowerShell, Zsh}; -- use clap_generate_fig::Fig; -+ use clap_complete::generate_to; -+ use clap_complete::shells::{Bash, Elvish, Fish, PowerShell, Zsh}; -+ use clap_complete_fig::Fig; - - let app = &mut App::into_app(); - let bin_name = env!("CARGO_PKG_NAME"); --- -2.34.1 - diff --git a/LICENSE.dependencies b/LICENSE.dependencies new file mode 100644 index 0000000..6ef2e3d --- /dev/null +++ b/LICENSE.dependencies @@ -0,0 +1,47 @@ +ASL 2.0 or MIT: rust-autocfg 1.1.0 +ASL 2.0 or MIT: rust-fastrand 1.7.0 +ASL 2.0 or MIT: rust-indexmap 1.9.1 +CC0: rust-dunce 1.0.2 +MIT OR Apache-2.0: rust-clap 3.2.12 +MIT OR Apache-2.0: rust-clap_complete 3.2.3 +MIT OR Apache-2.0: rust-clap_derive 3.2.7 +MIT OR Apache-2.0: rust-clap_lex 0.2.4 +MIT or ASL 2.0: rust-anyhow 1.0.58 +MIT or ASL 2.0: rust-askama 0.11.1 +MIT or ASL 2.0: rust-askama_derive 0.11.2 +MIT or ASL 2.0: rust-askama_escape 0.10.3 +MIT or ASL 2.0: rust-askama_shared 0.12.2 +MIT or ASL 2.0: rust-bitflags 1.3.2 +MIT or ASL 2.0: rust-cfg-if 1.0.0 +MIT or ASL 2.0: rust-clap_complete_fig 3.2.4 +MIT or ASL 2.0: rust-dirs 4.0.0 +MIT or ASL 2.0: rust-dirs-sys 0.3.7 +MIT or ASL 2.0: rust-glob 0.3.0 +MIT or ASL 2.0: rust-hashbrown 0.12.3 +MIT or ASL 2.0: rust-heck 0.4.0 +MIT or ASL 2.0: rust-libc 0.2.126 +MIT or ASL 2.0: rust-mime 0.3.16 +MIT or ASL 2.0: rust-minimal-lexical 0.2.1 +MIT or ASL 2.0: rust-num-traits 0.2.15 +MIT or ASL 2.0: rust-once_cell 1.13.0 +MIT or ASL 2.0: rust-os_str_bytes 6.1.0 +MIT or ASL 2.0: rust-proc-macro-error 1.0.4 +MIT or ASL 2.0: rust-proc-macro-error-attr 1.0.4 +MIT or ASL 2.0: rust-proc-macro2 1.0.40 +MIT or ASL 2.0: rust-quote 1.0.20 +MIT or ASL 2.0: rust-serde 1.0.139 +MIT or ASL 2.0: rust-serde_derive 1.0.139 +MIT or ASL 2.0: rust-syn 1.0.98 +MIT or ASL 2.0: rust-unicase 2.6.0 +MIT or ASL 2.0: rust-unicode-ident 1.0.1 +MIT or ASL 2.0: rust-version_check 0.9.4 +MIT: rust-atty 0.2.14 +MIT: rust-bincode 1.3.3 +MIT: rust-mime_guess 2.0.3 +MIT: rust-nix 0.24.1 +MIT: rust-nom 7.1.1 +MIT: rust-ordered-float 3.0.0 +MIT: rust-strsim 0.10.0 +MIT: rust-textwrap 0.15.0 +Unlicense or MIT: rust-memchr 2.5.0 +Unlicense or MIT: rust-termcolor 1.1.3 diff --git a/rust-zoxide.spec b/rust-zoxide.spec index 8da4394..72fe8d6 100644 --- a/rust-zoxide.spec +++ b/rust-zoxide.spec @@ -1,26 +1,27 @@ -# Generated by rust2rpm 20 -# The rstest dev-dependency has cyclic deps +# Generated by rust2rpm 22 +# * missing dev-dependency: rstest %bcond_with check %global crate zoxide -Name: rust-%{crate} -Version: 0.8.0 +Name: rust-zoxide +Version: 0.8.2 Release: %autorelease Summary: Smarter cd command for your terminal -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/zoxide -Source: %{crates_source} -# Initial patched metadata -# * Update clap to 3.0.0, https://github.com/ajeetdsouza/zoxide/commit/b6b024c452635d672e3dc58707ef86cb944a52ab -Patch0: zoxide-fix-metadata.diff -Patch1: 0001-port-from-clap_generate-to-clap_complete.patch +Source0: %{crates_source} +Source1: LICENSE.dependencies +# Automatically generated patch to strip foreign dependencies +Patch: zoxide-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * drop incompatible compiler flag settings (strip = true, debug = 0) +Patch: zoxide-fix-metadata.diff ExclusiveArch: %{rust_arches} -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Smarter cd command for your terminal.} @@ -35,18 +36,20 @@ Summary: %{summary} # MIT or ASL 2.0 # Unlicense or MIT License: MIT and CC0 -# For interactive mode -Recommends: fzf +# LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE -%doc CHANGELOG.md README.md +%license LICENSE.dependencies +%doc CHANGELOG.md +%doc README.md %{_bindir}/zoxide %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 +cp %{SOURCE1} . %cargo_prep %generate_buildrequires diff --git a/sources b/sources index b27cf4e..26aa74e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zoxide-0.8.0.crate) = abdabbc5b061a118232502b6c9deaf932327cde2357f7c281441d8beb70954348da4b19c55517f43d6067f955d9aac56447bd0b65fb58469212aba77f012391d +SHA512 (zoxide-0.8.2.crate) = b1ee56b3e9e6c89f64eaf7ecb2b00ede753d00e6b14b368b5c1e1e8c8a55e5b816116201aa0b4a9e52c3a4e5e043fc4dd15b0fe7e5451ca257870d73cd6c260b diff --git a/zoxide-fix-metadata-auto.diff b/zoxide-fix-metadata-auto.diff new file mode 100644 index 0000000..2b9b146 --- /dev/null +++ b/zoxide-fix-metadata-auto.diff @@ -0,0 +1,11 @@ +--- zoxide-0.8.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ zoxide-0.8.2/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -150,8 +150,5 @@ + ] + default-features = false + +-[target."cfg(windows)".dependencies.which] +-version = "4.2.5" +- + [badges.maintenance] + status = "actively-developed" diff --git a/zoxide-fix-metadata.diff b/zoxide-fix-metadata.diff index 9ff9f7e..4c1d1f7 100644 --- a/zoxide-fix-metadata.diff +++ b/zoxide-fix-metadata.diff @@ -1,38 +1,12 @@ ---- zoxide-0.8.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ zoxide-0.8.0/Cargo.toml 2022-01-29T15:31:36.978955+00:00 -@@ -35,7 +35,7 @@ - version = "1.3.1" - - [dependencies.clap] --version = "=3.0.0-rc.8" -+version = "3.0.0" - features = ["derive"] - - [dependencies.dirs] -@@ -65,21 +65,17 @@ - [dev-dependencies.rstest] - version = "0.12.0" - [build-dependencies.clap] --version = "=3.0.0-rc.8" -+version = "3.0.0" - features = ["derive"] - --[build-dependencies.clap_generate] --version = "=3.0.0-rc.8" -+[build-dependencies.clap_complete] -+version = "3.0.0" - --[build-dependencies.clap_generate_fig] --version = "=3.0.0-rc.8" -+[build-dependencies.clap_complete_fig] -+version = "3.0.0" - - [features] - default = [] - nix = [] --[target."cfg(windows)".dependencies.rand] --version = "0.8.4" --features = ["getrandom", "small_rng"] --default-features = false - [badges.maintenance] - status = "actively-developed" +--- zoxide-0.8.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ zoxide-0.8.2/Cargo.toml 2022-07-27T12:57:16.870661+00:00 +@@ -79,9 +79,6 @@ + + [profile.release] + lto = true +-codegen-units = 1 +-debug = 0 +-strip = true + + [dependencies.anyhow] + version = "1.0.32"