Bug 1025513

Summary: add Provides information for kernel modules
Product: [Fedora] Fedora Reporter: Kyle McMartin <kmcmartin>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ffesti, jwboyer, jzeleny, kmcmartin, novyjindrich, packaging-team-maint, peterm, pknirsch, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpm-4.11.1-11.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-03 07:55:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
add kmod.attr and kmod.prov scripts to implement Provides: kmod(foo.ko) none

Description Kyle McMartin 2013-10-31 20:44:12 UTC
Created attachment 818067 [details]
add kmod.attr and kmod.prov scripts to implement Provides: kmod(foo.ko)

It's difficult for userland software to depend on split kernel packages (ie: kernel and kernel-modules-extra) to provide a specific kmod (ie: gfs2.ko) currently, as you must maintain the versioned depends manually.

To solve this, add a kmod(foo.ko) Provides to each kernel module package, so that userland can depend on kmod(foo.ko) and have it be satisfied, wherever the module ends up being packaged.

Patch attached that seems to work in basic testing... Originally I had it in redhat-rpm-config, but it seems like these things usually go in rpm-build?

Fedora would like to use this so it can limit the modules built on architectures where various things are unlikely to be found (arm) and to split the modules up into various sub-packages to reduce the disk footprint on VMs where the hardware is more predictable.

Thanks in advance, Kyle

Comment 1 Kyle McMartin 2013-10-31 20:46:05 UTC
Additional info: this also makes it easier for us to move from something being in a module to being built into the kernel, since builtins are provided by the modules.builtin file.

Scratch build available here:

http://koji.fedoraproject.org/koji/taskinfo?taskID=6121132

If you install that and kick off a kernel build, you should end up with a large list of Provides: kmod(foo.ko) on kernel and kernel-modules-extra.

Comment 2 Panu Matilainen 2013-12-03 07:55:56 UTC
Apologies for not responding earlier. I've zero objections to this, it just kinda fell through the cracks initially and then I got stuck mulling over whether to put it into rpm or redhat-rpm-config (from dependency generation POV it doesn't matter, its just a matter of taste really)

Anyway, I put it into rpm now as that's what your patch is for, it can always be moved to redhat-rpm-config later if that becomes desireable/necessary for one reason or the other.

Fixed in rawhide, rpm-4.11.1-11.fc21.