As discussed for a while on #gentoo-dev, genkernel right now uses custom prefix-suffix for its kernels like: /boot/kernel-genkernel-x86_64-3.1.0 ^^^^^^^^^^^^^^^^ While the actual kernel name is just '3.1.0'. This makes it a pain to match kernel files with actual kernel [1]. Maybe it'd be a good idea to use naming consistent with 'make install', or at least drop that prefix-suffix and use [default] local version suffix instead. [1]:https://github.com/mgorny/eclean-kernel/issues/1
The lines copy_image_with_preserve "kernel" \ "${tmp_kernel_binary}" \ "kernel-${KNAME}-${ARCH}-${KV}" in gen_compile.sh seem to be responsible. I haven't studied copy_image_with_preserve (of gen_funcs.sh) for break possibilities. Personally, before touching this I would like to hear how much pain your pain is. On the local version suffix front outstanding bug #263927 may be related.
The question is: why genkernel uses different naming? in the first place. Although we should probably ask releng if they rely on this naming before changing it.
Pay attention to grub:2 kernel autodetection code and perhaps the many other scripts around hardcoding "genkernel-", I also have an eclass in the sabayon-distro overlay considering the "genkernel" suffix (it's hardcoded, but that's the way it is in genkernel since ~day 0 I guess).
I'm worried about breaking stuff we don't think of right now, too. That's why I'm interested to hear how much pain this actually causes. I should have said that more clearly in my first post.
Well, I opened this bug mostly because I don't see a real benefit in using name like that. Mostly because the 'genkernel' part does not occur in moduledir. (In reply to comment #1) > Personally, before touching this I would like to hear how much pain your pain > is. Right now, the script has hardcoded prefix list. Considering that parts of genkernel name are variable, I'd have to at least reproduce them, if not match even more variants. To be honest, I'd be completely happy with any solution which allows me to easily match files in /boot to actual kernel version. That seems like a long-term solution. (In reply to comment #3) > Pay attention to grub:2 kernel autodetection code and perhaps the many other > scripts around hardcoding "genkernel-", I also have an eclass in the > sabayon-distro overlay considering the "genkernel" suffix (it's hardcoded, but > that's the way it is in genkernel since ~day 0 I guess). That's not what I'm looking for. AFAICS grub searches filename for something looking like version. That's not really a good thing to match /boot to /lib.
Well, for the genkernel part I have no really objections to remove. However, I have heard about some exotic more configurations (PXE, shared boot) where they needed kernels for different arches to live side by side. Even tho it was a long time ago now... Personally I like keeping close to upstream and make a possibility for the user to change what upstream uses. In this case that would be using what "make install" gives by default, and have a option to add tags/suffixes of different kinds. However if that makes too many unhappy faces I could look into renaming the module dir. But for my part the ETA could be a while before I even have time to look into how to get a kernel searching in an alternative modules dir.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=c452f3d690dc695a55aee63f0f2e4ab0cbb7b93a commit c452f3d690dc695a55aee63f0f2e4ab0cbb7b93a Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-07-28 20:56:30 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-07-29 20:00:26 +0000 Change kernel and initramfs default filename in $BOOTDIR This commit will change default kernel and initramfs filename: kernel-genkernel-%%ARCH%%-%%KV%% -> vmlinuz-%%KV%% System.map-genkernel--%%ARCH%%-%%KV%% -> System.map-%%KV%% initramfs-genkernel-%%ARCH%%-%%KV%% -> initramfs-%%KV%%.img The new naming will be consistent with kernel's "make install" and will allow to match files in /lib/modules with actual kernel. In addition, $ARCH value was moved to kernel's LOCALVERSION. This will ensure that this information is still present and when you do cross-compilation, that /lib/modules content don't get mixed. Bug: https://bugs.gentoo.org/390407 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> defaults/config.sh | 6 +++--- doc/genkernel.8.txt | 21 ++++++++++++++++----- gen_configkernel.sh | 2 +- gen_determineargs.sh | 11 +++++++++-- genkernel | 10 ++++++++++ genkernel.conf | 6 +++--- 6 files changed, 42 insertions(+), 14 deletions(-)
And https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=769a07fd3e947ffb216ea94887d752a27ea212d9 which makes commit #7 possible.
Released with >=sys-kernel/genkernel-4.0.0_beta10. Please keep in mind that nobody you start immediately removing support for old naming schema: 1) 3.x is current stable version 2) Even with 4.x, user can revert name change. I guess in 2021 we can slowly start removing...