From: HONG Yifan <elsk@google.com>
To: masahiroy@kernel.org
Cc: elsk@google.com, kernel-team@android.com,
linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk
Subject: [PATCH v2] setlocalversion: use ${objtree}/include/config/auto.conf
Date: Tue, 18 Mar 2025 00:59:00 +0000 [thread overview]
Message-ID: <20250318005900.2256921-1-elsk@google.com> (raw)
In-Reply-To: <CAK7LNASqYkDTPNo20Bj1knwsJMrp=nbQyh__=Do67eWq4CKU3A@mail.gmail.com>
setlocalversion reads include/config/auto.conf, which is located below
$(objtree) with commit 214c0eea43b2 ("kbuild: add $(objtree)/ prefix to
some in-kernel build artifacts").
To be consistent, the setlocalversion script should use
${objtree}/include/config/auto.conf as well.
Signed-off-by: HONG Yifan <elsk@google.com>
---
v1: https://lore.kernel.org/lkml/20250312021154.102262-2-elsk@google.com/
v1 -> v2: fixed the other two locations of include/config/auto.conf in
setlocalversion script; also removed incorrect claim in commit message.
scripts/setlocalversion | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 28169d7e143b..c13fe6e585e9 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -186,16 +186,16 @@ if ${no_local}; then
exit 0
fi
-if ! test -e include/config/auto.conf; then
+if ! test -e ${objtree}/include/config/auto.conf; then
echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
exit 1
fi
# version string from CONFIG_LOCALVERSION
-config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf)
+config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' ${objtree}/include/config/auto.conf)
# scm version string if not at the kernel version tag or at the file_localversion
-if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then
+if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" ${objtree}/include/config/auto.conf; then
# full scm version string
scm_version="$(scm_version)"
elif [ "${LOCALVERSION+set}" != "set" ]; then
--
2.49.0.rc1.451.g8f38331e32-goog
next prev parent reply other threads:[~2025-03-18 0:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 2:11 [PATCH v1] setlocalversion: use ${objtree}/include/config/auto.conf HONG Yifan
2025-03-12 7:30 ` Masahiro Yamada
2025-03-12 19:13 ` Hong, Yifan
2025-03-12 23:02 ` Hong, Yifan
2025-03-15 7:28 ` Masahiro Yamada
2025-03-18 0:59 ` HONG Yifan [this message]
2025-03-22 15:14 ` [PATCH v2] " Masahiro Yamada
2025-03-24 23:11 ` Hong, Yifan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250318005900.2256921-1-elsk@google.com \
--to=elsk@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=masahiroy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.