Re: [asterisk-users] RHEL6 packages - SRTP support? [patch]

2013-06-04 Thread Daniel Pocock
On 03/06/13 23:04, Daniel Pocock wrote:
 On 03/06/13 19:18, Jason Parker wrote:

 On 06/03/2013 12:03 PM, Daniel Pocock wrote:
 I tried building manually from the source RPM

 Before running rpmbuild, I installed libsrtp-devel and I notice that
 res_srtp.so is generated during the build

 However, the rpmbuild fails for other reasons (see the other email I
 sent to the list about mISDNutils-devel and other spec file errors)

 Can you confirm the exact procedure you recommend for rpmbuild on a
 CentOS6 system
 rpmbuild --rebuild --without tds --without misdn somepackage.src.rpm

 Now trying it on a fresh VM (CentOS 6 + EPEL6, freshly built)

 I have these errors during installation of build dependencies:


   Installing : kmod-dahdi-linux-fwload-vpmadt032-2.6.2-1_centos6.2.6.32
   20/73
 WARNING:
 /lib/modules/2.6.32-358.6.2.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
 needs unknown symbol vpmadtreg_unregister
 WARNING:
 /lib/modules/2.6.32-358.6.2.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
 needs unknown symbol vpmadtreg_register
 WARNING:
 /lib/modules/2.6.32-358.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
 needs unknown symbol vpmadtreg_unregister
 WARNING:
 /lib/modules/2.6.32-358.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
 needs unknown symbol vpmadtreg_register



 and then rpmbuild fails with:

 checking for gcc... no
 checking for cc... no
 configure: error: in `/root/rpmbuild/BUILD/asterisk-11.4.0':
 configure: error: no acceptable C compiler found in $PATH
 See `config.log' for more details
 error: Bad exit status from /var/tmp/rpm-tmp.isB97h (%build)


 RPM build errors:
 Bad exit status from /var/tmp/rpm-tmp.isB97h (%build)



 so I think to be added to the build dependencies in the spec file.


 Then there is a more cryptic failure:

 checking how to run the C++ preprocessor... /lib/cpp
 configure: error: in `/root/rpmbuild/BUILD/asterisk-11.4.0':
 configure: error: C++ preprocessor /lib/cpp fails sanity check
 See `config.log' for more details
 error: Bad exit status from /var/tmp/rpm-tmp.q7wr5n (%build)



 config.log reveals that g++ is missing.  The build dependency is gcc-c++
 -  I install that and it fails due to missing make

 Later, there is another failure due to missing subversion.

 Altogether, these are the missing lines for the spec file:

 BuildRequires: gcc
 BuildRequires: gcc-c++
 BuildRequires: make
 BuildRequires: subversion


 although I would recommend not having a build dependency on SVN or
 network access, some people like to build on secured machines without
 network access.


 Eventually, I end up with the same failure I had before:


 RPM build errors:
 File not found:
 /root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/cdr_adaptive_odbc.so
 File not found:
 /root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/cdr_odbc.so
 File not found:
 /root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/cel_odbc.so
 File not found:
 /root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/func_odbc.so
 File not found:
 /root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/res_config_odbc.so
 File not found:
 /root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/res_odbc.so



 Now I've tried:


 rpmbuild --rebuild \
 --without tds \
 --without misdn \
 --without odbc \
 asterisk-11.4.0-1_centos6.src.rpm

 and on the rebuild, I get

 gzip: ./usr/share/man/man8/autosupport.8 already exists; do you wish to
 overwrite (y or n)?
 gzip: ./usr/share/man/man8/astgenkey.8 already exists; do you wish to
 overwrite (y or n)?

 which suggests that `make clean' didn't really clean up after the last
 attempt

 Finally, I get:

 Checking for unpackaged file(s): /usr/lib/rpm/check-files
 /root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64
 error: Installed (but unpackaged) file(s) found:
/usr/lib64/asterisk/modules/func_speex.so
/usr/lib64/asterisk/modules/res_srtp.so


 RPM build errors:
 Installed (but unpackaged) file(s) found:
/usr/lib64/asterisk/modules/func_speex.so
/usr/lib64/asterisk/modules/res_srtp.so


 so I added those two items to the spec file and finally I have a build.

 I attach a diff for fixing the spec file, it fixes all these issues
 except the `make clean'


Now I tried to repeat the build on the original CentOS6 box using the
spec file that I patched on the fresh VM

The build failed again on the original box, complaining about unpackaged
files

I removed the following -devel packages from the box:

rpm -e mISDN-devel radiusclient-ng-devel openldap-devel spandsp-devel
freetds-devel

and then I was able to run the build successfully.

So it appears that the build is sensitive to the 

[asterisk-users] RHEL6 packages - SRTP support?

2013-06-03 Thread Daniel Pocock

I tried installing the Asterisk 11 RHEL6 packages from packages.asterisk.org

I followed this guide:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Packages

The SRTP support appears to be missing though.  I notice libsrtp was not
automatically installed as a dependency, and no srtp module exists under
/usr/lib64/asterisk/modules

Is it still necessary to do a source build every time SRTP is needed? 
Or is the srtp module distributed in some other rpm?

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] RHEL6 packages - SRTP support?

2013-06-03 Thread jg
You need to download libsrtp manually from 
http://srtp.sourceforge.net/srtp-1.4.2.tgz


I never had any problems compiling this packages.

jg

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] RHEL6 packages - SRTP support?

2013-06-03 Thread Jason Parker

The packages currently do not support SRTP.

On 06/03/2013 10:56 AM, Daniel Pocock wrote:

I tried installing the Asterisk 11 RHEL6 packages from packages.asterisk.org

I followed this guide:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Packages

The SRTP support appears to be missing though.  I notice libsrtp was not
automatically installed as a dependency, and no srtp module exists under
/usr/lib64/asterisk/modules

Is it still necessary to do a source build every time SRTP is needed?
Or is the srtp module distributed in some other rpm?



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] RHEL6 packages - SRTP support?

2013-06-03 Thread Daniel Pocock
On 03/06/13 18:46, Jason Parker wrote:
 The packages currently do not support SRTP.


I tried building manually from the source RPM

Before running rpmbuild, I installed libsrtp-devel and I notice that
res_srtp.so is generated during the build

However, the rpmbuild fails for other reasons (see the other email I
sent to the list about mISDNutils-devel and other spec file errors)

Can you confirm the exact procedure you recommend for rpmbuild on a
CentOS6 system?



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] RHEL6 packages - SRTP support?

2013-06-03 Thread Jason Parker



On 06/03/2013 12:03 PM, Daniel Pocock wrote:

I tried building manually from the source RPM

Before running rpmbuild, I installed libsrtp-devel and I notice that
res_srtp.so is generated during the build

However, the rpmbuild fails for other reasons (see the other email I
sent to the list about mISDNutils-devel and other spec file errors)

Can you confirm the exact procedure you recommend for rpmbuild on a
CentOS6 system

rpmbuild --rebuild --without tds --without misdn somepackage.src.rpm

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] RHEL6 packages - SRTP support? [patch]

2013-06-03 Thread Daniel Pocock
On 03/06/13 19:18, Jason Parker wrote:
 
 
 On 06/03/2013 12:03 PM, Daniel Pocock wrote:
 I tried building manually from the source RPM

 Before running rpmbuild, I installed libsrtp-devel and I notice that
 res_srtp.so is generated during the build

 However, the rpmbuild fails for other reasons (see the other email I
 sent to the list about mISDNutils-devel and other spec file errors)

 Can you confirm the exact procedure you recommend for rpmbuild on a
 CentOS6 system
 rpmbuild --rebuild --without tds --without misdn somepackage.src.rpm
 

Now trying it on a fresh VM (CentOS 6 + EPEL6, freshly built)

I have these errors during installation of build dependencies:


  Installing : kmod-dahdi-linux-fwload-vpmadt032-2.6.2-1_centos6.2.6.32
  20/73
WARNING:
/lib/modules/2.6.32-358.6.2.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
needs unknown symbol vpmadtreg_unregister
WARNING:
/lib/modules/2.6.32-358.6.2.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
needs unknown symbol vpmadtreg_register
WARNING:
/lib/modules/2.6.32-358.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
needs unknown symbol vpmadtreg_unregister
WARNING:
/lib/modules/2.6.32-358.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko
needs unknown symbol vpmadtreg_register



and then rpmbuild fails with:

checking for gcc... no
checking for cc... no
configure: error: in `/root/rpmbuild/BUILD/asterisk-11.4.0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
error: Bad exit status from /var/tmp/rpm-tmp.isB97h (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.isB97h (%build)



so I think to be added to the build dependencies in the spec file.


Then there is a more cryptic failure:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/root/rpmbuild/BUILD/asterisk-11.4.0':
configure: error: C++ preprocessor /lib/cpp fails sanity check
See `config.log' for more details
error: Bad exit status from /var/tmp/rpm-tmp.q7wr5n (%build)



config.log reveals that g++ is missing.  The build dependency is gcc-c++
-  I install that and it fails due to missing make

Later, there is another failure due to missing subversion.

Altogether, these are the missing lines for the spec file:

BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: subversion


although I would recommend not having a build dependency on SVN or
network access, some people like to build on secured machines without
network access.


Eventually, I end up with the same failure I had before:


RPM build errors:
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/cdr_adaptive_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/cdr_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/cel_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/func_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/res_config_odbc.so
File not found:
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64/usr/lib64/asterisk/modules/res_odbc.so



Now I've tried:


rpmbuild --rebuild \
--without tds \
--without misdn \
--without odbc \
asterisk-11.4.0-1_centos6.src.rpm

and on the rebuild, I get

gzip: ./usr/share/man/man8/autosupport.8 already exists; do you wish to
overwrite (y or n)?
gzip: ./usr/share/man/man8/astgenkey.8 already exists; do you wish to
overwrite (y or n)?

which suggests that `make clean' didn't really clean up after the last
attempt

Finally, I get:

Checking for unpackaged file(s): /usr/lib/rpm/check-files
/root/rpmbuild/BUILDROOT/asterisk-11.4.0-1_centos6.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/lib64/asterisk/modules/func_speex.so
   /usr/lib64/asterisk/modules/res_srtp.so


RPM build errors:
Installed (but unpackaged) file(s) found:
   /usr/lib64/asterisk/modules/func_speex.so
   /usr/lib64/asterisk/modules/res_srtp.so


so I added those two items to the spec file and finally I have a build.

I attach a diff for fixing the spec file, it fixes all these issues
except the `make clean'

Regards,

Daniel

--- SPECS/asterisk.spec.orig	2013-06-03 22:52:12.302227936 +0200
+++ SPECS/asterisk.spec	2013-06-03 23:02:33.899224528 +0200
@@ -70,6 +70,10 @@
 Requires: %{name}-doc = %{actversion}
 Requires: %{name}-voicemail = %{actversion}-%{release}
 Requires: asterisk-sounds-core-en-gsm
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: make
+BuildRequires: subversion
 BuildRequires: sqlite-devel
 BuildRequires: ncurses-devel
 BuildRequires: libxml2-devel
@@ -616,7 +620,7 @@
 
 make %{makeflags} 2 err
 mv err