[Yum-devel] rfc - plugin to integrate hardware inventory into yum

Michael E Brown Michael_E_Brown at dell.com
Tue Aug 14 19:57:52 UTC 2007


On Tue, Aug 14, 2007 at 03:40:18PM -0400, seth vidal wrote:
> 
> 
> > Ok, I maybe assumed too much when I wrote this. Let me restate my
> > question more generically. I am asking the best way to do this, with my
> > preconceived notion embedded in the question. If there is a better way,
> > I'd like to know.
> > 
> > Right now:
> > 
> > Users must run 'bootstrap_firmware' to get the candidate list of
> > "provides" to feed to yum, which in turn will download matching
> > packages.
> 
> right - why not just have the functions that bootstrap_firmware calls be
> in the yum plugin. Then the plugin can check if the packages which
> provide those items are installed, if not it can install them or ask the
> user to install them. It could also verify that they are up to date.

The idea behind injecting virtual packages was that this would all be
handled completely automatically.

For example:

  -- user runs 'yum upgrade'
    1) firmware-tools bootstrap plugin runs, generating virtual packages
    for bootstrap (ie. devices that exist on the system for which we
    currently have no firmware utilities installed):

    Virtual RPM Name                      Virtual RPM version
    pci_firmware(ven_0x8086_dev_0x3500) = 0:0.0-0
    pci_firmware(ven_0x8086_dev_0x350c) = 0:0.0-0
    pci_firmware(ven_0x8086_dev_0x3510) = 0:0.0-0
    pci_firmware(ven_0x8086_dev_0x3514) = 0:0.0-0
    pci_firmware(ven_0x8086_dev_0x4222_subven_0x8086_subdev_0x1020) = 0:0.0-0
    ... snip ...

    2) yum looks in the repo and sees that there are RPMs that
    'Provide:' some of the names above:

    pci_firmware_Intel_Wireless-X.Y-z.noarch.rpm
        Provides: pci_firmware(ven_0x8086_dev_0x4222_subven_0x8086_subdev_0x1020) = 0:2.3-4

    3) yum installs said RPM.


The only purpose of this whole exercise is to get the RPM installed on
the system. The RPM %post script can then do other actions, such as
using firmware-tools framework to actually install firmware on a device.

> > What I want to improve:
> > 
> > I would like a way that yum automatically searches for new packages
> > every time it is run.
> > 
> > I suggested injection of fake packages, as this seemed most logical to
> > me. If there is a better way, I am not wedded to the idea. Here are a
> > couple of other points:
> > 
> > There are two type of inventory packages
> >     -- bootstrap packages -- these are packages that we think *might*
> >     exist in the repository. Populated with a list matching all the pci
> >     ids in the system, plus other vendor-specific stuff. USB/SCSI in the
> >     future. These will look like "pci_firmware_ven_0x9999_dev_0x9999".
> > 
> >     -- Actual inventory packages -- If we have a utility on the system
> >     that can actually determine the firmware version for a specific
> >     device. For example, if you have the dell-lsi inventory utility,
> >     then you can find out the exact version of lsi raid card you have.
> >     In this case, the package will look like
> >     "pci_firmware_ven_0x9999_dev_0x9999 = Version#"

Actually, now that I think about it, this second package type is not
necessary.

> 
> it sounds to me like you want a yum plugin that is in a package. It's
> pkg requires the above tools to figure out what hardware you have and it
> will then tell yum other pkgs you need to support your hw appropriately.

Exactly. This is how I have things already set up for firmware-tools. :)

Firmware-tools: provides base framework for bootstrap, inventory,
update. Doesnt provide any actual inventory or update utilities.

Firmware-addon-dell: provides bootstrap and inventory for common Dell
hardware that is supported by firmware-tools. Has dependencies on
everything necessary to do inventory.

It is extensible so that other manufacturers can easily add their own
stuff to the framework.
--
Michael



More information about the Yum-devel mailing list