Skip to content

Commit 7a531c2

Browse files
committed
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 3ab18a6 ("kbuild: deb-pkg: improve the usability of source package"). Reported-by: Péter Ujfalusi <[email protected]> Fixes: 3ab18a6 ("kbuild: deb-pkg: improve the usability of source package") Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Peter Ujfalusi <[email protected]>
1 parent 2fd6c45 commit 7a531c2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

scripts/package/deb-build-option

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ if [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUI
88
fi
99

1010
version=$(dpkg-parsechangelog -S Version)
11-
version_upstream="${version%-*}"
12-
debian_revision="${version#${version_upstream}}"
13-
debian_revision="${debian_revision#*-}"
11+
debian_revision="${version##*-}"
1412

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

scripts/package/mkdebian

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ KERNELRELEASE = ${KERNELRELEASE}
244244
build-indep:
245245
build-arch:
246246
\$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \
247+
KERNELRELEASE=\$(KERNELRELEASE) \
247248
\$(shell \$(srctree)/scripts/package/deb-build-option) \
248249
olddefconfig all
249250

0 commit comments

Comments
 (0)