[asterisk-dev] rebuilding kmod-dahdi-linux i686 vs i386

Bob Beers bob.beers at gmail.com
Wed Sep 1 08:53:24 CDT 2010


On Tue, Aug 31, 2010 at 5:08 PM, Jason Parker <jparker at digium.com> wrote:
> On 08/31/2010 03:56 PM, Bob Beers wrote:
>> I have RHEL5 on a Pentium M machine.
>> I am trying to rebuild the dahdi RPMs on my box.
>>
>> The package built on my machine using
>> $ rpmbuild --rebuild
>> dahdi-linux-kmod-2.3.0.1-1_centos5.2.6.18_194.11.3.el5.src.rpm
>> is
>> kmod-dahdi-linux-2.3.0.1-1_centos5.2.6.18_194.11.3.el5.i386.rpm
>>
>> The package at asterisk.org yum repository is
>> kmod-dahdi-linux-2.3.0.1-1_centos5.2.6.18_194.11.3.el5.i686.rpm
>>
>> Trying to install the .i386.rpm, built on my local machine doesn't work,
>>   since my machine has i686 kernel installed.
>>
>> Is there a 'special sauce' required for the 'rpmbuild --rebuild' command
>>   to get the kmod-dahdi-linux to be the correct arch?
>>
>> I tried adding '--define "arch i686"', but that had no effect.
>>
>> Shouldn't the .spec file determine the correct arch from the running
>> kernel, unless
>>   specifically overridden?
>>
>> Thanks,
>>
>> -Bob Beers
>>
>
> --target i686
>

Hi Jason,
Thank you very much for that.
It is necessary, but not sufficient it seems ...

$ rpmbuild --rebuild --target i686
dahdi-linux-kmod-2.3.0.1-1_centos5.2.6.18_194.11.3.el5.src.rpm
Installing dahdi-linux-kmod-2.3.0.1-1_centos5.2.6.18_194.11.3.el5.src.rpm
Building target platforms: i686
Building for target i686
error: Failed build dependencies:
        kernel-xen-devel = 2.6.18-194.11.3.el5 is needed by
dahdi-linux-kmod-2.3.0.1-1_centos5.2.6.18_194.11.3.el5.i686
        kernel-PAE-devel = 2.6.18-194.11.3.el5 is needed by
dahdi-linux-kmod-2.3.0.1-1_centos5.2.6.18_194.11.3.el5.i686

I could now:
yum install kernel-xen-devel kernel-PAE-devel

but I thought I'd first try adding
 --define 'kvariants ""'
 to the rpmbuild command.
That works ... I now have a kmod-dahdi-linux...el5.i686.rpm.
And I was able to install it on my system.

The successful command is:
rpmbuild --rebuild --target i686 --define 'kvariants ""'
dahdi-linux-kmod-2.3.0.1-1_centos5.2.6.18_194.11.3.el5.src.rpm

I guess my RPM size is 564484 vs. asterisk.org's 3895792 because my
 setup builds a separate dahdi-linux-kmod-debuginfo-2.3.0.1...rpm?

I've discovered that behavior can be modified by adding a line:
%debug_package %{nil}
to my ~/.rpmmacros file.

Also, just for completeness, it is necessary to build and install
basically all of
 the other dahdi linux RPMs (which requires installing libusb-devel),
 before you can rebuild from the dahdi-linux-kmod  SRPM.

Is this process discussed on the voip-info wiki?  I couldn't find
anything, but maybe
 I didn't look carefully enough.  Maybe some info could be added at
the bottom of
 this [1] page?

[1] <http://www.voip-info.org/wiki/index.php?page_id=4975>

Thanks again,

>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>



More information about the asterisk-dev mailing list