]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kbuild: rpm-pkg: Fix manual debuginfo generation when using .src.rpm
authorNathan Chancellor <nathan@kernel.org>
Fri, 13 Feb 2026 06:45:13 +0000 (01:45 -0500)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:21:30 +0000 (07:21 -0500)
commit3d01d8a2cc64ab0745c9454865da6493e0bb07d6
tree177b88289dbcaeba038e9ebe8a4e51d341d47f78
parent39824c8ce0c257154a07d18e49ae6618094a31fa
kbuild: rpm-pkg: Fix manual debuginfo generation when using .src.rpm

[ Upstream commit afdfb71c018e9a0aa2e51fb8186d3fb1acdd3f0e ]

Commit 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package
manually") added uses of OBJCOPY and READELF, variables from Kbuild.
These variables are defined and work properly when using the binrpm-pkg
target because rpmbuild is run within Kbuild. However, these variables
are not defined when building from a source RPM package generated with
the srcrpm-pkg target, breaking the build when generating the debug info
subpackage.

Define a default value for these variables so that these commands
respect the value from Kbuild but continue to work when built from a
source RPM package.

Cc: stable@vger.kernel.org
Fixes: 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package manually")
Reported-by: Lukas Herbolt <lukas@herbolt.com>
Closes: https://lore.kernel.org/20260212135855.147906-2-lukas@herbolt.com/
Tested-by: Lukas Herbolt <lukas@herbolt.com>
Link: https://patch.msgid.link/20260213-fix-debuginfo-srcrpm-pkg-v1-1-45cd0c0501b9@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/package/kernel.spec