Commit 7a531c21 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

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

Reported-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fixes: 3ab18a62 ("kbuild: deb-pkg: improve the usability of source package")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Tested-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
parent 2fd6c455
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -8,9 +8,8 @@ if [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUI
fi
fi


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


echo KERNELRELEASE=${version_upstream}
if [ "${version}" != "${debian_revision}" ]; then
	echo KBUILD_BUILD_VERSION=${debian_revision}
	echo KBUILD_BUILD_VERSION=${debian_revision}
fi
+1 −0
Original line number Original line Diff line number Diff line
@@ -244,6 +244,7 @@ KERNELRELEASE = ${KERNELRELEASE}
build-indep:
build-indep:
build-arch:
build-arch:
	\$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \
	\$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \
	KERNELRELEASE=\$(KERNELRELEASE) \
	\$(shell \$(srctree)/scripts/package/deb-build-option) \
	\$(shell \$(srctree)/scripts/package/deb-build-option) \
	olddefconfig all
	olddefconfig all