mbox series

[0/6] kbuild: fix some packaging issues, and use git-archive for source package

Message ID 20230312200731.599706-1-masahiroy@kernel.org (mailing list archive)
Headers show
Series kbuild: fix some packaging issues, and use git-archive for source package | expand

Message

Masahiro Yamada March 12, 2023, 8:07 p.m. UTC
This series fixes some bugs, then switch to 'git archive'
for source package creation as suggested by Linus.



Masahiro Yamada (6):
  kbuild: deb-pkg: make debian source package working again
  kbuild: deb-pkg: do not take KERNELRELEASE from the source version
  kbuild: deb-pkg: set CROSS_COMPILE only when undefined
  kbuild: deb-pkg: split image and debug objects staging out into
    functions
  kbuild: deb-pkg: use dh_listpackages to know enabled packages
  kbuild: use git-archive for source package creation

 .gitignore                       |    1 +
 Makefile                         |    9 +-
 scripts/.gitignore               |    1 -
 scripts/Makefile                 |    2 +-
 scripts/Makefile.package         |  113 ++--
 scripts/check-git                |   14 +
 scripts/list-gitignored.c        | 1057 ------------------------------
 scripts/package/builddeb         |  269 ++++----
 scripts/package/deb-build-option |   14 +-
 scripts/package/gen-diff-patch   |   44 ++
 scripts/package/mkdebian         |   24 +-
 scripts/package/mkspec           |   17 +-
 scripts/setlocalversion          |   45 +-
 13 files changed, 335 insertions(+), 1275 deletions(-)
 create mode 100755 scripts/check-git
 delete mode 100644 scripts/list-gitignored.c
 create mode 100755 scripts/package/gen-diff-patch

Comments

Linus Torvalds March 12, 2023, 11:26 p.m. UTC | #1
On Sun, Mar 12, 2023 at 1:07 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> This series fixes some bugs, then switch to 'git archive'
> for source package creation as suggested by Linus.

Thanks, looks good.

Shouldn't we also revert e0ca16749ac3 ("kbuild: make perf-tar*-src-pkg
work without relying on git")?

           Linus
Masahiro Yamada March 13, 2023, 12:52 a.m. UTC | #2
On Mon, Mar 13, 2023 at 8:26 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Sun, Mar 12, 2023 at 1:07 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > This series fixes some bugs, then switch to 'git archive'
> > for source package creation as suggested by Linus.
>
> Thanks, looks good.
>
> Shouldn't we also revert e0ca16749ac3 ("kbuild: make perf-tar*-src-pkg
> work without relying on git")?
>
>            Linus


Right.

6/6 did that.

It may not be clear enough from the commit description,
but I added the following tag to 6/6.

Fixes: e0ca16749ac3 ("kbuild: make perf-tar*-src-pkg work without
relying on git")



Instead of a verbatim revert, I made some refactoring
to share code among deb-pkg, rpm-pkg, perf-tar*-src-pkg.
Linus Torvalds March 13, 2023, 5:33 p.m. UTC | #3
On Sun, Mar 12, 2023 at 5:53 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> 6/6 did that.

Oh, I looked at that one, but only reacted to the removal of the
ignored-files script, not realizing that it also did that revert.

No complaints then,

              Linus
Leon Romanovsky March 16, 2023, 10:22 a.m. UTC | #4
On Mon, Mar 13, 2023 at 05:07:25AM +0900, Masahiro Yamada wrote:
> This series fixes some bugs, then switch to 'git archive'
> for source package creation as suggested by Linus.
> 
> 
> 
> Masahiro Yamada (6):
>   kbuild: deb-pkg: make debian source package working again
>   kbuild: deb-pkg: do not take KERNELRELEASE from the source version
>   kbuild: deb-pkg: set CROSS_COMPILE only when undefined
>   kbuild: deb-pkg: split image and debug objects staging out into
>     functions
>   kbuild: deb-pkg: use dh_listpackages to know enabled packages
>   kbuild: use git-archive for source package creation


I tried this series and got the following error:
11:05:53  Install lsb-release or set $KDEB_CHANGELOG_DIST explicitly
11:05:53  dpkg-buildpackage: info: source package linux-upstream
11:05:53  dpkg-buildpackage: info: source version 6.3.0-rc2-gdc71b1b23e6d-1
11:05:53  dpkg-buildpackage: info: source distribution unstable
11:05:53  dpkg-buildpackage: info: source changed by root <root@5621c2cf448d>
11:05:53  dpkg-buildpackage: info: host architecture arm64
11:05:53   dpkg-source --before-build .
11:05:53  dpkg-source: info: using options from linux/debian/source/local-options: --diff-ignore --extend-diff-ignore=.*
11:05:53  dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper
11:05:53  dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
11:05:53  dpkg-buildpackage: warning: (Use -d flag to override.)
11:05:53  make[1]: *** [scripts/Makefile.package:117: deb-pkg] Error 3
11:05:53  make: *** [Makefile:1656: deb-pkg] Error 2

Thanks


> 
>  .gitignore                       |    1 +
>  Makefile                         |    9 +-
>  scripts/.gitignore               |    1 -
>  scripts/Makefile                 |    2 +-
>  scripts/Makefile.package         |  113 ++--
>  scripts/check-git                |   14 +
>  scripts/list-gitignored.c        | 1057 ------------------------------
>  scripts/package/builddeb         |  269 ++++----
>  scripts/package/deb-build-option |   14 +-
>  scripts/package/gen-diff-patch   |   44 ++
>  scripts/package/mkdebian         |   24 +-
>  scripts/package/mkspec           |   17 +-
>  scripts/setlocalversion          |   45 +-
>  13 files changed, 335 insertions(+), 1275 deletions(-)
>  create mode 100755 scripts/check-git
>  delete mode 100644 scripts/list-gitignored.c
>  create mode 100755 scripts/package/gen-diff-patch
> 
> -- 
> 2.34.1
>
Nicolas Schier March 16, 2023, 11:24 a.m. UTC | #5
On Thu 16 Mar 2023 12:22:15 GMT, Leon Romanovsky wrote:
> On Mon, Mar 13, 2023 at 05:07:25AM +0900, Masahiro Yamada wrote:
> > This series fixes some bugs, then switch to 'git archive'
> > for source package creation as suggested by Linus.
> > 
> > 
> > 
> > Masahiro Yamada (6):
> >   kbuild: deb-pkg: make debian source package working again
> >   kbuild: deb-pkg: do not take KERNELRELEASE from the source version
> >   kbuild: deb-pkg: set CROSS_COMPILE only when undefined
> >   kbuild: deb-pkg: split image and debug objects staging out into
> >     functions
> >   kbuild: deb-pkg: use dh_listpackages to know enabled packages
> >   kbuild: use git-archive for source package creation
> 
> 
> I tried this series and got the following error:
> 11:05:53  Install lsb-release or set $KDEB_CHANGELOG_DIST explicitly
> 11:05:53  dpkg-buildpackage: info: source package linux-upstream
> 11:05:53  dpkg-buildpackage: info: source version 6.3.0-rc2-gdc71b1b23e6d-1
> 11:05:53  dpkg-buildpackage: info: source distribution unstable
> 11:05:53  dpkg-buildpackage: info: source changed by root <root@5621c2cf448d>
> 11:05:53  dpkg-buildpackage: info: host architecture arm64
> 11:05:53   dpkg-source --before-build .
> 11:05:53  dpkg-source: info: using options from linux/debian/source/local-options: --diff-ignore --extend-diff-ignore=.*
> 11:05:53  dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper
> 11:05:53  dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
> 11:05:53  dpkg-buildpackage: warning: (Use -d flag to override.)
> 11:05:53  make[1]: *** [scripts/Makefile.package:117: deb-pkg] Error 3
> 11:05:53  make: *** [Makefile:1656: deb-pkg] Error 2
> 
> Thanks

Do you have debhelper available on your system?  As debhelper is a 
build dependency, such a fail is expected if debhelper is not 
available.

Kind regards,
Nicolas
Leon Romanovsky March 16, 2023, 12:50 p.m. UTC | #6
On Thu, Mar 16, 2023 at 12:24:39PM +0100, Nicolas Schier wrote:
> On Thu 16 Mar 2023 12:22:15 GMT, Leon Romanovsky wrote:
> > On Mon, Mar 13, 2023 at 05:07:25AM +0900, Masahiro Yamada wrote:
> > > This series fixes some bugs, then switch to 'git archive'
> > > for source package creation as suggested by Linus.
> > > 
> > > 
> > > 
> > > Masahiro Yamada (6):
> > >   kbuild: deb-pkg: make debian source package working again
> > >   kbuild: deb-pkg: do not take KERNELRELEASE from the source version
> > >   kbuild: deb-pkg: set CROSS_COMPILE only when undefined
> > >   kbuild: deb-pkg: split image and debug objects staging out into
> > >     functions
> > >   kbuild: deb-pkg: use dh_listpackages to know enabled packages
> > >   kbuild: use git-archive for source package creation
> > 
> > 
> > I tried this series and got the following error:
> > 11:05:53  Install lsb-release or set $KDEB_CHANGELOG_DIST explicitly
> > 11:05:53  dpkg-buildpackage: info: source package linux-upstream
> > 11:05:53  dpkg-buildpackage: info: source version 6.3.0-rc2-gdc71b1b23e6d-1
> > 11:05:53  dpkg-buildpackage: info: source distribution unstable
> > 11:05:53  dpkg-buildpackage: info: source changed by root <root@5621c2cf448d>
> > 11:05:53  dpkg-buildpackage: info: host architecture arm64
> > 11:05:53   dpkg-source --before-build .
> > 11:05:53  dpkg-source: info: using options from linux/debian/source/local-options: --diff-ignore --extend-diff-ignore=.*
> > 11:05:53  dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper
> > 11:05:53  dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
> > 11:05:53  dpkg-buildpackage: warning: (Use -d flag to override.)
> > 11:05:53  make[1]: *** [scripts/Makefile.package:117: deb-pkg] Error 3
> > 11:05:53  make: *** [Makefile:1656: deb-pkg] Error 2
> > 
> > Thanks
> 
> Do you have debhelper available on your system?  As debhelper is a 
> build dependency, such a fail is expected if debhelper is not 
> available.

Yes, we don't have debhelper in our build container. The thing is that
we are using same container as we used before this series and never needed
debhelper.

Thanks

> 
> Kind regards,
> Nicolas
Steev Klimaszewski March 19, 2023, 1:12 a.m. UTC | #7
Hi Masahiro,

On Sun, Mar 12, 2023 at 1:07 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> This series fixes some bugs, then switch to 'git archive'
> for source package creation as suggested by Linus.

I apologize if this is a stupid question, but it's not immediately apparent to
me...

Previously, I was overriding the deb file output name by the setting of
LOCALVERSION_AUTO; but with this series applied, that seems to be ignored?

Now if I pass LOCALVERSION="" I end up with e.g. linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb
whereas previously, I would end up with linux-image-6.3.0-rc2_6.3.0-rc2-100_arm64.deb

How would I restore the old naming behaviour?

-- steev
Masahiro Yamada March 19, 2023, 2:19 a.m. UTC | #8
On Sun, Mar 19, 2023 at 10:12 AM Steev Klimaszewski <steev@kali.org> wrote:
>
> Hi Masahiro,
>
> On Sun, Mar 12, 2023 at 1:07 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > This series fixes some bugs, then switch to 'git archive'
> > for source package creation as suggested by Linus.
>
> I apologize if this is a stupid question, but it's not immediately apparent to
> me...
>
> Previously, I was overriding the deb file output name by the setting of
> LOCALVERSION_AUTO; but with this series applied, that seems to be ignored?
>
> Now if I pass LOCALVERSION="" I end up with e.g. linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb
> whereas previously, I would end up with linux-image-6.3.0-rc2_6.3.0-rc2-100_arm64.deb
>
> How would I restore the old naming behaviour?
>
> -- steev

The same string "6.3.0-rc2" is repeated in the file name.
The first one is what Debian calls the ABI version, and the
second one is the version of the package.
They are usually different on real Debian kernels.

LOCALVERSION affects the former, and KDEB_PKGVERSION
the second.


My recommendation is "just let it be"
because "linux-upstream_6.3.0-rc2.orig.tar.gz"
you would generate is not the real 6.3.0-rc2.


If you want to restore what you previously did,

 make deb-pkg KDEB_PKGVERSION=6.3.0-rc2-100

will create such a file name.
Steev Klimaszewski March 19, 2023, 3:21 a.m. UTC | #9
Hi Masahiro,

On Sat, Mar 18, 2023 at 9:19 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sun, Mar 19, 2023 at 10:12 AM Steev Klimaszewski <steev@kali.org> wrote:
> >
> > Hi Masahiro,
> >
> > On Sun, Mar 12, 2023 at 1:07 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > This series fixes some bugs, then switch to 'git archive'
> > > for source package creation as suggested by Linus.
> >
> > I apologize if this is a stupid question, but it's not immediately apparent to
> > me...
> >
> > Previously, I was overriding the deb file output name by the setting of
> > LOCALVERSION_AUTO; but with this series applied, that seems to be ignored?
> >
> > Now if I pass LOCALVERSION="" I end up with e.g. linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb
> > whereas previously, I would end up with linux-image-6.3.0-rc2_6.3.0-rc2-100_arm64.deb
> >
> > How would I restore the old naming behaviour?
> >
> > -- steev
>
> The same string "6.3.0-rc2" is repeated in the file name.
> The first one is what Debian calls the ABI version, and the
> second one is the version of the package.
> They are usually different on real Debian kernels.
>
> LOCALVERSION affects the former, and KDEB_PKGVERSION
> the second.
>
>
> My recommendation is "just let it be"
> because "linux-upstream_6.3.0-rc2.orig.tar.gz"
> you would generate is not the real 6.3.0-rc2.
>
>
> If you want to restore what you previously did,
>
>  make deb-pkg KDEB_PKGVERSION=6.3.0-rc2-100
>
> will create such a file name.
>
My apologies, my text editor seemed to swallow up half of my previous
email as what I was trying to say wasn't all in there...
What I meant to say is that, prior to this patchset, if
LOCALVERSION_AUTO=y we would end up with

linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb

where
LOCALVERSION_AUTO="00575-g46c71cad996d"
NUMBEROFBUILDS="100" (i'm not sure where this number was stored previously)

Assuming the above 2 are what the current settings are...

And if you turned LOCALVERSION_AUTO off, and had changes on top of the
git repo, you would end up with

linux-image-6.3.0-rc2_6.3.0-rc2+-100_arm64.deb

Then if you would pass LOCALVERSION="", on top of LOCALVERSION_AUTO
being unset, you would end up with

linux-image-6.3.0-rc2_6.3.0-rc2-100_arm64.deb

Now with your patchset applied, with LOCALVERSION_AUTO being unset,
you end up with

linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb

Which means that LOCALVERSION_AUTO goes away?  I'm not sure why the
package version overrides what I'm trying to set in the first place in
the kernel config?

Your workaround is mostly fine, but that "-100" on the end means I
have to now personally track how many builds I've done?

>
>
> --
> Best Regards
> Masahiro Yamada
Steev Klimaszewski March 19, 2023, 6:45 a.m. UTC | #10
Hi Masahiro,

On Sat, Mar 18, 2023 at 10:21 PM Steev Klimaszewski <steev@kali.org> wrote:
>
> Hi Masahiro,
>
> On Sat, Mar 18, 2023 at 9:19 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > On Sun, Mar 19, 2023 at 10:12 AM Steev Klimaszewski <steev@kali.org> wrote:
> > >
> > > Hi Masahiro,
> > >
> > > On Sun, Mar 12, 2023 at 1:07 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > > >
> > > > This series fixes some bugs, then switch to 'git archive'
> > > > for source package creation as suggested by Linus.
> > >
> > > I apologize if this is a stupid question, but it's not immediately apparent to
> > > me...
> > >
> > > Previously, I was overriding the deb file output name by the setting of
> > > LOCALVERSION_AUTO; but with this series applied, that seems to be ignored?
> > >
> > > Now if I pass LOCALVERSION="" I end up with e.g. linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb
> > > whereas previously, I would end up with linux-image-6.3.0-rc2_6.3.0-rc2-100_arm64.deb
> > >
> > > How would I restore the old naming behaviour?
> > >
> > > -- steev
> >
> > The same string "6.3.0-rc2" is repeated in the file name.
> > The first one is what Debian calls the ABI version, and the
> > second one is the version of the package.
> > They are usually different on real Debian kernels.
> >
> > LOCALVERSION affects the former, and KDEB_PKGVERSION
> > the second.
> >
> >
> > My recommendation is "just let it be"
> > because "linux-upstream_6.3.0-rc2.orig.tar.gz"
> > you would generate is not the real 6.3.0-rc2.
> >
> >
> > If you want to restore what you previously did,
> >
> >  make deb-pkg KDEB_PKGVERSION=6.3.0-rc2-100
> >
> > will create such a file name.
> >
> My apologies, my text editor seemed to swallow up half of my previous
> email as what I was trying to say wasn't all in there...
> What I meant to say is that, prior to this patchset, if
> LOCALVERSION_AUTO=y we would end up with
>
> linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb
>
> where
> LOCALVERSION_AUTO="00575-g46c71cad996d"
> NUMBEROFBUILDS="100" (i'm not sure where this number was stored previously)
>
> Assuming the above 2 are what the current settings are...
>
> And if you turned LOCALVERSION_AUTO off, and had changes on top of the
> git repo, you would end up with
>
> linux-image-6.3.0-rc2_6.3.0-rc2+-100_arm64.deb
>
> Then if you would pass LOCALVERSION="", on top of LOCALVERSION_AUTO
> being unset, you would end up with
>
> linux-image-6.3.0-rc2_6.3.0-rc2-100_arm64.deb
>
> Now with your patchset applied, with LOCALVERSION_AUTO being unset,
> you end up with
>
> linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb
>
> Which means that LOCALVERSION_AUTO goes away?  I'm not sure why the
> package version overrides what I'm trying to set in the first place in
> the kernel config?
>
> Your workaround is mostly fine, but that "-100" on the end means I
> have to now personally track how many builds I've done?
>
> >
> >
> > --
> > Best Regards
> > Masahiro Yamada

I've been trying for a while now to reproduce the previous behaviour
of version numbers and with this change in, it just does not seem
possible at all.  If I try to put any variables into KDEB_PKGVERSION,
it simply ignores then and sets it to what LOCALVERSION_AUTO would be.

-- steev
Leon Romanovsky March 19, 2023, 7:02 a.m. UTC | #11
On Mon, Mar 13, 2023 at 05:07:25AM +0900, Masahiro Yamada wrote:
> This series fixes some bugs, then switch to 'git archive'
> for source package creation as suggested by Linus.
> 
> 
> 
> Masahiro Yamada (6):
>   kbuild: deb-pkg: make debian source package working again
>   kbuild: deb-pkg: do not take KERNELRELEASE from the source version
>   kbuild: deb-pkg: set CROSS_COMPILE only when undefined
>   kbuild: deb-pkg: split image and debug objects staging out into
>     functions
>   kbuild: deb-pkg: use dh_listpackages to know enabled packages
>   kbuild: use git-archive for source package creation
> 

Thanks,
Tested-by: Leon Romanovsky <leonro@nvidia.com>
Masahiro Yamada March 19, 2023, 7:06 a.m. UTC | #12
On Sun, Mar 19, 2023 at 12:21 PM Steev Klimaszewski <steev@kali.org> wrote:
>
> Hi Masahiro,
>
> On Sat, Mar 18, 2023 at 9:19 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > On Sun, Mar 19, 2023 at 10:12 AM Steev Klimaszewski <steev@kali.org> wrote:
> > >
> > > Hi Masahiro,
> > >
> > > On Sun, Mar 12, 2023 at 1:07 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > > >
> > > > This series fixes some bugs, then switch to 'git archive'
> > > > for source package creation as suggested by Linus.
> > >
> > > I apologize if this is a stupid question, but it's not immediately apparent to
> > > me...
> > >
> > > Previously, I was overriding the deb file output name by the setting of
> > > LOCALVERSION_AUTO; but with this series applied, that seems to be ignored?
> > >
> > > Now if I pass LOCALVERSION="" I end up with e.g. linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb
> > > whereas previously, I would end up with linux-image-6.3.0-rc2_6.3.0-rc2-100_arm64.deb
> > >
> > > How would I restore the old naming behaviour?
> > >
> > > -- steev
> >
> > The same string "6.3.0-rc2" is repeated in the file name.
> > The first one is what Debian calls the ABI version, and the
> > second one is the version of the package.
> > They are usually different on real Debian kernels.
> >
> > LOCALVERSION affects the former, and KDEB_PKGVERSION
> > the second.
> >
> >
> > My recommendation is "just let it be"
> > because "linux-upstream_6.3.0-rc2.orig.tar.gz"
> > you would generate is not the real 6.3.0-rc2.
> >
> >
> > If you want to restore what you previously did,
> >
> >  make deb-pkg KDEB_PKGVERSION=6.3.0-rc2-100
> >
> > will create such a file name.
> >
> My apologies, my text editor seemed to swallow up half of my previous
> email as what I was trying to say wasn't all in there...
> What I meant to say is that, prior to this patchset, if
> LOCALVERSION_AUTO=y we would end up with
>
> linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb
>
> where
> LOCALVERSION_AUTO="00575-g46c71cad996d"
> NUMBEROFBUILDS="100" (i'm not sure where this number was stored previously)
>
> Assuming the above 2 are what the current settings are...
>
> And if you turned LOCALVERSION_AUTO off, and had changes on top of the
> git repo, you would end up with
>
> linux-image-6.3.0-rc2_6.3.0-rc2+-100_arm64.deb
>
> Then if you would pass LOCALVERSION="", on top of LOCALVERSION_AUTO
> being unset, you would end up with
>
> linux-image-6.3.0-rc2_6.3.0-rc2-100_arm64.deb
>
> Now with your patchset applied, with LOCALVERSION_AUTO being unset,
> you end up with
>
> linux-image-6.3.0-rc2_6.3.0-rc2-00575-g46c71cad996d-100_arm64.deb
>
> Which means that LOCALVERSION_AUTO goes away?


It did not go away.
LOCALVERSION_AUTO is meant to set kernelrelease,
which will result in 'uname -r' in the installed system.

LOCALVERSION_AUTO should not affect the Debian package version,
which is a different thing.




>  I'm not sure why the
> package version overrides what I'm trying to set in the first place in
> the kernel config?
>
> Your workaround is mostly fine, but that "-100" on the end means I
> have to now personally track how many builds I've done?

"-100" is the build revision, which will go into the .version file
while building the kernel.
It is not so important, you can set whatever number.



If you leave the revision auto-incremented,
this is equivalent to what Kbuild is doing internally.

make KDEB_PKGVERSION=$(make kernelversion)-$(init/build-version) bindeb-pkg



>
> >
> >
> > --
> > Best Regards
> > Masahiro Yamada
Steev Klimaszewski March 19, 2023, 7:57 a.m. UTC | #13
Hi Masahiro,

Once again, sincerest apologies, but i do appreciate your time and knowledge!

On Sun, Mar 19, 2023 at 2:07 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sun, Mar 19, 2023 at 12:21 PM Steev Klimaszewski <steev@kali.org> wrote:
<snip>
> It did not go away.
> LOCALVERSION_AUTO is meant to set kernelrelease,
> which will result in 'uname -r' in the installed system.
>
> LOCALVERSION_AUTO should not affect the Debian package version,
> which is a different thing.
>
>
>
>
> >  I'm not sure why the
> > package version overrides what I'm trying to set in the first place in
> > the kernel config?
> >
> > Your workaround is mostly fine, but that "-100" on the end means I
> > have to now personally track how many builds I've done?
>
> "-100" is the build revision, which will go into the .version file
> while building the kernel.
> It is not so important, you can set whatever number.
>
This is actually what was throwing me for a loop!
>
> If you leave the revision auto-incremented,
> this is equivalent to what Kbuild is doing internally.
>
> make KDEB_PKGVERSION=$(make kernelversion)-$(init/build-version) bindeb-pkg

Aha!  So the issue seems to be that I do out of tree builds, and
init/build-version does not take that into account, so I was always
getting whatever is in the kernel source's .version and not what is in
my actual build directory.  I'm still not entirely sure how to get
that one, but I'm a lot closer, thank you again so much, for your time
in putting together the patchset to fix the building of the packages,
as well as answering my questions.

-- steev