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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 28 Aug 2022 11:39:55 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     linux-kbuild@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        Masahiro Yamada <masahiroy@...nel.org>
Subject: [PATCH 07/15] scripts/mkcompile_h: move LC_ALL=C to '$LD -v'

Minimize the scope of LC_ALL=C like before commit 87c94bfb8ad3 ("kbuild:
override build timestamp & version").

Give LC_ALL=C to '$LD -v' to get the consistent version output, as commit
bcbcf50f5218 ("kbuild: fix ld-version.sh to not be affected by locale")
mentioned the LD version is affected by locale.

While I was here, I merged two sed invocations.

Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---

 scripts/mkcompile_h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index f1a820d49e53..b76ccbbc094b 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -8,10 +8,6 @@ LD=$3
 # Do not expand names
 set -f
 
-# Fix the language to get consistent output
-LC_ALL=C
-export LC_ALL
-
 if test -z "$KBUILD_BUILD_USER"; then
 	LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
 else
@@ -23,8 +19,8 @@ else
 	LINUX_COMPILE_HOST=$KBUILD_BUILD_HOST
 fi
 
-LD_VERSION=$($LD -v | head -n1 | sed 's/(compatible with [^)]*)//' \
-	      | sed 's/[[:space:]]*$//')
+LD_VERSION=$(LC_ALL=C $LD -v | head -n1 |
+		sed -e 's/(compatible with [^)]*)//' -e 's/[[:space:]]*$//')
 
 cat <<EOF
 #define UTS_MACHINE		"${UTS_MACHINE}"
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ