lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  4 Oct 2022 11:46:25 -0700
From:   Olof Johansson <olof@...om.net>
To:     Miguel Ojeda <ojeda@...nel.org>,
        Alex Gaynor <alex.gaynor@...il.com>,
        Wedson Almeida Filho <wedsonaf@...il.com>
Cc:     Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
        Björn Roy Baron <bjorn3_gh@...tonmail.com>,
        rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
        Olof Johansson <olof@...om.net>
Subject: [PATCH] scripts: rust_is_available.sh: Provide hints on how to fix missing pieces

This might be a bit bikesheddy, but it saves a few roundtrips to the
documentation when getting the `make LLVM=1 rustavailable` run to pass.

Stick to the rustup options to avoid too much verbosity.

Signed-off-by: Olof Johansson <olof@...om.net>
---
 scripts/rust_is_available.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/rust_is_available.sh b/scripts/rust_is_available.sh
index aebbf1913970..94e6a1ce1df3 100755
--- a/scripts/rust_is_available.sh
+++ b/scripts/rust_is_available.sh
@@ -59,6 +59,9 @@ if [ "$rust_compiler_cversion" -lt "$rust_compiler_min_cversion" ]; then
 		echo >&2 "***   Your version:    $rust_compiler_version"
 		echo >&2 "***   Minimum version: $rust_compiler_min_version"
 		echo >&2 "***"
+		echo >&2 "*** To update to the expected version:"
+		echo >&2 "***   \$ rustup override set \$(scripts/min-tool-version.sh rustc)"
+		echo >&2 "***"
 	fi
 	exit 1
 fi
@@ -68,6 +71,9 @@ if [ "$1" = -v ] && [ "$rust_compiler_cversion" -gt "$rust_compiler_min_cversion
 	echo >&2 "***   Your version:     $rust_compiler_version"
 	echo >&2 "***   Expected version: $rust_compiler_min_version"
 	echo >&2 "***"
+	echo >&2 "*** To update to the expected version:"
+	echo >&2 "***   \$ rustup override set \$(scripts/min-tool-version.sh rustc)"
+	echo >&2 "***"
 fi
 
 # Check that the Rust bindings generator is suitable.
@@ -155,6 +161,9 @@ if [ ! -e "$rustc_src_core" ]; then
 		echo >&2 "*** Source code for the 'core' standard library could not be found"
 		echo >&2 "*** at '$rustc_src_core'."
 		echo >&2 "***"
+		echo >&2 "*** To install sources:"
+		echo >&2 "***   \$ rustup component add rust-src"
+		echo >&2 "***"
 	fi
 	exit 1
 fi
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ