Proposal: pci_driver() tags for dkms rpms
Michael E Brown
michael_e_brown at Dell.com
Wed Mar 15 21:57:33 CST 2006
On Wed, 2006-03-15 at 18:48 -0600, Matt Domsch wrote:
> On Wed, Mar 15, 2006 at 11:27:04PM +0000, Paul Howarth wrote:
> > > Sorry, no good answer here. Yum does the wrong thing in response to
> > > multiple packages providing a dependency.
> >
> > Yum has to make a arbitrary decision when this happens, and will pick
> > the package with the shortest name I believe. I don't believe it's a
> > problem though because any given system should not be pointing at
> > repositories containing packages inappropriate for its own distribution,
> > so there shouldn't be Novell format packages in a Fedora repository for
> > instance.
>
> The question:
>
> Does the kernel already have an appropriate driver for my hardware?
>
> is what we're trying to answer. One way to answer that question is to
> put Michael's Provides: pci_driver(foo) lines in the kernel RPMs.
Don't think this is the right thing to do. Way too much rpm metadata
(every pci device supported by the kernel, I'd be laughed out of the
room...)
I'm really only thinking of putting this data into the dkms rpms.
>
> If the answer were "no" (i.e the kernel doesn't have such a Provides
> line), then having other (DKMS driver, Fedora driver, whatever)
> packages in the repo that Provide this is all well and good.
>
> If the answer were "yes" (i.e. the kernel does have such a Provides
> line), *and* there were a "newer" (DKMS driver, Fedora driver, ...)
> package also available in the repo that provided a newer driver, then
> the tools don't automatically "do the right thing" and upgrade the
> driver.
Given that we don't put this data into kernel rpm, then yes, yum will do
the correct thing here.
Where they _dont_ do the right thing is a situation where Dell has
"dell-tg3-1.0-1dkms.noarch.rpm" and Broadcom has
"bcm-tg3-1.0-1dkms.noarch.rpm", and both Dell and Broadcom have yum
repositories.
I thought this was the case you were trying to bring up originally, but
I now see your problem if kernel RPM has provides tags. But, here I
don't think the kernel should ever have these provides tags, otherwise,
you are going to have a _lot_ of RPM metadata to deal with.
>
>
> As an extension then, could the Provides: lines look like:
>
> Provides: pci_driver(0x1028,0x1000) = kmod(megaraid_mbox) = 2.0.0.10
>
> or something like that? So we get both the version of the *driver*
> and the name of the module that handles it, put there? Would that
> help?
Only if Yum does the right thing. :)
>
> Then Requires: pci_driver(0x1028,0x1000)
> would need to resolve the "best" version on the right, which I'm sure
> RPM doesn't do today...
Kernel of an idea that may not be fully thought out, yet... how about
this:
dkms rpm has this in spec file:
Provides: pci_driver(0x1028,0x1000) = 2.0.0.10
Provides: kmod(megaraid_mbox) = 2.0.0.10
Provides: suse_kmp_thingy = 2.0.0.10
And then the inventory tool can use yum to find RPM that provides
pci_driver(), then look at which kmod()s are povided by that driver to
do version comparison to know if it needs to pull down new driver.
Or... you could just not even worry about the version comparison and
always install the dkms rpm and punt the version checking to dkms.
(Preferred, imho, as it is simpler.)
--
Michael
More information about the DKMS-devel
mailing list