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:   Wed, 15 Mar 2023 21:45:29 +0100 (CET)
From:   Christian Kujau <lists@...dbynature.de>
To:     linux-kernel@...r.kernel.org, Miguel Ojeda <ojeda@...nel.org>
Subject: rust: Minor formatting fix on available Rust version.

In Fedora (and possibly other distributions too) rustc is versioned as:
    
$ rustc --version
rustc 1.67.1 (d5a82bbd2 2023-02-07) (Fedora 1.67.1-1.fc37)
    
This makes "make rustavailable" report the version twice:
    
*** Rust compiler 'rustc' is too new. This may or may not work.
***   Your version:     1.67.1
1.67.1
***   Expected version: 1.62.0
    
Fix that by only reporting the first version number.
    
Signed-off-by: Christian Kujau <lists@...dbynature.de>
---
diff --git a/scripts/rust_is_available.sh b/scripts/rust_is_available.sh
index aebbf1913970..6b5d25e36538 100755
--- a/scripts/rust_is_available.sh
+++ b/scripts/rust_is_available.sh
@@ -46,8 +46,8 @@ fi
 # Non-stable and distributions' versions may have a version suffix, e.g. `-dev`.
 rust_compiler_version=$( \
 	LC_ALL=C "$RUSTC" --version 2>/dev/null \
-		| head -n 1 \
 		| grep -oE '[0-9]+\.[0-9]+\.[0-9]+' \
+		| head -n 1
 )
 rust_compiler_min_version=$($min_tool_version rustc)
 rust_compiler_cversion=$(get_canonical_version $rust_compiler_version)

-- 
BOFH excuse #398:

Data for intranet got routed through the extranet and landed on the internet.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ