[asterisk-users] Cannot built kmod-dahdi-linux for PAE kvariant from SRPM

stephen.hindmarch at bt.com stephen.hindmarch at bt.com
Tue Feb 16 12:05:58 CST 2010


I using the asterisk yum repository at http://packages.asterisk.org/centos/5/current to install a vanilla asterisk. All went well on my development server, which is a fully up to date CentOS5 machine. But now I am trying to do the same with my production server, which is an OEL5 machine with the 2.6.18-128.el5PAE kernel. This throws a dependency error for kmod-dahdi-linux.

kmod-dahdi-linux-2.2.1-1_centos5.2.6.18_164.11.1.el5.i686 from asterisk-current has depsolving problems
  --> Missing Dependency: kernel-i686 = 2.6.18-164.11.1.el5 is needed by package kmod-dahdi-linux-2.2.1-1_centos5.2.6.18_164.11.1.el5.i686 (asterisk-current)
Error: Missing Dependency: kernel-i686 = 2.6.18-164.11.1.el5 is needed by package kmod-dahdi-linux-2.2.1-1_centos5.2.6.18_164.11.1.el5.i686 (asterisk-current)

Well I suppose I can't expect there to be a kmod package for every possible combination of dahdi version and kernel out there so I suppose I shall have to build my own. I cannot change the kernel version on the production server as it is out of my hands.

So I have been trying to use the source rpm. I tried using yum to download it but the SRPMS directory is not at the same level as the RPMS directory so yum cannot see it. Instead I used wget to download dahdi-linux-kmod-2.2.1-1_centos5.2.6.18_164.11.1.el5.src.rpm, installed in a local build area and tried to build it.

I installed the correct devel packages, that is both kernel-devel and kernel-PAE-devel. To begin with I just tried

rpmbuild --bb ~/localrpms/SPECS/dahdi-linux-kmod.spec

but that fails as the spec file relies on the internally defined kernel version

error: Failed build dependencies:
            kernel-devel = 2.6.18-164.11.1.el5 is needed by dahdi-linux-kmod-2.2.1-1_centos5.2.6.18_164.11.1.el5.i386

A brief inspection of the spec file suggested I could override the kernel version

uname -r
2.6.18-128.el5PAE
rpmbuild --bb ~/localrpms/SPECS/dahdi-linux-kmod.spec -D "kversion `uname -r`"

But this fails because by the time the kernel name gets passed to the makefile the "PAE" has been lost:-

...
~/localrpms/BUILD/dahdi-linux-kmod-2.2.1/_kmod_build_ ~/localrpms/BUILD/dahdi-linux-kmod-2.2.1
+ make KVERS=2.6.18-128.el5 modules
You do not appear to have the sources for the 2.6.18-128.el5 kernel installed.

Further inspection and I tried to override the kernel variant parameter with
rpmbuild --bb ~/localrpms/SPECS/dahdi-linux-kmod.spec -D "kversion `uname -r`" -D "kvariants PAE"

This allows the RPM to build but when I try to install it I get

error: Failed dependencies:
            kernel-i386 = 2.6.18-128.el5PAE is needed by kmod-dahdi-linux-PAE-2.2.1-1_centos5.2.6.18_128.el5.i386

Why "kernel-i386" when the kernel package I am using is "kernel-PAE" and really this check should be using "uname -r" to test the kernel version?

So I think there are parts of the spec file that are broken for my needs. I would be happy help test any changes. In the mean time am I ok to do a "-nodeps" install of the package I have built?

Steve Hindmarch


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100216/1c45bcc0/attachment.htm 


More information about the asterisk-users mailing list