# HG changeset patch # User Michael Schloh von Bennewitz # Date 1409601440 -7200 # Node ID 4ef5d37e8bb24a7440cfa9966381efb45eb19ff2 # Parent ded2db56a196824163da7fec0264e67ad5c64535 Update to new vendor version and adjust patch logic accordingly. diff -r ded2db56a196 -r 4ef5d37e8bb2 asterisk/asterisk.patch --- a/asterisk/asterisk.patch Mon Sep 01 21:55:47 2014 +0200 +++ b/asterisk/asterisk.patch Mon Sep 01 21:57:20 2014 +0200 @@ -2,9 +2,9 @@ diff -Nau addons/chan_ooh323.c.orig addons/chan_ooh323.c --- addons/chan_ooh323.c.orig 2012-01-26 21:14:50.000000000 +0100 +++ addons/chan_ooh323.c 2012-03-18 17:47:07.875949857 +0100 -@@ -24,6 +24,12 @@ - +@@ -25,6 +25,12 @@ #include "chan_ooh323.h" + #include "asterisk/paths.h" #include +#if defined __SVR4 && defined __sun +#include @@ -198,15 +198,15 @@ diff -Nau apps/app_meetme.c.orig apps/app_meetme.c --- apps/app_meetme.c.orig 2012-01-09 16:37:12.000000000 +0100 +++ apps/app_meetme.c 2012-03-18 17:47:07.875949857 +0100 -@@ -614,6 +614,7 @@ +@@ -624,6 +624,7 @@ /*! Do not write any audio to this channel until the state is up. */ #define CONFFLAG_NO_AUDIO_UNTIL_UP (1ULL << 31) +#define CONFFLAG_USERNAME (1 << 32) /*! If set play an intro announcement at start of conference */ #define CONFFLAG_INTROMSG (1ULL << 32) - -@@ -625,6 +626,7 @@ + /*! If set, don't enable a denoiser for the channel */ +@@ -637,6 +638,7 @@ OPT_ARG_MOH_CLASS = 4, OPT_ARG_INTROMSG = 5, OPT_ARG_ARRAY_SIZE = 6, @@ -214,7 +214,7 @@ }; AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS -@@ -658,6 +660,7 @@ +@@ -671,6 +673,7 @@ AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ), AST_APP_OPTION_ARG('S', CONFFLAG_DURATION_STOP, OPT_ARG_DURATION_STOP), AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT), @@ -222,7 +222,7 @@ END_OPTIONS ); static const char * const app = "MeetMe"; -@@ -2453,6 +2456,12 @@ +@@ -3014,6 +3017,12 @@ ast_test_flag64(confflags, CONFFLAG_INTROUSERNOREVIEW))) { char destdir[PATH_MAX]; @@ -235,7 +235,7 @@ snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR); if (ast_mkdir(destdir, 0777) != 0) { -@@ -2469,6 +2478,7 @@ +@@ -3030,6 +3039,7 @@ res = ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL); if (res == -1) goto outrun; @@ -255,7 +255,7 @@ static char imapparentfolder[64] = "\0"; static char greetingfolder[64]; static char authuser[32]; -@@ -2527,7 +2528,7 @@ +@@ -2550,7 +2551,7 @@ } /* Build up server information */ @@ -264,7 +264,7 @@ /* Add authentication user if present */ if (!ast_strlen_zero(authuser)) -@@ -6193,6 +6194,7 @@ +@@ -6220,6 +6221,7 @@ /* simple. huh? */ char sequence[10]; char mailbox[256]; @@ -272,7 +272,7 @@ int res; /* get the real IMAP message number for this message */ -@@ -6208,10 +6210,24 @@ +@@ -6235,10 +6237,24 @@ mail_setflag(vms->mailstream, sequence, "\\Unseen"); mail_clearflag(vms->mailstream, sequence, "\\Seen"); } @@ -299,7 +299,7 @@ /* Create the folder if it don't exist */ imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */ ast_debug(5, "Checking if folder exists: %s\n", mailbox); -@@ -7290,7 +7306,11 @@ +@@ -7317,7 +7333,11 @@ int oldmsgs; int newmsgs; int capacity; @@ -312,7 +312,7 @@ ast_log(LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", s); /* Shouldn't happen, but allow trying another extension if it does */ res = ast_play_and_wait(chan, "pbx-invalid"); -@@ -10281,7 +10301,7 @@ +@@ -10308,7 +10328,7 @@ case '5': /* Leave VoiceMail */ if (ast_test_flag(vmu, VM_SVMAIL)) { @@ -321,7 +321,7 @@ if (cmd == ERROR_LOCK_PATH || cmd == OPERATOR_EXIT) { res = cmd; goto out; -@@ -10464,7 +10484,7 @@ +@@ -10491,7 +10511,7 @@ case '8': /* Forward the current message */ if (vms.lastmsg > -1) { @@ -330,7 +330,7 @@ if (cmd == ERROR_LOCK_PATH) { res = cmd; goto out; -@@ -10517,6 +10537,10 @@ +@@ -10544,6 +10564,10 @@ #ifndef IMAP_STORAGE } else if (!cmd) { vms.deleted[vms.curmsg] = 1; @@ -341,7 +341,7 @@ #endif } else { vms.deleted[vms.curmsg] = 0; -@@ -12046,6 +12070,15 @@ +@@ -12071,6 +12095,15 @@ } else { ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder)); } @@ -361,7 +361,7 @@ diff -Nau cdr/cdr_radius.c.orig cdr/cdr_radius.c --- cdr/cdr_radius.c.orig 2011-07-14 22:13:06.000000000 +0200 +++ cdr/cdr_radius.c 2012-03-18 17:47:07.888451260 +0100 -@@ -106,10 +106,18 @@ +@@ -114,10 +114,18 @@ if (!rc_avpair_add(rh, tosend, PW_AST_SRC, &cdr->src, strlen(cdr->src), VENDOR_CODE)) return -1; @@ -380,7 +380,7 @@ /* Destination context */ if (!rc_avpair_add(rh, tosend, PW_AST_DST_CTX, &cdr->dcontext, strlen(cdr->dcontext), VENDOR_CODE)) return -1; -@@ -164,6 +172,10 @@ +@@ -172,6 +180,10 @@ if (!rc_avpair_add(rh, tosend, PW_AST_BILL_SEC, &cdr->billsec, 0, VENDOR_CODE)) return -1; @@ -391,7 +391,7 @@ /* Disposition */ tmp = ast_cdr_disp2str(cdr->disposition); if (!rc_avpair_add(rh, tosend, PW_AST_DISPOSITION, tmp, strlen(tmp), VENDOR_CODE)) -@@ -187,10 +199,14 @@ +@@ -195,10 +207,14 @@ } /* Setting Acct-Session-Id & User-Name attributes for proper generation @@ -785,7 +785,7 @@ diff -Nau channels/chan_sip.c.orig channels/chan_sip.c --- channels/chan_sip.c.orig 2012-02-28 18:53:34.000000000 +0100 +++ channels/chan_sip.c 2012-03-18 17:47:07.898462166 +0100 -@@ -12150,7 +12150,16 @@ +@@ -12483,7 +12483,16 @@ } else { if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) { /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */ @@ -823,7 +823,7 @@ diff -Nau configure.orig configure --- configure.orig 2012-01-14 17:40:17.000000000 +0100 +++ configure 2012-03-18 17:47:32.518450837 +0100 -@@ -4711,11 +4711,6 @@ +@@ -4743,11 +4743,6 @@ esac case "${host_os}" in @@ -835,7 +835,7 @@ openbsd*) ac_default_prefix=/usr/local if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then -@@ -18994,8 +18989,8 @@ +@@ -19261,8 +19256,8 @@ if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS` fi @@ -846,8 +846,8 @@ CPPFLAGS="${CPPFLAGS} ${imap_include}" LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}` cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -26771,7 +26766,7 @@ - pbxlibdir="-L${SQLITE_DIR}" +@@ -27359,7 +27354,7 @@ + pbxlibdir="-L${SQLITE_DIR}" fi fi - pbxfuncname="sqlite_exec" @@ -922,7 +922,7 @@ diff -Nau main/features.c.orig main/features.c --- main/features.c.orig 2012-01-23 21:30:21.000000000 +0100 +++ main/features.c 2012-03-18 17:47:07.898462166 +0100 -@@ -2158,6 +2158,10 @@ +@@ -2163,6 +2163,10 @@ snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename); } @@ -933,7 +933,7 @@ for(x = 0; x < strlen(args); x++) { if (args[x] == '/') args[x] = '-'; -@@ -2270,6 +2274,10 @@ +@@ -2275,6 +2279,10 @@ snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav")); } @@ -956,7 +956,7 @@ + ext = "wav"; if (filename[0] == '/') { - if (asprintf(&fn, "%s.%s", filename, ext) < 0) { + if (ast_asprintf(&fn, "%s.%s", filename, ext) < 0) { Index: main/Makefile diff -Nau main/Makefile.orig main/Makefile --- main/Makefile.orig 2011-09-19 22:27:03.000000000 +0200 @@ -977,7 +977,7 @@ diff -Nau main/tcptls.c.orig main/tcptls.c --- main/tcptls.c.orig 2011-11-30 22:41:31.000000000 +0100 +++ main/tcptls.c 2012-03-18 17:47:07.898462166 +0100 -@@ -391,6 +391,7 @@ +@@ -821,6 +821,7 @@ if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) { if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); @@ -1012,7 +1012,7 @@ diff -Nau Makefile.orig Makefile --- Makefile.orig 2011-10-05 00:54:15.000000000 +0200 +++ Makefile 2012-03-18 17:47:07.898462166 +0100 -@@ -186,12 +186,6 @@ +@@ -185,12 +185,6 @@ _ASTCFLAGS+=-isystem /usr/local/include endif diff -r ded2db56a196 -r 4ef5d37e8bb2 asterisk/asterisk.patch.proxymwi --- a/asterisk/asterisk.patch.proxymwi Mon Sep 01 21:55:47 2014 +0200 +++ b/asterisk/asterisk.patch.proxymwi Mon Sep 01 21:57:20 2014 +0200 @@ -2,7 +2,7 @@ diff -Nau channels/chan_sip.c.orig channels/chan_sip.c --- channels/chan_sip.c.orig 2011-01-14 18:32:52.000000000 +0100 +++ channels/chan_sip.c 2011-03-13 14:34:29.000000000 +0100 -@@ -25791,6 +25791,7 @@ +@@ -26449,6 +26449,7 @@ struct sip_pvt *p; int newmsgs = 0, oldmsgs = 0; const char *vmexten = NULL; @@ -10,7 +10,7 @@ ao2_lock(peer); -@@ -25852,6 +25853,11 @@ +@@ -26510,6 +26511,11 @@ } /* Recalculate our side, and recalculate Call ID */ ast_sip_ouraddrfor(&p->sa, &p->ourip, p); diff -r ded2db56a196 -r 4ef5d37e8bb2 asterisk/asterisk.patch.xfersips --- a/asterisk/asterisk.patch.xfersips Mon Sep 01 21:55:47 2014 +0200 +++ b/asterisk/asterisk.patch.xfersips Mon Sep 01 21:57:20 2014 +0200 @@ -2,7 +2,7 @@ diff -Nau channels/chan_sip.c.orig channels/chan_sip.c --- channels/chan_sip.c.orig 2011-05-23 17:35:28.358543497 +0200 +++ channels/chan_sip.c 2011-05-23 17:57:05.948534524 +0200 -@@ -29733,6 +29733,7 @@ +@@ -30388,6 +30388,7 @@ \todo Fix this function so that we wait for reply to the REFER and react to errors, denials or other issues the other end might have. */ @@ -10,7 +10,7 @@ static int sip_sipredirect(struct sip_pvt *p, const char *dest) { char *cdest; -@@ -29741,7 +29742,7 @@ +@@ -30396,7 +30397,7 @@ cdest = ast_strdupa(dest); extension = strsep(&cdest, "@"); @@ -19,7 +19,7 @@ if (ast_strlen_zero(extension)) { ast_log(LOG_ERROR, "Missing mandatory argument: extension\n"); return 0; -@@ -29773,7 +29774,14 @@ +@@ -30428,7 +30429,14 @@ } } diff -r ded2db56a196 -r 4ef5d37e8bb2 asterisk/asterisk.spec --- a/asterisk/asterisk.spec Mon Sep 01 21:55:47 2014 +0200 +++ b/asterisk/asterisk.spec Mon Sep 01 21:57:20 2014 +0200 @@ -22,19 +22,19 @@ ## # package version -%define V_opkg 1.8.20.2 -%define V_asterisk 1.8.20.2 +%define V_opkg 1.8.30.0 +%define V_asterisk 1.8.30.0 %define V_asterisk_fax_subdir 1.8.4 %define V_asterisk_fax_digium 1.8.4_1.3.1 -%define V_asterisk_sounds_core 1.4.23 -%define V_asterisk_sounds_extra 1.4.13 +%define V_asterisk_sounds_core 1.4.25 +%define V_asterisk_sounds_extra 1.4.14 %define V_asterisk_sounds_amoogab 1.4 %define V_asterisk_sounds_amootts current %define V_asterisk_sounds_custom 1.0 %define V_asterisk_sounds_mohop 2.03 %define V_asterisk_sounds_newpro july_2012 %define V_asterisk_addons_mp3dec 1 -%define V_fswitch_sounds_en 1.0.24 +%define V_fswitch_sounds_en 1.0.25 %define V_fswitch_sounds_fr 1.0.18 %define V_fswitch_sounds_ru 1.0.13 %define V_fswitch_music 1.0.8 @@ -52,14 +52,15 @@ Group: VoIP License: GPL Version: %{V_opkg} -Release: 20120800 +Release: 20140800 # package options %option with_dahdi no %option with_capi no %option with_ogg no %option with_mp3 no -%option with_fax no +%option with_faxmod no +%option with_faxarch generic %option with_avcodec no %option with_ldap no %option with_radius no @@ -123,6 +124,8 @@ Patch2: asterisk.patch.proxymwi # build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20100101, bison, gcc, make, grep, pkgconfig PreReq: OpenPKG, openpkg >= 20100101, MTA BuildPreReq: zlib, curl, openssl, ncurses, speex, sox, popt, gmime, libxml @@ -184,6 +187,8 @@ %if "%{with_esounds}" == "yes" BuildPreReq: sox, infozip %endif +AutoReq: no +AutoReqProv: no %description Asterisk is a complete Private Branch Exchange (PBX) in software. @@ -278,7 +283,7 @@ %setup -q -n asterisk-%{V_asterisk} %setup -q -n asterisk-%{V_asterisk} -D -T -a 1 %setup -q -n asterisk-%{V_asterisk} -D -T -a 2 -%if "%{with_fax}" == "yes" +%if "%{with_faxmod}" == "yes" %setup -q -n asterisk-%{V_asterisk} -D -T -a 23 %setup -q -n asterisk-%{V_asterisk} -D -T -a 24 %endif @@ -311,7 +316,8 @@ -e 's;lua5\.1;lua;g' \ -e 's;-I${IMAP_TK_DIR}/c-client;-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap;g' \ -e 's;${IMAP_TK_DIR}/c-client/c-client\.a;-limap -lssl -lcrypto -lcrypt;g' \ - -e 's;LIBXML2_INCLUDE="-I\${LIBXML2_DIR}/include";echo "Removing really buggy hard coded LibXML include defs.";' \ + -e 's;LIBXML2_INCLUDE=\$(echo \${LIBXML2_INCLUDE} | \$SED -e "s|-I|-I\${LIBXML2_DIR}|g");echo "Removing really buggy hard coded LibXML include defs.";' \ + -e 's;LIBXML2_LIB=\$(echo \${LIBXML2_LIB} | \$SED -e "s|-L|-L\${LIBXML2_DIR}|g");echo "Removing really buggy hard coded LibXML linkage defs.";' \ -e 's;\(for ver in 2\.0 2\.2 2\.4\);\1 2.6;' \ -e 's;\(\-lpq.*\-lz.*\)";\1 ${PTHREAD_LIBS}";g'\ configure @@ -397,6 +403,13 @@ %{l_shtool} subst \ -e 's;#ifdef CC_AST_HAS_VERSION_1_6$;#if (defined(CC_AST_HAS_VERSION_1_6) \&\& !defined(CC_AST_HAS_VERSION_1_8));g' \ chan_capi-%{V_chan_capi}/chan_capi_devstate.c + %{l_shtool} subst \ + -e "s;^\(NCURSES_INCLUDE=\).*;\1%{l_cppflags ncurses};" \ + -e "s;^\(NCURSES_LIB=\);\1%{l_ldflags} ;" \ + menuselect/makeopts.in + %{l_shtool} subst \ + -e 's; *\.lastclean;;g' \ + Makefile case "%{l_platform -t}" in *-sunos* ) %{l_shtool} subst \ @@ -619,6 +632,9 @@ %endif %install + # remove build cruft + rm -rf $RPM_BUILD_ROOT + # install program %{l_make} %{l_mflags} install \ DESTDIR=$RPM_BUILD_ROOT \ @@ -634,7 +650,7 @@ ) || exit $? %endif -%if "%{with_fax}" == "yes" +%if "%{with_faxmod}" == "yes" # install fax support case "%{l_platform -t}" in amd64*-* ) @@ -713,7 +729,7 @@ cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk for highfile in `find . -name '*.wav'`; do lowfile=`echo $highfile | sed -e 's;\(.*\)\.wav;\1.sln16;'` - %{l_prefix}/bin/sox $highfile -t raw -r 16000 -s -2 -c 1 $lowfile + %{l_prefix}/bin/sox $highfile -t raw -r 16000 -e signed-integer -b 16 -c 1 $lowfile rm $highfile done %endif @@ -857,6 +873,7 @@ %files -f files %clean + rm -rf $RPM_BUILD_ROOT %post %if "%{with_dahdi}" == "yes" @@ -893,7 +910,7 @@ ) || exit $? fi %endif -%if "%{with_fax}" == "yes" +%if "%{with_faxmod}" == "yes" ( echo "Asterisk has been installed with proprietary Digium fax support." echo "The responsible module is called res_fax_digium and requires a" echo "valid license. The license must be found in the directory"