linux-yocto/scripts/package
Alexandru Gagniuc 528287815e kbuild: deb-pkg: don't set KBUILD_BUILD_VERSION unconditionally
[ Upstream commit 62604063621fb075c7966286bdddcb057d883fa8 ]

In ThinPro, we use the convention <upstream_ver>+hp<patchlevel> for
the kernel package. This does not have a dash in the name or version.
This is built by editing ".version" before a build, and setting
EXTRAVERSION="+hp" and KDEB_PKGVERSION make variables:

    echo 68 > .version
    make -j<n> EXTRAVERSION="+hp" bindeb-pkg KDEB_PKGVERSION=6.12.2+hp69

    .deb name: linux-image-6.12.2+hp_6.12.2+hp69_amd64.deb

Since commit 7d4f07d5cb ("kbuild: deb-pkg: squash
scripts/package/deb-build-option to debian/rules"), this no longer
works. The deb build logic changed, even though, the commit message
implies that the logic should be unmodified.

Before, KBUILD_BUILD_VERSION was not set if the KDEB_PKGVERSION did
not contain a dash. After the change KBUILD_BUILD_VERSION is always
set to KDEB_PKGVERSION. Since this determines UTS_VERSION, the uname
output to look off:

    (now)      uname -a: version 6.12.2+hp ... #6.12.2+hp69
    (expected) uname -a: version 6.12.2+hp ... #69

Update the debian/rules logic to restore the original behavior.

Fixes: 7d4f07d5cb ("kbuild: deb-pkg: squash scripts/package/deb-build-option to debian/rules")
Signed-off-by: Alexandru Gagniuc <alexandru.gagniuc@hp.com>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-10 14:39:35 +02:00
..
debian kbuild: deb-pkg: don't set KBUILD_BUILD_VERSION unconditionally 2025-04-10 14:39:35 +02:00
builddeb kbuild: deb-pkg: Don't fail if modules.order is missing 2024-12-05 14:03:08 +01:00
buildtar kbuild: package: add -e and -u options to some shell scripts 2024-07-16 16:06:18 +09:00
gen-diff-patch kbuild: package: add -e and -u options to some shell scripts 2024-07-16 16:06:18 +09:00
install-extmod-build kbuild: deb-pkg: add pkg.linux-upstream.nokernelheaders build profile 2024-10-31 21:41:02 +09:00
kernel.spec kbuild: rpm-pkg: ghost modules.weakdep file 2024-07-28 17:07:03 +09:00
mkdebian kbuild: deb-pkg: add pkg.linux-upstream.nokerneldbg build profile 2024-10-31 21:41:02 +09:00
mkspec kbuild: rpm-pkg: Fix C locale setup 2024-07-24 19:26:44 +09:00
PKGBUILD kbuild: pacman-pkg: provide versioned linux-api-headers package 2025-01-09 13:33:48 +01:00
snapcraft.template kbuild: remove the last use of old cmd_src_tar rule in packaging 2023-11-28 11:38:32 +09:00