diff --git a/0001-Modify-init-scripts-for-better-Fedora-compatibility.patch b/0001-Modify-init-scripts-for-better-Fedora-compatibility.patch index e8eb79f..e92c8e9 100644 --- a/0001-Modify-init-scripts-for-better-Fedora-compatibility.patch +++ b/0001-Modify-init-scripts-for-better-Fedora-compatibility.patch @@ -1,18 +1,7 @@ -From 6cd5722ba64b7cb24b8475395edcc6555e2326d4 Mon Sep 17 00:00:00 2001 -From: Jeffrey C. Ollie -Date: Sun, 18 Nov 2007 21:47:59 -0600 -Subject: [PATCH 01/15] Modify init scripts for better Fedora compatibility. - ---- - contrib/init.d/rc.redhat.asterisk | 61 +++++++++++++++++------------------- - contrib/sysconfig/asterisk | 16 ++++++++++ - 2 files changed, 45 insertions(+), 32 deletions(-) - create mode 100644 contrib/sysconfig/asterisk - -diff --git a/contrib/init.d/rc.redhat.asterisk b/contrib/init.d/rc.redhat.asterisk -index d2a630e..7ac830d 100755 ---- a/contrib/init.d/rc.redhat.asterisk -+++ b/contrib/init.d/rc.redhat.asterisk +Index: contrib/init.d/rc.redhat.asterisk +=================================================================== +--- contrib/init.d/rc.redhat.asterisk (revision 225759) ++++ contrib/init.d/rc.redhat.asterisk (working copy) @@ -3,7 +3,7 @@ # # asterisk Starts, Stops and Reloads Asterisk. @@ -30,10 +19,10 @@ index d2a630e..7ac830d 100755 -#AST_CONFIG=/etc/asterisk +# Do not modify this script to change any of the settings, instead +# edit /etc/sysconfig/asterisk -+ + +# Specify the configuration file +AST_CONFIG=/etc/asterisk/asterisk.conf - ++ # Installation directory AST_SBIN=/usr/sbin @@ -50,7 +39,7 @@ index d2a630e..7ac830d 100755 +# as to the primary group of the user, as well as initialize the +# supplementary groups. If you want to run Asterisk as a different +# group, set AST_GROUP to the group that Asterisk should run as. Note -+# that this may break Zaptel devices as supplementary groups will not ++# that this may break DAHDI devices as supplementary groups will not +# be initialized. #AST_GROUP="asterisk" @@ -100,7 +89,7 @@ index d2a630e..7ac830d 100755 RETVAL=0 start() { -@@ -78,9 +78,6 @@ start() { +@@ -78,19 +78,17 @@ # Start daemons. echo -n $"Starting asterisk: " @@ -108,18 +97,24 @@ index d2a630e..7ac830d 100755 - DAEMON=$SAFE_ASTERISK - fi if [ $AST_USER ] ; then - ASTARGS="-U $AST_USER" +- ASTARGS="-U $AST_USER" ++ AST_ARGS="-U $AST_USER" fi -@@ -88,7 +85,7 @@ start() { - ASTARGS="$ASTARGS -G $AST_GROUP" + if [ $AST_GROUP ] ; then +- ASTARGS="$ASTARGS -G $AST_GROUP" ++ AST_ARGS="$AST_ARGS -G $AST_GROUP" fi if [ $AST_CONFIG ]; then - ASTARGS="$ASTARGS -C $AST_CONFIG/asterisk.conf" -+ ASTARGS="$ASTARGS -C $AST_CONFIG" ++ AST_ARGS="$AST_ARGS -C $AST_CONFIG" fi - daemon $DAEMON $ASTARGS +- daemon $DAEMON $ASTARGS ++ cd /var/spool/asterisk ++ daemon $DAEMON $AST_ARGS $AST_EXTRA_ARGS RETVAL=$? -@@ -99,7 +96,7 @@ start() { + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/asterisk + echo +@@ -99,7 +97,7 @@ stop() { # Stop daemons. @@ -128,12 +123,11 @@ index d2a630e..7ac830d 100755 killproc asterisk RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/asterisk -diff --git a/contrib/sysconfig/asterisk b/contrib/sysconfig/asterisk -new file mode 100644 -index 0000000..2d3598a ---- /dev/null -+++ b/contrib/sysconfig/asterisk -@@ -0,0 +1,16 @@ +Index: contrib/sysconfig/asterisk +=================================================================== +--- contrib/sysconfig/asterisk (revision 225759) ++++ contrib/sysconfig/asterisk (working copy) +@@ -0,0 +1,19 @@ +# Specify the configuration file +AST_CONFIG=/etc/asterisk/asterisk.conf + @@ -150,6 +144,6 @@ index 0000000..2d3598a +# that this may break Zaptel devices as supplementary groups will not +# be initialized. +#AST_GROUP="asterisk" --- -1.6.1 - ++ ++# A place to specify extra arguments for the Asterisk command line ++AST_EXTRA_ARGS="" diff --git a/0008-change-configure.ac-to-look-for-pkg-config-gmime-2.0.patch b/0008-change-configure.ac-to-look-for-pkg-config-gmime-2.0.patch new file mode 100644 index 0000000..0fc0399 --- /dev/null +++ b/0008-change-configure.ac-to-look-for-pkg-config-gmime-2.0.patch @@ -0,0 +1,23 @@ +Index: configure.ac +=================================================================== +--- configure.ac (revision 221084) ++++ configure.ac (working copy) +@@ -1520,7 +1520,17 @@ + AST_CHECK_OSPTK([3], [5], [0]) + fi + +-AST_EXT_TOOL_CHECK([GMIME], [gmime], [], [], [#include ], [gboolean q = g_mime_check_version(0,0,0);]) ++PBX_GMIME=0 ++AC_CHECK_TOOL(PKGCONFIG, pkg-config, No) ++if test ! "x${PKGCONFIG}" = xNo; then ++ GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.0 --cflags 2>/dev/null) ++ GMIME_LIB=$(${PKGCONFIG} gmime-2.0 --libs) ++ PBX_GMIME=1 ++ AC_DEFINE([HAVE_GMIME], 1, [Define if your system has the GMIME libraries.]) ++fi ++AC_SUBST(PBX_GMIME) ++AC_SUBST(GMIME_INCLUDE) ++AC_SUBST(GMIME_LIB) + + AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], []) + diff --git a/0008-change-configure.ac-to-look-for-pkg-config-gmime-2.4.patch b/0008-change-configure.ac-to-look-for-pkg-config-gmime-2.4.patch deleted file mode 100644 index 956d825..0000000 --- a/0008-change-configure.ac-to-look-for-pkg-config-gmime-2.4.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: configure.ac -=================================================================== ---- configure.ac (revision 216642) -+++ configure.ac (working copy) -@@ -1493,7 +1493,17 @@ - AST_CHECK_OSPTK([3], [5], [0]) - fi - --AST_EXT_TOOL_CHECK([GMIME], [gmime], [], [], [#include ], [gboolean q = g_mime_check_version(0,0,0);]) -+PBX_GMIME=0 -+AC_CHECK_TOOL(PKGCONFIG, pkg-config, No) -+if test ! "x${PKGCONFIG}" = xNo; then -+ GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.4 --cflags 2>/dev/null) -+ GMIME_LIB=$(${PKGCONFIG} gmime-2.4 --libs) -+ PBX_GMIME=1 -+ AC_DEFINE([HAVE_GMIME], 1, [Define if your system has the GMIME libraries.]) -+fi -+AC_SUBST(PBX_GMIME) -+AC_SUBST(GMIME_INCLUDE) -+AC_SUBST(GMIME_LIB) - - AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], []) - diff --git a/0010-my-guess-as-replacements-for-the-missing-broken-stuf.patch b/0010-my-guess-as-replacements-for-the-missing-broken-stuf.patch deleted file mode 100644 index 709db6b..0000000 --- a/0010-my-guess-as-replacements-for-the-missing-broken-stuf.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 8c0899c97ac05f3c84ef61c4e95e4aa0309b1570 Mon Sep 17 00:00:00 2001 -From: Caolan McNamara -Date: Sat, 3 Jan 2009 19:15:12 -0600 -Subject: [PATCH 10/15] my guess as replacements for the missing/broken stuff against the new gmime api - ---- - res/res_http_post.c | 12 ++++-------- - 1 files changed, 4 insertions(+), 8 deletions(-) - -diff --git a/res/res_http_post.c b/res/res_http_post.c -index 5fbf46a..8827e65 100644 ---- a/res/res_http_post.c -+++ b/res/res_http_post.c -@@ -119,14 +119,10 @@ static void process_message_callback(GMimeObject *part, gpointer user_data) - ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n"); - return; - } else if (GMIME_IS_MULTIPART(part)) { -- GList *l; -- - ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n"); -- l = GMIME_MULTIPART(part)->subparts; -- while (l) { -- process_message_callback(l->data, cbinfo); -- l = l->next; -- } -+ -+ g_mime_multipart_foreach(GMIME_MULTIPART(part), process_message_callback, -+ cbinfo); - } else if (GMIME_IS_PART(part)) { - const char *filename; - -@@ -148,7 +144,7 @@ static int process_message(GMimeMessage *message, const char *post_dir) - .post_dir = post_dir, - }; - -- g_mime_message_foreach_part(message, process_message_callback, &cbinfo); -+ g_mime_message_foreach(message, process_message_callback, &cbinfo); - - return cbinfo.count; - } --- -1.6.1 - diff --git a/asterisk.spec b/asterisk.spec index b1ad0a8..7d8f6d2 100644 --- a/asterisk.spec +++ b/asterisk.spec @@ -2,7 +2,7 @@ Summary: The Open Source PBX Name: asterisk Version: 1.6.1.7 -Release: 0.2%{?_rc:.rc%{_rc}}%{?dist} +Release: 0.4%{?_rc:.rc%{_rc}}%{?dist} License: GPLv2 Group: Applications/Internet URL: http://www.asterisk.org/ @@ -17,8 +17,7 @@ Source6: asterisk-developer-pubring.gpg Patch1: 0001-Modify-init-scripts-for-better-Fedora-compatibility.patch Patch2: 0002-Modify-modules.conf-so-that-different-voicemail-modu.patch Patch5: 0005-Build-using-external-libedit.patch -Patch8: 0008-change-configure.ac-to-look-for-pkg-config-gmime-2.4.patch -Patch10: 0010-my-guess-as-replacements-for-the-missing-broken-stuf.patch +Patch8: 0008-change-configure.ac-to-look-for-pkg-config-gmime-2.0.patch Patch11: 0011-Fix-up-some-paths.patch Patch12: 0012-Add-LDAP-schema-that-is-compatible-with-Fedora-Direc.patch @@ -38,7 +37,7 @@ BuildRequires: libcap-devel BuildRequires: gtk2-devel # for res_http_post -BuildRequires: gmime-devel +BuildRequires: gmime22-devel # for building docs BuildRequires: doxygen @@ -380,11 +379,10 @@ local filesystem. %prep %setup0 -q -n asterisk-%{version}%{?_rc:-rc%{_rc}} -%patch1 -p1 +%patch1 -p0 %patch2 -p0 %patch5 -p0 %patch8 -p0 -%patch10 -p1 %patch11 -p0 %patch12 -p1 @@ -992,6 +990,13 @@ fi %{_libdir}/asterisk/modules/app_voicemail_plain.so %changelog +* Sat Oct 24 2009 Jeffrey C. Ollie - 1.6.1.7-0.4.rc2 +- Add an AST_EXTRA_ARGS option to the init script +- have the init script to cd to /var/spool/asterisk to prevent annoying message + +* Sat Oct 24 2009 Jeffrey C. Ollie - 1.6.1.7-0.3.rc2 +- Compile against gmime 2.2 instead of gmime 2.4 because the patch to convert the API calls from 2.2 to 2.4 caused crashes. + * Fri Oct 9 2009 Jeffrey C. Ollie - 1.6.1.7-0.2.rc2 - Require latex2html used in static-http documents