Skip to content

Commit

Permalink
kbuild: deb-pkg: do not take KERNELRELEASE from the source version
Browse files Browse the repository at this point in the history
KERNELRELEASE does not need to match the package version in changelog.
Rather, it conventially matches what is called 'ABINAME', which is a
part of the binary package names.

Both are the same by default, but the former might be overridden by
KDEB_PKGVERSION. In this case, the resulting package would not boot
because /lib/modules/$(uname -r) does not point the module directory.

Partially revert 3ab18a6 ("kbuild: deb-pkg: improve the usability
of source package").

Reported-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fixes: 3ab18a6 ("kbuild: deb-pkg: improve the usability of source package")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
masahir0y authored and ujfalusi committed Mar 13, 2023
1 parent 3f65886 commit c7ab720
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/package/deb-build-option
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ if [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUI
fi

version=$(dpkg-parsechangelog -S Version)
version_upstream="${version%-*}"
debian_revision="${version#${version_upstream}}"
debian_revision="${debian_revision#*-}"
debian_revision="${version##*-}"

echo KERNELRELEASE=${version_upstream}
echo KBUILD_BUILD_VERSION=${debian_revision}
if [ "${version}" != "${debian_revision}" ]; then
echo KBUILD_BUILD_VERSION=${debian_revision}
fi
1 change: 1 addition & 0 deletions scripts/package/mkdebian
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ srctree ?= .
build-indep:
build-arch:
\$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \
KERNELRELEASE=\$(KERNELRELEASE) \
\$(shell \$(srctree)/scripts/package/deb-build-option) \
olddefconfig all
Expand Down

0 comments on commit c7ab720

Please sign in to comment.