From: Lukas Herbolt <lukas@herbolt.com>
To: nathan@kernel.org, nsc@kernel.org
Cc: linux-kbuild@vger.kernel.org, Lukas Herbolt <lukas@herbolt.com>
Subject: [PATCH] kbuild: rpm-pkg: Fix generating debuginfo manually.
Date: Thu, 12 Feb 2026 14:58:56 +0100 [thread overview]
Message-ID: <20260212135855.147906-2-lukas@herbolt.com> (raw)
The ${OBJCOPY} and ${READELF} are not expanded into path to readelf
and objcopy binary so just use the binary name with the %{_bindir}
makro.
Signed-off-by: Lukas Herbolt <lukas@herbolt.com>
---
scripts/package/kernel.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index 0f1c8de1bd95..d032f6aff91b 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -109,11 +109,11 @@ echo /usr/lib/debug/lib/modules/%{KERNELRELEASE}/vmlinux > %{buildroot}/debuginf
while read -r mod; do
mod="${mod%.o}.ko"
dbg="%{buildroot}/usr/lib/debug/lib/modules/%{KERNELRELEASE}/kernel/${mod}"
- buildid=$("${READELF}" -n "${mod}" | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p')
+ buildid=$(%{_bindir}/eu-readelf -n "${mod}" | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p')
link="%{buildroot}/usr/lib/debug/.build-id/${buildid}.debug"
mkdir -p "${dbg%/*}" "${link%/*}"
- "${OBJCOPY}" --only-keep-debug "${mod}" "${dbg}"
+ %{_bindir}/objcopy --only-keep-debug "${mod}" "${dbg}"
ln -sf --relative "${dbg}" "${link}"
echo "${dbg#%{buildroot}}" >> %{buildroot}/debuginfo.list
--
2.53.0
next reply other threads:[~2026-02-12 13:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 13:58 Lukas Herbolt [this message]
2026-02-12 16:26 ` [PATCH] kbuild: rpm-pkg: Fix generating debuginfo manually Nathan Chancellor
2026-02-12 19:28 ` Lukas Herbolt
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=20260212135855.147906-2-lukas@herbolt.com \
--to=lukas@herbolt.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox