Re: [BUG] Problem with automatic kernel numbering
From: Bagas Sanjaya
Date: Sun Apr 02 2023 - 09:23:59 EST
On 4/1/23 18:54, Mirsad Goran Todorovac wrote:
> I am talking about a problem with the CONFIG_LOCALVERSION_AUTO=y feature.
>
> I thought of a way to make an exact account of which patches were applied in a build
> i.e. adding patch checksum to 6.3.0-rc4-00034-gfcd476ea6a88-dirty, for currently the
> command
>
> # rpm -ivh --oldpackage <kernelname>-<build-no>.rpm
>
> install the kernels
>
> kernel-6.3.0_rc4mt+20230330_00051_g8bb95a1662f8_dirty-24.x86_64.rpm
> kernel-6.3.0_rc4mt+20230330_00051_g8bb95a1662f8_dirty-25.x86_64.rpm
> kernel-6.3.0_rc4mt+20230330_00051_g8bb95a1662f8_dirty-26.x86_64.rpm
>
First, Cc'ing Masahiro.
I think applying patches with `git am` should change the `git describe`
part of kernel version name. However, in this case, you have uncommitted
changes in your tree when building.
> all overlapping (apparently everything after '-' [minus] sign is discarded,
> so one has to reboot to another kernel, i.e. 6.1.15, remove the offending kernel,
> and then install the new one in the sequence of testing.
> The CONFIG_LOCALVERSION_AUTO=y rpm build script might add something that rpm
> command sees in the install process so the files do not overlap (as kernel names
> are being truncated at '-' sign).
>
Patch number truncated?
> A smaller hash of the applied patches would suffice, considering the limit
> of 64 chars. Or using an underscore '_' instead of minus '-', so the rpm
> installer doesn't treat them as the same version of kernel.
>
12 chars is minimum abbreviated hash length for Linux kernel, so it is
already sufficient. Personally, I bump to 14 chars to give more headroom in
case 12 chars give 50% collision in the (hopefully distant) future.
Thanks.
--
An old man doll... just what I always wanted! - Clara