summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ast-db-manage/config/versions/65eb22eb195_add_unidentified_request_options_to_.py27
-rw-r--r--contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py25
-rw-r--r--contrib/ast-db-manage/config/versions/8d478ab86e29_pjsip_add_disable_multi_domain.py31
-rwxr-xr-xcontrib/scripts/install_prereq36
4 files changed, 114 insertions, 5 deletions
diff --git a/contrib/ast-db-manage/config/versions/65eb22eb195_add_unidentified_request_options_to_.py b/contrib/ast-db-manage/config/versions/65eb22eb195_add_unidentified_request_options_to_.py
new file mode 100644
index 000000000..e0453a57c
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/65eb22eb195_add_unidentified_request_options_to_.py
@@ -0,0 +1,27 @@
+"""Add unidentified request options to global
+
+Revision ID: 65eb22eb195
+Revises: 8d478ab86e29
+Create Date: 2016-03-11 11:58:51.567959
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '65eb22eb195'
+down_revision = '8d478ab86e29'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ op.add_column('ps_globals', sa.Column('unidentified_request_count', sa.Integer))
+ op.add_column('ps_globals', sa.Column('unidentified_request_period', sa.Integer))
+ op.add_column('ps_globals', sa.Column('unidentified_request_prune_interval', sa.Integer))
+ op.add_column('ps_globals', sa.Column('default_realm', sa.String(40)))
+
+def downgrade():
+ op.drop_column('ps_globals', 'unidentified_request_count')
+ op.drop_column('ps_globals', 'unidentified_request_period')
+ op.drop_column('ps_globals', 'unidentified_request_prune_interval')
+ op.drop_column('ps_globals', 'default_realm')
diff --git a/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py
new file mode 100644
index 000000000..c25fc7233
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py
@@ -0,0 +1,25 @@
+"""pjsip: add contact reg_server
+
+Revision ID: 81b01a191a46
+Revises: 65eb22eb195
+Create Date: 2016-04-15 15:00:35.024525
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '81b01a191a46'
+down_revision = '65eb22eb195'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ op.add_column('ps_contacts', sa.Column('reg_server', sa.String(20)))
+ op.drop_constraint(UniqueConstraint('id'), 'ps_contacts', type_='unique')
+ op.create_unique_constraint('ps_contacts_uq', 'ps_contacts', ['id','reg_server'])
+
+def downgrade():
+ op.drop_constraint('ps_contacts_uq', 'ps_contacts', type_='unique')
+ op.drop_column('ps_contacts', 'reg_server')
+ op.create_unique_constraint(None, 'ps_contacts', 'id')
diff --git a/contrib/ast-db-manage/config/versions/8d478ab86e29_pjsip_add_disable_multi_domain.py b/contrib/ast-db-manage/config/versions/8d478ab86e29_pjsip_add_disable_multi_domain.py
new file mode 100644
index 000000000..a78268584
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/8d478ab86e29_pjsip_add_disable_multi_domain.py
@@ -0,0 +1,31 @@
+"""pjsip_add_disable_multi_domain
+
+Revision ID: 8d478ab86e29
+Revises: 1c688d9a003c
+Create Date: 2016-04-15 11:41:26.988997
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '8d478ab86e29'
+down_revision = '1c688d9a003c'
+
+from alembic import op
+import sqlalchemy as sa
+from sqlalchemy.dialects.postgresql import ENUM
+
+YESNO_NAME = 'yesno_values'
+YESNO_VALUES = ['yes', 'no']
+
+def upgrade():
+ ############################# Enums ##############################
+
+ # yesno_values have already been created, so use postgres enum object
+ # type to get around "already created" issue - works okay with mysql
+ yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
+
+ op.add_column('ps_globals', sa.Column('disable_multi_domain', yesno_values))
+
+
+def downgrade():
+ op.drop_column('ps_globals', 'disable_multi_domain')
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index 1682558ac..bda28e9f7 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -29,13 +29,15 @@ PACKAGES_DEBIAN="$PACKAGES_DEBIAN libopenh323-dev libvpb-dev libgtk2.0-dev libmy
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libsnmp-dev libiksemel-dev libcorosync-dev libnewt-dev libpopt-dev libical-dev libspandsp-dev libjack-dev"
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libresample-dev libc-client-dev binutils-dev libsrtp-dev libgsm1-dev libedit-dev doxygen libjansson-dev libldap-dev"
PACKAGES_DEBIAN="$PACKAGES_DEBIAN subversion git libxslt1-dev automake libsrtp-dev libncurses5-dev python-dev"
-PACKAGES_RH="automake gcc gcc-c++ ncurses-devel openssl-devel libxml2-devel unixODBC-devel libcurl-devel libogg-devel libvorbis-devel speex-devel"
+PACKAGES_RH="automake bzip2 gcc gcc-c++ patch ncurses-devel openssl-devel libxml2-devel unixODBC-devel libcurl-devel libogg-devel libvorbis-devel speex-devel"
PACKAGES_RH="$PACKAGES_RH spandsp-devel freetds-devel net-snmp-devel iksemel-devel corosynclib-devel newt-devel popt-devel libtool-ltdl-devel lua-devel"
PACKAGES_RH="$PACKAGES_RH sqlite-devel libsqlite3x-devel radiusclient-ng-devel portaudio-devel postgresql-devel libresample-devel neon-devel libical-devel"
PACKAGES_RH="$PACKAGES_RH openldap-devel gmime22-devel sqlite2-devel mysql-devel bluez-libs-devel jack-audio-connection-kit-devel gsm-devel libedit-devel libuuid-devel"
PACKAGES_RH="$PACKAGES_RH jansson-devel libsrtp-devel pjproject-devel subversion git libxslt-devel python-devel"
PACKAGES_OBSD="popt gmake wget libxml libogg libvorbis curl iksemel spandsp speex iodbc freetds-0.63p1-msdblib mysql-client gmime sqlite sqlite3 jack libxslt"
+PACKAGES_FBSD="autoconf gcc binutils popt gmake wget libxml2 libogg libvorbis curl iksemel spandsp speex unixODBC freetds-devel mysql55-client gmime2 sqlite"
+PACKAGES_FBSD="$PACKAGES_FBSD sqlite3 libxslt jansson e2fsprogs-libuuid gsm libsrtp libsamplerate"
KVERS=`uname -r`
@@ -95,23 +97,45 @@ check_installed_pkgs() {
done
}
+check_installed_fpkgs() {
+ for pack in "$@"
+ do
+ if [ `pkg info -a | grep $pack | wc -l` = 0 ]; then
+ echo $pack
+ fi
+ done
+}
+
handle_debian() {
if ! [ -x "$(command -v aptitude)" ]; then
apt-get install aptitude
fi
extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
$testcmd aptitude update
- $testcmd aptitude install -y $extra_packs
+ if [ x"$extra_packs" != "x" ] ; then
+ $testcmd aptitude install -y $extra_packs
+ fi
}
handle_rh() {
extra_packs=`check_installed_rpms $PACKAGES_RH`
- $testcmd yum install -y $extra_packs
+ if [ x"$extra_packs" != "x" ] ; then
+ $testcmd yum install -y $extra_packs
+ fi
}
handle_obsd() {
extra_packs=`check_installed_pkgs $PACKAGES_OBSD`
- $testcmd pkg_add $extra_packs
+ if [ x"$extra_packs" != "x" ] ; then
+ $testcmd pkg_add $extra_packs
+ fi
+}
+
+handle_fbsd() {
+ extra_packs=`check_installed_fpkgs $PACKAGES_FBSD`
+ if [ x"$extra_packs" != "x" ] ; then
+ $testcmd pkg install -y $extra_packs
+ fi
}
install_unpackaged() {
@@ -188,7 +212,7 @@ OS=`uname -s`
unsupported_distro=''
# A number of distributions we don't (yet?) support.
-if [ "$OS" != 'Linux' -a "$OS" != 'OpenBSD' ]; then
+if [ "$OS" != 'Linux' -a "$OS" != 'OpenBSD' -a "$OS" != 'FreeBSD' ]; then
echo >&2 "$0: Your OS ($OS) is currently not supported. Aborting."
exit 1
fi
@@ -221,6 +245,8 @@ elif [ -r /etc/redhat-release ]; then
handle_rh
elif [ "$OS" = 'OpenBSD' ]; then
handle_obsd
+elif [ "$OS" = 'FreeBSD' ]; then
+ handle_fbsd
fi
if ! in_test_mode; then