asterisk: Update to 1.4.39.2
authorTom Rini <tom_rini@mentor.com>
Sun, 27 Feb 2011 23:21:30 +0000 (16:21 -0700)
committerTom Rini <tom_rini@mentor.com>
Mon, 28 Feb 2011 03:03:15 +0000 (20:03 -0700)
This fixes a few security problems and has a little recipe clean-up while
I'm in here.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
recipes/asterisk/asterisk-1.4.39.2/Makefile.patch [moved from recipes/asterisk/asterisk-1.4.23.1/Makefile.patch with 100% similarity]
recipes/asterisk/asterisk-1.4.39.2/asterisk-1.4-bugid18301.patch [new file with mode: 0644]
recipes/asterisk/asterisk-1.4.39.2/init [moved from recipes/asterisk/asterisk-1.4.23.1/init with 100% similarity]
recipes/asterisk/asterisk-1.4.39.2/logrotate [moved from recipes/asterisk/asterisk-1.4.23.1/logrotate with 100% similarity]
recipes/asterisk/asterisk-1.4.39.2/sounds.xml.patch [moved from recipes/asterisk/asterisk-1.4.23.1/sounds.xml.patch with 100% similarity]
recipes/asterisk/asterisk-1.4.39.2/volatiles [moved from recipes/asterisk/asterisk-1.4.23.1/volatiles with 100% similarity]
recipes/asterisk/asterisk_1.4.39.2.bb [moved from recipes/asterisk/asterisk_1.4.23.1.bb with 87% similarity]

diff --git a/recipes/asterisk/asterisk-1.4.39.2/asterisk-1.4-bugid18301.patch b/recipes/asterisk/asterisk-1.4.39.2/asterisk-1.4-bugid18301.patch
new file mode 100644 (file)
index 0000000..4a80d01
--- /dev/null
@@ -0,0 +1,43 @@
+--- asterisk-1.4.39-rc1/configure.ac.orig      2011-01-09 12:46:51.000000000 -0600
++++ asterisk-1.4.39-rc1/configure.ac   2011-01-09 12:48:28.000000000 -0600
+@@ -485,40 +485,6 @@
+       AC_MSG_RESULT(cross-compile)
+ )
+-ac_cv_have_variable_fdset=0
+-AC_MSG_CHECKING(if we can increase the maximum select-able file descriptor)
+-AC_RUN_IFELSE(
+-AC_LANG_PROGRAM([
+-#include <stdio.h>
+-#include <sys/select.h>
+-#include <sys/time.h>
+-#include <sys/resource.h>
+-#include <string.h>
+-#include <errno.h>
+-#include <stdlib.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <unistd.h>
+-], [[
+-      struct rlimit rlim = { FD_SETSIZE + 2, FD_SETSIZE + 2 };
+-      int fd[[2]];
+-      struct timeval tv = { 0, };
+-      struct ast_fdset { long fds_bits[[1024]]; } fds = { { 0, } };
+-      if (setrlimit(RLIMIT_NOFILE, &rlim)) { exit(1); }
+-      if ((fd0 = open("/dev/null", O_RDONLY)) < 0) { exit(1); }
+-      if (dup2(fd0, (fd1 = FD_SETSIZE + 1)) < 0) { exit(1); }
+-      FD_SET(fd[[0]], (fd_set *) &fds);
+-      FD_SET(fd[[1]], (fd_set *) &fds);
+-      if (select(FD_SETSIZE + 2, (fd_set *) &fds, NULL, NULL, &tv) < 0) { exit(1); }
+-      exit(0)]]),
+-      AC_MSG_RESULT(yes)
+-      ac_cv_have_variable_fdset=1
+-      AC_DEFINE([HAVE_VARIABLE_FDSET], 1, [Define to 1 if your system can support larger than default select bitmasks.]),
+-      AC_MSG_RESULT(no),
+-      AC_MSG_RESULT(cross-compile)
+-)
+-
+ if test "${ac_cv_have_variable_fdset}x" = "0x"; then
+       AC_RUN_IFELSE(
+               AC_LANG_PROGRAM([
similarity index 87%
rename from recipes/asterisk/asterisk_1.4.23.1.bb
rename to recipes/asterisk/asterisk_1.4.39.2.bb
index ed44508..90877c6 100644 (file)
@@ -11,6 +11,7 @@ DEPENDS = "speex readline zlib openssl curl popt gnutls sqlite libogg libvorbis"
 SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-${PV}.tar.gz \
 #      file://sounds.xml.patch \
        file://Makefile.patch \
+       file://asterisk-1.4-bugid18301.patch \
        file://logrotate \
        file://volatiles \
        file://init"
@@ -54,29 +55,33 @@ export ASTCFLAGS = "-fsigned-char -I${STAGING_INCDIR} -DPATH_MAX=4096"
 export ASTLDFLAGS="${LDFLAGS} -lpthread -ldl -lresolv "
 export PROC="${ARCH}"
 
-do_configure_prepend () {
+do_configure_prepend() {
        sed -i 's:/var:${localstatedir}:' ${WORKDIR}/logrotate
        sed -i 's:/etc/init.d:${sysconfdir}/init.d:' ${WORKDIR}/logrotate
        sed -i 's:/var:${localstatedir}:' ${WORKDIR}/volatiles
-}
 
-do_configure () {
-       # Looks like rebuilding configure doesn't work, so we are skipping
-       # that and are just using the shipped one
-       # gnu-configize
-       # libtoolize --force
-       oe_runconf
+       # Due to menuselect below we want to save off these configures
+       mv ${S}/menuselect/configure ${S}/menuselect/configure.SAVE
+       mv ${S}/menuselect/mxml/configure ${S}/menuselect/mxml/configure.SAVE
+       mv ${S}/main/editline/configure ${S}/main/editline/configure.SAVE
 }
 
+do_configure_append() {
+       # Put this back
+       mv ${S}/menuselect/configure.SAVE ${S}/menuselect/configure
+       mv ${S}/menuselect/mxml/configure.SAVE ${S}/menuselect/mxml/configure
+       mv ${S}/main/editline/configure.SAVE ${S}/main/editline/configure
+}
 
 do_compile() {
         (
-         #make sure that menuselect gets build using host toolchain
-         unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS RANLIB
+         # Make sure that menuselect gets build using host toolchain
+         unset CC CPP LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS RANLIB
+         unset CONFIG_SITE
+         export ac_cv_prog_PKGCONFIG=No
          cd menuselect 
          ./configure
          oe_runmake
-         cd ../
         ) || exit 1
         oe_runmake
 }
@@ -160,5 +165,5 @@ CONFFILES_${PN} += "${sysconfdir}/asterisk/voicemail.conf"
 CONFFILES_${PN} += "${sysconfdir}/asterisk/vpb.conf"
 CONFFILES_${PN} += "${sysconfdir}/logrotate.d/asterisk"
 
-SRC_URI[md5sum] = "f5fdaa7e4a6d9b8dfc9e2bef8ee81681"
-SRC_URI[sha256sum] = "e78e73de5d9b920070b778cbb2ab077119a86a71a59755d67aa2c3a82b4239c4"
+SRC_URI[md5sum] = "b3c0102860cf8b5ca44660636d6eac87"
+SRC_URI[sha256sum] = "b2eb49e2198a4f05e4254cf224e0f13755889ba421a70c772ffafb3a6775271e"