Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921201 - eclass kernel-install unconditionally adds a dependency on kmod[lzma] even without opting into compressed modules
Summary: eclass kernel-install unconditionally adds a dependency on kmod[lzma] even wi...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-02 15:42 UTC by Boris Staletic
Modified: 2024-01-07 12:01 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 Boris Staletic 2024-01-02 15:42:50 UTC
The change was introduced in this commit:
https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/kernel-install.eclass?id=8fbafcbda119ea44a75bfd8b29cf8631d5aff80e

The following part
	RDEPEND+="
		sys-apps/kmod[lzma]
	"
imposes kmod[lzma] dependency even for users that did not opt into compressed modules or that have a kernel configuration with no module support.

As one of those users, my attempt to undo this dependency was to change the above RDEPEND to the following:

	RDEPEND+="
		modules-compress? ( sys-apps/kmod[lzma] )
	"

I can certainly make a pull request, but I wanted to know if this is really the right kind of patch.

Currently, kmod is in the @system set for all users, so it should be present on all gentoo systems, unless someone has overridden it with /etc/portage/profile/packages.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-07 07:07:08 UTC
I don't see why we can't make that conditional.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-07 08:14:18 UTC
(In reply to Sam James from comment #1)
> I don't see why we can't make that conditional.

i.e. PR is welcome :)
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-01-07 12:01:43 UTC
Both kmod and xz-utils are @system.  The dependency is necessary because you may enable USE=modules-compress on any package providing kernel modules (via linux-mod-r1), and you'd be able to end up with compressed modules that you can't load.  On the other hand, we can't enforce the dep there because there's no requirement that USE=modules-compress would use xz compression rather than the two other algorithms supported — this is only characteristic of sys-kernel/gentoo-kernel*.