diff --git a/cargo-help-clippy-should-have-description-to-user.patch b/cargo-help-clippy-should-have-description-to-user.patch new file mode 100644 index 0000000000000000000000000000000000000000..d10579cf19f28e8c63e27f4c02c6111fec2a6243 --- /dev/null +++ b/cargo-help-clippy-should-have-description-to-user.patch @@ -0,0 +1,30 @@ +From 4a2c2e81316960ffbcc3dc1c91758420d6db0a6e Mon Sep 17 00:00:00 2001 +From: si-gui +Date: Thu, 24 Jun 2021 16:35:12 +0800 +Subject: [PATCH] cargo help clippy should have description to user + +--- + src/tools/cargo/src/bin/cargo/cli.rs | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/tools/cargo/src/bin/cargo/cli.rs b/src/tools/cargo/src/bin/cargo/cli.rs +index 243f6ac0..c2dd8785 100644 +--- a/src/tools/cargo/src/bin/cargo/cli.rs ++++ b/src/tools/cargo/src/bin/cargo/cli.rs +@@ -92,7 +92,12 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'" + if is_verbose { + drop_println!(config, " {:<20} {}", name, path.display()); + } else { +- drop_println!(config, " {}", name); ++ if name.as_str() == "clippy" { ++ let summary = "Checks a package to catch common mistakes and improve your Rust code."; ++ drop_println!(config, " {}", name, summary); ++ } else { ++ drop_println!(config, " {}", name); ++ } + } + } + } +-- +2.30.0 + diff --git a/clippy-driver-usage-should-user-friendly.patch b/clippy-driver-usage-should-user-friendly.patch new file mode 100644 index 0000000000000000000000000000000000000000..d618974f538286b42e3aeddec896cd95ee49771f --- /dev/null +++ b/clippy-driver-usage-should-user-friendly.patch @@ -0,0 +1,25 @@ +From 1062e11170d93df3c53b01c1a630a7151af3a003 Mon Sep 17 00:00:00 2001 +From: si-gui +Date: Wed, 23 Jun 2021 14:36:09 +0800 +Subject: [PATCH] clippy-driver usage should user friendly + +--- + src/tools/clippy/src/driver.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tools/clippy/src/driver.rs b/src/tools/clippy/src/driver.rs +index f5f6c09e..7af74f15 100644 +--- a/src/tools/clippy/src/driver.rs ++++ b/src/tools/clippy/src/driver.rs +@@ -95,7 +95,7 @@ fn display_help() { + Checks a package to catch common mistakes and improve your Rust code. + + Usage: +- cargo clippy [options] [--] [...] ++ clippy-driver [options] [--] [...] + + Common options: + -h, --help Print this message +-- +2.30.0 + diff --git a/fix-a-println-wrong-format.patch b/fix-a-println-wrong-format.patch new file mode 100644 index 0000000000000000000000000000000000000000..478f4e5aaf209b02821bf8c886b26abd0e7da238 --- /dev/null +++ b/fix-a-println-wrong-format.patch @@ -0,0 +1,25 @@ +From edbb1b7011fe7bccf8a2efc71d806d61cd8e0c9b Mon Sep 17 00:00:00 2001 +From: si-gui +Date: Thu, 24 Jun 2021 20:15:14 +0800 +Subject: [PATCH] fix a println wrong format + +--- + src/tools/cargo/src/bin/cargo/cli.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tools/cargo/src/bin/cargo/cli.rs b/src/tools/cargo/src/bin/cargo/cli.rs +index c2dd8785..9c240690 100644 +--- a/src/tools/cargo/src/bin/cargo/cli.rs ++++ b/src/tools/cargo/src/bin/cargo/cli.rs +@@ -94,7 +94,7 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'" + } else { + if name.as_str() == "clippy" { + let summary = "Checks a package to catch common mistakes and improve your Rust code."; +- drop_println!(config, " {}", name, summary); ++ drop_println!(config, " {:<20} {}", name, summary); + } else { + drop_println!(config, " {}", name); + } +-- +2.30.0 + diff --git a/rust.spec b/rust.spec index 7bc1ffec2caa17b423cda3d8e20cd2e14564b3d4..6f8982d912f1b2038f319878e7e9e4f2905245fa 100644 --- a/rust.spec +++ b/rust.spec @@ -12,7 +12,7 @@ %bcond_without lldb Name: rust Version: 1.51.0 -Release: 1 +Release: 4 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) URL: https://www.rust-lang.org @@ -35,6 +35,9 @@ Patch0006: rustc-1.51.0-backport-pr81728.patch Patch0007: rustc-1.51.0-backport-pr83629.patch Patch0008: rustc-1.48.0-disable-libssh2.patch Patch0009: rustc-1.51.0-disable-http2.patch +Patch0010: clippy-driver-usage-should-user-friendly.patch +Patch0011: cargo-help-clippy-should-have-description-to-user.patch +Patch0012: fix-a-println-wrong-format.patch %{lua: function rust_triple(arch) local abi = "gnu" if arch == "armv7hl" then @@ -254,6 +257,9 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure rm -rf src/llvm-project/ mkdir -p src/llvm-project/libunwind/ %endif +%patch0010 -p1 +%patch0011 -p1 +%patch0012 -p1 rm -rf vendor/curl-sys/curl/ rm -rf vendor/jemalloc-sys/jemalloc/ rm -rf vendor/libssh2-sys/libssh2/ @@ -459,6 +465,15 @@ export %{rust_env} %{_mandir}/man1/cargo*.1* %changelog +* Thu 24 Jun 2021 sunguoshuai - 1.51.0-4 +- fix a println wrong format + +* Thu 24 Jun 2021 sunguoshuai - 1.51.0-3 +- cargo help clippy should have description to user + +* Wed 23 Jun 2021 sunguoshuai - 1.51.0-2 +- clippy-driver usage should user friendly + * Fri May 07 2021 wangyue - 1.51.0-1 - Update to 1.51.0