Change in kernel debian packages between -rc2 and -rc3

Theodore Ts'o
2023-03-25T14:31:38Z

Hi Masahiro,

It appears that there is a backwards-incompatible (and, I believe,
incorrect) change in the package version used when generated Debian
packages between 6.2-rc2 and 6.2-rc3.

I have CONFIG_LOCALVERSION set in my .config:

CONFIG_LOCALVERSION="-xfstests"

As a result, the uname -a of a kernel that I build contains -xfstests,
e.g:

root@kvm-xfstests:~# uname -r
6.3.0-rc3-xfstests-00043-g463f2e46bf7c

Previously this would be correctly reflected in the Debian package
version:

% dpkg -I /build/linux-image-6.3.0-rc2-xfstests_6.3.0-rc2-xfstests-1016_amd64.deb
...
Package: linux-image-6.3.0-rc2-xfstests
Source: linux-6.3.0-rc2-xfstests
Version: 6.3.0-rc2-xfstests-1016
...

However, after -rc3, the CONFIG_LOCALVERSION is no longer present in the package version:

% dpkg -I /build/linux-image-6.3.0-rc3-xfstests-00043-g463f2e46bf7c_6.3.0-rc3-00043-g463f2e46bf7c-1017_amd64.deb
...
Package: linux-image-6.3.0-rc3-xfstests-00043-g463f2e46bf7c
Source: linux-6.3.0-rc3-xfstests-00043-g463f2e46bf7c
Version: 6.3.0-rc3-00043-g463f2e46bf7c-1017
...

Note the missing "-xfstests" in the above Version. This also shows up
in the name of the .deb file which is generated, and this is breaking
my kernel build script[1].

[1] https://github.com/tytso/xfstests-bld/blob/master/kernel-build/kbuild

I assume the problem is caused by one of these two commits:

36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages")
b611daae5efc ("kbuild: deb-pkg: split image and debug objects staging out into functions")

As these are the two commits which touch the builddeb script.

Could you please take a look?

Many thanks,

- Ted