Commit bbcde0a7 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: deb-pkg: fix too low build version number

Since commit b41d920a ("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: b41d920a ("kbuild: deb-pkg: split generating packaging and build")
Reported-by: default avatarDoug Smythies <dsmythies@telus.net>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: default avatarDoug Smythies <dsmythies@telus.net>
parent 6bbe4385
...@@ -88,6 +88,7 @@ set_debarch() { ...@@ -88,6 +88,7 @@ set_debarch() {
version=$KERNELRELEASE version=$KERNELRELEASE
if [ -n "$KDEB_PKGVERSION" ]; then if [ -n "$KDEB_PKGVERSION" ]; then
packageversion=$KDEB_PKGVERSION packageversion=$KDEB_PKGVERSION
revision=${packageversion##*-}
else else
revision=$(cat .version 2>/dev/null||echo 1) revision=$(cat .version 2>/dev/null||echo 1)
packageversion=$version-$revision packageversion=$version-$revision
...@@ -205,10 +206,12 @@ cat <<EOF > debian/rules ...@@ -205,10 +206,12 @@ cat <<EOF > debian/rules
#!$(command -v $MAKE) -f #!$(command -v $MAKE) -f
build: build:
\$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
KBUILD_BUILD_VERSION=${revision} KBUILD_SRC=
binary-arch: binary-arch:
\$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= intdeb-pkg \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
KBUILD_BUILD_VERSION=${revision} KBUILD_SRC= intdeb-pkg
clean: clean:
rm -rf debian/*tmp debian/files rm -rf debian/*tmp debian/files
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment