Bug 572883 - proper kmod handling
proper kmod handling
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: James Antill
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-12 04:17 EST by Levente Farkas
Modified: 2014-01-21 01:16 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-02 10:56:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix installonlypkgs and kernelpkgnames (1.77 KB, patch)
2010-07-31 07:28 EDT, Levente Farkas
no flags Details | Diff

  None (edit)
Description Levente Farkas 2010-03-12 04:17:33 EST
hi,
as i wrote in yum-devel list thread:
http://lists.baseurl.org/pipermail/yum-devel/2010-March/006735.html
currently in rhel and elrepo kmod are not yum friendly.

on rhel/centos-5w we've a lot's of kernel module (thanks to the elrepo) 
and we can build our own on a nearly standardized way for rhel/centos. 
but i now run into a problem how to add a require kmod line into another 
package's spec file. it seems to very easy, if i've got package x.spec:
Requires: y-kmod
first question whether y-kmod or kmod-y (tha package name or the virtual 
provides)? and if we go a bit further and have a i386 machine with 4gb 
ram which install by default kernel-PAE and like to install x into that 
machine i wish to pull (yum pull) kmod-x-PAE and not kmod-x since it 
can't be used on a PAE kernel. what's more if x pull kmod-y that also 
pull the none PAE kernel too which is also not a good think. there are 
two plugins in yum-utils yum-kernel-module and yum-fedorakmod, but none 
of the seems to working (yum-fedorakmod instal the proper kmod-x-PAE too 
if i set installforallkernels=1, but still install the non PAE one and 
the none PAE kernel too).

so what's the good and proper solution to require y kernel module into 
package x (in a way that works with yum on all kernel variant)?

i even like to modify any of the yum-kernel-module or yum-fedorakmod to 
be able to use, but the problem is that i can't write conditional 
requires in a package spec file which depend on the runtime kernel 
variant:-(

if there would be some tricky yum plugins which do this:
- if yum needs to install a package
- check whether the package provide kabi-module or kernel-module. if yes 
it's a kernel module.
- if it's a kernel module than check the currently running kernel (and 
optionally all installed kernel) and install the proper kernel module 
variant. eg. if the running kernel is:
   - kernel-2.6.18-164.11.1.el5 then install kmod-ocfs2
   - kernel-PAE-2.6.18-164.11.1.el5 then install kmod-ocfs2-PAE


it'd be useful to fix in rhel6 (but i can't open rhel6 ticket so please modify the product type:-)
Comment 1 Levente Farkas 2010-06-18 06:49:35 EDT
could you change it to rhel-6
Comment 2 James Antill 2010-06-18 11:53:34 EDT
I'm not exactly a kmod* packaging expert, but:

1. The only examples I can find of packages requiring kmod's, they require the virtual provide (this also seems sane, or it could never work). However these are kmod2 style packages (see below).

2. yum in RHEL-6 has new additions to compare_providers(), most importantly the fact it'll try and install the provider which requires the fewest deps. ... this might be enough to work out PAE vs. non-PAE on it's own.

3. kmod's in rpmfusion have moved away from using the yum-kmod plugin altogether, see: http://rpmfusion.org/Packaging/KernelModules/Kmods2

4. While we (RH) ship kmod-xfs and xfsprogs etc. in RHEL-5 ... we don't have a dep. between userspace and the kernel module.

...do you still want/need to change something ... if so what?
Comment 4 RHEL Product and Program Management 2010-06-18 12:23:23 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 5 Levente Farkas 2010-06-18 12:33:23 EDT
ps. jon masters is the master of kmod:-) may be he can be added to the cc list.

there is no longer pae kernel in rhel-6 so it's no longer an issue, but
- you can remove yum-kernel-module and yum-fedorakmod
- or fix it.
as in rhel kernel among dot release eg 6.0. 6.3 are kabi compatible it has no reason to keep different kmods for different kernel (one works for all), but if i modify something in a kmod package the it'd be useful (and imho the only good solution) to update kmod package and not install. ie: if i have installed
kmod-foo-1.0 and in any repo there is a kmod-foo-1.1 then yum update do NOT install the new package, but update it.
and that's the main problem currently with yum.
Comment 6 RHEL Product and Program Management 2010-07-15 10:47:56 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 7 Levente Farkas 2010-07-31 07:28:17 EDT
Created attachment 435745 [details]
fix installonlypkgs and kernelpkgnames
Comment 8 Levente Farkas 2010-07-31 07:36:16 EDT
first of all remove 'kernel-modules' from the installonlypkgs and i try to make it clear the installonlypkgs and kernelpkgnames variable. does anyone really know what they good for??? 
eg installonlypkgs:
- it contains kernel-devel but not kernel-PAE-devel
- it contains kernel-debug but not kernel-debug-devel
- it contains kernel-PAE but not kernel-xen
- it not contains kernel-doc and kernel-headers
- it contains some magic names like kernel-source kernel-unsupported
- it contains kernel-PAE-debug (typo of kernel-PAE-devel?)
kernelpkgnames:
- it contains kernel-PAE-debug but not kernel-debug 
etc...
it would be nice to clean up!
Comment 9 James Antill 2010-08-02 10:56:25 EDT
> eg installonlypkgs:
> - it contains kernel-devel but not kernel-PAE-devel

 That's not true. I've fixed the documentation to be clearer upstream:

List of package provides that should only ever be installed, never updated.
Kernels in particular fall into this category. Defaults to kernel,
kernel-bigmem, kernel-enterprise, kernel-smp, kernel-modules, kernel-debug, 
kernel-unsupported, kernel-source, kernel-devel, kernel-PAE, kernel-PAE-debug.

Note that because these are provides, and not just package names, kernel-devel
will also apply to kernel-debug-devel, etc.
Comment 10 Levente Farkas 2010-08-02 11:44:47 EDT
the original reason for this bugzilla was the kernel-modules. as i already white and discussed many places it should have to be removed from this list:
https://bugzilla.redhat.com/show_bug.cgi?id=502140
http://lists.elrepo.org/pipermail/elrepo-devel/2009-August/thread.html
http://lists.elrepo.org/pipermail/elrepo-devel/2010-July/000268.html
Comment 11 Levente Farkas 2010-08-02 11:45:21 EDT
so can i reopen this bug for further discussion?
Comment 12 James Antill 2010-08-02 14:33:33 EDT
If newer kmods aren't meant to be "installonly" why are they providing kernel-modules? Just remove that provide, and it'll be happy.

Note You need to log in before you can comment on or make changes to this bug.