Koozali.org: home of the SME Server

Compiling dahdi-linux-kmod from src rpm

Offline apmuthu

  • *
  • 244
  • +0/-0
Compiling dahdi-linux-kmod from src rpm
« on: March 01, 2013, 06:52:18 PM »
The last dahdi-linux-kmod was compiled for CentOS v5.8 kernel version 308.24.1.
The src rpm for it is at:
dahdi-linux-kmod-2.6.1-1_centos5.2.6.18_308.24.1.el5.src.rpm

The src rpm file has been patched for the xdefs.h bug and is available at:
dahdi-linux-kmod-2.6.1-1_centos5.2.6.18_348.1.1.el5.src.rpm

Attempting to rebuild the rpm from it only creates the i386 build version of the rpm:
kmod-dahdi-linux-2.6.1-1_centos5.2.6.18_348.1.1.el5.i386.rpm

Note the change in names of the RPM and the SRPM.

How do we get the i686 version of it?

Code: [Select]
yum install kernel-devel kernel-xen-devel kernel-PAE-devel
was also done.

Even the rpmbuild --target i686 --define 'kvariants ""' was also done to no avail.

Line 160 of the file /usr/src/kernels/2.6.18-348.1.1.el5-i686/Makefile:
Code: [Select]
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
shows that the i686 command line argument for the target ARCH gets changed to i386.

Any workaround other than to tinker with the kernel Makefile to generate the i686 version of the rpm?

On making the said line:
Code: [Select]
SUBARCH := $(shell uname -m | sed -e s/i.86/i686/ -e s/sun4u/sparc64/ \

We now get the following error:
Code: [Select]
make[1]: Entering directory `/usr/src/kernels/2.6.18-348.1.1.el5-i686'
Makefile:495: /usr/src/kernels/2.6.18-348.1.1.el5-i686/arch/i686/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/kernels/2.6.18-348.1.1.el5-i686/arch/i686/Makefile'.  Stop.
make[1]: Leaving directory `/usr/src/kernels/2.6.18-348.1.1.el5-i686'
make: *** [modules] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.90501 (%build)
The said folder /usr/src/kernels/2.6.18-348.1.1.el5-i686/arch/i686/ does not exists and hence the missing Makefile error.

Now do we just
1. symlink or copy the i386 equivalent in as i686 (both tested to produce only the i386 rpm) or
2. is there any rpm from which it is obtained or
3. do we copy over the i386 folder and (where to and what) tweak it?

Code: [Select]
CPU Architecture 'i686' does not support VPMADT032 or HPEC. Skipping.
« Last Edit: March 02, 2013, 04:50:50 AM by apmuthu »

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #1 on: March 01, 2013, 10:38:41 PM »
Hi Ap.muthu

I don't have an answer I'm afraid.  Because of the dependencies of the Asterisk kernel modules, we've always concentrated on creating a stable distro based upon the SME base augmented with SAIL and whatever RPMS are pointed to by the Asterisk 'current' repo pointer.  For EL5, I think this is still 1.8.7 at the moment but I'll check it and come back to you.

Best

S

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #2 on: March 02, 2013, 04:52:02 AM »
The penalty is living with a compromised kernel (308) in this case.

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #3 on: March 11, 2013, 05:50:48 AM »
A new CentOS 5 / SME 8 kernel has been released.
The freshly compiled dahdi-linux-kmod rpm with sprm and no spec sheet changes other than version is available at:
http://www.apmuthu.com/files/CentOS-Dahdi-Linux-Kmod.zip

The new kernel is:
 centos5.2.6.18_348.2.1.el5


Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #4 on: March 11, 2013, 10:04:16 PM »
Thanks apmuthu

Best

S

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #5 on: March 12, 2013, 05:00:47 PM »
New kernel:
kernel-2.6.18-348.3.1.el5.i686.rpm
 
No DAHDI / Asterisk rpms yet.
 
DAHDI RPMs
Asterisk RPMs
 
« Last Edit: March 13, 2013, 06:57:45 AM by apmuthu »

guest22

Re: Compiling dahdi-linux-kmod from src rpm
« Reply #6 on: March 14, 2013, 10:53:30 PM »
A new CentOS 5 / SME 8 kernel has been released.
The freshly compiled dahdi-linux-kmod rpm with sprm and no spec sheet changes other than version is available at:
http://www.apmuthu.com/files/CentOS-Dahdi-Linux-Kmod.zip
apmuthu,

really appreciate all what you do and joining this community a with a zillion percent energy!

There are some pointers that you may want to take into consideration:
- Please only submit patches
- Please only make available new files/rpm's throught your personal contribs area on contribs.org

reasons for these are:
- All should be to be able to review and comment, so only patches are viable for reviews
- New non contribs.org sources (repo/download/zip) are not trusted by default.

TIA for your considerations.

guest

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #7 on: March 15, 2013, 06:09:57 AM »
Hi RequestedDeletion,
 
Thankyou for your kind words.
 
I do not know where my personal contribs.org area for placement of patches is.
 
I am placing all my files for predominantly personal use at my personal domain for tracking opensource developments and make it available to those who want to further it's cause.
 
As a matter of full disclosure, I am placing both SRPM and RPM besides spec and notes where necessary so that anyone can see the diff patch from whatever source they already have. Patches against existing repo sprms / files vis-a-vis my contributions are included in such zips or are placed in the bugzilla (thanks @stephdl) or links to uploads in appropriate wikis.
 
Since each endeavour is done purely out of hobby interests and sometimes sponsored by kind individuals and is done at a specific point in time based on dependencies available it should be followed and used with care. The rpms are provided for the lazy ones who wish to trust my endeavours explicity - obviously at their sole risk!
 
Unfortunately, progress in the development of active open source projects far outstrips the pace with which the community documents it in their wikis (quite a few do not have any beyond a mostly outdated readme). This may be in some instances, a solicitation for funding/sponsors and / or an attempt to demand consultancy contracts (unfair use of position in market place), but where the public is largely interested with a strong long standing userbase such as the SMEServer project, in the long run mischief and vested interests will be exposed or project forked where other (funding / bespoke intelligence interests of national / corporate entities) factors encourage it.
 
It is in this space of documentation on experimentation firsthand that I endeavour to fill this lacunae here.
 

guest22

Re: Compiling dahdi-linux-kmod from src rpm
« Reply #8 on: March 17, 2013, 08:21:30 AM »
I do not know where my personal contribs.org area for placement of patches is.

Please see: http://wiki.contribs.org/Releasing_Contribs

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #9 on: March 17, 2013, 10:46:12 AM »
I tried my Forum / Wiki access cerdentials and the SF.net credentials to no avail attempting to ssh into shell.contribs.org
 
Your link while informative does not provide a simple and prominent display of how to get a user account at (shell.)contribs.org repo and a folder there for placing my contribs.
 
I have postedin the forum and submitted the smeserver-crontab-manager addon RPM, SRPM and SPEC files in the bugzilla and made an entry in the wiki as well.
 
 

guest22

Re: Compiling dahdi-linux-kmod from src rpm
« Reply #10 on: March 17, 2013, 05:04:00 PM »
I tried my Forum / Wiki access cerdentials and the SF.net credentials to no avail attempting to ssh into shell.contribs.org
 
Your link while informative does not provide a simple and prominent display of how to get a user account at (shell.)contribs.org repo and a folder there for placing my contribs.

Indeed, the 'request access' part seems missing. Could you please send an email requesting a 'contribs area' to admin@contribs.org for now?

Thanks & regards,
guest

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #11 on: March 17, 2013, 07:11:39 PM »
@hwang: Thanks for the email id.
Just sent the request mail.



Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #12 on: March 17, 2013, 10:48:25 PM »
@hwang: Thanks for the email id.
Just sent the request mail.

Thank for your attempt and your patience ap
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline bbialy

  • ***
  • 105
  • +0/-0
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #13 on: March 20, 2013, 11:17:21 AM »
Hi,
IMHO it is much easier to compile dahdi and asterisk straight from digium sources.
just few commands make make all, make config ...etc.

but there is only one tip for centos
or you have to patch dahdi 2.6.1 (xdef.h)
or just use 2.6.2 (for now it is availbale as stable release - but i was using also RC2 version with success)

if you also install subversion package (from base repo) you are able to add mp3 natvie supprot . (there scripts in asterisk sources which you can use. all data you receive just after you made  asterisk menuselect ste during compling asterisk from sources.


one more thing remeber that if you want to have CDRs in MySQL you have to install mysql-devel package

Best Bialy


P.S. if you detailed instruction for compiling just let know. i will paste step by step instructions
 
Reading with understanding is the hardest thing IN THE WORLD

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Compiling dahdi-linux-kmod from src rpm
« Reply #14 on: March 24, 2013, 07:25:48 AM »
@bbialy: When we have many machines to populate Asterisk / DAHDI, compiling from sources each time is not an effective option. For a one off install what you say is fine.

A consolidated script to download the sources and make the rpms and generate a script to install everything thru' to SAIL would be the best way forward and whenever the kernels change, we can recompile then alone.

@stephdl: http://mirror.contribs.org/smeserver/contribs/ still does not have my name in it!
« Last Edit: March 24, 2013, 07:28:18 AM by apmuthu »