Skip to contentSkip to conversation

package/asterisk: new package

RFC New Bernd Kuhls 2 participants 5 messages Apr 26, 2015 – Jan 9, 2016

lore
Share & tools
lore
#0 lore raw

cover package/asterisk: new package

Hi,

this is a RFC and not meant to be committed to buildroot since I could not establish a VOIP connection yet although the Asterisk daemon itself can be started and used on an uClibc target. This shortcoming is due to my limited knowledge in regard of Asterisk configuration and not related to this package, nonetheless therefore I consider this patch as an RFC.

The following patches are also needed:
http://patchwork.ozlabs.org/patch/464677/
http://patchwork.ozlabs.org/patch/464701/
http://patchwork.ozlabs.org/patch/464703/
http://patchwork.ozlabs.org/patch/464702/
http://patchwork.ozlabs.org/patch/464704/

Regards, Bernd

Signature · 1 line
1.7.10.4
#1 lore raw

RFC 1/1 package/asterisk: new package

---
 package/Config.in                               |    1 +
 package/asterisk/0001-configure-cross-fix.patch |   22 +
 package/asterisk/0002-ASTERISK-24155.patch      |  241 ++
 package/asterisk/0003-resinit.patch             |   15 +
 package/asterisk/0004-uclibc-pthread.patch      |   25 +
 package/asterisk/0005-configure-uclibc.patch    |   18 +
 package/asterisk/0006-no-xml-docs.patch         |   20 +
 package/asterisk/Config.in                      |   73 +
 package/asterisk/asterisk-addon-mp3-r201.patch  | 4076 +++++++++++++++++++++++
 package/asterisk/asterisk.hash                  |    2 +
 package/asterisk/asterisk.makeopts-13           |   54 +
 package/asterisk/asterisk.mk                    |  106 +
 12 files changed, 4653 insertions(+)
 create mode 100644 package/asterisk/0001-configure-cross-fix.patch
 create mode 100644 package/asterisk/0002-ASTERISK-24155.patch
 create mode 100644 package/asterisk/0003-resinit.patch
 create mode 100644 package/asterisk/0004-uclibc-pthread.patch
 create mode 100644 package/asterisk/0005-configure-uclibc.patch
 create mode 100644 package/asterisk/0006-no-xml-docs.patch
 create mode 100644 package/asterisk/Config.in
 create mode 100644 package/asterisk/asterisk-addon-mp3-r201.patch
 create mode 100644 package/asterisk/asterisk.hash
 create mode 100644 package/asterisk/asterisk.makeopts-13
 create mode 100644 package/asterisk/asterisk.mk
package/Config.in +1 -0
index d47b787..231a927 100644
@@ -4,6 +4,7 @@ menu "Target packages"
 
 menu "Audio and video applications"
 	source "package/alsa-utils/Config.in"
+	source "package/asterisk/Config.in"
 	source "package/aumix/Config.in"
 	source "package/bellagio/Config.in"
 	source "package/dvdauthor/Config.in"
package/asterisk/0001-configure-cross-fix.patch new file +22 -0
new file mode 100644
index 0000000..ba40344
@@ -0,0 +1,22 @@
+Cosmetic error when cross-compiling as ./configure calls ./menuselect/configure
+
+Downloaded from https://issues.asterisk.org/jira/browse/ASTERISK-23184
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+--- asterisk-1.8.25.0/configure.ac.orig	2014-01-24 16:52:23.000000000 -0600
++++ asterisk-1.8.25.0/configure.ac	2014-01-24 16:55:14.000000000 -0600
+@@ -2382,11 +2382,13 @@
+ AC_OUTPUT
+ 
+ ${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak2
++if test "${cross_compiling}" = "no"; then
+ if test "x${ac_cv_path_CMP}" = "x:"; then
+ 	( cd `pwd`/menuselect && ./configure )
+ else if ${ac_cv_path_CMP} -s makeopts.acbak makeopts.acbak2; then : ; else
+ 	( cd `pwd`/menuselect && ./configure )
+ fi ; fi
++fi
+ 
+ rm makeopts.acbak makeopts.acbak2
+ 
package/asterisk/0002-ASTERISK-24155.patch new file +241 -0

241 lines not on this page · raw message

package/asterisk/0003-resinit.patch new file +15 -0
new file mode 100644
index 0000000..e5acab4
@@ -0,0 +1,15 @@
+uclibc does not contain support for res_ninit.
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+diff -uNr asterisk-13.2.0-rc1.org/configure.ac asterisk-13.2.0-rc1/configure.ac
+--- asterisk-13.2.0-rc1.org/configure.ac	2015-01-26 15:49:32.000000000 +0100
++++ asterisk-13.2.0-rc1/configure.ac	2015-02-03 22:06:34.956432426 +0100
+@@ -1190,7 +1190,6 @@
+ 			#include <resolv.h>],
+ 			[int foo = res_ninit(NULL);])],
+ 	AC_MSG_RESULT(yes)
+-	AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
+ 	AC_SEARCH_LIBS(res_9_ndestroy, resolv)
+ 	AC_MSG_CHECKING(for res_ndestroy)
+ 	AC_LINK_IFELSE(
package/asterisk/0004-uclibc-pthread.patch new file +25 -0
new file mode 100644
index 0000000..b4913dc
@@ -0,0 +1,25 @@
+Gentoo bug 66557
+Link: http://bugs.gentoo.org/show_bug.cgi?id=66557
+Patch-By: REdOG
+
+Submitted upstream: No
+
+The uclibc environment, as opposed to the glibc environment, needs explicit
+linking with the pthread & dl libraries. Without these, name resolution is
+not functional.
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+--- asterisk-1.8.7.0-rc2.orig/Makefile	2011-08-25 21:00:55.000000000 +0200
++++ asterisk-1.8.7.0-rc2.orig/Makefile	2011-09-21 14:13:12.823076046 +0200
+@@ -247,6 +247,10 @@ 
+   _ASTCFLAGS+=-pthread -ftrampolines
+ endif
+ 
++ifeq ($(findstring $(OSARCH), uclibc ),)
++  AST_LIBS+=-lpthread -ldl
++endif
++
+ ifeq ($(OSARCH),SunOS)
+   _ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 -D__EXTENSIONS__
+ endif
package/asterisk/0005-configure-uclibc.patch new file +18 -0
new file mode 100644
index 0000000..b2ba7db
@@ -0,0 +1,18 @@
+Force recognition of uclibc toolchains, this patch forces
+recognition of linux-uclibcgnueabi as uclibc-based.
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+diff -uNr asterisk-13.2.0-rc1.org/configure.ac asterisk-13.2.0-rc1/configure.ac
+--- asterisk-13.2.0-rc1.org/configure.ac	2015-01-26 15:49:32.000000000 +0100
++++ asterisk-13.2.0-rc1/configure.ac	2015-02-03 23:52:09.500018494 +0100
+@@ -181,6 +181,9 @@
+      linux-gnueabi* |  linux-gnuspe)
+      OSARCH=linux-gnu
+      ;;
++     linux-uclibc*)
++     OSARCH=linux-uclibc
++     ;;
+      kfreebsd*-gnu)
+      OSARCH=kfreebsd-gnu
+      ;;
package/asterisk/0006-no-xml-docs.patch new file +20 -0
new file mode 100644
index 0000000..49b6e67
@@ -0,0 +1,20 @@
+Docs are not needed on the target, this saves compile time
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+diff -uNr asterisk-13.2.0.org/include/asterisk/xml.h asterisk-13.2.0/include/asterisk/xml.h
+--- asterisk-13.2.0.org/include/asterisk/xml.h	2013-02-15 14:38:12.000000000 +0100
++++ asterisk-13.2.0/include/asterisk/xml.h	2015-03-06 20:28:07.099389969 +0100
+@@ -247,9 +247,9 @@
+ struct ast_xml_xpath_results *ast_xml_query(struct ast_xml_doc *doc, const char *xpath_str);
+ 
+ /* Features using ast_xml_ */
+-#ifdef HAVE_LIBXML2
+-#define AST_XML_DOCS
+-#endif
++//#ifdef HAVE_LIBXML2
++//#define AST_XML_DOCS
++//#endif
+ 
+ #endif /* _ASTERISK_XML_H */
+ 
package/asterisk/Config.in new file +73 -0

73 lines not on this page · raw message

package/asterisk/asterisk-addon-mp3-r201.patch new file +4076 -0

2,579 lines not on this page · raw message

package/asterisk/asterisk.hash new file +2 -0
new file mode 100644
index 0000000..65f5a93

Lines of this file are not shown. View the raw message.

package/asterisk/asterisk.makeopts-13 new file +54 -0

54 lines not on this page · raw message

package/asterisk/asterisk.mk new file +106 -0

106 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.10.4

Part of the diff is not shown here. View the raw message.

#2 lore raw

RFC 1/1 package/asterisk: new package

Bernd Kuhls <[email protected]> wrote in news:1430068623-2118-2-git-send-email-bernd.kuhls at t-online.de:

Quoted 1 line
 package/asterisk/asterisk-addon-mp3-r201.patch  | 4076 

+++++++++++++++++++++++

Hi,

instead of this monster patch I am now using this code in asterisk.mk:

ASTERISK_ADDON_MP3_VERSION = r201
ASTERISK_ADDON_MP3_SITE = http://dev.alpinelinux.org/~tteras
ASTERISK_ADDON_MP3_SOURCE = asterisk-addon-mp3-$(ASTERISK_ADDON_MP3 _VERSION).patch.gz
ASTERISK_EXTRA_DOWNLOADS = $(ASTERISK_ADDON_MP3_SITE)/$(ASTERISK_ADDON_MP3 _SOURCE)
define ASTERISK_ADDON_MP3_PATCH

        $(APPLY_PATCHES) $(@D) $(DL_DIR) $(ASTERISK_ADDON_MP3_SOURCE)

endef
ASTERISK_POST_PATCH_HOOKS += ASTERISK_ADDON_MP3_PATCH

Regards, Bernd

#3 lore raw

RFC 1/1 package/asterisk: new package

In reply to Bernd Kuhls

Bernd, All,

On 2015-04-26 19:17 +0200, Bernd Kuhls spake thusly:

Quoted 14 lines
---
 package/Config.in                               |    1 +
 package/asterisk/0001-configure-cross-fix.patch |   22 +
 package/asterisk/0002-ASTERISK-24155.patch      |  241 ++
 package/asterisk/0003-resinit.patch             |   15 +
 package/asterisk/0004-uclibc-pthread.patch      |   25 +
 package/asterisk/0005-configure-uclibc.patch    |   18 +
 package/asterisk/0006-no-xml-docs.patch         |   20 +
 package/asterisk/Config.in                      |   73 +
 package/asterisk/asterisk-addon-mp3-r201.patch  | 4076 +++++++++++++++++++++++
 package/asterisk/asterisk.hash                  |    2 +
 package/asterisk/asterisk.makeopts-13           |   54 +
 package/asterisk/asterisk.mk                    |  106 +

Following a recent discussion on IRC, I've had a look at this monster patch to add Asterisk.

It turns out that Thomas already had a much, much simpler patch to add Asterisk, but it was definitely not in shape to be sent. So I took the job of looking at this asterisk stuff, and started from scratch.

In ow have a series that I believe is much saner than any of two existing patches, so I'll be shortly proposing this series on the list. In the ,meantime, it's browseable:
https://git.buildroot.org/~ymorin/git/buildroot/log/?h=yem/asterisk

Yes, it's 34 patches, but it starts with a much cleaner base, with everything disabled, no hard-coded menuselect-stuff, no monster mp3 patch, adding extra features one by one, up to pretty-complete solution I believe (there are still missing pieces, but without reall HW or no VoIP setup to test against, I can't do much for now...)

So, I'll be marking this patch as rejected on Patchwork for now; my series should come to the list soonish...

Thanks!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

RFC 1/1 package/asterisk: new package

Hi Yann,

Am Sat, 09 Jan 2016 18:38:11 +0100 schrieb Yann E. MORIN:

Quoted 6 lines

Following a recent discussion on IRC, I've had a look at this monster patch to add Asterisk.

It turns out that Thomas already had a much, much simpler patch to add Asterisk, but it was definitely not in shape to be sent. So I took the job of looking at this asterisk stuff, and started from scratch.

after switching to Freeswitch

http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/125731/

I lost interest in Asterisk, so go ahead ;)

Regards, Bernd