summaryrefslogtreecommitdiffstats
path: root/scripts/package
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-11-05 23:18:05 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-11-11 09:04:52 -0500
commitbbcde0a7241261cd0ca8d8e6b94a4113a4b71443 (patch)
treef9a1abb090b0280c5e00b7579898833450b76499 /scripts/package
parent6bbe4385d035c6fac56f840a59861a0310ce137b (diff)
kbuild: deb-pkg: fix too low build version number
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>
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/mkdebian7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 663a7f343b42..edcad61fe3cd 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -88,6 +88,7 @@ set_debarch() {
88version=$KERNELRELEASE 88version=$KERNELRELEASE
89if [ -n "$KDEB_PKGVERSION" ]; then 89if [ -n "$KDEB_PKGVERSION" ]; then
90 packageversion=$KDEB_PKGVERSION 90 packageversion=$KDEB_PKGVERSION
91 revision=${packageversion##*-}
91else 92else
92 revision=$(cat .version 2>/dev/null||echo 1) 93 revision=$(cat .version 2>/dev/null||echo 1)
93 packageversion=$version-$revision 94 packageversion=$version-$revision
@@ -205,10 +206,12 @@ cat <<EOF > debian/rules
205#!$(command -v $MAKE) -f 206#!$(command -v $MAKE) -f
206 207
207build: 208build:
208 \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= 209 \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
210 KBUILD_BUILD_VERSION=${revision} KBUILD_SRC=
209 211
210binary-arch: 212binary-arch:
211 \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= intdeb-pkg 213 \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
214 KBUILD_BUILD_VERSION=${revision} KBUILD_SRC= intdeb-pkg
212 215
213clean: 216clean:
214 rm -rf debian/*tmp debian/files 217 rm -rf debian/*tmp debian/files