Skip to content

Commit

Permalink
kbuild: Restore .version auto-increment behaviour for Debian packages
Browse files Browse the repository at this point in the history
Since 2df8220 ("kbuild: build init/built-in.a just once"),
generating Debian packages using 'make bindeb-pkg' results in
packages that are stuck to the same .version, leading to unexpected
behaviours (multiple packages with the same version).

That's because the mkdebian script samples the build version
before building the kernel, and forces the use of that version
number for the actual build.

Restore the previous behaviour by calling init/build-version
instead of reading the .version file. This is likely to result
in too many .version bumps, but this is what was happening before
(although the bump was affecting builds made after the current one).

Fixes: 2df8220 ("kbuild: build init/built-in.a just once")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
Marc Zyngier authored and Masahiro Yamada committed Nov 17, 2022
1 parent 26e01ee commit 5db8fac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/package/mkdebian
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ if [ -n "$KDEB_PKGVERSION" ]; then
packageversion=$KDEB_PKGVERSION
revision=${packageversion##*-}
else
revision=$(cat .version 2>/dev/null||echo 1)
revision=$($srctree/init/build-version)
packageversion=$version-$revision
fi
sourcename=$KDEB_SOURCENAME
Expand Down

0 comments on commit 5db8fac

Please sign in to comment.