Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: deb-pkg: do not take KERNELRELEASE from the source version

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 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability
of source package").

Reported-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fixes: 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability of source package")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>

+5 -5
+4 -5
scripts/package/deb-build-option
··· 8 8 fi 9 9 10 10 version=$(dpkg-parsechangelog -S Version) 11 - version_upstream="${version%-*}" 12 - debian_revision="${version#${version_upstream}}" 13 - debian_revision="${debian_revision#*-}" 11 + debian_revision="${version##*-}" 14 12 15 - echo KERNELRELEASE=${version_upstream} 16 - echo KBUILD_BUILD_VERSION=${debian_revision} 13 + if [ "${version}" != "${debian_revision}" ]; then 14 + echo KBUILD_BUILD_VERSION=${debian_revision} 15 + fi
+1
scripts/package/mkdebian
··· 244 244 build-indep: 245 245 build-arch: 246 246 \$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \ 247 + KERNELRELEASE=\$(KERNELRELEASE) \ 247 248 \$(shell \$(srctree)/scripts/package/deb-build-option) \ 248 249 olddefconfig all 249 250