Managing kernel-updates in rpm

Saket Sinha saket.sinha89 at gmail.com
Tue Mar 25 05:02:28 EDT 2014


Let me describe a scenario to explain my question -

I first deployed a RHEL machine which happened to boot into
kernel-2.6.32-358.14.1.el6.x86_64.
Some time later I decided to install kernel-headers and kernel-devel,
and therefore I ended up with kernel-devel-2.6.32-431.5.1.el6.x86_64
and kernel-headers-2.6.32-431.5.1.el6.x86_64. Note that these differ
from the running kernel in minor version (358 and 431). This is normal
and expected with RHEL but it breaks the installation of my driver.

I will also explain why my driver has dependencies on these packages

In this condition, my driver rpm will try to install a driver for
version 2.6.32-358.14.1.el6.x86_64 which is the currently running
kernel. Since the rpm does not contain a driver for this exact kernel,
 I do not fail my driver.

NOW HERE WHAT CAN I DO. I HAVE FOUND THE FOLLOWING SOLUTION.
 In my rpm's SPEC file, I try to build my driver with kernel-devel &
Development Tools. Thus my rpm has dependencies on two packages
kernel-devel and development-tools. Most of the times this is
successful. But look at the above scenario.
What all I have in the above scenario-

kernel-devel-2.6.32-431.5.1.el6.x86_64
kernel-headers-2.6.32-431.5.1.el6.x86_64
kernel-firmware-2.6.32-358.14.1.el6.noarch
kernel-2.6.32-358.14.1.el6.x86_64

 And although it appears that kernel-devel is installed, it is
installed for a different version from the running kernel, hence the
failure.

Now I thought of installing a yum plugin with my rpm to handle kernel
updates rather than the above approach. Is this approach right?

Regards,
Saket Sinha



More information about the Kernelnewbies mailing list