diff options
author | Rajiv Aaron Manglani <rajiv@gentoo.org> | 2008-01-06 08:36:27 +0000 |
---|---|---|
committer | Rajiv Aaron Manglani <rajiv@gentoo.org> | 2008-01-06 08:36:27 +0000 |
commit | 973ad363549f902d9d74ab21c4ca987008449177 (patch) | |
tree | 0a2b56b9842ddadff9bd616e0144094151b4789e /net-misc | |
parent | Add dev-util/pkgconfig to DEPEND. (bug #204464) (diff) | |
download | historical-973ad363549f902d9d74ab21c4ca987008449177.tar.gz historical-973ad363549f902d9d74ab21c4ca987008449177.tar.bz2 historical-973ad363549f902d9d74ab21c4ca987008449177.zip |
removing asterisk and zaptel 1.0.
Package-Manager: portage-2.1.4_rc14
Diffstat (limited to 'net-misc')
43 files changed, 46 insertions, 3524 deletions
diff --git a/net-misc/asterisk-sounds/ChangeLog b/net-misc/asterisk-sounds/ChangeLog index 3e04592de7aa..6420a6b25555 100644 --- a/net-misc/asterisk-sounds/ChangeLog +++ b/net-misc/asterisk-sounds/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-misc/asterisk-sounds -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-sounds/ChangeLog,v 1.15 2007/12/25 22:39:28 rajiv Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-sounds/ChangeLog,v 1.16 2008/01/06 08:31:25 rajiv Exp $ + + 06 Jan 2008; Rajiv Aaron Manglani <rajiv@gentoo.org> + -asterisk-sounds-1.0.8.ebuild: + removing asterisk and zaptel 1.0. *asterisk-sounds-1.2.1-r1 (25 Dec 2007) diff --git a/net-misc/asterisk-sounds/asterisk-sounds-1.0.8.ebuild b/net-misc/asterisk-sounds/asterisk-sounds-1.0.8.ebuild deleted file mode 100644 index ddaa4502cc32..000000000000 --- a/net-misc/asterisk-sounds/asterisk-sounds-1.0.8.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-sounds/asterisk-sounds-1.0.8.ebuild,v 1.6 2007/07/26 22:36:19 rajiv Exp $ - -IUSE="" - -DESCRIPTION="Additional sounds for Asterisk" -HOMEPAGE="http://www.asterisk.org/" -SRC_URI="http://ftp.digium.com/pub/telephony/asterisk/old-releases/${P}.tar.gz" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="x86 sparc ~hppa ~amd64 ~ppc" - -DEPEND="net-misc/asterisk" - -src_install() { - make DESTDIR=${D} install || die "Make install failed" - - dodoc README.txt sounds-extra.txt - - # fix permissions - if has_version ">=net-misc/asterisk-1.0.5-r2"; then - chown -R asterisk:asterisk ${D}/var/lib/asterisk - chmod -R u=rwX,g=rX,o= ${D}/var/lib/asterisk - fi -} diff --git a/net-misc/asterisk-sounds/files/digest-asterisk-sounds-1.0.8 b/net-misc/asterisk-sounds/files/digest-asterisk-sounds-1.0.8 deleted file mode 100644 index d5f0d57d277f..000000000000 --- a/net-misc/asterisk-sounds/files/digest-asterisk-sounds-1.0.8 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 e735e12d967a47b422cfb04e7a5b2114 asterisk-sounds-1.0.8.tar.gz 3170394 -RMD160 20b724e1b8018c7929f9daa61da453575415e459 asterisk-sounds-1.0.8.tar.gz 3170394 -SHA256 ac2dca8e1fa54a99c91d6e10a3cda55950c4893c50087b71dcc0f05f474b2515 asterisk-sounds-1.0.8.tar.gz 3170394 diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog index 373027dff421..398c79ddac8a 100644 --- a/net-misc/asterisk/ChangeLog +++ b/net-misc/asterisk/ChangeLog @@ -1,6 +1,33 @@ # ChangeLog for net-misc/asterisk -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.173 2007/11/14 19:09:44 beandog Exp $ +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.174 2008/01/06 08:36:26 rajiv Exp $ + + 06 Jan 2008; Rajiv Aaron Manglani <rajiv@gentoo.org> + -files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff, + -files/1.0.0/asterisk-1.0.5-hppa.patch, + -files/1.0.0/asterisk-1.0.5-lpc10flags.diff, + -files/1.0.0/asterisk-1.0.5-speex.diff, + -files/1.0.0/asterisk-1.0.7-initgroups.diff, + -files/1.0.0/asterisk-1.0.7-manager-cli-segv.patch, + -files/1.0.0/asterisk-1.0.7-scripts.diff, + -files/1.0.0/asterisk-1.0.8-callerid.patch, + -files/1.0.0/asterisk-1.0.10-vmail.cgi.patch, -files/1.0.0/asterisk.confd, + -files/1.0.0/asterisk-1.0.8-hppa.patch, + -files/1.0.0/asterisk-1.0.10-weak-references.diff, + -files/1.0.0/asterisk.confd.sec, + -files/1.0.0/asterisk-1.0-CVE-2006-1827.patch, + -files/1.0.0/asterisk-1.0.8-initgroups.diff, + -files/1.0.0/asterisk-1.0.10-misdn.patch, -files/1.0.0/asterisk.rc6, + -files/1.0.0/asterisk-1.0.8-ptr64fix.diff, + -files/1.0.0/asterisk-1.0.12-r2-chan_sip.patch, + -files/1.0.0/asterisk.rc6.sec, -files/1.0.0/asterisk-1.0.9-freetds.diff, + -files/1.0.0/asterisk-uclibc-dns.diff, + -files/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff, + -files/1.0.0/asterisk-1.0.9-ukcid.patch, + -files/1.0.0/asterisk-1.0.9-vmail.cgi.patch, + -files/1.0.0/asterisk-1.0.9-weak-references.diff, metadata.xml, + -asterisk-1.0.12-r2.ebuild: + removing asterisk and zaptel 1.0. 14 Nov 2007; Steve Dibb <beandog@gentoo.org> asterisk-1.2.14-r2.ebuild: amd64 stable, bug 175321 diff --git a/net-misc/asterisk/asterisk-1.0.12-r2.ebuild b/net-misc/asterisk/asterisk-1.0.12-r2.ebuild deleted file mode 100644 index 48b1616f16c0..000000000000 --- a/net-misc/asterisk/asterisk-1.0.12-r2.ebuild +++ /dev/null @@ -1,510 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.12-r2.ebuild,v 1.5 2007/10/28 13:25:43 phreak Exp $ - -inherit eutils perl-app - -ADDONS_VERSION="1.0.9" -BRI_VERSION="0.2.0-RC8r" - -MY_P="${P/_p/.}" - -DESCRIPTION="Asterisk: A Modular Open Source PBX System" -HOMEPAGE="http://www.asterisk.org/" -SRC_URI="http://ftp1.digium.com/pub/telephony/${PN}/releases/${MY_P}.tar.gz - http://ftp1.digium.com/pub/telephony/${PN}/old-releases/${PN}-addons-${ADDONS_VERSION}.tar.gz - bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )" - -S_ADDONS="${WORKDIR}/${PN}-addons-${ADDONS_VERSION}" -S_BRI="${WORKDIR}/bristuff-${BRI_VERSION}" -S="${WORKDIR}/${MY_P}" - -IUSE="alsa bri debug doc gtk hardened mmx mysql mysqlfriends postgres pri resperl speex ukcid vmdbmysql vmdbpostgres zaptel" -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="~ppc x86" - -DEPEND="dev-libs/newt - dev-libs/openssl - media-sound/mpg123 - media-sound/sox - doc? ( app-doc/doxygen ) - gtk? ( =x11-libs/gtk+-1.2* ) - pri? ( <net-libs/libpri-1.2 ) - bri? ( <net-libs/libpri-1.2 - <net-misc/zaptel-1.2 ) - alsa? ( media-libs/alsa-lib ) - mysql? ( virtual/mysql ) - speex? ( media-libs/speex ) - zaptel? ( <net-misc/zaptel-1.2 ) - postgres? ( dev-db/postgresql ) - vmdbmysql? ( virtual/mysql ) - mysqlfriends? ( virtual/mysql ) - vmdbpostgres? ( dev-db/postgresql ) - resperl? ( dev-lang/perl - <net-misc/zaptel-1.2 )" - -RDEPEND="${DEPEND} - virtual/logger" - -pkg_setup() { - local n - - # - # Warning about security changes... - # - ewarn "****************** Important changes warning! *********************" - ewarn - ewarn "- Asterisk runs as user asterisk, group asterisk by default" - ewarn - ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk" - ewarn " 750 (directories) / 640 (files)" - ewarn - ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed" - ewarn " to asterisk:asterisk 750 (directories) / 640 (files)" - ewarn - ewarn "- Asterisk's unix socket and pidfile are now in /var/run/asterisk" - ewarn - ewarn "- More information at the end of this emerge" - ewarn - ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732" - ewarn " http://www.voip-info.org/wiki-Asterisk+non-root" - ewarn - einfo "Press Ctrl+C to abort" - echo - ebeep - - n=15 - while [[ $n -gt 0 ]]; do - echo -en " Waiting $n seconds...\r" - sleep 1 - (( n-- )) - done - - # - # Regular checks - # - einfo "Running some pre-flight checks..." - if use resperl; then - # res_perl pre-flight check... - if ! $(perl -V | grep -q "usemultiplicity=define") ||\ - ! built_with_use dev-lang/perl ithreads || ! built_with_use sys-devel/libperl ithreads - then - eerror "Embedded perl add-on needs Perl and libperl with built-in threads support" - eerror "(rebuild perl and libperl with ithreads use-flag enabled)" - die "Perl w/o threads support..." - fi - einfo "Perl with ithreads support found" - fi - - # mysql and postgres voicemail support are mutually exclusive.. - if use vmdbmysql && use vmdbpostgres; then - eerror "MySQL and PostgreSQL Voicemail support are mutually exclusive... choose one!" - die "Conflicting use-flags" - fi - - # check if zaptel and libpri have been built with bri enabled - if use bri; then - if ! built_with_use net-misc/zaptel bri; then - eerror "Re-emerge zaptel with bri use-flag enabled!" - die "Zaptel without bri support detected" - fi - - if ! built_with_use net-libs/libpri bri; then - eerror "Re-emerge libpri with bri use-flag enabled!" - die "Libpri without bri support detected" - fi - fi - - # check if zaptel has been built with ukcid - if use ukcid && ! built_with_use net-misc/zaptel ukcid; then - eerror "Re-emerge zaptel with ukcid useflag enabled!" - die "Zaptel missing ukcid support" - fi -} - -src_unpack() { - unpack ${A} - cd ${S} - - # set cflags & mmx optimization - sed -i -e "s:^\(OPTIMIZE+=\).*:\1 ${CFLAGS}:" \ - -e "s:^\(CFLAGS+=\$(shell if \$(CC)\):#\1:" \ - Makefile - - # hppa patch for gsm codec - epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-hppa.patch - - # mark adsi functions as weak references, things will blow - # on hardened otherwise (bug #100697 and #85655) - epatch ${FILESDIR}/1.0.0/${PN}-1.0.10-weak-references.diff - - # gsm codec still uses -fomit-frame-pointer, and other codecs have their - # own flags. We only change the arch. - sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE=${CFLAGS}:" \ - -e "s:^CFLAGS[\t ]\++=:CFLAGS =:" \ - codecs/gsm/Makefile - - if use mmx; then - if ! use hardened; then - einfo "Enabling mmx optimization" - sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \ - codecs/gsm/Makefile - else - ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!" - - fi - fi - if ! use mmx || use hardened; then - # don't build + link asm mmx object file - # without this codec_gsm.so will include text relocations - sed -i -e "/k6opt\.\(s\|o\)/ d" \ - codecs/gsm/Makefile - fi - - if ! use debug; then - einfo "Disabling debugging" - sed -i -e "s:^\(DEBUG=\):#\1:" Makefile - fi - - # change image path in voicemail cgi - sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi - - # - # embedded perl - # - if use resperl; then - einfo "Patching asterisk for embedded perl support..." - epatch ${S_ADDONS}/res_perl/astmake.diff - - # create necessary .c file - /usr/bin/perl -MExtUtils::Embed -e xsinit || die "Could not create perlxsi.c" - - cd ${S_ADDONS} - - # fix perl path, source location and remove res_musiconhold - sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \ - res_perl/Makefile \ - ${S}/Makefile \ - res_perl/INC/*.pm - sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \ - -e "s:\$(ASTLIBDIR)/modules/res_musiconhold.so::" \ - res_perl/Makefile - - if use bri; then - epatch ${FILESDIR}/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff - fi - - cd ${S} - fi - - # - # uclibc patch - # - if use elibc_uclibc; then - einfo "Patching asterisk for uclibc..." - epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-uclibc-dns.diff - fi - - # - # other patches - # - - # fix lpc10 Makefile, remove the - # CFLAGS+=-march=$(shell uname -m) part - epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-lpc10flags.diff - - # asterisk-config - epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-astcfg-0.0.2.diff - - # - # database voicemail support - # - if use postgres; then - sed -i -e "s:^#\(APPS+=app_sql_postgres.so\):\1:" \ - -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \ - -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \ - apps/Makefile - fi - - if use vmdbpostgres; then - einfo "Enabling PostgreSQL voicemail support" - sed -i -e "s:^\(USE_POSTGRES_VM_INTERFACE\).*:\1=1:" \ - -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \ - -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \ - apps/Makefile - - # patch app_voicemail.c - sed -i -e "s:^#include <postgresql/libpq-fe\.h>:#include \"libpq-fe\.h\":" \ - apps/app_voicemail.c - - elif use vmdbmysql; then - einfo "Enabling MySQL voicemail support" - sed -i -e "s:^\(USE_MYSQL_VM_INTERFACE\).*:\1=1:" \ - -e "s:^\(CFLAGS+=-DUSEMYSQLVM\):\1 -I${S_ADDONS}:" \ - apps/Makefile - fi - - # - # MySQL friends support - # - if use mysqlfriends; then - einfo "Enabling MySQL friends support for SIP and IAX" - sed -i -e "s:^\(USE_MYSQL_FRIENDS\)=.*:\1=1:" \ - -e "s:^\(USE_SIP_MYSQL_FRIENDS\)=.*:\1=1:" \ - channels/Makefile - fi - - # - # asterisk add-ons - # - cd ${S_ADDONS} - sed -i -e "s:-I../asterisk:-I${S} -I${S}/include:" Makefile - sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE+=${CFLAGS}:" \ - -e "s:^\(CFLAGS=\)\(.*\):\1-I${S}/include -fPIC \2:" \ - format_mp3/Makefile - - # - # BRI patches - # - if use bri; then - cd ${S} - einfo "Patching asterisk w/ BRI stuff" - - # remove after new patch has been released - sed -i -e "s:^\([+-]\)1\.0\.10:\11.0.11.1:" \ - ${S_BRI}/patches/asterisk.patch - - epatch ${S_BRI}/patches/asterisk.patch - fi - - # - # Revived snmp plugin support - # -# if use snmp; then -# cd ${S} -# einfo "Patching snmp plugin helper functions" -# epatch ${FILESDIR}/1.0.0/ast-ax-snmp-1.0.6.diff -# fi - - # fix path for non-root - cd ${S} - sed -i -e "s:^\(ASTVARRUNDIR=\).*:\1\$(INSTALL_PREFIX)/var/run/asterisk:" \ - Makefile - - # fix contrib scripts for non-root - epatch ${FILESDIR}/1.0.0/${PN}-1.0.7-scripts.diff - - # add initgroups support to asterisk, this is needed - # to support supplementary groups for the asterisk - # user (start-stop-daemons --chguid breaks realtime priority support) - epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-initgroups.diff - - # UK callerid patch, adds support for british-telecoms callerid to x100p cards - # see http://www.lusyn.com/asterisk/patches.html for more information - use ukcid && \ - epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-ukcid.patch - - # needed for >=freetds-0.63 - if has_version ">=dev-db/freetds-0.63"; then - epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-freetds.diff - fi - - # security fix, bug #111836 - epatch ${FILESDIR}/1.0.0/${PN}-1.0.10-vmail.cgi.patch - - # patch for mISDN - epatch ${FILESDIR}/1.0.0/${PN}-1.0.10-misdn.patch - - # CVE-2006-1827: integer signedness error in format_jpeg (#131096) - epatch ${FILESDIR}/1.0.0/${PN}-1.0-CVE-2006-1827.patch - - # security patches for chan_sip (#169616, #171467) - epatch ${FILESDIR}/1.0.0/${PN}-1.0.12-r2-chan_sip.patch -} - -src_compile() { - # build asterisk first... - einfo "Building Asterisk..." - cd ${S} - emake -j1 || die "Make failed" - - # create api docs - use doc && \ - emake -j1 progdocs - - # - # add-ons - # - einfo "Building additional stuff..." - cd ${S_ADDONS} - emake -j1 || die "Make failed" - - if use resperl; then - cd ${S_ADDONS}/res_perl - emake -j1 || die "Building embedded perl failed" - fi -} - -src_install() { - make DESTDIR=${D} install || die "Make install failed" - make DESTDIR=${D} samples || die "Make install samples failed" - - # install astconf.h, a lot of external modules need this - insinto /usr/include/asterisk - doins astconf.h - - # install addmailbox and astgenkey - dosbin contrib/scripts/addmailbox - dosbin contrib/scripts/astgenkey - - newinitd ${FILESDIR}/1.0.0/asterisk.rc6.sec asterisk - newconfd ${FILESDIR}/1.0.0/asterisk.confd.sec asterisk - - # don't delete these, even if they are empty - keepdir /var/spool/asterisk/voicemail/default/1234/INBOX - keepdir /var/spool/asterisk/tmp - keepdir /var/log/asterisk/cdr-csv - keepdir /var/run/asterisk - - # install standard docs... - dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm - dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README - dodoc doc/README.* - dodoc doc/*.txt - - docinto scripts - dodoc contrib/scripts/* - docinto firmware/iax - dodoc contrib/firmware/iax/* - - # install api docs - if use doc; then - insinto /usr/share/doc/${PF}/api/html - doins doc/api/html/* - fi - - insinto /usr/share/doc/${PF}/cgi - doins contrib/scripts/vmail.cgi - doins images/*.gif - - # - # add-ons - # - - # install additional modules... - einfo "Installing additional modules..." - cd ${S_ADDONS} - make INSTALL_PREFIX=${D} install || die "Make install failed" - - if use resperl; then - perlinfo - - cd ${S_ADDONS}/res_perl - make INSTALL_PREFIX=${D} install || die "Installation of perl AST_API failed" - - # move AstApiBase.so to a proper place - dodir ${VENDOR_LIB}/auto/AstAPIBase - mv ${D}/etc/asterisk/perl/AstAPIBase.so ${D}${VENDOR_LIB}/auto/AstAPIBase - - # move *.pm files to other location - dodir ${VENDOR_LIB}/AstAPI - dodir ${VENDOR_LIB}/AstAPIBase - for x in AstAPI.pm AstConfig.pm LoadFile.pm PerlSwitch.pm WebServer.pm; do - mv ${D}/etc/asterisk/perl/${x} ${D}${VENDOR_LIB}/AstAPI - dosed "s/^use[\t ]\+${x/.pm/};/use AstAPI::${x/.pm/};/" /etc/asterisk/perl/asterisk_init.pm - done - mv ${D}/etc/asterisk/perl/AstAPIBase.pm ${D}${VENDOR_LIB}/AstAPIBase - dosed "s/^use[\t ]\+AstAPI;/use AstAPI::AstAPI;/" /etc/asterisk/perl/asterisk_init.pm - dosed "s/^use[\t ]\+AstAPIBase;/use AstAPIBase::AstAPIBase;/" ${VENDOR_LIB}/AstAPI/AstAPI.pm - - # move apps + htdocs to a proper place - dodir /var/lib/asterisk/perl - mv ${D}/etc/asterisk/perl/{apps,htdocs} ${D}/var/lib/asterisk/perl - - # fix locations - sed -i -e "s:/etc/asterisk/perl:/var/lib/asterisk/perl:" \ - ${D}${VENDOR_LIB}/AstAPI/LoadFile.pm ${D}${VENDOR_LIB}/AstAPI/WebServer.pm - fi -} - -pkg_preinst() { - einfo "Adding asterisk user and group" - enewgroup asterisk - enewuser asterisk -1 -1 /var/lib/asterisk asterisk -} - -pkg_postinst() { - # - # Change permissions and ownerships of asterisk - # directories and files - # - einfo "Fixing permissions and ownerships" - # fix permissions in /var/... - 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 - - # - # Fix locations for old installations (pre-non-root versions) - # - if [[ -z "$(grep "/var/run/asterisk" ${ROOT}etc/asterisk/asterisk.conf)" ]] - then - elog "Fixing astrundir in ${ROOT}etc/asterisk/asterisk.conf" - mv -f ${ROOT}etc/asterisk/asterisk.conf \ - ${ROOT}etc/asterisk/asterisk.conf.bak - sed -e "s:^\(astrundir[\t ]=>\).*:\1 /var/run/asterisk:" \ - ${ROOT}etc/asterisk/asterisk.conf.bak >\ - ${ROOT}etc/asterisk/asterisk.conf - elog "Backup has been saved as ${ROOT}etc/asterisk/asterisk.conf.bak" - fi - - # - # Some messages - # - einfo "Asterisk has been installed" - einfo "" - elog "to add new Mailboxes use: /usr/sbin/addmailbox" - elog - elog "If you want to know more about asterisk, visit these sites:" - elog "http://www.asteriskdocs.org/" - elog "http://www.voip-info.org/wiki-Asterisk" - elog - elog "http://www.automated.it/guidetoasterisk.htm" - elog - elog "Gentoo VoIP IRC Channel:" - elog "#gentoo-voip @ irc.freenode.net" - - # - # Warning about security changes... - # - ewarn "*********************** Important changes **************************" - ewarn - ewarn "- Asterisk runs as user asterisk, group asterisk by default" - ewarn - ewarn "- Make sure the asterisk user is a member of the proper groups if you want it" - ewarn " to have access to hardware devices, e.g. \"audio\" for Alsa and OSS sound or" - ewarn " \"dialout\" for zaptel!" - 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" -} diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0-CVE-2006-1827.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0-CVE-2006-1827.patch deleted file mode 100644 index 41e646725c7a..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0-CVE-2006-1827.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: formats/format_jpeg.c -=================================================================== ---- formats/format_jpeg.c (.../1.2.6) (revision 19610) -+++ formats/format_jpeg.c (.../1.2.7) (revision 19610) -@@ -55,7 +55,7 @@ - struct ast_frame fr; - int res; - char buf[65536]; -- if (len > sizeof(buf)) { -+ if (len > sizeof(buf) || len < 0) { - ast_log(LOG_WARNING, "JPEG image too large to read\n"); - return NULL; - } diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-misdn.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-misdn.patch deleted file mode 100644 index a11b23dfb895..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-misdn.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: channel.c -=================================================================== -RCS file: /usr/cvsroot/asterisk/channel.c,v -retrieving revision 1.139.2.11 -diff -u -r1.139.2.11 channel.c ---- channel.c 5 Aug 2005 00:02:09 -0000 1.139.2.11 -+++ channel.c 11 Oct 2005 04:20:20 -0000 -@@ -381,6 +381,12 @@ - } - ast_mutex_lock(&chan->lock); - prev = NULL; -+ -+ if (!chan->pvt ) { -+ ast_log(LOG_WARNING, "chan->pvt == NULL!!"); -+ ast_mutex_unlock(&chan->lock); -+ return -1; -+ } - cur = chan->pvt->readq; - while(cur) { - if ((cur->frametype == AST_FRAME_CONTROL) && (cur->subclass == AST_CONTROL_HANGUP)) { diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-vmail.cgi.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-vmail.cgi.patch deleted file mode 100644 index a441ee0b2eae..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-vmail.cgi.patch +++ /dev/null @@ -1,260 +0,0 @@ ---- trunk/contrib/scripts/vmail.cgi 2004/09/15 05:11:41 3781 -+++ trunk/contrib/scripts/vmail.cgi 2005/10/30 16:30:35 6896 -@@ -11,10 +11,15 @@ - # (icky, I know.... if you know better perl please help!) - # - # -+# Synchronization added by GDS Partners (www.gdspartners.com) -+# Stojan Sljivic (stojan.sljivic@gdspartners.com) -+# - use CGI qw/:standard/; - use Carp::Heavy; - use CGI::Carp qw(fatalsToBrowser); - use DBI; -+use Fcntl qw ( O_WRONLY O_CREAT O_EXCL ); -+use Time::HiRes qw ( usleep ); - - $context=""; # Define here your by default context (so you dont need to put voicemail@context in the login - -@@ -44,6 +49,57 @@ - $footer = "<hr><font size=-1><a href=\"http://www.asterisk.org\">The Asterisk Open Source PBX</a> Copyright 2004, <a href=\"http://www.digium.com\">Digium, Inc.</a></a>"; - $stdcontainerend = "</td></tr><tr><td align=right>$footer</td></tr></table>\n"; - -+sub lock_path() { -+ -+ my($path) = @_; -+ my $rand; -+ my $rfile; -+ my $start; -+ my $res; -+ -+ $rand = rand 99999999; -+ $rfile = "$path/.lock-$rand"; -+ -+ sysopen(RFILE, $rfile, O_WRONLY | O_CREAT | O_EXCL, 0666) or return -1; -+ close(RFILE); -+ -+ $res = link($rfile, "$path/.lock"); -+ $start = time; -+ if ($res == 0) { -+ while (($res == 0) && (time - $start <= 5)) { -+ $res = link($rfile, "$path/.lock"); -+ usleep(1); -+ } -+ } -+ unlink($rfile); -+ -+ if ($res == 0) { -+ return -1; -+ } else { -+ return 0; -+ } -+} -+ -+sub unlock_path() { -+ -+ my($path) = @_; -+ -+ unlink("$path/.lock"); -+} -+ -+sub untaint() { -+ -+ my($data) = @_; -+ -+ if ($data =~ /^([-\@\w.]+)$/) { -+ $data = $1; -+ } else { -+ die "Security violation."; -+ } -+ -+ return $data; -+} -+ - sub login_screen() { - print header; - my ($message) = @_; -@@ -120,7 +176,7 @@ - - # db variables are present. Use db for authentication. - my $dbh = DBI->connect("DBI:mysql:$dbname:$dbhost",$dbuser,$dbpass); -- my $sth = $dbh->prepare(qq{select fullname,context from users where mailbox='$mbox' and password='$pass' and context='$context'}); -+ my $sth = $dbh->prepare(qq{select fullname,context from voicemail where mailbox='$mbox' and password='$pass' and context='$context'}); - $sth->execute(); - if (($fullname, $category) = $sth->fetchrow_array()) {; - return ($fullname ? $fullname : "Extension $mbox in $context",$category); -@@ -184,7 +240,7 @@ - - # db variables are present. Use db for authentication. - my $dbh = DBI->connect("DBI:mysql:$dbname:$dbhost",$dbuser,$dbpass); -- my $sth = $dbh->prepare(qq{select fullname,context from users where mailbox='$mbox' and password='$pass' and context='$context'}); -+ my $sth = $dbh->prepare(qq{select fullname,context from voicemail where mailbox='$mbox' and password='$pass' and context='$context'}); - $sth->execute(); - if (($fullname, $category) = $sth->fetchrow_array()) {; - return ($fullname ? $fullname : "unknown", $category); -@@ -242,7 +298,7 @@ - - # db variables are present. Use db for authentication. - my $dbh = DBI->connect("DBI:mysql:$dbname:$dbhost",$dbuser,$dbpass); -- my $sth = $dbh->prepare(qq{select mailbox,fullname,context from users where context='$context' order by mailbox}); -+ my $sth = $dbh->prepare(qq{select mailbox,fullname,context from voicemail where context='$context' order by mailbox}); - $sth->execute(); - while (($mailbox, $fullname, $category) = $sth->fetchrow_array()) { - $text = $mailbox; -@@ -489,14 +545,16 @@ - sub message_audio() - { - my ($forcedownload) = @_; -- my $folder = param('folder'); -- my $msgid = param('msgid'); -- my $mailbox = param('mailbox'); -- my $context = param('context'); -+ my $folder = &untaint(param('folder')); -+ my $msgid = &untaint(param('msgid')); -+ my $mailbox = &untaint(param('mailbox')); -+ my $context = &untaint(param('context')); - my $format = param('format'); - if (!$format) { - $format = &getcookie('format'); - } -+ &untaint($format); -+ - my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msgid}.$format"; - - $msgid =~ /^\d\d\d\d$/ || die("Msgid Liar ($msgid)!"); -@@ -719,6 +777,8 @@ - } - - my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$newfolder"; -+ $path =~ /^(.*)$/; -+ $path = $1; - mkdir $path, 0770; - my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder"; - opendir(DIR, $path) || die("Unable to open directory\n"); -@@ -742,6 +802,10 @@ - my ($orig, $new) = @_; - my $res; - my $data; -+ $orig =~ /^(.*)$/; -+ $orig = $1; -+ $new =~ /^(.*)$/; -+ $new = $1; - open(IN, "<$orig") || die("Unable to open '$orig'\n"); - open(OUT, ">$new") || DIE("Unable to open '$new'\n"); - while(($res = sysread(IN, $data, 4096)) > 0) { -@@ -788,8 +852,12 @@ - } - - my $path = "/var/spool/asterisk/voicemail/$context/$newmbox"; -+ $path =~ /^(.*)$/; -+ $path = $1; - mkdir $path, 0770; - my $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX"; -+ $path =~ /^(.*)$/; -+ $path = $1; - mkdir $path, 0770; - my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$oldfolder"; - opendir(DIR, $path) || die("Unable to open directory\n"); -@@ -863,19 +931,29 @@ - die("Bah! Not a valid mailbox '$newmbox'\n"); - return ""; - } -- $msgcount = &msgcount($context, $newmbox, "INBOX"); -+ - my $txt; -- if ($newmbox ne $mbox) { --# print header; -- foreach $msg (@msgs) { --# print "Forwarding $msg from $mbox to $newmbox<BR>\n"; -- &message_copy($context, $mbox, $newmbox, $folder, $msg, sprintf "%04d", $msgcount); -- $msgcount++; -+ $context = &untaint($context); -+ $newmbox = &untaint($newmbox); -+ my $path = "/var/spool/asterisk/voicemail/$context/$newmbox/INBOX"; -+ if (&lock_path($path) == 0) { -+ $msgcount = &msgcount($context, $newmbox, "INBOX"); -+ -+ if ($newmbox ne $mbox) { -+# print header; -+ foreach $msg (@msgs) { -+# print "Forwarding $msg from $mbox to $newmbox<BR>\n"; -+ &message_copy($context, $mbox, $newmbox, $folder, $msg, sprintf "%04d", $msgcount); -+ $msgcount++; -+ } -+ $txt = "Forwarded messages " . join(', ', @msgs) . "to $newmbox"; -+ } else { -+ $txt = "Can't forward messages to yourself!\n"; - } -- $txt = "Forwarded messages " . join(', ', @msgs) . "to $newmbox"; -+ &unlock_path($path); - } else { -- $txt = "Can't forward messages to yourself!\n"; -- } -+ $txt = "Cannot forward messages: Unable to lock path.\n"; -+ } - if ($toindex) { - &message_index($folder, $txt); - } else { -@@ -900,33 +978,42 @@ - $context = "default"; - } - my $passwd = param('password'); -- my $msgcount = &msgcount($context, $mbox, $folder); -- my $omsgcount = &msgcount($context, $mbox, $newfolder) if $newfolder; --# print header; -- if ($newfolder ne $folder) { -- $y = 0; -- for ($x=0;$x<$msgcount;$x++) { -- my $msg = sprintf "%04d", $x; -- my $newmsg = sprintf "%04d", $y; -- if (grep(/^$msg$/, @msgs)) { -- if ($newfolder) { -- &message_rename($context, $mbox, $folder, $msg, $newfolder, sprintf "%04d", $omsgcount); -- $omsgcount++; -+ $context = &untaint($context); -+ $mbox = &untaint($mbox); -+ $folder = &untaint($folder); -+ my $path = "/var/spool/asterisk/voicemail/$context/$mbox/$folder"; -+ if (&lock_path($path) == 0) { -+ my $msgcount = &msgcount($context, $mbox, $folder); -+ my $omsgcount = &msgcount($context, $mbox, $newfolder) if $newfolder; -+ # print header; -+ if ($newfolder ne $folder) { -+ $y = 0; -+ for ($x=0;$x<$msgcount;$x++) { -+ my $msg = sprintf "%04d", $x; -+ my $newmsg = sprintf "%04d", $y; -+ if (grep(/^$msg$/, @msgs)) { -+ if ($newfolder) { -+ &message_rename($context, $mbox, $folder, $msg, $newfolder, sprintf "%04d", $omsgcount); -+ $omsgcount++; -+ } else { -+ &message_delete($context, $mbox, $folder, $msg); -+ } - } else { -- &message_delete($context, $mbox, $folder, $msg); -+ &message_rename($context, $mbox, $folder, $msg, $folder, $newmsg); -+ $y++; - } -+ } -+ if ($del) { -+ $txt = "Deleted messages " . join (', ', @msgs); - } else { -- &message_rename($context, $mbox, $folder, $msg, $folder, $newmsg); -- $y++; -+ $txt = "Moved messages " . join (', ', @msgs) . " to $newfolder"; - } -- } -- if ($del) { -- $txt = "Deleted messages " . join (', ', @msgs); - } else { -- $txt = "Moved messages " . join (', ', @msgs) . " to $newfolder"; -+ $txt = "Can't move a message to the same folder they're in already"; - } -+ &unlock_path($path); - } else { -- $txt = "Can't move a message to the same folder they're in already"; -+ $txt = "Cannot move/delete messages: Unable to lock path.\n"; - } - # Not as many messages now - $msgcount--; diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-weak-references.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-weak-references.diff deleted file mode 100644 index 90bc007b16de..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.10-weak-references.diff +++ /dev/null @@ -1,229 +0,0 @@ ---- asterisk-1.0.10/include/asterisk/adsi.h.orig 2005-06-25 00:27:10.000000000 +0200 -+++ asterisk-1.0.10/include/asterisk/adsi.h 2005-11-22 22:45:31.000000000 +0100 -@@ -118,11 +118,14 @@ - * Returns 0 on success (or adsi unavailable) and -1 on hangup - * - */ --extern int adsi_channel_init(struct ast_channel *chan); -+extern int adsi_channel_init(struct ast_channel *chan) -+ __attribute__ ((weak)); - --extern int adsi_begin_download(struct ast_channel *chan, char *service, char *fdn, char *sec, int version); -+extern int adsi_begin_download(struct ast_channel *chan, char *service, char *fdn, char *sec, int version) -+ __attribute__ ((weak)); - --extern int adsi_end_download(struct ast_channel *chan); -+extern int adsi_end_download(struct ast_channel *chan) -+ __attribute__ ((weak)); - - //! Restore ADSI initialization (for applications that play with ADSI - // and want to restore it to normal. If you touch "INFO" then you -@@ -133,7 +136,8 @@ - * Returns 0 on success (or adsi unavailable) and -1 on hangup - * - */ --extern int adsi_channel_restore(struct ast_channel *chan); -+extern int adsi_channel_restore(struct ast_channel *chan) -+ __attribute__ ((weak)); - - //! Display some stuff on the screen - /*! -@@ -145,7 +149,8 @@ - * Return 0 on success (or adsi unavailable) and -1 on hangup - * - */ --extern int adsi_print(struct ast_channel *chan, char **lines, int *align, int voice); -+extern int adsi_print(struct ast_channel *chan, char **lines, int *align, int voice) -+ __attribute__ ((weak)); - - //! Check if scripts for a given app are already loaded. Version may be -1 - // if any version is okay, or 0-255 for a specific version. -@@ -158,18 +163,24 @@ - * Returns 0 if scripts is not loaded or not an ADSI CPE. Returns -1 - * on hangup. Returns 1 if script already loaded. - */ --extern int adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data); --extern int adsi_unload_session(struct ast_channel *chan); -+extern int adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data) -+ __attribute__ ((weak)); -+extern int adsi_unload_session(struct ast_channel *chan) -+ __attribute__ ((weak)); - - /* ADSI Layer 2 transmission functions */ --extern int adsi_transmit_messages(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype); --extern int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype); --extern int adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait); -+extern int adsi_transmit_messages(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype) -+ __attribute__ ((weak)); -+extern int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype) -+ __attribute__ ((weak)); -+extern int adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait) -+ __attribute__ ((weak)); - //! Read some encoded DTMF data. - /*! - * Returns number of bytes received - */ --extern int adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen); -+extern int adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen) -+ __attribute__ ((weak)); - - /* ADSI Layer 3 creation functions */ - -@@ -183,14 +194,17 @@ - * - */ - --extern int adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver); -+extern int adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver) -+ __attribute__ ((weak)); - - //! Build Query CPE ID of equipment */ - /*! - * Returns number of bytes added to message - */ --extern int adsi_query_cpeid(unsigned char *buf); --extern int adsi_query_cpeinfo(unsigned char *buf); -+extern int adsi_query_cpeid(unsigned char *buf) -+ __attribute__ ((weak)); -+extern int adsi_query_cpeinfo(unsigned char *buf) -+ __attribute__ ((weak)); - - //! Get CPE ID from an attached ADSI compatible CPE. - /*! -@@ -198,9 +212,11 @@ - * or -1 on hangup, or 0 if there was no hangup but it failed to find the - * device ID. Returns to voice mode if "voice" is non-zero. - */ --extern int adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice); -+extern int adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice) -+ __attribute__ ((weak)); - --extern int adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice); -+extern int adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice) -+ __attribute__ ((weak)); - - //! Begin an ADSI script download */ - /*! -@@ -214,7 +230,8 @@ - * - */ - --extern int adsi_download_connect(unsigned char *buf, unsigned char *service, unsigned char *fdn, unsigned char *sec, int ver); -+extern int adsi_download_connect(unsigned char *buf, unsigned char *service, unsigned char *fdn, unsigned char *sec, int ver) -+ __attribute__ ((weak)); - - //! Disconnects a running session - /*! -@@ -223,7 +240,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_disconnect_session(unsigned char *buf); -+extern int adsi_disconnect_session(unsigned char *buf) -+ __attribute__ ((weak)); - - //! Disconnects (and hopefully saves) a downloaded script - /*! -@@ -232,7 +250,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_download_disconnect(unsigned char *buf); -+extern int adsi_download_disconnect(unsigned char *buf) -+ __attribute__ ((weak)); - - //! Puts CPE in data mode... - /*! -@@ -241,9 +260,12 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_data_mode(unsigned char *buf); --extern int adsi_clear_soft_keys(unsigned char *buf); --extern int adsi_clear_screen(unsigned char *buf); -+extern int adsi_data_mode(unsigned char *buf) -+ __attribute__ ((weak)); -+extern int adsi_clear_soft_keys(unsigned char *buf) -+ __attribute__ ((weak)); -+extern int adsi_clear_screen(unsigned char *buf) -+ __attribute__ ((weak)); - - //! Puts CPE in voice mode... - /*! -@@ -253,14 +275,16 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_voice_mode(unsigned char *buf, int when); -+extern int adsi_voice_mode(unsigned char *buf, int when) -+ __attribute__ ((weak)); - - //! Returns non-zero if Channel does or might support ADSI - /*! - * \param chan Channel to check - * - */ --extern int adsi_available(struct ast_channel *chan); -+extern int adsi_available(struct ast_channel *chan) -+ __attribute__ ((weak)); - - //! Loads a line of info into the display */ - /*! -@@ -276,7 +300,8 @@ - * - */ - --extern int adsi_display(unsigned char *buf, int page, int line, int just, int wrap, unsigned char *col1, unsigned char *col2); -+extern int adsi_display(unsigned char *buf, int page, int line, int just, int wrap, unsigned char *col1, unsigned char *col2) -+ __attribute__ ((weak)); - - //! Sets the current line and page */ - /*! -@@ -288,7 +313,8 @@ - * - */ - --extern int adsi_set_line(unsigned char *buf, int page, int line); -+extern int adsi_set_line(unsigned char *buf, int page, int line) -+ __attribute__ ((weak)); - - //! Creates "load soft key" parameters - /*! -@@ -302,7 +328,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_load_soft_key(unsigned char *buf, int key, unsigned char *llabel, unsigned char *slabel, unsigned char *ret, int data); -+extern int adsi_load_soft_key(unsigned char *buf, int key, unsigned char *llabel, unsigned char *slabel, unsigned char *ret, int data) -+ __attribute__ ((weak)); - - //! Set which soft keys should be displayed - /*! -@@ -313,7 +340,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_set_keys(unsigned char *buf, unsigned char *keys); -+extern int adsi_set_keys(unsigned char *buf, unsigned char *keys) -+ __attribute__ ((weak)); - - //! Set input information - /*! -@@ -327,7 +355,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just); -+extern int adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just) -+ __attribute__ ((weak)); - - //! Set input format - /*! -@@ -341,5 +370,6 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_input_format(unsigned char *buf, int num, int dir, int wrap, unsigned char *format1, unsigned char *format2); -+extern int adsi_input_format(unsigned char *buf, int num, int dir, int wrap, unsigned char *format1, unsigned char *format2) -+ __attribute__ ((weak)); - #endif diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.12-r2-chan_sip.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.12-r2-chan_sip.patch deleted file mode 100644 index ef79a5371023..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.12-r2-chan_sip.patch +++ /dev/null @@ -1,30 +0,0 @@ -Ports from <http://svn.digium.com/view/asterisk?rev=57478&view=rev>, -<http://svn.digium.com/view/asterisk?rev=59038&view=rev> -More information at <http://bugs.gentoo.org/169616> and -<http://bugs.gentoo.org/171467>. ---- asterisk-1.0.12/channels/chan_sip.c 2005-11-29 13:24:39.000000000 -0500 -+++ asterisk-1.0.12-r2/channels/chan_sip.c 2007-03-19 15:32:08.000000000 -0400 -@@ -7293,6 +7293,12 @@ - increasing */ - p->icseq = seqno; - -+ if (!e && (strcasecmp(cmd, "INVITE") == 0 || strcasecmp(cmd, "SUBSCRIBE") == 0 || strcasecmp(cmd, "REGISTER") == 0 || strcasecmp(cmd, "NOTIFY") == 0)) { -+ transmit_response(p, "503 Server error", req); -+ p->needdestroy = 1; -+ return -1; -+ } -+ - /* Initialize the context if it hasn't been already */ - if (!strcasecmp(cmd, "OPTIONS")) { - res = get_destination(p, req); -@@ -7790,6 +7796,10 @@ - if (sscanf(e, "%i %n", &respid, &len) != 1) { - ast_log(LOG_WARNING, "Invalid response: '%s'\n", e); - } else { -+ if (respid <= 0) { -+ ast_log(LOG_WARNING, "Invalid SIP response code: '%d'\n", respid); -+ return 0; -+ } - handle_response(p, respid, e + len, req,ignore); - } - } else { diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff deleted file mode 100644 index 9d977a05fd7f..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-astcfg-0.0.2.diff +++ /dev/null @@ -1,216 +0,0 @@ -diff -Nau asterisk-1.0.2-orig/Makefile asterisk-1.0.2/Makefile ---- asterisk-1.0.2-orig/Makefile 2004-10-03 20:37:37.000000000 +0200 -+++ asterisk-1.0.2/Makefile 2004-11-21 23:09:08.969201360 +0100 -@@ -221,6 +221,7 @@ - - CC=gcc - INSTALL=install -+SED=sed - - _all: all - @echo " +--------- Asterisk Build Complete ---------+" -@@ -231,7 +232,7 @@ - @echo " + $(MAKE) install +" - @echo " +-------------------------------------------+" - --all: depend asterisk subdirs -+all: depend asterisk asterisk-config subdirs - - editline/config.h: - cd editline && unset CFLAGS LIBS && ./configure ; \ -@@ -295,6 +296,20 @@ - asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS) - $(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS) - -+asterisk-config: asterisk-config.in -+ $(SED) \ -+ -e "s:@SOLINK@:$(SOLINK):" -e "s:@VERSION@:$(ASTERISKVERSION):" \ -+ -e "s:@ETCDIR@:$(ASTETCDIR):" -e "s:@LIBDIR@:$(ASTLIBDIR):" \ -+ -e "s:@CFLAGS@:$(CFLAGS):" -e "s:@VARRUNDIR@:$(ASTVARRUNDIR):" \ -+ -e "s:@LIBS@:$(LIBS):" -e "s:@VARLIBDIR@:$(ASTVARLIBDIR):" \ -+ -e "s:@LOGDIR@:$(ASTLOGDIR):" -e "s:@SPOOLDIR@:$(ASTSPOOLDIR):" \ -+ -e "s:@AGIDIR@:$(AGI_DIR):" -e "s:@MODDIR@:$(MODULES_DIR):" \ -+ -e "s:@BINDIR@:$(ASTBINDIR):" -e "s:@SBINDIR@:$(ASTSBINDIR):" \ -+ -e "s:@MANDIR@:$(ASTMANDIR):" \ -+ -e "s:@INCDIR@:$(ASTHEADERDIR):" \ -+ -e "s:@PREFIX@:$(INSTALL_PREFIX):" \ -+ asterisk-config.in > $@ -+ - muted: muted.o - $(CC) -o muted muted.o - -@@ -303,7 +318,7 @@ - - clean: - for x in $(SUBDIRS); do $(MAKE) -C $$x clean || exit 1 ; done -- rm -f *.o *.so asterisk .depend -+ rm -f *.o *.so asterisk .depend asterisk-config - rm -f build.h - rm -f ast_expr.c - @if [ -e editline/Makefile ]; then $(MAKE) -C editline distclean ; fi -@@ -373,6 +388,7 @@ - mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail - mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp - install -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/ -+ install -m 755 asterisk-config $(DESTDIR)$(ASTBINDIR)/ - install -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/ - if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \ - install -m 755 contrib/scripts/safe_asterisk $(DESTDIR)$(ASTSBINDIR)/ ;\ -Common subdirectories: asterisk-1.0.2-orig/agi and asterisk-1.0.2/agi -Common subdirectories: asterisk-1.0.2-orig/apps and asterisk-1.0.2/apps -diff -Nau asterisk-1.0.2-orig/asterisk-config.in asterisk-1.0.2/asterisk-config.in ---- asterisk-1.0.2-orig/asterisk-config.in 1970-01-01 01:00:00.000000000 +0100 -+++ asterisk-1.0.2/asterisk-config.in 2004-11-21 23:11:29.129893696 +0100 -@@ -0,0 +1,152 @@ -+#!/bin/sh -+# -+# asterisk-config -+# -+# Copyright (C) 2004 Stefan Knoblich <stkn@gentoo.org> -+# -+ -+# /* -+# Changes: -+# -+# 0.0.2 (stkn: 20041121) -+# Clean-ups, renamed some options (more configure alike) -+# -+# 0.0.1 (stkn: 20041114) -+# Yeah it's ugly as hell, but it does it's job -+# */ -+ -+## -+# These get replaced by sed... -+# -+ -+SOLINK='@SOLINK@' -+CFLAGS='@CFLAGS@' -+LIBS='@LIBS@' -+ -+AST_PREFIX=@PREFIX@ -+AST_LIBDIR=@LIBDIR@ -+AST_ETCDIR=@ETCDIR@ -+AST_MODDIR=@MODDIR@ -+AST_AGIDIR=@AGIDIR@ -+AST_INCDIR=@INCDIR@ -+AST_MANDIR=@MANDIR@ -+AST_LOGDIR=@LOGDIR@ -+AST_VARLIBDIR=@VARLIBDIR@ -+AST_VARRUNDIR=@VARRUNDIR@ -+AST_SPOOLDIR=@SPOOLDIR@ -+AST_CONFPATH=@CFGPATH@ -+AST_VERSION=@VERSION@ -+ -+## -+# Don't even think about touching anything below... -+# -+ -+usage() { -+ echo "asterisk-config <options>" -+ echo "" -+ echo "* About asterisk (outputs first option only)" -+ echo "" -+ echo " --version | -v Asterisk version" -+ echo "" -+ echo "* Build time stuff" -+ echo "" -+ echo " --libs Libraries used by asterisk" -+ echo " --cflags Cflags used during building" -+ echo " --solink Option for linking modules" -+ echo "" -+ echo "* Paths" -+ echo "" -+ echo " --prefix Installation prefix" -+ echo " --bindir Location of user-accessible binaries" -+ echo " --sbindir Location of system binaries" -+ echo " --sysconfdir Directory for config files" -+ echo " --mandir Place for man-pages" -+ echo " --libdir Libraries are put there" -+ echo " --modulesdir Asterisk keeps it's modules here" -+ echo " --agidir AGI files belong there" -+ echo " --logdir The place for logfiles" -+ echo " --spooldir Asterisk's spool directory" -+ echo " --includesdir Include files" -+ echo "" -+} -+ -+ -+if [ $# -lt 1 ]; then -+ usage -+ exit 0 -+fi -+ -+# -+# single-use options -+# -+while [ $# -gt 0 ]; do -+ case $1 in -+ --help|-h) -+ usage -+ ;; -+ --version|-v) -+ echo ${AST_VERSION} -+ ;; -+ # paths -+ --prefix) -+ echo -n ${AST_PREFIX} -+ ;; -+ --sysconfdir) -+ echo -n ${AST_ETCDIR} -+ ;; -+ --libexecdir|--sbindir) -+ echo -n ${AST_SBINDIR} -+ ;; -+ --bindir) -+ echo -n ${AST_BINDIR} -+ ;; -+ --modulesdir) -+ echo -n ${AST_MODDIR} -+ ;; -+ --agidir) -+ echo -n ${AST_AGIDIR} -+ ;; -+ --mandir) -+ echo -n ${AST_MANDIR} -+ ;; -+ --logdir) -+ echo -n ${AST_LOGDIR} -+ ;; -+ --includedir) -+ echo -n ${AST_INCDIR} -+ ;; -+ --spooldir) -+ echo -n ${AST_SPOOLDIR} -+ ;; -+ --libdir) -+ echo -n ${AST_LIBDIR} -+ ;; -+ --varrundir) -+ echo -n ${AST_VARRUNDIR} -+ ;; -+ --varlibdir) -+ echo -n ${AST_VARLIBDIR} -+ ;; -+ # flags and stuff -+ --solink) -+ echo -n ${SOLINK} -+ ;; -+ --cflags) -+ echo -n ${CFLAGS} -+ # skip if asterisk includes are inside default include path -+ # (/usr/include/asterisk...) -+ if [ `dirname ${AST_INCDIR}` != "/usr/include" ]; then -+ echo -n " -I${AST_INCDIR}" -+ fi -+ ;; -+ --libs) -+ echo -n ${LIBS} -+ ;; -+ esac -+ shift -+done -+exit 0 -+ -+## -+# The End -+# diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-hppa.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-hppa.patch deleted file mode 100644 index 569db12f027b..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-hppa.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -uNr asterisk-1.0.5.orig/codecs/gsm/Makefile asterisk-1.0.5/codecs/gsm/Makefile ---- asterisk-1.0.5.orig/codecs/gsm/Makefile 2005-02-19 21:49:10.060313408 +0100 -+++ asterisk-1.0.5/codecs/gsm/Makefile 2005-02-19 21:49:46.176822864 +0100 -@@ -217,12 +217,16 @@ - ifneq ($(shell uname -m),ppc) - ifneq ($(shell uname -m),alpha) - ifneq ($(shell uname -m),sparc64) -+ifneq ($(shell uname -m),parisc) -+ifneq ($(shell uname -m),parisc64) - GSM_SOURCES+= $(SRC)/k6opt.s - endif - endif - endif - endif - endif -+endif -+endif - - TOAST_SOURCES = $(SRC)/toast.c \ - $(SRC)/toast_lin.c \ -@@ -273,12 +277,16 @@ - ifneq ($(shell uname -m), ppc) - ifneq ($(shell uname -m), alpha) - ifneq ($(shell uname -m), sparc64) -+ifneq ($(shell uname -m), parisc) -+ifneq ($(shell uname -m), parisc64) - GSM_OBJECTS+= $(SRC)/k6opt.o - endif - endif - endif - endif - endif -+endif -+endif - - TOAST_OBJECTS = $(SRC)/toast.o \ - $(SRC)/toast_lin.o \ diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-lpc10flags.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-lpc10flags.diff deleted file mode 100644 index 8b828e3fafed..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-lpc10flags.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- asterisk-1.0.9/codecs/lpc10/Makefile.orig 2005-09-08 00:29:27.000000000 +0200 -+++ asterisk-1.0.9/codecs/lpc10/Makefile 2005-09-08 00:30:15.000000000 +0200 -@@ -22,30 +22,7 @@ - # - - WARNINGS = -Wall -Wno-comment -Wno-error --CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC --#CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi) -- --#fix for PPC processors and ALPHA, And UltraSparc too --ifneq ($(OSARCH),Darwin) --ifneq ($(findstring BSD,${OSARCH}),BSD) --ifneq ($(PROC),ppc) --ifneq ($(PROC),x86_64) --ifneq ($(PROC),alpha) --#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. --#This works for even old (2.96) versions of gcc and provides a small boost either way. --#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it. --#So we go lowest common available by gcc and go a step down, still a step up from --#the default as we now have a better instruction set to work with. - Belgarath --ifeq ($(PROC),ultrasparc) -- CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer --else -- CFLAGS+= -march=$(PROC) --endif --endif --endif --endif --endif --endif -+CFLAGS = $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC - - LIB = $(LIB_TARGET_DIR)/liblpc10.a - diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff deleted file mode 100644 index 7a9da8032690..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.5-speex.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- asterisk-1.0.5/codecs/Makefile.orig 2005-02-10 09:59:42.303104992 +0100 -+++ asterisk-1.0.5/codecs/Makefile 2005-02-10 10:00:49.988815200 +0100 -@@ -19,18 +19,16 @@ - #MODG723=codec_g723_1.so codec_g723_1b.so - MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so") - MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so") --MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/local/include/speex.h ] || [ -f /usr/local/include/speex/speex.h ] && echo "codec_speex.so") -+MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/include/speex/speex.h ] && echo "codec_speex.so") - MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so") - CFLAGS+=-fPIC --CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include") --CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex") -+CFLAGS+=$(shell [ -f /usr/include/speex/speex.h ] && echo "-I/usr/include/speex") - - LIBG723=g723.1/libg723.a - LIBG723B=g723.1b/libg723b.a - LIBGSM=gsm/lib/libgsm.a - LIBGSMT=gsm/lib/libgsm.a - LIBLPC10=lpc10/liblpc10.a --LIBSPEEX=$(shell [ -f /usr/local/lib/libspeex.a ] && echo "-L/usr/local/lib") - LIBSPEEX+=-lspeex -lm - LIBILBC=ilbc/libilbc.a - diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-initgroups.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-initgroups.diff deleted file mode 100644 index 98ae11aa180c..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-initgroups.diff +++ /dev/null @@ -1,64 +0,0 @@ ---- asterisk-1.0.7/asterisk.c.orig 2005-05-12 21:33:21.000000000 +0200 -+++ asterisk-1.0.7/asterisk.c 2005-05-12 21:38:33.000000000 +0200 -@@ -1581,7 +1581,9 @@ int main(int argc, char *argv[]) - int num; - char *buf; - char *runuser=NULL, *rungroup=NULL; -- struct pollfd silly_macos[1]; -+ struct pollfd silly_macos[1]; -+ gid_t runasgid = 0; -+ uid_t runasuid = 0; - - /* Remember original args for restart */ - if (argc > sizeof(_argv) / sizeof(_argv[0]) - 1) { -@@ -1701,17 +1703,9 @@ int main(int argc, char *argv[]) - ast_log(LOG_WARNING, "No such group '%s'!\n", rungroup); - exit(1); - } -- if (setgid(gr->gr_gid)) { -- ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", gr->gr_gid, rungroup); -- exit(1); -- } -- if (option_verbose) -- ast_verbose("Running as group '%s'\n", rungroup); -+ runasgid = gr->gr_gid; - } - -- if (set_priority(option_highpriority)) { -- exit(1); -- } - if (runuser) { - struct passwd *pw; - pw = getpwnam(runuser); -@@ -1719,8 +1713,29 @@ int main(int argc, char *argv[]) - ast_log(LOG_WARNING, "No such user '%s'!\n", runuser); - exit(1); - } -- if (setuid(pw->pw_uid)) { -- ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", pw->pw_uid, runuser); -+ runasuid = pw->pw_uid; -+ } -+ -+ if (set_priority(option_highpriority)) { -+ exit(1); -+ } -+ -+ if (runasgid) { -+ if (setgid(runasgid)) { -+ ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", runasgid, rungroup); -+ exit(1); -+ } -+ if (option_verbose) -+ ast_verbose("Running as group '%s'\n", rungroup); -+ } -+ -+ if (runasuid) { -+ if(initgroups(runuser, runasgid) < 0) { -+ ast_log(LOG_WARNING, "Unable to set supplemental groups for %s\n", runuser); -+ exit(1); -+ } -+ if (setuid(runasuid)) { -+ ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", runasuid, runuser); - exit(1); - } - if (option_verbose) diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-manager-cli-segv.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-manager-cli-segv.patch deleted file mode 100644 index ebcf18b5b707..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-manager-cli-segv.patch +++ /dev/null @@ -1,162 +0,0 @@ ---- asterisk-1.0.7/cli.c 2004-12-30 23:30:09.000000000 +0100 -+++ asterisk-1.0.8/cli.c 2005-06-10 22:52:27.000000000 +0200 -@@ -918,9 +918,14 @@ - return RESULT_SHOWUSAGE; - if (argc > 1) { - e = find_cli(argv + 1, 1); -- if (e) -- ast_cli(fd, e->usage); -- else { -+ if (e) { -+ if (e->usage) -+ ast_cli(fd, e->usage); -+ else { -+ join(fullcmd, sizeof(fullcmd), argv+1); -+ ast_cli(fd, "No help text available for '%s'.\n", fullcmd); -+ } -+ } else { - if (find_cli(argv + 1, -1)) { - return help_workhorse(fd, argv + 1); - } else { -@@ -934,72 +939,62 @@ - return RESULT_SUCCESS; - } - --static char *parse_args(char *s, int *max, char *argv[]) -+static char *parse_args(char *s, int *argc, char *argv[], int max) - { - char *dup, *cur; -- int x=0; -- int quoted=0; -- int escaped=0; -- int whitespace=1; -- -- dup = strdup(s); -- if (dup) { -- cur = dup; -- while(*s) { -- switch(*s) { -- case '"': -- /* If it's escaped, put a literal quote */ -- if (escaped) -- goto normal; -- else -- quoted = !quoted; -- if (quoted && whitespace) { -- /* If we're starting a quote, coming off white space start a new word, too */ -- argv[x++] = cur; -- whitespace=0; -- } -- escaped = 0; -- break; -- case ' ': -- case '\t': -- if (!quoted && !escaped) { -- /* If we're not quoted, mark this as whitespace, and -- end the previous argument */ -- whitespace = 1; -- *(cur++) = '\0'; -- } else -- /* Otherwise, just treat it as anything else */ -- goto normal; -- break; -- case '\\': -- /* If we're escaped, print a literal, otherwise enable escaping */ -- if (escaped) { -- goto normal; -- } else { -- escaped=1; -+ int x = 0; -+ int quoted = 0; -+ int escaped = 0; -+ int whitespace = 1; -+ -+ if (!(dup = strdup(s))) -+ return NULL; -+ -+ cur = dup; -+ while (*s) { -+ if ((*s == '"') && !escaped) { -+ quoted = !quoted; -+ if (quoted & whitespace) { -+ /* If we're starting a quoted string, coming off white space, start a new argument */ -+ if (x >= (max - 1)) { -+ ast_log(LOG_WARNING, "Too many arguments, truncating\n"); -+ break; - } -- break; -- default: --normal: -- if (whitespace) { -- if (x >= AST_MAX_ARGS -1) { -- ast_log(LOG_WARNING, "Too many arguments, truncating\n"); -- break; -- } -- /* Coming off of whitespace, start the next argument */ -- argv[x++] = cur; -- whitespace=0; -+ argv[x++] = cur; -+ whitespace = 0; -+ } -+ escaped = 0; -+ } else if (((*s == ' ') || (*s == '\t')) && !(quoted || escaped)) { -+ /* If we are not already in whitespace, and not in a quoted string or -+ processing an escape sequence, and just entered whitespace, then -+ finalize the previous argument and remember that we are in whitespace -+ */ -+ if (!whitespace) { -+ *(cur++) = '\0'; -+ whitespace = 1; -+ } -+ } else if ((*s == '\\') && !escaped) { -+ escaped = 1; -+ } else { -+ if (whitespace) { -+ /* If we are coming out of whitespace, start a new argument */ -+ if (x >= (max - 1)) { -+ ast_log(LOG_WARNING, "Too many arguments, truncating\n"); -+ break; - } -- *(cur++) = *s; -- escaped=0; -+ argv[x++] = cur; -+ whitespace = 0; - } -- s++; -+ *(cur++) = *s; -+ escaped = 0; - } -- /* Null terminate */ -- *(cur++) = '\0'; -- argv[x] = NULL; -- *max = x; -+ s++; - } -+ /* Null terminate */ -+ *(cur++) = '\0'; -+ argv[x] = NULL; -+ *argc = x; -+ - return dup; - } - -@@ -1071,7 +1066,7 @@ - char matchstr[80]; - char *fullcmd = NULL; - -- if ((dup = parse_args(text, &x, argv))) { -+ if ((dup = parse_args(text, &x, argv, sizeof(argv) / sizeof(argv[0])))) { - join(matchstr, sizeof(matchstr), argv); - if (lock) - ast_mutex_lock(&clilock); -@@ -1142,8 +1137,8 @@ - struct ast_cli_entry *e; - int x; - char *dup; -- x = AST_MAX_ARGS; -- if ((dup = parse_args(s, &x, argv))) { -+ -+ if ((dup = parse_args(s, &x, argv, sizeof(argv) / sizeof(argv[0])))) { - /* We need at least one entry, or ignore */ - if (x > 0) { - ast_mutex_lock(&clilock); diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-scripts.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-scripts.diff deleted file mode 100644 index 3eb1e15bdb7c..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.7-scripts.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- asterisk-1.0.7/contrib/scripts/addmailbox.orig 2005-05-11 23:17:10.000000000 +0200 -+++ asterisk-1.0.7/contrib/scripts/addmailbox 2005-05-11 23:21:57.000000000 +0200 -@@ -21,14 +21,14 @@ - echo - echo "New Voicemail context.." - echo "Creating Voicemail context directory..." -- mkdir -p ${VMHOME}/${context} -+ mkdir -m 750 -p ${VMHOME}/${context} - fi - - echo - echo "Creating Voicemail directory..." --mkdir -p ${VMHOME}/${context}/${mailbox} -+mkdir -m 750 -p ${VMHOME}/${context}/${mailbox} - echo "Creating INBOX..." --mkdir -p ${VMHOME}/${context}/${mailbox}/INBOX -+mkdir -m 750 -p ${VMHOME}/${context}/${mailbox}/INBOX - echo "Creating Default greetings..." - cat ${SNDHOME}/vm-theperson.gsm > ${VMHOME}/${context}/${mailbox}/unavail.gsm - cat ${SNDHOME}/vm-theperson.gsm > ${VMHOME}/${context}/${mailbox}/busy.gsm -@@ -41,5 +41,8 @@ - done - cat ${SNDHOME}/vm-isunavail.gsm >> ${VMHOME}/${context}/${mailbox}/unavail.gsm - cat ${SNDHOME}/vm-isonphone.gsm >> ${VMHOME}/${context}/${mailbox}/busy.gsm -+echo "Changing permissions..." -+chown -R asterisk:asterisk ${VMHOME}/${context} -+chmod u=rwX,g=rX,o= ${VMHOME}/${context}/${mailbox}/*.gsm - echo "Complete." - ---- asterisk-1.0.7/contrib/scripts/astgenkey.orig 2005-05-11 23:28:37.000000000 +0200 -+++ asterisk-1.0.7/contrib/scripts/astgenkey 2005-05-11 23:30:12.000000000 +0200 -@@ -55,7 +55,11 @@ - echo "Key creation successful." - echo "Public key: ${KEY}.pub" - echo "Private key: ${KEY}.key" -+ echo "Changing permissions..." - fi -+ chown root:asterisk ${KEY}.pub ${KEY}.key -+ chmod u=rw,g=r,o= ${KEY}.pub ${KEY}.key - else - echo "Unknown error creating keys." - fi -+ diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-callerid.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-callerid.patch deleted file mode 100644 index a65c760507f1..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-callerid.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- asterisk-1.0.8/pbx/pbx_config.c.orig 2005-06-26 21:45:36.724546872 +0200 -+++ asterisk-1.0.8/pbx/pbx_config.c 2005-06-26 21:50:14.119376448 +0200 -@@ -1688,14 +1688,9 @@ - data = ""; - } - pbx_substitute_variables_helper(NULL, ext, realext, sizeof(realext)-1); -- cidmatch = strchr(ext, '/'); -- if (cidmatch) { -- *cidmatch = '\0'; -- cidmatch++; -- } -- stringp=ext; -- strsep(&stringp, "/"); -- -+ stringp = realext; -+ ext = strsep(&stringp, "/"); -+ cidmatch = stringp; - if (!data) - data=""; - while(*appl && (*appl < 33)) appl++; diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-hppa.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-hppa.patch deleted file mode 100644 index 624b50c5b474..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-hppa.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- asterisk-1.0.8/codecs/gsm/Makefile.orig 2005-06-25 09:30:45.146479088 +0200 -+++ asterisk-1.0.8/codecs/gsm/Makefile 2005-06-25 09:32:05.008338240 +0200 -@@ -46,6 +46,8 @@ - ifneq (${PROC},sparc64) - ifneq (${PROC},ppc) - ifneq (${PROC},ppc64) -+ifneq ($(PROC),parisc) -+ifneq ($(PROC),parisc64) - OPTIMIZE+=-march=$(PROC) - endif - endif -@@ -56,6 +58,8 @@ - endif - endif - endif -+endif -+endif - - #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. - #This works for even old (2.96) versions of gcc and provides a small boost either way. -@@ -224,6 +228,8 @@ - ifneq ($(shell uname -m),alpha) - ifneq ($(shell uname -m),armv4l) - ifneq ($(shell uname -m),sparc64) -+ifneq ($(shell uname -m),parisc) -+ifneq ($(shell uname -m),parisc64) - GSM_SOURCES+= $(SRC)/k6opt.s - endif - endif -@@ -231,6 +237,8 @@ - endif - endif - endif -+endif -+endif - - TOAST_SOURCES = $(SRC)/toast.c \ - $(SRC)/toast_lin.c \ -@@ -282,6 +290,8 @@ - ifneq ($(shell uname -m), alpha) - ifneq ($(shell uname -m), armv4l) - ifneq ($(shell uname -m), sparc64) -+ifneq ($(shell uname -m), parisc) -+ifneq ($(shell uname -m), parisc64) - GSM_OBJECTS+= $(SRC)/k6opt.o - endif - endif -@@ -289,6 +299,8 @@ - endif - endif - endif -+endif -+endif - - TOAST_OBJECTS = $(SRC)/toast.o \ - $(SRC)/toast_lin.o \ diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-initgroups.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-initgroups.diff deleted file mode 100644 index c1350ace33d1..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-initgroups.diff +++ /dev/null @@ -1,55 +0,0 @@ ---- asterisk-1.0.8/asterisk.c.orig 2005-05-16 05:04:58.000000000 +0200 -+++ asterisk-1.0.8/asterisk.c 2005-06-25 09:45:18.763669088 +0200 -@@ -1581,7 +1581,9 @@ - int num; - char *buf; - char *runuser=NULL, *rungroup=NULL; -- struct pollfd silly_macos[1]; -+ struct pollfd silly_macos[1]; -+ gid_t runasgid = 0; -+ uid_t runasuid = 0; - - /* Remember original args for restart */ - if (argc > sizeof(_argv) / sizeof(_argv[0]) - 1) { -@@ -1709,12 +1711,7 @@ - ast_log(LOG_WARNING, "No such group '%s'!\n", rungroup); - exit(1); - } -- if (setgid(gr->gr_gid)) { -- ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", gr->gr_gid, rungroup); -- exit(1); -- } -- if (option_verbose) -- ast_verbose("Running as group '%s'\n", rungroup); -+ runasgid = gr->gr_gid; - } - - if (runuser) { -@@ -1724,8 +1721,25 @@ - ast_log(LOG_WARNING, "No such user '%s'!\n", runuser); - exit(1); - } -- if (setuid(pw->pw_uid)) { -- ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", pw->pw_uid, runuser); -+ runasuid = pw->pw_uid; -+ } -+ -+ if (runasgid) { -+ if (setgid(runasgid)) { -+ ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", runasgid, rungroup); -+ exit(1); -+ } -+ if (option_verbose) -+ ast_verbose("Running as group '%s'\n", rungroup); -+ } -+ -+ if (runasuid) { -+ if(initgroups(runuser, runasgid) < 0) { -+ ast_log(LOG_WARNING, "Unable to set supplemental groups for %s\n", runuser); -+ exit(1); -+ } -+ if (setuid(runasuid)) { -+ ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", runasuid, runuser); - exit(1); - } - if (option_verbose) diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-ptr64fix.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-ptr64fix.diff deleted file mode 100644 index 424421d7751d..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.8-ptr64fix.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- asterisk-1.0.8/utils.c.orig 2005-09-13 20:14:28.000000000 +0000 -+++ asterisk-1.0.8/utils.c 2005-09-13 20:14:52.000000000 +0000 -@@ -399,7 +399,7 @@ - offset = strstr(upper(haystack, u1, u1len), upper(needle, u2, u2len)); - if (offset) { - /* Return the offset into the original string */ -- return ((char *)((unsigned int)haystack + (unsigned int)(offset - u1))); -+ return ((char *)((unsigned long)haystack + (unsigned long)(offset - u1))); - } else { - return NULL; - } diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-freetds.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-freetds.diff deleted file mode 100644 index 811067dda3c5..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-freetds.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- asterisk-1.0.9/cdr/cdr_tds.c.orig 2005-10-29 00:50:28.000000000 +0000 -+++ asterisk-1.0.9/cdr/cdr_tds.c 2005-10-29 00:50:57.000000000 +0000 -@@ -412,7 +412,7 @@ - - static int mssql_connect(void) - { -- TDSCONNECTINFO *connection = NULL; -+ TDSCONNECTION *connection = NULL; - char query[128]; - - /* Connect to M$SQL Server */ ---- asterisk-1.0.9/cdr/cdr_tds.c.orig 2005-10-29 04:54:16.000000000 +0000 -+++ asterisk-1.0.9/cdr/cdr_tds.c 2005-10-29 04:54:36.000000000 +0000 -@@ -457,11 +457,11 @@ - { - ast_log(LOG_ERROR, "Failed to connect to MSSQL server.\n"); - tds = NULL; /* freed by tds_connect() on error */ -- tds_free_connect(connection); -+ tds_free_connection(connection); - connection = NULL; - goto connect_fail; - } -- tds_free_connect(connection); -+ tds_free_connection(connection); - connection = NULL; - - sprintf(query, "USE %s", dbname); diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-ukcid.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-ukcid.patch deleted file mode 100644 index de86f2a903f7..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-ukcid.patch +++ /dev/null @@ -1,168 +0,0 @@ -? 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/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/1.0.0/asterisk-1.0.9-vmail.cgi.patch b/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-vmail.cgi.patch deleted file mode 100644 index 7c6cb09a9d46..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-vmail.cgi.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- asterisk/contrib/scripts/vmail.cgi 2005/07/07 23:34:59 1.15 -+++ asterisk/contrib/scripts/vmail.cgi 2005/10/30 16:30:35 1.16 -@@ -545,14 +545,16 @@ _EOH - sub message_audio() - { - my ($forcedownload) = @_; -- my $folder = param('folder'); -- my $msgid = param('msgid'); -- my $mailbox = param('mailbox'); -- my $context = param('context'); -+ my $folder = &untaint(param('folder')); -+ my $msgid = &untaint(param('msgid')); -+ my $mailbox = &untaint(param('mailbox')); -+ my $context = &untaint(param('context')); - my $format = param('format'); - if (!$format) { - $format = &getcookie('format'); - } -+ &untaint($format); -+ - my $path = "/var/spool/asterisk/voicemail/$context/$mailbox/$folder/msg${msgid}.$format"; - - $msgid =~ /^\d\d\d\d$/ || die("Msgid Liar ($msgid)!"); diff --git a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-weak-references.diff b/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-weak-references.diff deleted file mode 100644 index dfb46cc73908..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-1.0.9-weak-references.diff +++ /dev/null @@ -1,229 +0,0 @@ -diff -ru ../asterisk-1.0.9/include/asterisk/adsi.h ./include/asterisk/adsi.h ---- ../asterisk-1.0.9/include/asterisk/adsi.h 2005-07-29 13:22:39.003302450 +0100 -+++ ./include/asterisk/adsi.h 2005-07-29 13:41:41.000000000 +0100 -@@ -118,11 +118,14 @@ - * Returns 0 on success (or adsi unavailable) and -1 on hangup - * - */ --extern int adsi_channel_init(struct ast_channel *chan); -+extern int adsi_channel_init(struct ast_channel *chan) -+ __attribute__ ((weak)); - --extern int adsi_begin_download(struct ast_channel *chan, char *service, char *fdn, char *sec, int version); -+extern int adsi_begin_download(struct ast_channel *chan, char *service, char *fdn, char *sec, int version) -+ __attribute__ ((weak)); - --extern int adsi_end_download(struct ast_channel *chan); -+extern int adsi_end_download(struct ast_channel *chan) -+ __attribute__ ((weak)); - - //! Restore ADSI initialization (for applications that play with ADSI - // and want to restore it to normal. If you touch "INFO" then you -@@ -133,7 +136,8 @@ - * Returns 0 on success (or adsi unavailable) and -1 on hangup - * - */ --extern int adsi_channel_restore(struct ast_channel *chan); -+extern int adsi_channel_restore(struct ast_channel *chan) -+ __attribute__ ((weak)); - - //! Display some stuff on the screen - /*! -@@ -145,7 +149,8 @@ - * Return 0 on success (or adsi unavailable) and -1 on hangup - * - */ --extern int adsi_print(struct ast_channel *chan, char **lines, int *align, int voice); -+extern int adsi_print(struct ast_channel *chan, char **lines, int *align, int voice) -+ __attribute__ ((weak)); - - //! Check if scripts for a given app are already loaded. Version may be -1 - // if any version is okay, or 0-255 for a specific version. -@@ -158,18 +163,23 @@ - * Returns 0 if scripts is not loaded or not an ADSI CPE. Returns -1 - * on hangup. Returns 1 if script already loaded. - */ --extern int adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data); --extern int adsi_unload_session(struct ast_channel *chan); -+extern int adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data) -+ __attribute__ ((weak)); -+extern int adsi_unload_session(struct ast_channel *chan) -+ __attribute__ ((weak)); - - /* ADSI Layer 2 transmission functions */ --extern int adsi_transmit_messages(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype); --extern int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype); -+extern int adsi_transmit_messages(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype) -+ __attribute__ ((weak)); -+extern int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype) -+ __attribute__ ((weak)); - - //! Read some encoded DTMF data. - /*! - * Returns number of bytes received - */ --extern int adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen); -+extern int adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen) -+ __attribute__ ((weak)); - - /* ADSI Layer 3 creation functions */ - -@@ -183,14 +193,17 @@ - * - */ - --extern int adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver); -+extern int adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver) -+ __attribute__ ((weak)); - - //! Build Query CPE ID of equipment */ - /*! - * Returns number of bytes added to message - */ --extern int adsi_query_cpeid(unsigned char *buf); --extern int adsi_query_cpeinfo(unsigned char *buf); -+extern int adsi_query_cpeid(unsigned char *buf) -+ __attribute__ ((weak)); -+extern int adsi_query_cpeinfo(unsigned char *buf) -+ __attribute__ ((weak)); - - //! Get CPE ID from an attached ADSI compatible CPE. - /*! -@@ -198,9 +211,11 @@ - * or -1 on hangup, or 0 if there was no hangup but it failed to find the - * device ID. Returns to voice mode if "voice" is non-zero. - */ --extern int adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice); -+extern int adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice) -+ __attribute__ ((weak)); - --extern int adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice); -+extern int adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice) -+ __attribute__ ((weak)); - - //! Begin an ADSI script download */ - /*! -@@ -214,7 +229,8 @@ - * - */ - --extern int adsi_download_connect(unsigned char *buf, unsigned char *service, unsigned char *fdn, unsigned char *sec, int ver); -+extern int adsi_download_connect(unsigned char *buf, unsigned char *service, unsigned char *fdn, unsigned char *sec, int ver) -+ __attribute__ ((weak)); - - //! Disconnects a running session - /*! -@@ -223,7 +239,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_disconnect_session(unsigned char *buf); -+extern int adsi_disconnect_session(unsigned char *buf) -+ __attribute__ ((weak)); - - //! Disconnects (and hopefully saves) a downloaded script - /*! -@@ -232,7 +249,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_download_disconnect(unsigned char *buf); -+extern int adsi_download_disconnect(unsigned char *buf) -+ __attribute__ ((weak)); - - //! Puts CPE in data mode... - /*! -@@ -241,9 +259,12 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_data_mode(unsigned char *buf); --extern int adsi_clear_soft_keys(unsigned char *buf); --extern int adsi_clear_screen(unsigned char *buf); -+extern int adsi_data_mode(unsigned char *buf) -+ __attribute__ ((weak)); -+extern int adsi_clear_soft_keys(unsigned char *buf) -+ __attribute__ ((weak)); -+extern int adsi_clear_screen(unsigned char *buf) -+ __attribute__ ((weak)); - - //! Puts CPE in voice mode... - /*! -@@ -253,14 +274,16 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_voice_mode(unsigned char *buf, int when); -+extern int adsi_voice_mode(unsigned char *buf, int when) -+ __attribute__ ((weak)); - - //! Returns non-zero if Channel does or might support ADSI - /*! - * \param chan Channel to check - * - */ --extern int adsi_available(struct ast_channel *chan); -+extern int adsi_available(struct ast_channel *chan) -+ __attribute__ ((weak)); - - //! Loads a line of info into the display */ - /*! -@@ -276,7 +299,8 @@ - * - */ - --extern int adsi_display(unsigned char *buf, int page, int line, int just, int wrap, unsigned char *col1, unsigned char *col2); -+extern int adsi_display(unsigned char *buf, int page, int line, int just, int wrap, unsigned char *col1, unsigned char *col2) -+ __attribute__ ((weak)); - - //! Sets the current line and page */ - /*! -@@ -288,7 +312,8 @@ - * - */ - --extern int adsi_set_line(unsigned char *buf, int page, int line); -+extern int adsi_set_line(unsigned char *buf, int page, int line) -+ __attribute__ ((weak)); - - //! Creates "load soft key" parameters - /*! -@@ -302,7 +327,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_load_soft_key(unsigned char *buf, int key, unsigned char *llabel, unsigned char *slabel, unsigned char *ret, int data); -+extern int adsi_load_soft_key(unsigned char *buf, int key, unsigned char *llabel, unsigned char *slabel, unsigned char *ret, int data) -+ __attribute__ ((weak)); - - //! Set which soft keys should be displayed - /*! -@@ -313,7 +339,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_set_keys(unsigned char *buf, unsigned char *keys); -+extern int adsi_set_keys(unsigned char *buf, unsigned char *keys) -+ __attribute__ ((weak)); - - //! Set input information - /*! -@@ -327,7 +354,8 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just); -+extern int adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just) -+ __attribute__ ((weak)); - - //! Set input format - /*! -@@ -341,5 +369,6 @@ - * Returns number of bytes added to buffer or -1 on error. - * - */ --extern int adsi_input_format(unsigned char *buf, int num, int dir, int wrap, unsigned char *format1, unsigned char *format2); -+extern int adsi_input_format(unsigned char *buf, int num, int dir, int wrap, unsigned char *format1, unsigned char *format2) -+ __attribute__ ((weak)); - #endif -Only in ../asterisk-1.0.9: .version diff --git a/net-misc/asterisk/files/1.0.0/asterisk-uclibc-dns.diff b/net-misc/asterisk/files/1.0.0/asterisk-uclibc-dns.diff deleted file mode 100644 index b66b5421ade8..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk-uclibc-dns.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- work/asterisk-1.0.0/dns.c2004-06-22 20:11:15.000000000 +0000 -+++ dns.c2004-10-06 12:59:38.000000000 +0000 -@@ -150,15 +150,18 @@ - } - return 0; - } -- -+/* - #if defined(res_ninit) - #define HAS_RES_NINIT - #else -+*/ - AST_MUTEX_DEFINE_STATIC(res_lock); -+/* - #if 0 - #warning Warning, res_ninit is missing... Could have reentrancy issues - #endif - #endif -+*/ - - int ast_search_dns(void *context, - const char *dname, int class, int type, diff --git a/net-misc/asterisk/files/1.0.0/asterisk.confd b/net-misc/asterisk/files/1.0.0/asterisk.confd deleted file mode 100644 index c025d64f3f0c..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk.confd +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.confd,v 1.1 2004/09/24 00:01:57 stkn Exp $ - -# -# see "asterisk -h" for a list of options -# - -OPTIONS="" diff --git a/net-misc/asterisk/files/1.0.0/asterisk.confd.sec b/net-misc/asterisk/files/1.0.0/asterisk.confd.sec deleted file mode 100644 index 63be8c0ac851..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk.confd.sec +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.confd.sec,v 1.4 2005/05/31 23:19:56 stkn Exp $ - -# -# see "asterisk -h" for a list of options -# -ASTERISK_OPTS="" - -# -# User to run asterisk as -# -# Examples: -# "user:group" -# "user" -# "" or unset = root:root -# -ASTERISK_USER="asterisk:asterisk" - -# -# Nicelevel -# -# Set the priority of the asterisk process -# -# Range: -19..20 -#ASTERISK_NICE="" diff --git a/net-misc/asterisk/files/1.0.0/asterisk.rc6 b/net-misc/asterisk/files/1.0.0/asterisk.rc6 deleted file mode 100644 index ac3ddfae6cb5..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk.rc6 +++ /dev/null @@ -1,21 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.rc6,v 1.2 2005/03/22 15:51:16 stkn Exp $ - -depend() { - need net logger - after zaptel -} - -start() { - ebegin "Starting asterisk PBX" - start-stop-daemon --start --exec /usr/sbin/asterisk -- ${OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping asterisk PBX" - start-stop-daemon --stop --pidfile /var/run/asterisk.pid - eend $? -} diff --git a/net-misc/asterisk/files/1.0.0/asterisk.rc6.sec b/net-misc/asterisk/files/1.0.0/asterisk.rc6.sec deleted file mode 100644 index 5e29792351ff..000000000000 --- a/net-misc/asterisk/files/1.0.0/asterisk.rc6.sec +++ /dev/null @@ -1,46 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.0.0/asterisk.rc6.sec,v 1.5 2005/12/20 21:11:53 stkn Exp $ - -depend() { - need net - use zaptel mysql postgresql capi -} - -start() { - local OPTS USER GROUP - - if [[ -n "${ASTERISK_NICE}" ]]; then - if [[ ${ASTERISK_NICE} -ge -20 ]] && \ - [[ ${ASTERISK_NICE} -le 19 ]]; then - OPTS="--nicelevel ${ASTERISK_NICE}" - else - eerror "Nice value must be between -20 and 19" - fi - fi - - if [[ -n "${ASTERISK_USER}" ]]; then - USER=${ASTERISK_USER/:*/} - GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }') - if [[ -n "${USER}" ]]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}" - fi - if [[ -n "${GROUP}" ]]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}" - GROUP=":${GROUP}" # make it look nice... - fi - ebegin "Starting asterisk PBX (as ${USER}${GROUP})" - else - ebegin "Starting asterisk PBX (as root)" - fi - start-stop-daemon --start --exec /usr/sbin/asterisk \ - ${OPTS} -- ${ASTERISK_OPTS} - eend $? -} - -stop() { - ebegin "Stopping asterisk PBX" - start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid - eend $? -} diff --git a/net-misc/asterisk/files/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff b/net-misc/asterisk/files/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff deleted file mode 100644 index 5001809d2b7f..000000000000 --- a/net-misc/asterisk/files/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- asterisk-addons-1.0.7/res_perl/AstAPIBase.c.orig 2005-03-28 21:38:28.998238136 +0200 -+++ asterisk-addons-1.0.7/res_perl/AstAPIBase.c 2005-03-28 21:40:41.375113792 +0200 -@@ -704,7 +704,7 @@ - struct ast_channel *asterisk_request_and_dial(char *type,char *data,int format,char *callerid, int timeout) { - int reason; - struct ast_channel *chan; -- chan = ast_request_and_dial(type,AST_FORMAT_ULAW, data, timeout, &reason,callerid); -+ chan = ast_request_and_dial(type,AST_FORMAT_ULAW, data, timeout, &reason, 0, callerid, NULL); - return chan; - } - -@@ -743,7 +743,7 @@ - - struct ast_channel *asterisk_request(int format,char *type,char *data,char *callerid) { - struct ast_channel *chan=NULL; -- chan = ast_request(type, format, data); -+ chan = ast_request(type, format, data, NULL); - if (callerid && strlen(callerid)) - ast_set_callerid(chan, callerid, 1); - diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.12-r2 b/net-misc/asterisk/files/digest-asterisk-1.0.12-r2 deleted file mode 100644 index 39a31083407a..000000000000 --- a/net-misc/asterisk/files/digest-asterisk-1.0.12-r2 +++ /dev/null @@ -1,9 +0,0 @@ -MD5 d1a2f994cbeee02258c8da4a60b07bc1 asterisk-1.0.12.tar.gz 9641502 -RMD160 bb6d5d38e2945e43d367cb7aedf1e0f557808a29 asterisk-1.0.12.tar.gz 9641502 -SHA256 0b900a9614bb936334247ff6881edc9eb57d6a684fc5a4aab4e4dd4c7f597ff6 asterisk-1.0.12.tar.gz 9641502 -MD5 2b6e1da3ff097f9792d3123e7e5a0059 asterisk-addons-1.0.9.tar.gz 73716 -RMD160 98156861f790987fb4bf86b14c902aeca90b380b asterisk-addons-1.0.9.tar.gz 73716 -SHA256 4c878a4e5b5aabbdd93116ccbca5cf6465d55f480f4aa1e6438e9fc49c1f11fe asterisk-addons-1.0.9.tar.gz 73716 -MD5 4306e18c195e6b1a37af02fedd4a153e bristuff-0.2.0-RC8r.tar.gz 194888 -RMD160 d5dd31b9e4dcf30af6d2a62deb285a83f8a54019 bristuff-0.2.0-RC8r.tar.gz 194888 -SHA256 99f9da320d6335413384d12310e5ae9815572281c99d5908706022b6a4d6cb03 bristuff-0.2.0-RC8r.tar.gz 194888 diff --git a/net-misc/asterisk/metadata.xml b/net-misc/asterisk/metadata.xml index 36957c87ed2d..cad9a9aa53e9 100644 --- a/net-misc/asterisk/metadata.xml +++ b/net-misc/asterisk/metadata.xml @@ -6,7 +6,7 @@ <email>stkn@gentoo.org</email> <name>Stefan Knoblich</name> </maintainer> -<maintainer restrict="<net-misc/asterisk-1.2.0"> +<maintainer> <email>rajiv@gentoo.org</email> <name>Rajiv Aaron Manglani</name> </maintainer> diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog index 666563c1ce3f..8a02f7edf3bd 100644 --- a/net-misc/zaptel/ChangeLog +++ b/net-misc/zaptel/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/zaptel -# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.99 2007/12/25 06:26:11 rajiv Exp $ +# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.100 2008/01/06 08:33:58 rajiv Exp $ + + 06 Jan 2008; Rajiv Aaron Manglani <rajiv@gentoo.org> + -files/zaptel-1.0.4-gcc34.patch, -files/zaptel-1.0.9-rtc.patch, + -files/zaptel-1.0.10-devfs26.diff, + -files/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff, + -files/zaptel-1.0.10-gentoo.diff, -files/zaptel-1.0.10-linux2.6.16.diff, + -files/zaptel-1.0.10-ukcid.patch, -zaptel-1.0.10-r2.ebuild: + removing asterisk and zaptel 1.0. *zaptel-1.2.22.1 (25 Dec 2007) diff --git a/net-misc/zaptel/files/digest-zaptel-1.0.10-r2 b/net-misc/zaptel/files/digest-zaptel-1.0.10-r2 deleted file mode 100644 index dda57b1c8ec3..000000000000 --- a/net-misc/zaptel/files/digest-zaptel-1.0.10-r2 +++ /dev/null @@ -1,6 +0,0 @@ -MD5 215dd795ce8ea72370b2e9d1bb7d8f6a bristuff-0.2.0-RC8q.tar.gz 152037 -RMD160 aaa9ca23eaeb74abc96dd7240f67e7886d4d6ad9 bristuff-0.2.0-RC8q.tar.gz 152037 -SHA256 8ba7a1e1e6ee8e9d77853d6d790d0de5deced7c11679b9b0e108cca817ed9728 bristuff-0.2.0-RC8q.tar.gz 152037 -MD5 a0ee0e7b276abe8ef88030d1252d6a3d zaptel-1.0.10.tar.gz 327832 -RMD160 a797bb36f35e50c51d30705ad1d628f5728d87ed zaptel-1.0.10.tar.gz 327832 -SHA256 7978f3c56a95033bf2bc2cb8d0cb2830c5371aae21e0021503c6dbf2361795d1 zaptel-1.0.10.tar.gz 327832 diff --git a/net-misc/zaptel/files/zaptel-1.0.10-devfs26.diff b/net-misc/zaptel/files/zaptel-1.0.10-devfs26.diff deleted file mode 100644 index 9b62e69764c1..000000000000 --- a/net-misc/zaptel/files/zaptel-1.0.10-devfs26.diff +++ /dev/null @@ -1,220 +0,0 @@ ---- zaptel-1.0.10/zaptel.c.orig 2005-09-02 22:27:45.000000000 +0200 -+++ zaptel-1.0.10/zaptel.c 2005-11-22 19:25:39.000000000 +0100 -@@ -148,12 +148,14 @@ - - /* Here are a couple important little additions for devfs */ - #ifdef CONFIG_DEVFS_FS -+#ifndef LINUX26 - static devfs_handle_t zaptel_devfs_dir; - static devfs_handle_t channel; - static devfs_handle_t pseudo; - static devfs_handle_t ctl; - static devfs_handle_t timer; - #endif -+#endif - - /* udev necessary data structures. Yeah! */ - #ifdef CONFIG_ZAP_UDEV -@@ -1123,6 +1125,7 @@ - } - - #ifdef CONFIG_DEVFS_FS -+#ifndef LINUX26 - static devfs_handle_t register_devfs_channel(struct zt_chan *chan, devfs_handle_t dir) - { - char path[100]; -@@ -1165,6 +1168,36 @@ - - return chan_dev; - } -+#else -+static dev_t register_devfs_channel(struct zt_chan *chan, dev_t dir) -+{ -+#ifdef HAS_DEVFS_MK_SYMLINK -+ char link[100]; -+ char path[100]; -+#endif -+ dev_t chan_dev; -+ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO; -+ -+ /* create /dev/zap/span%d/%d channel device node */ -+ if ((chan_dev = devfs_mk_cdev(MKDEV(ZT_MAJOR, chan->channo), mode, "zap/span%d/%d", dir, chan->chanpos)) < 0) { -+ printk("zaptel: Something really bad happened. Unable to register devfs entry\n"); -+ return 0; -+ } -+ -+#ifdef HAS_DEVFS_MK_SYMLINK -+ /* link /dev/zap/span%d/%d -> /dev/zap/%d ?!? */ -+ sprintf(path, "zap/span%d/%d", dir, chan->chanpos); -+ sprintf(link, "zap/%d", chan->channo); -+ devfs_mk_symlink(link, path); -+#else -+ /* register /dev/zap/%d channel node directly */ -+ if(devfs_mk_cdev(MKDEV(ZT_MAJOR, chan->channo), mode, "zap/%d", chan->channo) < 0) { -+ printk("zaptel: Unable to register compat devfs entry\n"); -+ } -+#endif -+ return chan_dev; -+} -+#endif - #endif /* CONFIG_DEVFS_FS */ - - static int zt_chan_reg(struct zt_chan *chan) -@@ -4404,6 +4437,7 @@ - #endif - - #ifdef CONFIG_DEVFS_FS -+#ifndef LINUX26 - { - char span_name[50]; - sprintf(span_name, "span%d", span->spanno); -@@ -4413,6 +4447,15 @@ - chan->fhandle = register_devfs_channel(chan, chan->span->dhandle); /* Register our stuff with devfs */ - } - } -+#else -+ { -+ devfs_mk_dir("zap/span%d", span->spanno); -+ for (x = 0; x < span->channels; x++) { -+ struct zt_chan *chan = &span->chans[x]; -+ register_devfs_channel(chan, span->spanno); /* Register our stuff with devfs */ -+ } -+ } -+#endif - #endif /* CONFIG_DEVFS_FS */ - - #ifdef CONFIG_ZAP_UDEV -@@ -4460,11 +4503,22 @@ - remove_proc_entry(tempfile, NULL); - #endif /* CONFIG_PROC_FS */ - #ifdef CONFIG_DEVFS_FS -+#ifndef LINUX26 - for (x = 0; x < span->channels; x++) { - devfs_unregister(span->chans[x].fhandle); - devfs_unregister(span->chans[x].fhandle_symlink); - } - devfs_unregister(span->dhandle); -+#else -+ for (x = 0; x < span->channels; x++) { -+ /* remove symlink/compat device first */ -+ devfs_remove("zap/%d", span->chans[x].channo); -+ /* remove channel device */ -+ devfs_remove("zap/span%d/%d", span->spanno, span->chans[x].chanpos); -+ } -+ /* remove span dir */ -+ devfs_remove("zap/span%d", span->spanno); -+#endif - #endif /* CONFIG_DEVFS_FS */ - - #ifdef CONFIG_ZAP_UDEV -@@ -6452,6 +6506,7 @@ - #endif /* CONFIG_ZAP_UDEV */ - - #ifdef CONFIG_DEVFS_FS -+#ifndef LINUX26 - { - umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO; - devfs_register_chrdev(ZT_MAJOR, "zaptel", &zt_fops); -@@ -6463,6 +6518,22 @@ - ctl = devfs_register(zaptel_devfs_dir, "ctl", DEVFS_FL_DEFAULT, ZT_MAJOR, 0, mode, &zt_fops, NULL); - } - #else -+ { -+ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO; -+ if ((res = register_chrdev(ZT_MAJOR, "zaptel", &zt_fops)) < 0) { -+ printk(KERN_ERR "Unable to register for device on %d, error: %d\n", ZT_MAJOR, res); -+ return res; -+ } -+ -+ devfs_mk_dir("zap"); -+ -+ devfs_mk_cdev(MKDEV(ZT_MAJOR, 253), mode, "zap/timer"); -+ devfs_mk_cdev(MKDEV(ZT_MAJOR, 254), mode, "zap/channel"); -+ devfs_mk_cdev(MKDEV(ZT_MAJOR, 255), mode, "zap/pseudo"); -+ devfs_mk_cdev(MKDEV(ZT_MAJOR, 0), mode, "zap/ctl"); -+ } -+#endif -+#else - if ((res = register_chrdev(ZT_MAJOR, "zaptel", &zt_fops))) { - printk(KERN_ERR "Unable to register tor device on %d\n", ZT_MAJOR); - return res; -@@ -6493,6 +6564,7 @@ - if (tone_zones[x]) - kfree(tone_zones[x]); - #ifdef CONFIG_DEVFS_FS -+#ifndef LINUX26 - devfs_unregister(timer); - devfs_unregister(channel); - devfs_unregister(pseudo); -@@ -6508,6 +6580,16 @@ - class_destroy(zap_class); - #endif /* CONFIG_ZAP_UDEV */ - unregister_chrdev(ZT_MAJOR, "zaptel"); -+ -+ devfs_remove("zap/timer"); -+ devfs_remove("zap/ctl"); -+ devfs_remove("zap/pseudo"); -+ devfs_remove("zap/channel"); -+ -+ devfs_remove("zap"); -+#endif -+#else -+ unregister_chrdev(ZT_MAJOR, "zaptel"); - #endif - #ifdef CONFIG_ZAPTEL_WATCHDOG - watchdog_cleanup(); ---- zaptel-1.0.10/zaptel.h.orig 2005-11-15 15:28:44.000000000 +0100 -+++ zaptel-1.0.10/zaptel.h 2005-11-22 19:25:39.000000000 +0100 -@@ -52,18 +52,17 @@ - #define zap_pci_module pci_register_driver - #else - #define zap_pci_module pci_module_init -+/* devfs_mk_symlink has been removed in 2.6.10 */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -+#define HAS_DEVFS_MK_SYMLINK -+#endif - #endif - - #include "ecdis.h" - #include "fasthdlc.h" - #endif - #ifdef CONFIG_DEVFS_FS --#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - #include <linux/devfs_fs_kernel.h> --#else --#undef CONFIG_DEVFS_FS --//#warning "Zaptel doesn't support DEVFS in post 2.4 kernels. Disabling DEVFS in zaptel" --#endif - #endif /* CONFIG_DEVFS_FS */ - #include <linux/ioctl.h> - -@@ -71,6 +70,8 @@ - #define ELAST 500 - #endif - -+ -+ - /* Per-span configuration values */ - #define ZT_CONFIG_TXLEVEL 7 /* bits 0-2 are tx level */ - -@@ -1153,8 +1154,10 @@ - #endif - - #ifdef CONFIG_DEVFS_FS -+#ifndef LINUX26 - devfs_handle_t fhandle; /* File handle in devfs for the channel */ - devfs_handle_t fhandle_symlink; -+#endif - #endif /* CONFIG_DEVFS_FS */ - }; - -@@ -1290,7 +1293,9 @@ - int lastalarms; /* Previous alarms */ - - #ifdef CONFIG_DEVFS_FS -+#ifndef LINUX26 - devfs_handle_t dhandle; /* Directory name */ -+#endif - #endif - /* If the watchdog detects no received data, it will call the - watchdog routine */ diff --git a/net-misc/zaptel/files/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff b/net-misc/zaptel/files/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff deleted file mode 100644 index b4f1b524a6f9..000000000000 --- a/net-misc/zaptel/files/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff +++ /dev/null @@ -1,118 +0,0 @@ ---- zaptel-1.0.10/zaptel.c.orig 2006-06-08 01:59:11.000000000 +0000 -+++ zaptel-1.0.10/zaptel.c 2006-06-08 02:00:02.000000000 +0000 -@@ -1260,7 +1260,7 @@ - #ifndef LINUX26 - MOD_INC_USE_COUNT; - #endif --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("ZAPNET: Opened channel %d name %s\n", ms->channo, ms->name); - #endif - return 0; -@@ -1420,7 +1420,7 @@ - dev->trans_start = jiffies; - stats->tx_packets++; - stats->tx_bytes += ss->writen[oldbuf]; --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Buffered %d bytes to go out in buffer %d\n", ss->writen[oldbuf], oldbuf); - for (x=0;x<ss->writen[oldbuf];x++) - printk("%02x ", ss->writebuf[oldbuf][x]); -@@ -1521,7 +1521,7 @@ - some space for us */ - ss->outwritebuf = oldbuf; - } --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Buffered %d bytes (skblen = %d) to go out in buffer %d\n", ss->writen[oldbuf], skb->len, oldbuf); - for (x=0;x<ss->writen[oldbuf];x++) - printk("%02x ", ss->writebuf[oldbuf][x]); -@@ -1732,7 +1732,7 @@ - amnt = chan->blocksize; - } - --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("zt_chan_write(unit: %d, inwritebuf: %d, outwritebuf: %d amnt: %d\n", - unit, chan->inwritebuf, chan->outwritebuf, amnt); - #endif -@@ -1918,7 +1918,7 @@ - } else { - for (x=0;x<NUM_SIGS;x++) { - if (outs[x][0] == chan->sig) { --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Setting bits to %d for channel %s state %d in %d signalling\n", outs[x][txsig + 1], chan->name, txsig, chan->sig); - #endif - chan->txhooksig = txsig; -@@ -3008,14 +3008,14 @@ - if (!chan->span) - return; - --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Recalculating slaves on %s\n", chan->name); - #endif - - /* Link all slaves appropriately */ - for (x=chan->chanpos;x<chan->span->channels;x++) - if (chan->span->chans[x].master == chan) { --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Channel %s, slave to %s, last is %s, its next will be %d\n", - chan->span->chans[x].name, chan->name, last->name, x); - #endif -@@ -3024,7 +3024,7 @@ - } - /* Terminate list */ - last->nextslave = 0; --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Done Recalculating slaves on %s (last is %s)\n", chan->name, last->name); - #endif - } -@@ -3271,7 +3271,7 @@ - if (y >= 0) chans[ch.chan]->rxsig = (unsigned char)y; - chans[ch.chan]->rxhooksig = ZT_RXSIG_INITIAL; - } --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Configured channel %s, flags %04x, sig %04x\n", chans[ch.chan]->name, chans[ch.chan]->flags, chans[ch.chan]->sig); - #endif - spin_unlock_irqrestore(&chans[ch.chan]->lock, flags); -@@ -5229,7 +5229,7 @@ - zt_rbs_sethook(chan,ZT_TXSIG_OFFHOOK, ZT_TXSTATE_AFTERSTART, ZT_AFTERSTART_TIME); - } - chan->kewlonhook = 0; --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Off hook on channel %d, itimer = %d, gotgs = %d\n", chan->channo, chan->itimer, chan->gotgs); - #endif - if (chan->itimer) /* if timer still running */ -@@ -5748,7 +5748,7 @@ - oldbuf = ms->inreadbuf; - ms->infcs = PPP_INITFCS; - ms->readn[ms->inreadbuf] = ms->readidx[ms->inreadbuf]; --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("EOF, len is %d\n", ms->readn[ms->inreadbuf]); - #endif - #if defined(CONFIG_ZAPATA_NET) || defined(CONFIG_ZAPATA_PPP) -@@ -5818,7 +5818,7 @@ - /* Whoops, we're full, and have no where else - to store into at the moment. We'll drop it - until there's a buffer available */ --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Out of storage space\n"); - #endif - ms->inreadbuf = -1; -@@ -5841,7 +5841,7 @@ - if (!ms->rxdisable) { /* if receiver enabled */ - /* Notify a blocked reader that there is data available - to be read, unless we're waiting for it to be full */ --#if CONFIG_ZAPATA_DEBUG -+#ifdef CONFIG_ZAPATA_DEBUG - printk("Notifying reader data in block %d\n", oldbuf); - #endif - wake_up_interruptible(&ms->readbufq); diff --git a/net-misc/zaptel/files/zaptel-1.0.10-gentoo.diff b/net-misc/zaptel/files/zaptel-1.0.10-gentoo.diff deleted file mode 100644 index 4724762e8916..000000000000 --- a/net-misc/zaptel/files/zaptel-1.0.10-gentoo.diff +++ /dev/null @@ -1,116 +0,0 @@ ---- zaptel-1.0.10/Makefile.orig 2005-11-04 06:03:38.000000000 +0100 -+++ zaptel-1.0.10/Makefile 2005-11-22 19:14:05.000000000 +0100 -@@ -15,13 +15,13 @@ - HOSTCC=gcc - # If you want to build for a kernel other than the current kernel,set KVERS - KVERS?=`uname -r` --KINCLUDES=$(shell if [ -d /usr/src/linux-2.4/include ]; then echo /usr/src/linux-2.4/include ; else echo /usr/src/linux/include ; fi) -+KINCLUDES=/usr/src/linux/include - --CFLAGS+=-I. -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER -+CFLAGS+=-I. -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER - CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) - CFLAGS+=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi) - LCFLAGS=-fPIC $(CFLAGS) -DBUILDING_TONEZONE --KFLAGS+=-I/usr/src/linux-2.4/include -O6 -+KFLAGS+=-I/usr/src/linux/include -O6 - KFLAGS+=-DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I/usr/src/linux/drivers/net \ - -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I/usr/src/linux/drivers/net/wan -I /usr/src/linux/include -I/usr/src/linux/include/net - KFLAGS+=$(shell if [ -f $(KINCLUDES)/linux/modversions.h ] ; then echo "-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h" ; fi) -@@ -41,7 +41,7 @@ - CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\" - - BUILDVER=$(shell if echo -n $(KVERS) | grep -q ^2.6; then echo "linux26"; else echo "linux24"; fi) --MODCONF=$(shell if [ -d $(ROOT_PREFIX)/etc/modprobe.d ]; then echo "$(ROOT_PREFIX)/etc/modprobe.d/zaptel"; elif [ -d $(ROOT_PREFIX)/etc/modutils ]; then echo "$(ROOT_PREFIX)/etc/modutils/zaptel"; elif [ -f $(ROOT_PREFIX)/etc/modprobe.conf ]; then echo "$(ROOT_PREFIX)/etc/modprobe.conf"; elif [ -f $(ROOT_PREFIX)/etc/modules.conf ]; then echo "$(ROOT_PREFIX)/etc/modules.conf"; else echo $(ROOT_PREFIX)/etc/conf.modules ; fi) -+MODCONF=$(INSTALL_PREFIX)/etc/modules.d/zaptel - - ifeq (${BUILDVER},linux24) - #We only support DEVFS in linux 2.4 kernels, since its considered obsolete post 2.4 -@@ -60,7 +60,7 @@ - TZOBJS=zonedata.lo tonezone.lo - LIBTONEZONE=libtonezone.so.1.0 - MODULES=zaptel tor2 torisa wcusb wcfxo wcfxs \ -- ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp # ztdummy -+ ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp ztdummy - #MODULES+=wcfxsusb - - MODULESO=$(shell for x in $(MODULES); do echo "$$x.o "; done ) -@@ -264,7 +264,7 @@ - @echo "**** If you are running udev, read README.udev" - endif - --install: all devices -+install: devices - install -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg - if [ -f sethdlc-new ]; then \ - install -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \ -@@ -288,45 +288,24 @@ - fi; \ - fi - install -D -m 755 $(LIBTONEZONE) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE) -- if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then restorecon -v $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE); fi - install -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/linux/zaptel.h - install -D -m 644 torisa.h $(INSTALL_PREFIX)/usr/include/linux/torisa.h - install -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/tonezone.h - ( cd $(INSTALL_PREFIX)/usr/lib ; rm -f libtonezone.so ; ln -sf $(LIBTONEZONE) libtonezone.so ) -- [ `id -u` = 0 ] && /sbin/ldconfig || : -- if [ -f $(MODCONF) ]; then mv -f $(MODCONF) $(MODCONF).bak ; fi -- cat $(MODCONF).bak | grep -v "alias char-major-250" | \ -- grep -v "post-install torisa /sbin/ztcfg" | \ -- grep -v "post-install wcfxsusb /sbin/ztcfg" | \ -- grep -v "alias wcfxs" | \ -- grep -v "post-install wcfxs /sbin/ztcfg" > $(MODCONF) || true -+ if [ ! -d `dirname $(MODCONF)` ]; then install -d -m 755 `dirname $(MODCONF)` ; fi -+ /sbin/ldconfig -n $(INSTALL_PREFIX)/usr/lib - if ! grep "options torisa" $(MODCONF); then \ - echo "options torisa base=$(BASEADDR)" >> $(MODCONF); \ - fi - if ! grep "alias char-major-196" $(MODCONF); then \ - echo "alias char-major-196 $(PRIMARY)" >> $(MODCONF); \ - fi -- for x in $(MODULES); do \ -- if ! grep "post-install $$x" $(MODCONF); then \ -- if ! grep "install $$x " $(MODCONF); then \ -- if [ "$$x" != "zaptel" ] ; then \ -- if [ -f zaptel.ko ]; then echo "install $$x /sbin/modprobe --ignore-install $$x && /sbin/ztcfg" >> $(MODCONF); \ -- else echo "post-install $$x /sbin/ztcfg" >> $(MODCONF); \ -- fi; \ -- fi; \ -- fi; \ -- fi; \ -- done - if ! grep "alias wctdm" $(MODCONF); then \ - echo "alias wctdm wcfxs" >> $(MODCONF); \ - fi - if ! grep "alias wct2xxp" $(MODCONF); then \ - echo "alias wct2xxp wct4xxp" >> $(MODCONF); \ - fi -- if [ -d /etc/modutils ]; then \ -- /sbin/update-modules ; \ -- fi -- [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : - [ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE) - - config: ---- zaptel-1.0.10/Makefile.orig 2005-11-22 19:22:28.000000000 +0100 -+++ zaptel-1.0.10/Makefile 2005-11-22 19:23:34.000000000 +0100 -@@ -49,7 +49,7 @@ - endif - ifeq (${BUILDVER},linux26) - #Tests for newer linux-2.6 udev support --DYNFS=$(shell ps ax | grep -v grep | grep udevd && echo "yes") -+DYNFS=$(shell ps ax | grep -v grep | grep -q "udevd\|devfsd" && echo "yes") - endif - - CHKCONFIG=$(shell sh -c 'type -p chkconfig' 2> /dev/null) ---- zaptel-1.0.10/Makefile.orig 2005-11-22 19:40:18.000000000 +0100 -+++ zaptel-1.0.10/Makefile 2005-11-22 19:41:01.000000000 +0100 -@@ -200,7 +200,7 @@ - - $(LIBTONEZONE): $(TZOBJS) - $(CC) -shared -Wl,-soname,libtonezone.so.1 -lm -o $@ $(TZOBJS) -- [ `id -u` = 0 ] && /sbin/ldconfig || : -+ /sbin/ldconfig -n . - ln -sf libtonezone.so.1 libtonezone.so - - ztcfg.c: ztcfg.h diff --git a/net-misc/zaptel/files/zaptel-1.0.10-linux2.6.16.diff b/net-misc/zaptel/files/zaptel-1.0.10-linux2.6.16.diff deleted file mode 100644 index de56811d692c..000000000000 --- a/net-misc/zaptel/files/zaptel-1.0.10-linux2.6.16.diff +++ /dev/null @@ -1,44 +0,0 @@ ---- zaptel-1.0.10/zaptel.c.orig 2006-06-08 01:53:19.000000000 +0000 -+++ zaptel-1.0.10/zaptel.c 2006-06-08 01:56:35.000000000 +0000 -@@ -4419,7 +4419,11 @@ - for (x = 0; x < span->channels; x++) { - char chan_name[50]; - sprintf(chan_name, "zap%d", span->chans[x].channo); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) - class_device_create(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo), NULL, chan_name); -+#else -+ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, span->chans[x].channo), NULL, chan_name); -+#endif - } - #endif /* CONFIG_ZAP_UDEV */ - -@@ -6445,10 +6449,17 @@ - - #ifdef CONFIG_ZAP_UDEV /* udev support functions */ - zap_class = class_create(THIS_MODULE, "zaptel"); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) - class_device_create(zap_class, MKDEV(ZT_MAJOR, 253), NULL, "zaptimer"); - class_device_create(zap_class, MKDEV(ZT_MAJOR, 254), NULL, "zapchannel"); - class_device_create(zap_class, MKDEV(ZT_MAJOR, 255), NULL, "zappseudo"); - class_device_create(zap_class, MKDEV(ZT_MAJOR, 0), NULL, "zapctl"); -+#else -+ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, 253), NULL, "zaptimer"); -+ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, 254), NULL, "zapchannel"); -+ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, 255), NULL, "zappseudo"); -+ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, 0), NULL, "zapctl"); -+#endif - #endif /* CONFIG_ZAP_UDEV */ - - #ifdef CONFIG_DEVFS_FS ---- zaptel-1.0.10/wcusb.c.orig 2006-06-08 02:05:33.000000000 +0000 -+++ zaptel-1.0.10/wcusb.c 2006-06-08 02:06:08.000000000 +0000 -@@ -1448,7 +1448,9 @@ - static struct usb_driver wc_usb_driver = - { - #ifdef LINUX26 -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) - owner: THIS_MODULE, -+#endif - #else - fops: NULL, - minor: 0, diff --git a/net-misc/zaptel/files/zaptel-1.0.10-ukcid.patch b/net-misc/zaptel/files/zaptel-1.0.10-ukcid.patch deleted file mode 100644 index 940abf8b0a98..000000000000 --- a/net-misc/zaptel/files/zaptel-1.0.10-ukcid.patch +++ /dev/null @@ -1,139 +0,0 @@ -Index: zaptel.c -=================================================================== -RCS file: /usr/cvsroot/zaptel/zaptel.c,v -retrieving revision 1.95.2.1 -diff -u -r1.95.2.1 zaptel.c ---- zaptel.c 6 Oct 2004 22:11:41 -0000 1.95.2.1 -+++ zaptel.c 2 Nov 2004 10:59:16 -0000 -@@ -703,6 +703,20 @@ - unsigned char *newbuf, *oldbuf; - unsigned long flags; - int x; -+ -+ /* Allocate history buffer, or not. This probably shouldn't -+ * be here, but it's convenient */ -+ if(!j) -+ { -+ if(ss->history) kfree(ss->history); -+ ss->history = NULL; -+ } -+ else -+ { -+ if(!ss->history) ss->history=kmalloc(ZT_HISTORY_BUF_LEN, GFP_KERNEL); -+ } -+ ss->historypos=0; -+ - /* Check numbufs */ - if (numbufs < 2) - numbufs = 2; -@@ -3856,11 +3870,12 @@ - { - struct zt_chan *chan = chans[unit]; - unsigned long flags; -- int j, rv; -+ int j, k1, k2, rv; - int ret; - int oldconf; - void *rxgain=NULL; - echo_can_state_t *ec, *tec; -+ struct zt_history hist; - - if (!chan) - return -ENOSYS; -@@ -4186,6 +4201,29 @@ - return -EINVAL; - break; - #endif -+ case ZT_GET_HISTORY: -+ if (copy_from_user(&hist,(struct zt_history *) data,sizeof(hist))) -+ return -EIO; -+ -+ if (!(chan->flags & ZT_FLAG_AUDIO)) return (-EINVAL); -+ if (!chan->history) return -EINVAL; -+ j=hist.len; -+ k1=ZT_HISTORY_BUF_LEN-chan->historypos; -+ k2=chan->historypos; -+ if(j>0 && k1>0) -+ { -+ if (copy_to_user(hist.buf,chan->history+chan->historypos,min(j,k1))) -+ return -EIO; -+ j-=min(j,k1); -+ } -+ if(j>0 && k2>0) -+ { -+ if (copy_to_user(hist.buf+k1,chan->history,min(j,k2))) -+ return -EIO; -+ j-=min(j,k2); -+ } -+ /* Probably should assert j==0 here */ -+ break; - default: - return zt_chanandpseudo_ioctl(inode, file, cmd, data, unit); - } -@@ -5371,6 +5409,15 @@ - if (!(ms->flags & ZT_FLAG_PSEUDO)) { - memcpy(ms->putlin, putlin, ZT_CHUNKSIZE * sizeof(short)); - memcpy(ms->putraw, rxb, ZT_CHUNKSIZE); -+ } -+ -+ /* Store in the history buffer */ -+ if(ms->history) -+ { -+ memcpy(ms->history+ms->historypos,rxb,ZT_CHUNKSIZE); -+ ms->historypos+=ZT_CHUNKSIZE; -+ if(ms->historypos >= ZT_HISTORY_BUF_LEN) -+ ms->historypos=0; - } - - /* Take the rxc, twiddle it for conferencing if appropriate and put it -Index: zaptel.h -=================================================================== -RCS file: /usr/cvsroot/zaptel/zaptel.h,v -retrieving revision 1.38 -diff -u -r1.38 zaptel.h ---- zaptel.h 27 Sep 2004 19:50:03 -0000 1.38 -+++ zaptel.h 2 Nov 2004 10:59:17 -0000 -@@ -137,6 +137,8 @@ - #define ZT_MAX_NUM_BUFS 32 - #define ZT_MAX_BUF_SPACE 32768 - -+#define ZT_HISTORY_BUF_LEN 16384 /* Count of ulaw samples */ -+ - #define ZT_DEFAULT_BLOCKSIZE 1024 - #define ZT_DEFAULT_MTR_MRU 2048 - -@@ -277,6 +279,11 @@ - int reserved[4]; /* Reserved for future expansion -- always set to 0 */ - } ZT_DIAL_PARAMS; - -+typedef struct zt_history -+{ -+ unsigned char *buf; /* Sample buffer */ -+ int len; /* Length of buffer, in bytes */ -+} ZT_HISTORY; - - typedef struct zt_dynamic_span { - char driver[20]; /* Which low-level driver to use */ -@@ -584,6 +591,11 @@ - #define ZT_TIMERPONG _IOW (ZT_CODE, 53, int) - - /* -+ * Return history buffer -+ */ -+#define ZT_GET_HISTORY _IOR(ZT_CODE, 54, struct zt_history) -+ -+/* - * Set/get signalling freeze - */ - #define ZT_SIGFREEZE _IOW (ZT_CODE, 54, int) -@@ -989,6 +1001,10 @@ - wait_queue_head_t writebufq; /* write wait queue */ - - int blocksize; /* Block size */ -+ -+ -+ u_char *history; /* History buffer, for pre-ring caller ID (ZT_HISTORY_BUF_LEN) */ -+ u_short historypos; /* Current position within buffer */ - - int eventinidx; /* out index in event buf (circular) */ - int eventoutidx; /* in index in event buf (circular) */ diff --git a/net-misc/zaptel/files/zaptel-1.0.4-gcc34.patch b/net-misc/zaptel/files/zaptel-1.0.4-gcc34.patch deleted file mode 100644 index ea80c9e0ca06..000000000000 --- a/net-misc/zaptel/files/zaptel-1.0.4-gcc34.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -ruN zaptel-1.0.4.orig/wcfxs.c zaptel-1.0.4/wcfxs.c ---- zaptel-1.0.4.orig/wcfxs.c 2005-01-31 14:27:54.828322677 -0500 -+++ zaptel-1.0.4/wcfxs.c 2005-01-31 14:32:15.629810758 -0500 -@@ -740,7 +740,7 @@ - return 0; - } - --static inline void wcfxs_voicedaa_check_hook(struct wcfxs *wc, int card) -+static void wcfxs_voicedaa_check_hook(struct wcfxs *wc, int card) - { - #ifndef AUDIO_RINGCHECK - unsigned char res; -@@ -884,7 +884,7 @@ - } - } - --static inline void wcfxs_proslic_check_hook(struct wcfxs *wc, int card) -+static void wcfxs_proslic_check_hook(struct wcfxs *wc, int card) - { - char res; - int hook; -@@ -939,7 +939,7 @@ - - } - --static inline void wcfxs_proslic_recheck_sanity(struct wcfxs *wc, int card) -+static void wcfxs_proslic_recheck_sanity(struct wcfxs *wc, int card) - { - int res; - /* Check loopback */ diff --git a/net-misc/zaptel/files/zaptel-1.0.9-rtc.patch b/net-misc/zaptel/files/zaptel-1.0.9-rtc.patch deleted file mode 100644 index a3adaa111c79..000000000000 --- a/net-misc/zaptel/files/zaptel-1.0.9-rtc.patch +++ /dev/null @@ -1,170 +0,0 @@ -Index: ztdummy.c -=================================================================== -RCS file: /usr/cvsroot/zaptel/ztdummy.c,v -retrieving revision 1.4.2.4 -diff -u -r1.4.2.4 ztdummy.c ---- ztdummy.c 21 Jan 2005 05:05:18 -0000 1.4.2.4 -+++ ztdummy.c 21 May 2005 21:53:28 -0000 -@@ -6,6 +6,7 @@ - * Written by Robert Pleh <robert.pleh@hermes.si> - * 2.6 version by Tony Hoyle - * Unified by Mark Spencer <markster@digium.com> -+ * Converted to use RTC on i386 by Tony Mountifield <tony@softins.co.uk> - * - * Copyright (C) 2002, Hermes Softlab - * Copyright (C) 2004, Digium, Inc. -@@ -38,6 +39,15 @@ - # error "This kernel is too old: not supported by this file" - #endif - -+/* -+ * NOTE: (only applies to kernel 2.6) -+ * If using an i386 architecture without a PC real-time clock, -+ * the #define USE_RTC should be commented out. -+ */ -+#if defined(__i386__) || defined(__x86_64__) -+#define USE_RTC -+#endif -+ - #include <linux/kernel.h> - #include <linux/errno.h> - #include <linux/module.h> -@@ -54,6 +64,9 @@ - #include <asm/io.h> - #endif - #ifdef LINUX26 -+#ifdef USE_RTC -+#include <linux/rtc.h> -+#endif - #include <linux/moduleparam.h> - #endif - #include "ztdummy.h" -@@ -77,8 +90,10 @@ - static int debug = 0; - - #ifdef LINUX26 -+#ifndef USE_RTC - /* New 2.6 kernel timer stuff */ - static struct timer_list timer; -+#endif - #else - #if LINUX_VERSION_CODE < VERSION_CODE(2,4,5) - # error "This kernel is too old: not supported by this file" -@@ -103,6 +118,28 @@ - - - #ifdef LINUX26 -+#ifdef USE_RTC -+/* rtc_interrupt - called at 1024Hz from hook in RTC handler */ -+static void rtc_interrupt(void *private_data) -+{ -+ struct ztdummy *ztd = private_data; -+ unsigned int ticks; -+ -+ atomic_inc(&ztd->ticks); -+ ticks = atomic_read(&ztd->ticks); -+ if (ticks == 42 || ticks == 85) { -+ /* skip it */ -+ } else if (ticks >= 128) { -+ /* skip and restart count */ -+ atomic_set(&ztd->ticks, 0); -+ } else { -+ /* zaptel timing - called in 125 of every 128 interrupts = 1000Hz */ -+ zt_receive(&ztd->span); -+ zt_transmit(&ztd->span); -+ } -+} -+#else -+/* use kernel system tick timer if PC architecture RTC is not available */ - static void ztdummy_timer(unsigned long param) - { - zt_receive(&ztd->span); -@@ -110,6 +147,7 @@ - timer.expires = jiffies + 1; - add_timer(&timer); - } -+#endif - #else - static void ztdummy_interrupt(int irq, void *dev_id, struct pt_regs *regs) - { -@@ -150,7 +188,11 @@ - - int init_module(void) - { --#ifndef LINUX26 -+#ifdef LINUX26 -+#ifdef USE_RTC -+ int err; -+#endif -+#else - int irq; - spinlock_t mylock = SPIN_LOCK_UNLOCKED; - -@@ -180,10 +222,25 @@ - } - - #ifdef LINUX26 -+#ifdef USE_RTC -+ atomic_set(&ztd->ticks, 0); -+ ztd->rtc_task.func = rtc_interrupt; -+ ztd->rtc_task.private_data = ztd; -+ err = rtc_register(&ztd->rtc_task); -+ if (err < 0) { -+ printk("ztdummy: Unable to register zaptel rtc driver\n"); -+ zt_unregister(&ztd->span); -+ kfree(ztd); -+ return err; -+ } -+ rtc_control(&ztd->rtc_task, RTC_IRQP_SET, 1024); /* 1024 Hz */ -+ rtc_control(&ztd->rtc_task, RTC_PIE_ON, 0); -+#else - init_timer(&timer); - timer.function = ztdummy_timer; - timer.expires = jiffies + 1; - add_timer(&timer); -+#endif - #else - irq=s->irq; - spin_lock_irq(&mylock); -@@ -214,7 +271,12 @@ - void cleanup_module(void) - { - #ifdef LINUX26 -+#ifdef USE_RTC -+ rtc_control(&ztd->rtc_task, RTC_PIE_OFF, 0); -+ rtc_unregister(&ztd->rtc_task); -+#else - del_timer(&timer); -+#endif - #else - free_irq(s->irq, ztd); /* disable interrupts */ - #endif -Index: ztdummy.h -=================================================================== -RCS file: /usr/cvsroot/zaptel/ztdummy.h,v -retrieving revision 1.2 -diff -u -r1.2 ztdummy.h ---- ztdummy.h 24 Feb 2003 06:00:31 -0000 1.2 -+++ ztdummy.h 21 May 2005 21:53:28 -0000 -@@ -32,9 +32,16 @@ - struct ztdummy { - struct zt_span span; - struct zt_chan chan; -+#ifdef LINUX26 -+#ifdef USE_RTC -+ atomic_t ticks; -+ rtc_task_t rtc_task; -+#endif -+#endif - }; - - -+#ifndef LINUX26 - /* Uhci definitions and structures - from file usb-uhci.h */ - #define TD_CTRL_IOC (1 << 24) /* Interrupt on Complete */ - #define USBSTS 2 -@@ -141,3 +148,4 @@ - struct pci_pool *desc_pool; - long last_error_time; // last error output in uhci_interrupt() - } uhci_t, *puhci_t; -+#endif diff --git a/net-misc/zaptel/zaptel-1.0.10-r2.ebuild b/net-misc/zaptel/zaptel-1.0.10-r2.ebuild deleted file mode 100644 index cf0e03acd137..000000000000 --- a/net-misc/zaptel/zaptel-1.0.10-r2.ebuild +++ /dev/null @@ -1,261 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.0.10-r2.ebuild,v 1.3 2007/07/12 02:52:15 mr_bones_ Exp $ - -IUSE="bri devfs26 rtc ukcid" - -inherit toolchain-funcs eutils linux-mod - -BRI_VERSION="0.2.0-RC8q" -#FLORZ_VERSION="0.2.0-RC8o_florz-9" - -MY_PV="${PV/_p/.}" - -DESCRIPTION="Drivers for Digium and ZapataTelephony cards" -HOMEPAGE="http://www.asterisk.org" -SRC_URI="http://ftp1.digium.com/pub/telephony/zaptel/zaptel-${MY_PV}.tar.gz - bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )" -# florz? ( http://zaphfc.florz.dyndns.org/zaphfc_${FLORZ_VERSION}.diff.gz )" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="~amd64 ~ppc x86" - -DEPEND="virtual/libc - virtual/linux-sources - >=dev-libs/newt-0.50.0" - -S="${WORKDIR}/${PN}-${MY_PV}" -S_BRI="${WORKDIR}/bristuff-${BRI_VERSION}" - -pkg_setup() { - linux-mod_pkg_setup - - # show an nice warning message about zaptel not supporting devfs on 2.6 - if kernel_is 2 6 && linux_chkconfig_present DEVFS_FS ; then - echo - einfo "You're using a 2.6 kernel with DEVFS." - einfo "The Zaptel drivers won't work unless you either:" - einfo " * switch to udev" - einfo " * write a script that re-creates the necessary device nodes for you" - einfo " * enable the devfs26 useflag (see below)" - einfo "" - einfo "There's an experimental patch which adds devfs support when using linux-2.6, but:" - einfo " 1. It disables udev support to avoid conflicts" - ewarn " 2. It is not supported by Digium / the Asterisk project!" - einfo "" - einfo "If you're still interested, abort now (ctrl+c) and enable the devfs26 USE-flag" - einfo "Feedback and bug-reports should go to: stkn@gentoo.org" - einfo "You have been warned!" - echo - einfo "Sleeping 20 Seconds..." - epause 20 - fi -} - -src_unpack() { - unpack ${A} - - cd ${S} - # patch makefile(s) for gentoo - epatch ${FILESDIR}/${PN}-1.0.10-gentoo.diff - - # devfs support - if use devfs26; then - einfo "Enabling experimental devfs support for linux-2.6..." - epatch ${FILESDIR}/${PN}-1.0.10-devfs26.diff - - # disable udev - sed -i -e "s:#define[\t ]\+\(CONFIG_ZAP_UDEV\):#undef \1:" \ - zconfig.h - fi - - # apply patch for gcc-3.4.x if that's the compiler in use... - # fixes (#76707) - if use x86 && [[ `gcc-fullversion` = "3.4.3" ]]; then - epatch ${FILESDIR}/${PN}-1.0.4-gcc34.patch - fi - - # try to apply bristuff patch - if use bri; then - einfo "Patching zaptel w/ BRI stuff (${BRI_VERSION})" - epatch ${FILESDIR}/zaptel-bristuff-${BRI_VERSION}.patch - - cd ${S_BRI} - -# if use florz; then -# einfo "Using florz patches (${FLORZ_VERSION}) for zaphfc" -# epatch ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff -# fi - - # patch includes - sed -i -e "s:^#include.*zaptel\.h.*:#include <zaptel.h>:" \ - qozap/qozap.c \ - zaphfc/zaphfc.c \ - cwain/cwain.c - - # patch makefiles - sed -i -e "s:^ZAP[\t ]*=.*:ZAP=-I${S}:" \ - -e "s:^MODCONF=.*:MODCONF=/etc/modules.d/zaptel:" \ - -e "s:linux-2.6:linux:g" \ - qozap/Makefile \ - zaphfc/Makefile \ - cwain/Makefile - - sed -i -e "s:^\(CFLAGS+=-I. \).*:\1 \$(ZAP):" \ - zaphfc/Makefile - - # replace uname -r with $(KVERS) - # and add KVERS?="$(uname -r)" to all bristuff Makefiles - find ${S_BRI} -iname "Makefile" -exec sed -i \ - -e "s:\`uname -r\`:\$(KVERS):g" \ - -e "s:uname -r:echo -n \$(KVERS):g" \ - -e "1 i KVERS?=\$(shell uname -r)" {} \; - fi - - cd ${S} - ####################################################################### - # apply other patches here, - # make sure they work with things that have been added before! - # - - # apply x86 rtc patch for ztdummy (http://bugs.digium.com/view.php?id=4301) - # this won't have any effect on non-x86 systems... - if use rtc; then - if use x86 || use amd64; then - epatch ${FILESDIR}/${PN}-1.0.9-rtc.patch - else - ewarn "RTC is unsupported on your arch, skipping patch" - fi - fi - - # UK callerid patch, adds support for british-telecoms callerid to x100p cards - # see http://www.lusyn.com/asterisk/patches.html for more information - use ukcid && \ - epatch ${FILESDIR}/${PN}-1.0.10-ukcid.patch - - # buy some time to get 1.2 into shape, - # fix 2.6.16 compile errors and CONFIG_ZAPATA_DEBUG undefined warnings - epatch ${FILESDIR}/zaptel-1.0.10-linux2.6.16.diff - epatch ${FILESDIR}/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff -} - -src_compile() { - make \ - KVERS=${KV_FULL} ARCH=$(tc-arch-kernel) \ - KERNEL_SOURCE=/usr/src/linux || die - - if use bri; then - cd ${S_BRI} - for x in cwain qozap zaphfc; do - make \ - KVERS=${KV_FULL} \ - ARCH=$(tc-arch-kernel) \ - KERNEL_SOURCE=/usr/src/linux \ - -C ${x} || die "make ${x} failed" - done - fi -} - -src_install() { - make INSTALL_PREFIX=${D} ARCH=$(tc-arch-kernel) \ - KVERS=${KV_FULL} KERNEL_SOURCE=/usr/src/linux install || die - - dodoc ChangeLog README README.udev README.Linux26 README.fxsusb zaptel.init - dodoc zaptel.conf.sample LICENSE zaptel.sysconfig - - # additional tools - dobin ztmonitor ztspeed zttest - - # install all header files for wanpipe - insinto /usr/include/zaptel - doins *.h - - if use bri; then - einfo "Installing bri" - cd ${S_BRI} - - insinto /lib/modules/${KV_FULL}/misc - doins qozap/qozap.${KV_OBJ} - doins zaphfc/zaphfc.${KV_OBJ} - doins cwain/cwain.${KV_OBJ} - - # install example configs for octoBRI and quadBRI - insinto /etc - doins qozap/zaptel.conf.octoBRI - newins qozap/zaptel.conf zaptel.conf.quadBRI - newins zaphfc/zaptel.conf zaptel.conf.zaphfc - - insinto /etc/asterisk - doins qozap/zapata.conf.octoBRI - newins qozap/zapata.conf zapata.conf.quadBRI - newins zaphfc/zapata.conf zapata.conf.zaphfc - - docinto bristuff - dodoc CHANGES INSTALL - - docinto bristuff/qozap - dodoc qozap/LICENSE qozap/TODO qozap/*.conf* - - docinto bristuff/zaphfc - dodoc zaphfc/LICENSE zaphfc/*.conf - - docinto bristuff/cwain - dodoc cwain/TODO cwain/LICENSE - fi - - # install init script - newinitd ${FILESDIR}/zaptel.rc6 zaptel - newconfd ${FILESDIR}/zaptel.confd zaptel - - # install devfsd rule file - insinto /etc/devfs.d - newins ${FILESDIR}/zaptel.devfsd zaptel - - # install udev rule file - insinto /etc/udev/rules.d - newins ${FILESDIR}/zaptel.udevd 10-zaptel.rules - - # fix permissions if there's no udev / devfs around - if [[ -d ${D}/dev/zap ]]; then - chown -R root:dialout ${D}/dev/zap - chmod -R u=rwX,g=rwX,o= ${D}/dev/zap - fi -} - -pkg_postinst() { - linux-mod_pkg_postinst - - if use devfs26; then - ewarn "*** Warning! ***" - ewarn "Devfs support for linux-2.6 is experimental and not" - ewarn "supported by digium or the asterisk project!" - echo - ewarn "Send bug-reports to: stkn@gentoo.org" - fi - - echo - einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!" - echo - - if use bri; then - einfo "Bristuff configs have been merged as:" - einfo "" - einfo "${ROOT}etc/" - einfo " zaptel.conf.zaphfc" - einfo " zaptel.conf.quadBRI" - einfo " zaptel.conf.octoBRI" - einfo "" - einfo "${ROOT}etc/asterisk/" - einfo " zapata.conf.zaphfc" - einfo " zapata.conf.quadBRI" - einfo " zapata.conf.octoBRI" - echo - fi - - # fix permissions if there's no udev / devfs around - if [[ -d ${ROOT}/dev/zap ]]; then - chown -R root:dialout ${ROOT}/dev/zap - chmod -R u=rwX,g=rwX,o= ${ROOT}/dev/zap - fi -} |