kbuild: deb-pkg: fix too low build version number
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 6 Nov 2018 04:18:05 +0000 (13:18 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:13:07 +0000 (16:13 +0100)
commit4d17f22eb16ed539f6162ea566e89acf6f44354a
tree8a68c6a42b86a74ef7039b1d81330bfd4149d0c8
parent30fc828c1e1d86a7e151d8a44ed66ed6e8c79016
kbuild: deb-pkg: fix too low build version number

[ Upstream commit bbcde0a7241261cd0ca8d8e6b94a4113a4b71443 ]

Since commit b41d920acff8 ("kbuild: deb-pkg: split generating packaging
and build"), the build version of the kernel contained in a deb package
is too low by 1.

Prior to the bad commit, the kernel was built first, then the number
in .version file was read out, and written into the debian control file.

Now, the debian control file is created before the kernel is actually
compiled, which is causing the version number mismatch.

Let the mkdebian script pass KBUILD_BUILD_VERSION=${revision} to require
the build system to use the specified version number.

Fixes: b41d920acff8 ("kbuild: deb-pkg: split generating packaging and build")
Reported-by: Doug Smythies <dsmythies@telus.net>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Doug Smythies <dsmythies@telus.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/package/mkdebian