RHEL4 kernel RPM Provides: lines for modules

Paul Howarth paul at city-fan.org
Fri Apr 8 09:53:08 CDT 2005


Paul Howarth wrote:
> Buchan Milne wrote:
> 
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>Matt Domsch wrote:
>>
>>
>>>RHEL4 kernels now include Provides lines in their kernel RPMs for
>>>modules.  They look like this:
>>>
>>>kernel = 2.6.9
>>>kernel-drm = 4.3.0
>>>kernel-i686 = 2.6.9-5.EL
>>>kABI(4.0.i686) = 0
>>>kmod(DAC960) = 2.5.47
>>>kmod(cciss) = 2.6.4
>>>kmod(cpqarray) = 2.6.0
>>>kmod(bcm203x) = 1.0
>>>kmod(bfusb) = 1.1
>>>kmod(hci_uart) = 2.1
>>>kmod(hci_usb) = 2.7
>>>kmod(edd) = 0.16
>>>kmod(mptbase) = 3.01.16
>>>kmod(3c59x) = LK1.1.19
>>>kmod(8139too) = 0.9.27
>>>kmod(b44) = 0.95
>>>kmod(bonding) = 2.6.0
>>>kmod(e100) = 3.0.27-k2-NAPI
>>>kmod(e1000) = 5.3.19-k2-NAPI
>>>kmod(ixgb) = 1.0.66
>>>kmod(ns83820) = 0.20
>>>kmod(r8169) = 1.2
>>>kmod(tg3) = 3.10
>>>kmod(de2104x) = 0.7
>>>kmod(dmfe) = 1.36.4
>>>kmod(tulip) = 1.1.13
>>>kmod(winbond-840) = 1.01-d
>>>kmod(acpiphp_ibm) = 1.0.1
>>>kmod(3w-9xxx) = 2.26.02.001
>>>kmod(3w-xxxx) = 1.26.00.039
>>>kmod(aacraid) = 1.1.2-lk2
>>>kmod(ahci) = 1.00
>>>kmod(aic79xx) = 1.3.11
>>>kmod(aic7xxx) = 6.2.36
>>>kmod(aic7xxx_old) = 5.2.0
>>>kmod(ata_piix) = 1.02
>>>kmod(gdth) = 3.04
>>>kmod(ips) = 7.10.18
>>>kmod(libata) = 1.02
>>>kmod(lpfc) = 0:8.0.16
>>>kmod(megaraid_mbox) = 2.20.4.0
>>>kmod(megaraid_mm) = 2.20.2.0-rh1
>>>kmod(qla1280) = 3.24.4
>>>kmod(qla2100) = 8.00.00b21-k
>>>kmod(qla2200) = 8.00.00b21-k
>>>kmod(qla2300) = 8.00.00b21-k
>>>kmod(qla2322) = 8.00.00b21-k
>>>kmod(qla2xxx) = 8.00.00b21-k
>>>kmod(qla6312) = 8.00.00b21-k
>>>kmod(qla6322) = 8.00.00b21-k
>>>kmod(sata_nv) = 0.03
>>>kmod(sata_promise) = 1.00
>>>kmod(sata_sil) = 0.54
>>>kmod(sata_sis) = 0.10
>>>kmod(sata_svw) = 1.04
>>>kmod(sata_sx4) = 0.50
>>>kmod(sata_via) = 0.20
>>>kmod(sata_vsc) = 0.01
>>>kmod(sg) = 3.5.31
>>>kmod(sym53c8xx) = 2.1.18j
>>>kmod(speedtch) = 1.8
>>>kmod(usb_atm) = 1.8
>>>kmod(sn9c102) = 1:1.08
>>>kmod(w9968cf) = 1:1.32-basic
>>>kmod(cifs) = 1.20
>>>kmod(80	21q) = 1.8
>>>kmod(bluetooth) = 2.6
>>>kmod(bnep) = 1.2
>>>kmod(cmtp) = 1.0
>>>kmod(hidp) = 1.0
>>>kmod(l2cap) = 2.4
>>>kmod(rfcomm) = 1.3
>>>kmod(sco) = 0.3
>>>kernel = 2.6.9-5.EL
>>>
>>>Let's think about how dkms mkrpm can be extended to add similar lines
>>>to those generated RPMs that include prebuilt binaries.
>>
>>
>>This is something I would also like to have seen in Mandrakelinux kernel
>>packages (which would allow more sane management of drivers, since it
>>would then be possible to prevent dkms from clobbering good drivers in
>>newer kernels ...
>>
>>Do the kernel-source packages provide any of this info (or even better,
>>obsoletes ...)?
>>
>>Something like this should be enough for the default template:
>>
>>- --- template-dkms-mkrpm.spec.orig       2005-01-26 00:52:10.000000000
>>+0200
>>+++ template-dkms-mkrpm.spec    2005-04-06 11:11:04.000000000 +0200
>>@@ -14,6 +14,7 @@
>> BuildArch:     noarch
>> Group:         System/Kernel
>> Requires:      dkms >= 1.95
>>+Provides:      kmod(%{module_name}) = %{version}
>> BuildRequires:         dkms
>> Source0:       %{module_name}-%{version}-mktarball.dkms.tgz
>> BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root/
>>
>>
>>
>>[bgmilne at comanche dkms-2.0.5]$ rpm -q --provides --define "module_name
>>foo" --define "version 1.0" --define "kernel_versions `uname -r`"
>>- --specfile template-dkms-mkrpm.spec
>>kmod(foo) = 1.0
>>
>>This doesn't however address the case where multiple modules are
>>provided by one dkms package ...
> 
> 
> The way Red Hat do it in RHEL4 is to use a script 
> /usr/lib/rpm/redhat/find-kmod-provides.sh (part of the redhat-rpm-config 
> package) to generate the Provides: entries instead of using RPM's 
> internal Provides: generator:
> 
> #
> # don't use RPM's internal dependency generator, instead
> # just use our magic one that finds the versions of kernel modules for
> # provides and don't do any requires
> # (we used to just turn off AutoReqProv on all packages)
> #
> %define _use_internal_dependency_generator 0
> %define __find_provides /usr/lib/rpm/redhat/find-kmod-provides.sh
> %define __find_requires %{nil}
> 
> What the script does is to run "modinfo" on all .ko files in the package 
>   that are ELF files, extract the version information, and generate an 
> appropriate "kmod($mod) = $ver" Provides: entry.
> 
> A way that this could be done in dkms would be for dkms to provide its 
> own find-provides script, which looked to see if 
> /usr/lib/rpm/redhat/find-kmod-provides.sh existed and if so, ran it, 
> otherwise falling back to the standard /usr/lib/rpm/find-provides.
> 
> Alternatively, the dkms find-provides script could include the code from 
> the /usr/lib/rpm/redhat/find-kmod-provides.sh (GPL) directly or do 
> something equivalent.
> 
> This approach would get the correct module versions in the event that 
> the package version was not the same as the underlying module version, 
> and would also work for packages with multiple modules.

Attached is my first attempt at a patch to do this. It doesn't appear to 
break anything in FC3, but neither does it do anything useful because 
FC3's modinfo doesn't provide module version information. I don't have a 
RHEL4 box to try it on.

Paul.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dkms-2.0.5-provides.patch
Url: http://lists.us.dell.com/pipermail/dkms-devel/attachments/20050408/404692a4/dkms-2.0.5-provides.bat


More information about the DKMS-devel mailing list