Version bumped and removed old beta ebuild
authorStefan Knoblich <stkn@gentoo.org>
Fri, 18 Nov 2005 16:42:20 +0000 (16:42 +0000)
committerStefan Knoblich <stkn@gentoo.org>
Fri, 18 Nov 2005 16:42:20 +0000 (16:42 +0000)
Package-Manager: portage-2.0.51.22-r2

net-misc/asterisk/ChangeLog
net-misc/asterisk/Manifest
net-misc/asterisk/asterisk-1.2.0.ebuild [moved from net-misc/asterisk/asterisk-1.2.0_beta1-r1.ebuild with 77% similarity]
net-misc/asterisk/files/1.2.0/asterisk-1.2.0_beta-ukcid.patch [new file with mode: 0644]
net-misc/asterisk/files/digest-asterisk-1.2.0 [new file with mode: 0644]
net-misc/asterisk/files/digest-asterisk-1.2.0_beta1-r1 [deleted file]

index 25ec9d1f9cbe52edd2afe6d5b0610d53a4cdd248..0b5423ff3541b9c099c75bc572bc9de855e42a2f 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for net-misc/asterisk
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.88 2005/11/08 15:35:21 stkn Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.89 2005/11/18 16:42:20 stkn Exp $
+
+*asterisk-1.2.0 (18 Nov 2005)
+
+  18 Nov 2005; Stefan Knoblich <stkn@gentoo.org>
+  +files/1.2.0/asterisk-1.2.0_beta-ukcid.patch,
+  -asterisk-1.2.0_beta1-r1.ebuild, +asterisk-1.2.0.ebuild:
+  Version bumped and removed old beta ebuild
 
 *asterisk-1.2.0_beta1-r1 (08 Nov 2005)
 *asterisk-1.0.9-r2 (08 Nov 2005)
index 60d48f5c562a77376c404e7ae78f1eb908a6ced2..919eae9dacceb8ec09e05562f685aa17e6f8b772 100644 (file)
@@ -4,14 +4,15 @@ MD5 e6a6e09e3a4074c7eb81a173b182cda0 asterisk-1.0.5-r3.ebuild 12290
 MD5 72c321efd01343f66cc8f0e8d4cba25a asterisk-1.0.9-r2.ebuild 13817
 MD5 7f0f66b9fdad604ce8a945bc560ab97c asterisk-1.0.6-r2.ebuild 14062
 MD5 44cf247f04cc83413fcb40ed59d0847a metadata.xml 248
-MD5 c777d621d81a4175c7b34f8529bc3e92 ChangeLog 18107
-MD5 0e526fefc0545ed7007add0ec8cd1294 asterisk-1.2.0_beta1-r1.ebuild 8069
+MD5 d74d103137ec0c6903ba3c49cd1a69dd ChangeLog 18340
+MD5 3b25858e72f1fec72dc22ea4ca89b7b4 asterisk-1.2.0.ebuild 8273
 MD5 58b3329253168e6dfb4c8ecbb98aeecd files/digest-asterisk-1.0.9-r2 210
 MD5 48a3518349e2abfe20fa918a9db5eea2 files/digest-asterisk-1.0.7-r2 210
+MD5 fc8f9ac9d99f05b403f155625553e057 files/digest-asterisk-1.2.0 145
 MD5 97ed00bdccf7c70d5fcbf37580da91c4 files/digest-asterisk-1.0.5-r3 139
 MD5 b3bbedde09faea609a0357b21eafa596 files/digest-asterisk-1.0.8-r1 210
 MD5 f399592939cd5b43b7851e20744a108e files/digest-asterisk-1.0.6-r2 210
-MD5 5d8a088b5a0b3ea1681f4f085ff36299 files/digest-asterisk-1.2.0_beta1-r1 156
+MD5 3932983fb155e026eb10533425174f59 files/1.2.0/asterisk-1.2.0_beta-ukcid.patch 5787
 MD5 f20e5b869d5e221194187dd7f504d38b files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff 5829
 MD5 0c31aac944f4fdff2b26b446d0d0eef4 files/1.0.0/asterisk-1.0.7-initgroups.diff 1826
 MD5 93d2e0533a32a38e21f99f278f635266 files/1.0.0/asterisk-1.0.5-speex.diff 1214
similarity index 77%
rename from net-misc/asterisk/asterisk-1.2.0_beta1-r1.ebuild
rename to net-misc/asterisk/asterisk-1.2.0.ebuild
index 7227800d9e66f523add5c271fd508da5bce11db9..2c5722d1dc18451fd73cad01b17883526cc62ae4 100644 (file)
@@ -1,14 +1,14 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.2.0_beta1-r1.ebuild,v 1.1 2005/11/08 15:35:21 stkn Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.2.0.ebuild,v 1.1 2005/11/18 16:42:20 stkn Exp $
 
 inherit eutils
 
-IUSE="alsa doc gtk mmx mysql pri zaptel debug postgres odbc \
-       hardened speex h323 sqlite nosamples osp lowmem curl"
+IUSE="alsa curl debug doc gtk h323 hardened lowmem mmx mysql \
+       nosamples odbc postgres pri speex sqlite ssl ukcid zaptel"
 
 #BRI_VERSION="0.2.0-RC8f-CVS"
-AST_PATCHES="1.2.0_beta-patches-1.0"
+AST_PATCHES="1.2.0-patches-1.0"
 
 ## TODO:
 #
@@ -16,7 +16,7 @@ AST_PATCHES="1.2.0_beta-patches-1.0"
 # - bristuff (waiting...)
 # - test nosamples
 # - add some more use flags...
-#      recent additions: osp, lowmem, curl
+#      recent additions: osp, lowmem, curl, ukcid
 # - cleanup
 #
 
@@ -37,9 +37,9 @@ KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
 RDEPEND="dev-libs/newt
        media-sound/sox
        media-sound/mpg123
+       ssl? ( dev-libs/openssl )
        gtk? ( =x11-libs/gtk+-1.2* )
        pri? ( >=net-libs/libpri-1.1.0 )
-       osp? ( >=net-libs/osptoolkit-3.3.1 )
        h323? ( >=dev-libs/pwlib-1.8.3
                >=net-libs/openh323-1.15.0 )
        alsa? ( media-libs/alsa-lib )
@@ -51,6 +51,8 @@ RDEPEND="dev-libs/newt
        zaptel? ( >=net-misc/zaptel-1.1.0 )
        postgres? ( dev-db/postgresql )"
 
+#      osp? ( >=net-libs/osptoolkit-3.3.4 )
+
 #      bri? ( >=net-libs/libpri-1.1.0
 #              >=net-misc/zaptel-1.1.0 )
 
@@ -60,6 +62,23 @@ DEPEND="${RDEPEND}
        doc? ( app-doc/doxygen )"
 
 pkg_setup() {
+       ewarn "                      Asterisk UPGRADE Warning"
+       ewarn ""
+       ewarn "!!! Read ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.gz after installation !!!"
+       ewarn ""
+       ewarn "                      Asterisk UPGRADE Warning"
+       echo
+       einfo "Press Ctrl+C to abort"
+       echo
+       ebeep
+
+       n=10
+       while [[ $n -gt 0 ]]; do
+               echo -en "  Waiting $n seconds...\r"
+               sleep 1
+               (( n-- ))
+       done
+
        #
        # Regular checks
        #
@@ -77,6 +96,7 @@ pkg_setup() {
 #                      die "Libpri without bri support detected"
 #              fi
 #      fi
+
 }
 
 src_unpack() {
@@ -101,11 +121,17 @@ src_unpack() {
        fi
 
        if ! use debug; then
-               einfo "Disabling debugging"
+               einfo "Disabling debug support"
                sed -i -e "s:^\(DEBUG=\):#\1:" \
                        Makefile
        fi
 
+       if ! use ssl; then
+               einfo "Disabling crypto support"
+               sed -i -e "s:^#\(NOCRYPTO=yes\):\1:" \
+                       Makefile
+       fi
+
        #
        # uclibc patch
        #
@@ -114,6 +140,14 @@ src_unpack() {
                epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-uclibc-dns.diff
        fi
 
+       #
+       # ukcid patch from http://www.lusyn.com/asterisk/
+       #
+       if use ukcid; then
+               einfo "Patching asterisk for UK Callerid..."
+               epatch ${FILESDIR}/1.2.0/${PN}-1.2.0_beta-ukcid.patch
+       fi
+
        #
        # BRI patches
        #
@@ -122,9 +156,6 @@ src_unpack() {
 #              einfo "Patching asterisk w/ BRI stuff"
 #              epatch ${WORKDIR}/bristuff-${BRI_VERSION}/patches/asterisk.patch
 #      fi
-
-       # security fix, bug #11836
-       epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-vmail.cgi.patch
 }
 
 src_compile() {
@@ -213,7 +244,7 @@ src_install() {
 
        # install standard docs...
        dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm
-       dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README
+       dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README UPGRADE.txt
        dodoc doc/README.*
        dodoc doc/*.txt
 
@@ -268,31 +299,40 @@ pkg_postinst() {
        echo
        einfo "Gentoo VoIP IRC Channel:"
        einfo "#gentoo-voip @ irc.freenode.net"
+       echo
+       echo
 
        #
        # Warning about security changes...
        #
-       ewarn "*********************** Important changes **************************"
-       ewarn
-       ewarn "- Asterisk runs as user asterisk, group asterisk by default"
-       ewarn "  Use usermod -G to make the asterisk user a member of additional"
-       ewarn "  groups if necessary."
-       ewarn
-       ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
-       ewarn "  750 (rwxr-x--- directories) / 640 (rw-r----- files)"
-       ewarn
-       ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
-       ewarn "  to asterisk:asterisk 750 / 640"
-       ewarn
-       ewarn "- Asterisk's unix socket and pidfile are now in /var/run/astrisk"
-       ewarn
-       ewarn "- Asterisk cannot set the IP ToS bits when run as user,"
-       ewarn "  use something like this to make iptables set them for you:"
-       ewarn "  \"iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28\""
-       ewarn "  \"iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28\""
-       ewarn "  (taken from voip-info.org comments (see below), thanks andrewid)"
-       ewarn
-       ewarn "For more details:"
-       ewarn "     http://bugs.gentoo.org/show_bug.cgi?id=88732"
-       ewarn "     http://www.voip-info.org/wiki-Asterisk+non-root"
+       ewarn "                      Asterisk UPGRADE Warning"
+       ewarn ""
+       ewarn "!!! Read ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.gz before continuing !!!"
+       ewarn ""
+       ewarn "                      Asterisk UPGRADE Warning"
+}
+
+pkg_config() {
+       einfo "Do you want to reset file permissions and ownerships (y/N)?"
+
+       read tmp
+       tmp="$(echo $tmp | tr [:upper:] [:lower:])"
+
+       if [[ "$tmp" = "y" ]] ||\
+          [[ "$tmp" = "yes" ]]
+       then
+               einfo "Resetting permissions to defaults..."
+
+               for x in spool run lib log; do
+                       chown -R asterisk:asterisk ${ROOT}var/${x}/asterisk
+                       chmod -R u=rwX,g=rX,o=     ${ROOT}var/${x}/asterisk
+               done
+
+               chown -R root:asterisk ${ROOT}etc/asterisk
+               chmod -R u=rwX,g=rX,o= ${ROOT}etc/asterisk
+
+               einfo "done"
+       else
+               einfo "skipping"
+       fi
 }
diff --git a/net-misc/asterisk/files/1.2.0/asterisk-1.2.0_beta-ukcid.patch b/net-misc/asterisk/files/1.2.0/asterisk-1.2.0_beta-ukcid.patch
new file mode 100644 (file)
index 0000000..f456c3a
--- /dev/null
@@ -0,0 +1,168 @@
+? asterisk_ukcid.diff
+Index: channels/chan_zap.c
+===================================================================
+RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
+retrieving revision 1.344.2.7
+diff -u -r1.344.2.7 chan_zap.c
+--- channels/chan_zap.c        27 Oct 2004 14:41:55 -0000      1.344.2.7
++++ channels/chan_zap.c        4 Nov 2004 21:05:03 -0000
+@@ -790,6 +790,14 @@
+       return 0;
+ }
+ 
++static int zt_get_history(int fd, void *buf, int buf_size)
++{
++      struct zt_history hist;
++      hist.buf=buf;
++      hist.len=buf_size;
++      return ioctl(fd, ZT_GET_HISTORY, &hist);
++}
++
+ static int alloc_sub(struct zt_pvt *p, int x)
+ {
+       ZT_BUFFERINFO bi;
+@@ -5114,6 +5122,120 @@
+                       }
+               }
+ #endif
++              /* If we're using an X100P in the UK, caller ID needs to be extracted from
++               * the history buffer */
++              if (p->use_callerid && p->cid_start == CID_START_USEHIST) {
++                      ast_log(LOG_DEBUG,"Using history buffer to extract UK caller ID\n");
++                      cs = callerid_new(cid_signalling);
++                      if (cs) {
++                              unsigned char cidbuf[16384];
++                              res=0;
++
++                              res = zt_get_history(p->subs[index].zfd,cidbuf,sizeof(cidbuf));
++                              if(res<0) {
++                                      ast_log(LOG_ERROR,"zt_get_history failed: %s\n", strerror(errno));
++                              } else {
++                                      res=callerid_feed(cs,cidbuf,sizeof(cidbuf),AST_LAW(p));
++                                      if (res < 0) {
++                                              ast_log(LOG_WARNING, "CallerID feed failed: %s\n", strerror(errno));
++                                      }
++                              }
++
++                              if(res==1) {
++                                      callerid_get(cs, &name, &number, &flags);
++                                      if (option_debug)
++                                              ast_log(LOG_DEBUG, "CallerID number: %s, name: %s, flags=%d\n", number, name, flags);
++                              }
++                      }
++                      if (p->usedistinctiveringdetection == 1) {
++#if 1
++                              bump_gains(p);
++#endif                                
++                              len = 0;
++                              distMatches = 0;
++                              /* Clear the current ring data array so we dont have old data in it. */
++                              for (receivedRingT=0; receivedRingT < 3; receivedRingT++) {
++                                      curRingData[receivedRingT] = 0;
++                              }
++                              receivedRingT = 0;
++                              counter = 0;
++                              counter1 = 0;
++                              /* Check to see if context is what it should be, if not set to be. */
++                              if (strcmp(p->context,p->defcontext) != 0) {
++                                      strncpy(p->context, p->defcontext, sizeof(p->context)-1);
++                                      strncpy(chan->context,p->defcontext,sizeof(chan->context)-1);
++                              }
++
++                              for(;;) {       
++                                      i = ZT_IOMUX_READ | ZT_IOMUX_SIGEVENT;
++                                      if ((res = ioctl(p->subs[index].zfd, ZT_IOMUX, &i)))    {
++                                              ast_log(LOG_WARNING, "I/O MUX failed: %s\n", strerror(errno));
++                                              callerid_free(cs);
++                                              ast_hangup(chan);
++                                              return NULL;
++                                      }
++                                      if (i & ZT_IOMUX_SIGEVENT) {
++                                              res = zt_get_event(p->subs[index].zfd);
++                                              ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
++                                              res = 0;
++                                              /* Let us detect distinctive ring */
++
++                                              curRingData[receivedRingT] = p->ringt;
++
++                                              if (p->ringt < ringt_base/2)
++                                                      break;
++                                              ++receivedRingT; /* Increment the ringT counter so we can match it against
++                                                              values in zapata.conf for distinctive ring */
++                                      } else if (i & ZT_IOMUX_READ) {
++                                              res = read(p->subs[index].zfd, buf, sizeof(buf));
++                                              if (res < 0) {
++                                                      if (errno != ELAST) {
++                                                              ast_log(LOG_WARNING, "read returned error: %s\n", strerror(errno));
++                                                              callerid_free(cs);
++                                                              ast_hangup(chan);
++                                                              return NULL;
++                                                      }
++                                                      break;
++                                              }
++                                              if (p->ringt) 
++                                                      p->ringt--;
++                                              if (p->ringt == 1) {
++                                                      res = -1;
++                                                      break;
++                                              }
++                                      }
++                              }
++                              if(option_verbose > 2)
++                                      /* this only shows up if you have n of the dring patterns filled in */
++                                      ast_verbose( VERBOSE_PREFIX_3 "Detected ring pattern: %d,%d,%d\n",curRingData[0],curRingData[1],curRingData[2]);
++
++                              for (counter=0; counter < 3; counter++) {
++                                      /* Check to see if the rings we received match any of the ones in zapata.conf for this
++                                      channel */
++                                      distMatches = 0;
++                                      for (counter1=0; counter1 < 3; counter1++) {
++                                              if (curRingData[counter1] <= (p->drings.ringnum[counter].ring[counter1]+10) && curRingData[counter1] >=
++                                              (p->drings.ringnum[counter].ring[counter1]-10)) {
++                                                      distMatches++;
++                                              }
++                                      }
++                                      if (distMatches == 3) {
++                                              /* The ring matches, set the context to whatever is for distinctive ring.. */
++                                              strncpy(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context)-1);
++                                              strncpy(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context)-1);
++                                              if(option_verbose > 2)
++                                                      ast_verbose( VERBOSE_PREFIX_3 "Distinctive Ring matched context %s\n",p->context);
++                                              break;
++                                      }
++                              }
++                      }
++                      /* Restore linear mode (if appropriate) for Caller*ID processing */
++                      zt_setlinear(p->subs[index].zfd, p->subs[index].linear);
++#if 1
++                      restore_gains(p);
++#endif        
++              }
++
+               /* If we want caller id, we're in a prering state due to a polarity reversal
+                * and we're set to use a polarity reversal to trigger the start of caller id,
+                * grab the caller id and wait for ringing to start... */
+@@ -9178,6 +9300,8 @@
+                               cid_start = CID_START_RING;
+                       else if (!strcasecmp(v->value, "polarity"))
+                               cid_start = CID_START_POLARITY;
++                      else if (!strcasecmp(v->value, "usehist"))
++                              cid_start = CID_START_USEHIST;
+                       else if (ast_true(v->value))
+                               cid_start = CID_START_RING;
+               } else if (!strcasecmp(v->name, "threewaycalling")) {
+Index: include/asterisk/callerid.h
+===================================================================
+RCS file: /usr/cvsroot/asterisk/include/asterisk/callerid.h,v
+retrieving revision 1.7
+diff -u -r1.7 callerid.h
+--- include/asterisk/callerid.h        19 Sep 2004 16:17:18 -0000      1.7
++++ include/asterisk/callerid.h        4 Nov 2004 21:05:04 -0000
+@@ -30,6 +30,7 @@
+ 
+ #define CID_START_RING        1
+ #define CID_START_POLARITY 2
++#define CID_START_USEHIST 3
+ 
+ 
+ #define AST_LIN2X(a) ((codec == AST_FORMAT_ALAW) ? (AST_LIN2A(a)) : (AST_LIN2MU(a)))
diff --git a/net-misc/asterisk/files/digest-asterisk-1.2.0 b/net-misc/asterisk/files/digest-asterisk-1.2.0
new file mode 100644 (file)
index 0000000..8990081
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 61d7f29b586ba9b9b5fbb67f952fd3ca asterisk-1.2.0.tar.gz 10464039
+MD5 0eeb5317bde267141c33ee5051e3b494 asterisk-1.2.0-patches-1.0.tar.bz2 7197
diff --git a/net-misc/asterisk/files/digest-asterisk-1.2.0_beta1-r1 b/net-misc/asterisk/files/digest-asterisk-1.2.0_beta1-r1
deleted file mode 100644 (file)
index 27af8bb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 b87447c18dac12815c6869f755377056 asterisk-1.2.0-beta1.tar.gz 10278681
-MD5 2ab925ff8b092f3bff533972bdac8f42 asterisk-1.2.0_beta-patches-1.0.tar.bz2 9213