Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 702164 - sys-apps/debianutils: enhance or split installkernel?
Summary: sys-apps/debianutils: enhance or split installkernel?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-12-06 13:52 UTC by Michał Górny
Modified: 2021-07-30 03:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-06 13:52:30 UTC
I'd like to make better use of 'installkernel' as the de-facto tool for installing kernels on Gentoo.  This is a followup of PR [1].  I am also apparently responsible for requesting the flag to make it conditional in the past [2].

The basic Debian version is good for many setups.  However, modern installs frequently use initramfs which isn't handled there.  Furthermore, systemd-boot's kernel-install is a drop-in replacement for users of that bootloader.

So I can think of at least three competing implementations:

a. the original Debian implementation,
b. the above patched to support initramfs (I'd like to prepare this),
c. kernel-install for systemd-boot.

The question is, how to handle this most effectively?  More specifically:

1. Do we consider that patching initramfs support is a minor enough change to justify supporting only b. & c.?  Or do we wish to support all three variants.

2. Do we want to support variants b. & c. via USE flags on debianutils, or via separate packages requiring debianutils[-installkernel]?

3. Do we want to keep installkernel in debianutils at all, or maybe we should move it to a separate package, and have debianutils ||-PDEP on all providers?

[1] https://github.com/gentoo/gentoo/pull/13879
[2] https://bugs.gentoo.org/527304
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2019-12-06 14:12:49 UTC
I don't understand. The PR will skip installation of "installkernel" script for people who want to use systemd-boot's mechanism instead, correct? So current installkernel script can't be used for systemd-boot.

Are you suggesting to improve installkernel script, to add initramfs support *and* systemd-boot support?

In this case I would be interested from genkernel POV because I want to add systemd-boot support here as well and it would streamline the process if we could call a single command passing kernel, initramfs, map... for everything instead of adding support for each bootloader.

If this is your idea I would suggest to create our own installkernel package instead of changing software we don't own so that people expecting Debian behavior  when installing a Debian package aren't surprised in case we need to break something.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-06 14:25:21 UTC
(In reply to Thomas Deutschmann from comment #1)
> I don't understand. The PR will skip installation of "installkernel" script
> for people who want to use systemd-boot's mechanism instead, correct? So
> current installkernel script can't be used for systemd-boot.
> 
> Are you suggesting to improve installkernel script, to add initramfs support
> *and* systemd-boot support?

Yes.  I want to improve installkernel script to support initramfs.  I also want to allow an alternative of using systemd's kernel-install instead of installkernel.

> In this case I would be interested from genkernel POV because I want to add
> systemd-boot support here as well and it would streamline the process if we
> could call a single command passing kernel, initramfs, map... for everything
> instead of adding support for each bootloader.

Yes, that's precisely my goal.  Put a single switch for intended behavior somewhere, and call 'installkernel' everywhere else.  Of course, there's also a possible alternative of having a third 'gentoo-install-kernel' wrapper but I don't think it's really necessary here ;-).

> If this is your idea I would suggest to create our own installkernel package
> instead of changing software we don't own so that people expecting Debian
> behavior  when installing a Debian package aren't surprised in case we need
> to break something.

Should we keep original installkernel in debianutils then, or maybe split it to make switching easier for users?  Or maybe even disable the original entirely, just make debianutils PDEP on our || ( installkernel-gentoo installkernel-systemd )?
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2019-12-06 15:03:03 UTC
(In reply to Michał Górny from comment #2)
> [...]
> Yes, that's precisely my goal.

Cool! Count me in if you need any help.


> Should we keep original installkernel in debianutils then, or maybe split it
> to make switching easier for users?  Or maybe even disable the original
> entirely, just make debianutils PDEP on our || ( installkernel-gentoo
> installkernel-systemd )?

As long as we keep current CLI working so that the new tool is really a 100% drop-in replacement, I would suggest that we will stop installing installkernel from debianutils and pull in our replacement as dependency instead. For a 100% drop-in replacement I see no need in providing a choice/switch.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-06 15:08:55 UTC
Ok, I'm going to prepare a new PR with two replacement packages later today and add it to the discussion.
Comment 5 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-12-06 17:32:07 UTC
+1. As discussed on irc.
Comment 6 Larry the Git Cow gentoo-dev 2019-12-11 15:01:59 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dc984d959eb29754d40a06ed10845de916d9598

commit 2dc984d959eb29754d40a06ed10845de916d9598
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-06 16:56:41 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-11 15:01:30 +0000

    sys-apps/debianutils: Bump to 4.9.1, move installkernel out
    
    Bug: https://bugs.gentoo.org/702164
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/13896
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-apps/debianutils/Manifest                 |  1 +
 sys-apps/debianutils/debianutils-4.9.1.ebuild | 42 +++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9a35708e0ed4ac8190218773bf350449c979a3

commit 4c9a35708e0ed4ac8190218773bf350449c979a3
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-06 16:54:55 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-11 15:01:29 +0000

    sys-kernel/installkernel-gentoo: New package
    
    New package with Gentoo installkernel fork, adding initramfs support.
    
    Bug: https://bugs.gentoo.org/702164
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-kernel/installkernel-gentoo/Manifest           |  1 +
 .../installkernel-gentoo-1.ebuild                  | 25 ++++++++++++++++++++++
 sys-kernel/installkernel-gentoo/metadata.xml       |  8 +++++++
 3 files changed, 34 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ece6c16adaa7f9050944383f470fc40741c0c29

commit 0ece6c16adaa7f9050944383f470fc40741c0c29
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-06 16:36:11 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-11 15:01:27 +0000

    sys-kernel/installkernel-systemd-boot: New package
    
    New package to install 'installkernel' wrapper that uses systemd-boot's
    kernel-install.
    
    Bug: https://bugs.gentoo.org/702164
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 profiles/features/selinux/package.mask             |  1 +
 .../installkernel-systemd-boot-0.ebuild            | 27 ++++++++++++++++++++++
 sys-kernel/installkernel-systemd-boot/metadata.xml |  8 +++++++
 3 files changed, 36 insertions(+)
Comment 7 Georgy Yakovlev archtester gentoo-dev 2021-07-30 03:39:47 UTC
it has been fixed