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]
Message-Id: <20230722044806.3867434-10-masahiroy@kernel.org>
Date:   Sat, 22 Jul 2023 13:47:57 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     linux-kbuild@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>
Subject: [PATCH 10/19] kbuild: rpm-pkg: derive the Version from %{KERNELRELEASE}

Avoid hard-coding the Version field in the generated spec file.

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

 scripts/package/mkspec | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 22e290d23d8a..783e1997d94a 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -27,8 +27,6 @@ else
 	M=DEL
 fi
 
-__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
-
 # We can label the here-doc lines for conditional output to the spec file
 #
 # Labels:
@@ -43,7 +41,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
 
 	Name: kernel
 	Summary: The Linux Kernel
-	Version: $__KERNELRELEASE
+	Version: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g')
 	Release: $(cat .version 2>/dev/null || echo 1)
 	License: GPL
 	Group: System Environment/Kernel
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ