On Thu, Feb 6, 2020 at 2:40 PM Zbigniew Jędrzejewski-Szmek
<zbys...@in.waw.pl> wrote:
>
> On Thu, Feb 06, 2020 at 02:13:25PM -0500, Josh Boyer wrote:
> > On Thu, Feb 6, 2020 at 1:56 PM Zbigniew Jędrzejewski-Szmek
> > <zbys...@in.waw.pl> wrote:
> > >
> > > Hello kernel maintainers, hello Fedora developers,
> > >
> > > I'm looking into the split of kernel packages. The split into subpackages
> > > seems interesting, but there are many dependencies between the packages,
> > > so it is usual to end up with all of them installed.
> > >
> > > E.g. for a simple VM, by design, kernel-core contains a basic set of
> > > modules that should be enough to boot. I see that in a standard
> > > libvirt guest, the only modules from kernel-modules that are loaded
> > > are for sound hardware and "usbnet", all which I'd be fine without.
> > >
> > > Another example: we'd like to explore building an initramfs directly
> > > from rpms, without dracut, only systemd and a standard packages to
> > > bring up the hardware. Some modules need to be installed, so the
> > > kernel can load the from the initramfs, but the kernel itself should
> > > not, since it is provided "externally" by the boot loader.
> > >
> > > But:
> > > the basic modules are in one rpm with kernel-core
> > > kernel-core Requires linux-firmware (which is 240MB)
> > > kernel-modules Requires kernel-uname-r, which is provided by kernel-core
> > > kernel Requires kernel-core-uname-r, kernel-modules-uname-r
> > >
> > > Would it be possible to make some changes:
> > >
> > > - split out the modules from kernel-core package into a new subpackage
> > >   kernel-basic-modules, kernel-core can Recommend or Require it
> >
> > There has to be a *really* good benefit to do this, and I haven't seen
> > one described.  The more splitting we do, the more management both on
> > the client machines and for the kernel maintainers themselves.  The
> > way modules are filtered is terrible (I wrote it, so I can say that)
> > and requires people to keep it updated as the upstream kernel changes
> > module dependencies.
>
> > Can you describe in more detail why you need something smaller than
> > kernel-core?  I'm not understanding your usecase.
>
> The initramfs built from rpms was described above.
>
> A different example: a VM is booted with 'qemu -kernel foo'. Then
> we vmlinuz binary is not necessary in the guest, just the modules.
>
> > > - remove the Requires on kernel-core (or change to Recommends) from
> > >   kernel-modules, so it can be installed standalone
> >
> > That makes no sense.  The modules are unusable without the main
> > vmlinux binary.  Why would we do that and risk people making their
> > machines unbootable?
>
> See above, there are cases where the modules are usable without vmlinuz
> being _installed_. People who just want to have the safe thing, should
> install kernel.rpm and have it pull in all the dependencies. The split
> into subpackages is for power users.
>
> (Proposed changes don't fundamentally change anything: it was already
> possible to uninstall kernel-modules and kernel-firmware, just keeping
> kernel-core, and make the machine unbootable.)
>

The changes you're asking for would make this possible. It's currently
not possible to completely break your system this way.

I've previously experimented with some further splitting for
minimization purposes and I haven't really seen much benefit to it. It
also adds a lot of surprises for what functionality is expected to
work.

> > > - move the Requires:linux-firmware (or change to Recommends) from 
> > > kernel-core,
> > >   have kernel Requires:linux-firmware
> > >
> > > I think this would be useful for playing with various minimization 
> > > scenarios.
> >
> > This one might be feasible.  We did the split before Recommends
> > support was present.  It's often been requested for the VM case.  I do
> > still have concerns that it can lead to unbootable physical machines,
> > but if dnf defaults to installing Recommended packages that might be
> > possible.
> Cool, that'd be a good start, since the firmware package is so large.
> Yes, dnf does install Recommends by default.

I wish we could have linux-firmware get pulled in conditionally by DNF
if it detects hardware that needs it. That said, downgrading the
dependency to Recommends means that the kickstarts will need
adjustment to compensate for the fact that it'll no longer be pulled
in by default.

Alternatively, have you considered having the kernel package produce a
stub subpackage (e.g kernel-no-firmware) to install no firmware and
satisfy a kernel-firmware virtual dependency that it requires? Then
the kernel-core package could have a "Suggests: (kernel-no-firmware if
(fedora-release-cloud or fedora-release-container) or
linux-firmware)".



-- 
真実はいつも一つ!/ Always, there's only one truth!
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to