[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNASC6f_=ngS4NW0prvwcOribumeajW1r4q57u3LGZvuEdA@mail.gmail.com>
Date: Wed, 16 Nov 2022 15:09:31 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Marc Zyngier <maz@...nel.org>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] kbuild: Restore .version auto-increment behaviour for
Debian packages
On Wed, Nov 16, 2022 at 7:05 AM Marc Zyngier <maz@...nel.org> wrote:
>
> Since 2df8220cc511 ("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).
What do you mean by "too many .version bumps"?
Every "make bindeb-pkg" increments the version by one.
Is there any case where it increases more?
> Eventually, this script should be turned into something that
> is a bit less counter-intuitive (building the kernel first
> and only then generating the packaging artefacts).
How to achieve this?
The version is recorded in debian/chanegelog.
Without it, dpkg-buildpackage fails.
In my understanding, the version must be fixed before building the kernel.
>
> Fixes: 2df8220cc511 ("kbuild: build init/built-in.a just once")
> Signed-off-by: Marc Zyngier <maz@...nel.org>
> Cc: Masahiro Yamada <masahiroy@...nel.org>
> Cc: Michal Marek <michal.lkml@...kovi.net>
> Cc: Nick Desaulniers <ndesaulniers@...gle.com>
> ---
>
> Notes:
> v2: Drop the RPM version which was wrong, and make the path
> relative to $srctree.
>
> scripts/package/mkdebian | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> index 60a2a63a5e90..a3ac5a716e9f 100755
> --- a/scripts/package/mkdebian
> +++ b/scripts/package/mkdebian
> @@ -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
> --
> 2.34.1
>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists