OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   06-Sep-2006 08:38:31
  Branch: HEAD                             Handle: 2006090607383100

  Modified files:
    openpkg-src/asterisk    asterisk.patch asterisk.spec asterisk.txt

  Log:
    move astdb into a var directory; add SPYGROUP to conference setup; fix
    asterisk.conf to allow daemon mode; add %post/%pre for the usual
    daemon restart/stop/cleanup

  Summary:
    Revision    Changes     Path
    1.7         +45 -19     openpkg-src/asterisk/asterisk.patch
    1.5         +18 -1      openpkg-src/asterisk/asterisk.spec
    1.4         +7  -5      openpkg-src/asterisk/asterisk.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/asterisk/asterisk.patch
  ============================================================================
  $ cvs diff -u -r1.6 -r1.7 asterisk.patch
  --- openpkg-src/asterisk/asterisk.patch       5 Sep 2006 20:56:15 -0000       
1.6
  +++ openpkg-src/asterisk/asterisk.patch       6 Sep 2006 06:38:31 -0000       
1.7
  @@ -1,6 +1,6 @@
   Index: Makefile
   --- Makefile.orig    2006-06-29 21:23:18 +0200
  -+++ Makefile 2006-09-05 22:54:11 +0200
  ++++ Makefile 2006-09-06 08:25:09 +0200
   @@ -110,35 +110,19 @@
    # Don't use together with -DBUSYDETECT_TONEONLY
    BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
  @@ -112,7 +112,7 @@
      endif
   Index: agi/Makefile
   --- agi/Makefile.orig        2006-03-28 22:22:05 +0200
  -+++ agi/Makefile     2006-09-05 22:54:11 +0200
  ++++ agi/Makefile     2006-09-06 08:25:09 +0200
   @@ -20,9 +20,7 @@
      LIBS=-lsocket -lnsl ../strcompat.o
    endif
  @@ -126,7 +126,7 @@
    
   Index: app_conference/Makefile
   --- app_conference/Makefile.orig     2005-10-27 19:53:35 +0200
  -+++ app_conference/Makefile  2006-09-05 22:54:40 +0200
  ++++ app_conference/Makefile  2006-09-06 08:25:09 +0200
   @@ -20,10 +20,10 @@
    INSTALL_PREFIX := /opt/horizon
    INSTALL_MODULES_DIR := $(INSTALL_PREFIX)/lib/asterisk/modules
  @@ -186,7 +186,7 @@
    #   cp conf.conf /etc/asterisk/
   Index: app_conference/conference.c
   --- app_conference/conference.c.orig 2005-10-27 19:53:35 +0200
  -+++ app_conference/conference.c      2006-09-05 22:54:11 +0200
  ++++ app_conference/conference.c      2006-09-06 08:25:09 +0200
   @@ -618,7 +618,7 @@
        // acquire conference mutexes
        ast_mutex_lock( &conf->lock ) ;
  @@ -198,7 +198,7 @@
                pthread_detach( conf->conference_thread ) ;
   Index: apps/Makefile
   --- apps/Makefile.orig       2006-04-30 15:38:22 +0200
  -+++ apps/Makefile    2006-09-05 22:54:11 +0200
  ++++ apps/Makefile    2006-09-06 08:25:09 +0200
   @@ -54,16 +54,11 @@
    APPS+=app_osplookup.so
    endif
  @@ -222,7 +222,7 @@
    CYGSOLINK=-Wl,[EMAIL PROTECTED] -Wl,--export-all-symbols
   Index: asterisk-addons-1.2.4/Makefile
   --- asterisk-addons-1.2.4/Makefile.orig      2005-12-02 00:14:28 +0100
  -+++ asterisk-addons-1.2.4/Makefile   2006-09-05 22:54:11 +0200
  ++++ asterisk-addons-1.2.4/Makefile   2006-09-06 08:25:09 +0200
   @@ -27,17 +27,9 @@
    #
    # MySQL stuff...  Autoconf anyone??
  @@ -244,9 +244,35 @@
    
    OSARCH=$(shell uname -s)
    
  +Index: asterisk.c
  +--- asterisk.c.orig  2006-08-22 00:34:26 +0200
  ++++ asterisk.c       2006-09-06 08:31:47 +0200
  +@@ -1902,9 +1902,9 @@
  +             } else if (!strcasecmp(v->name, "astspooldir")) {
  +                     ast_copy_string(ast_config_AST_SPOOL_DIR, v->value, 
sizeof(ast_config_AST_SPOOL_DIR));
  +                     snprintf(ast_config_AST_MONITOR_DIR, 
sizeof(ast_config_AST_MONITOR_DIR) - 1, "%s/monitor", v->value);
  ++                    snprintf(ast_config_AST_DB, sizeof(ast_config_AST_DB), 
"%s/astdb", v->value);
  +             } else if (!strcasecmp(v->name, "astvarlibdir")) {
  +                     ast_copy_string(ast_config_AST_VAR_DIR, v->value, 
sizeof(ast_config_AST_VAR_DIR));
  +-                    snprintf(ast_config_AST_DB, sizeof(ast_config_AST_DB), 
"%s/astdb", v->value);
  +                     snprintf(ast_config_AST_KEY_DIR, 
sizeof(ast_config_AST_KEY_DIR), "%s/keys", v->value);
  +             } else if (!strcasecmp(v->name, "astlogdir")) {
  +                     ast_copy_string(ast_config_AST_LOG_DIR, v->value, 
sizeof(ast_config_AST_LOG_DIR));
  +Index: build_tools/make_defaults_h
  +--- build_tools/make_defaults_h.orig 2005-06-20 19:26:08 +0200
  ++++ build_tools/make_defaults_h      2006-09-06 08:32:28 +0200
  +@@ -14,7 +14,7 @@
  + #define AST_LOG_DIR    "${INSTALL_PATH}${ASTLOGDIR}"
  + #define AST_AGI_DIR    "${INSTALL_PATH}${AGI_DIR}"
  + #define AST_KEY_DIR    "${INSTALL_PATH}${ASTVARLIBDIR}/keys"
  +-#define AST_DB         "${INSTALL_PATH}${ASTVARLIBDIR}/astdb"
  ++#define AST_DB         "${INSTALL_PATH}${ASTSPOOLDIR}/astdb"
  + #define AST_TMP_DIR    "${INSTALL_PATH}${ASTSPOOLDIR}/tmp"
  + 
  + #define AST_CONFIG_FILE "${INSTALL_PATH}${ASTCONFPATH}"
   Index: cdr/Makefile
   --- cdr/Makefile.orig        2006-04-30 16:27:56 +0200
  -+++ cdr/Makefile     2006-09-05 22:54:11 +0200
  ++++ cdr/Makefile     2006-09-06 08:25:09 +0200
   @@ -20,10 +20,8 @@
    CFLAGS+=-fPIC
    endif
  @@ -262,7 +288,7 @@
    #This works for even old (2.96) versions of gcc and provides a small boost 
either way.
   Index: channels/Makefile
   --- channels/Makefile.orig   2006-08-17 23:57:19 +0200
  -+++ channels/Makefile        2006-09-05 22:54:11 +0200
  ++++ channels/Makefile        2006-09-06 08:25:09 +0200
   @@ -21,9 +21,7 @@
    #CHANNEL_LIBS+=chan_modem.so chan_modem_aopen.so chan_modem_bestdata.so
    endif
  @@ -276,7 +302,7 @@
      PTLIB=-lpt_OpenBSD_x86_r
   Index: channels/chan_h323.c
   --- channels/chan_h323.c.orig        2006-08-05 07:08:50 +0200
  -+++ channels/chan_h323.c     2006-09-05 22:54:11 +0200
  ++++ channels/chan_h323.c     2006-09-06 08:25:09 +0200
   @@ -31,6 +31,7 @@
     * \ingroup channel_drivers
     */
  @@ -287,7 +313,7 @@
    #include <sys/param.h>
   Index: channels/chan_skinny.c
   --- channels/chan_skinny.c.orig      2006-08-05 07:08:50 +0200
  -+++ channels/chan_skinny.c   2006-09-05 22:54:11 +0200
  ++++ channels/chan_skinny.c   2006-09-06 08:25:09 +0200
   @@ -99,7 +99,7 @@
    #define htolel(x) (x)
    #define htoles(x) (x)
  @@ -299,7 +325,7 @@
          (((x) & 0x00ff) << 8))
   Index: codecs/Makefile
   --- codecs/Makefile.orig     2005-11-29 19:24:39 +0100
  -+++ codecs/Makefile  2006-09-05 22:54:11 +0200
  ++++ codecs/Makefile  2006-09-06 08:25:09 +0200
   @@ -28,45 +28,16 @@
      LIBG723B=g723.1b/libg723b.a
    endif
  @@ -352,7 +378,7 @@
            codec_adpcm.so codec_ulaw.so codec_alaw.so codec_a_mu.so \
   Index: formats/Makefile
   --- formats/Makefile.orig    2005-11-29 19:24:39 +0100
  -+++ formats/Makefile 2006-09-05 22:54:11 +0200
  ++++ formats/Makefile 2006-09-06 08:25:09 +0200
   @@ -29,9 +29,7 @@
      FORMAT_LIBS+=format_ogg_vorbis.so
    endif
  @@ -366,7 +392,7 @@
    
   Index: frame.c
   --- frame.c.orig     2006-07-31 06:06:16 +0200
  -+++ frame.c  2006-09-05 22:54:11 +0200
  ++++ frame.c  2006-09-06 08:25:09 +0200
   @@ -1055,7 +1055,7 @@
    {
        switch(buf & TYPE_MASK) {
  @@ -378,7 +404,7 @@
                return 4;
   Index: funcs/Makefile
   --- funcs/Makefile.orig      2005-11-29 19:24:39 +0100
  -+++ funcs/Makefile   2006-09-05 22:54:11 +0200
  ++++ funcs/Makefile   2006-09-06 08:25:09 +0200
   @@ -40,9 +40,7 @@
    CFLAGS+=-fPIC
    endif
  @@ -392,7 +418,7 @@
    
   Index: pbx/Makefile
   --- pbx/Makefile.orig        2005-11-29 19:24:39 +0100
  -+++ pbx/Makefile     2006-09-05 22:54:11 +0200
  ++++ pbx/Makefile     2006-09-06 08:25:09 +0200
   @@ -14,9 +14,7 @@
    PBX_LIBS=pbx_config.so pbx_spool.so pbx_dundi.so pbx_loopback.so 
pbx_realtime.so \
             pbx_ael.so
  @@ -406,7 +432,7 @@
    #PBX_LIBS+=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >/dev/null 
2>/dev/null && echo "pbx_gtkconsole.so")
   Index: res/Makefile
   --- res/Makefile.orig        2005-11-29 19:24:39 +0100
  -+++ res/Makefile     2006-09-05 22:54:11 +0200
  ++++ res/Makefile     2006-09-06 08:25:09 +0200
   @@ -36,10 +36,8 @@
      endif
    endif
  @@ -422,7 +448,7 @@
    CYGSOLINK=-Wl,[EMAIL PROTECTED] -Wl,--export-all-symbols
   Index: rtp.c
   --- rtp.c.orig       2006-07-13 20:44:17 +0200
  -+++ rtp.c    2006-09-05 22:54:11 +0200
  ++++ rtp.c    2006-09-06 08:25:09 +0200
   @@ -962,8 +962,10 @@
                rtp->us.sin_port = htons(x);
                rtp->us.sin_addr = addr;
  @@ -437,7 +463,7 @@
                        (!rtp->rtcp || !bind(rtp->rtcp->s, (struct sockaddr 
*)&rtp->rtcp->us, sizeof(rtp->rtcp->us))))
   Index: utils.c
   --- utils.c.orig     2006-07-12 15:54:10 +0200
  -+++ utils.c  2006-09-05 22:54:11 +0200
  ++++ utils.c  2006-09-06 08:25:09 +0200
   @@ -58,7 +58,10 @@
    static char base64[64];
    static char b2a[256];
  @@ -452,7 +478,7 @@
    #define ERANGE 34
   Index: utils/Makefile
   --- utils/Makefile.orig      2005-11-29 19:24:39 +0100
  -+++ utils/Makefile   2006-09-05 22:54:11 +0200
  ++++ utils/Makefile   2006-09-06 08:25:09 +0200
   @@ -16,17 +16,15 @@
    #
    CFLAGS+=-DNO_AST_MM
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/asterisk/asterisk.spec
  ============================================================================
  $ cvs diff -u -r1.4 -r1.5 asterisk.spec
  --- openpkg-src/asterisk/asterisk.spec        6 Sep 2006 05:47:02 -0000       
1.4
  +++ openpkg-src/asterisk/asterisk.spec        6 Sep 2006 06:38:31 -0000       
1.5
  @@ -196,7 +196,7 @@
       #   determine installation files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
           %{l_files_std} `cat perl-openpkg-files` \
  -        '%config %{l_prefix}/etc/asterisk/*' \
  +        '%config %attr(640,%{l_mgrp},%{l_rgrp}) %{l_prefix}/etc/asterisk/*' \
           '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/asterisk/*' \
           '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/asterisk/*/*'
   
  @@ -205,3 +205,20 @@
   %clean
       rm -rf $RPM_BUILD_ROOT
   
  +%post
  +    #   after upgrade, restart service
  +    [ $1 -eq 2 ] || exit 0
  +    eval `%{l_rc} asterisk status 2>/dev/null`
  +    [ ".$asterisk_active" = .yes ] && %{l_rc} asterisk restart
  +    exit 0
  +
  +%preun
  +    #   before erase, stop service and remove log files
  +    [ $1 -eq 0 ] || exit 0
  +    %{l_rc} asterisk stop 2>/dev/null
  +    rm -f $RPM_INSTALL_PREFIX/var/asterisk/log/*       >/dev/null 2>&1 || 
true
  +    rm -f $RPM_INSTALL_PREFIX/var/asterisk/run/*       >/dev/null 2>&1 || 
true
  +    rm -f $RPM_INSTALL_PREFIX/var/asterisk/spool/*/*   >/dev/null 2>&1 || 
true
  +    rm -f $RPM_INSTALL_PREFIX/var/asterisk/spool/astdb >/dev/null 2>&1 || 
true
  +    exit 0
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/asterisk/asterisk.txt
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 asterisk.txt
  --- openpkg-src/asterisk/asterisk.txt 5 Sep 2006 17:54:15 -0000       1.3
  +++ openpkg-src/asterisk/asterisk.txt 6 Sep 2006 06:38:31 -0000       1.4
  @@ -16,25 +16,25 @@
   astctlowner        = @l_rusr@
   astctlgroup        = @l_rgrp@
   astctlpermissions  = 700
  -astctl             = @l_prefix@/var/asterisk/run/asterisk.ctl 
  +astctl             = asterisk.ctl 
   
   [options]
   systemname         = openpkg-pbx
   runuser            = @l_rusr@
   rungroup           = @l_rgrp@
  -verbose            = 3
  +verbose            = 0
   alwaysfork         = yes
  +dumpcore           = no
  +quiet              = yes
   ;timestamp         = yes
   ;execincludes      = yes
   ;optiondebug       = no
   ;nofork            = no
  -;quiet             = no
   ;console           = no
   ;highpriority      = no
   ;initcrypto        = no
   ;nocolor           = yes
   ;dontwarn          = no
  -;dumpcore          = yes
   
   </file>
   <file name="modules.conf">
  @@ -263,11 +263,13 @@
   exten           = 7,n,GotoIf($[${number} >= 0 & ${number} <= 9]?7-ok,1)
   exten           = 7,n,Playback(conf-invalid)
   exten           = 7,n,Goto(7,3)
  -exten           = 7-ok,1,Playback(conf-placeintoconf)
  +exten           = 7-ok,1,Set(SPYGROUP=conference-${number})
  +exten           = 7-ok,n,Playback(conf-placeintoconf)
   exten           = 7-ok,n,SayNumber(${number})
   exten           = 7-ok,n,Conference(conference-${number}/M)
   exten           = 7-ok,n,Hangup
   exten           = _7[0-9],1,Set(TIMEOUT(digit)=3)
  +exten           = _7[0-9],n,Set(SPYGROUP=conference-${EXTEN:1})
   exten           = _7[0-9],n,Playback(conf-placeintoconf)
   exten           = _7[0-9],n,SayNumber(${EXTEN:1})
   exten           = _7[0-9],n,Conference(conference-${EXTEN:1}/M)
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to