From 45d848ca8aa986494382be76ab70d9ff683f3a81 Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Sun, 17 Oct 2021 20:24:54 -0400 Subject: [PATCH 1/2] build: bbb-freeswitch-core install pip3 to solve site-packages missing --- .../bbb-freeswitch-core/build.sh | 110 ++++-------------- freeswitch.placeholder.sh | 4 +- 2 files changed, 22 insertions(+), 92 deletions(-) diff --git a/build/packages-template/bbb-freeswitch-core/build.sh b/build/packages-template/bbb-freeswitch-core/build.sh index 54281cf507..b659cf2d42 100755 --- a/build/packages-template/bbb-freeswitch-core/build.sh +++ b/build/packages-template/bbb-freeswitch-core/build.sh @@ -37,17 +37,8 @@ else add-apt-repository -y ppa:bigbluebutton/support fi -if [ "$DISTRO" == "xenial" ]; then - apt-get update - apt-get install -y libopusfile-dev opus-tools libopusenc-dev -fi - if [ "$DISTRO" == "bionic" ]; then - add-apt-repository ppa:bigbluebutton/support -y -# cat > /etc/apt/sources.list.d/kepstin-ubuntu-opus-bionic.list << HERE -#deb http://ppa.launchpad.net/kepstin/opus/ubuntu xenial main -# deb-src http://ppa.launchpad.net/kepstin/opus/ubuntu xenial main -#HERE + add-apt-repository ppa:bigbluebutton/support -y apt-get update apt-get install -y libopusfile-dev opus-tools libopusenc-dev fi @@ -55,6 +46,8 @@ fi mkdir -p staging pushd . + +# sofia-sip start if [ ! -d sofia-sip ]; then git clone https://github.com/freeswitch/sofia-sip.git fi @@ -62,11 +55,13 @@ cd sofia-sip/ git pull ./bootstrap.sh ./configure -#make DESTDIR=/var/tmp/bbb-freeswitch-core_2.3.0_bionic_develop/staging install + make -j $(nproc) make install cd .. +# sofia-sip end +# spandsp start if [ ! -d spandsp ]; then git clone https://github.com/freeswitch/spandsp.git fi @@ -89,52 +84,31 @@ if [ $DISTRO == "centos7" ] || [ $DISTRO == "amzn2" ]; then make -j $(nproc) make install fi - popd +# spandsp end -#cat > /etc/ld.so.conf.d/myapp.conf << HERE -#/var/tmp/bbb-freeswitch-core_2.3.0_bionic_develop/staging/usr/local/lib -#HERE ldconfig -#pushd /tmp -#git clone https://git.xiph.org/libopusenc.git -#cd libopusenc -#./autogen.sh -#./configure -#make install -#popd - - -git fetch -git fetch --tags -git reset --hard -git checkout master -git pull - -#git apply ../crash-fix2.patch - -# Fix websocket lock -#cp ../websocket-fix/tport.c libs/sofia-sip/libsofia-sip-ua/tport/tport.c -#cp ../websocket-fix/tport_type_ws.c libs/sofia-sip/libsofia-sip-ua/tport/tport_type_ws.c - - -#cp ../opus-fix/mod_opusfile.c src/mod/formats/mod_opusfile/mod_opusfile.c -#cp ../opus-fix/Makefile.am src/mod/formats/mod_opusfile/Makefile.am - - -#if [ "$DISTRO" == "bionic" ];then -# sed -i 's/formats\/mod_opusfile//g' modules.conf -# sed -i 's///g' ../conf/modules.conf.xml -#fi +# we already cloned the FS repo in freeswitch.placeholder.sh patch -p0 < floor.patch ./bootstrap.sh + +apt update +apt install -y python3-pip + +pip3 --version +pip3 install +python3 -m site +python3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));' + + + + ./configure --disable-core-odbc-support --disable-core-pgsql-support \ --without-python --without-erlang --without-java \ --prefix=/opt/freeswitch CFLAGS="-Wno-error -Og -ggdb" CXXFLAGS="-Wno-error -Og -ggdb" -# --prefix=/opt/freeswitch CFLAGS="-Wno-error -O3 -ggdb" CXXFLAGS="-Wno-error -Og -ggdb" make -j $(nproc) make install @@ -154,52 +128,8 @@ cp -r /opt/freeswitch staging/opt mkdir -p $DESTDIR/var/freeswitch/meetings echo "This directory holds *.wav files for FreeSWITCH" > $DESTDIR/var/freeswitch/meetings/readme.txt - #mkdir -p $DESTDIR/etc/default - #cp freeswitch.default $DESTDIR/etc/default/freeswitch - - if [ 1 == 0 ]; then - cp conf/acl.conf.xml $CONFDIR/autoload_configs - cp conf/opus.conf.xml $CONFDIR/autoload_configs - - # Leave these here in case administrator wants to try other settings for Opus - # - # find $(DESTDIR)/opt/freeswitch/sounds -type d -name 32000 -exec rm -rf '{}' \; - # find $(DESTDIR)/opt/freeswitch/sounds -type d -name 48000 -exec rm -rf '{}' \; - - cp conf/vars.xml $CONFDIR - - cp conf/external.xml $CONFDIR/sip_profiles - cp conf/external-ipv6.xml $CONFDIR/sip_profiles - cp conf/internal-ipv6.xml $CONFDIR/sip_profiles - cp conf/internal.xml $CONFDIR/sip_profiles - cp conf/public.xml $CONFDIR/dialplan - - rm -rf $CONFDIR/directory/default/* - cp conf/bbbuser.xml $CONFDIR/directory/default - - cp conf/modules.conf.xml $CONFDIR/autoload_configs - cp conf/conference.conf.xml $CONFDIR/autoload_configs - cp conf/switch.conf.xml $CONFDIR/autoload_configs - # cp conf/verto.conf.xml $CONFDIR/autoload_configs - - rm -rf $CONFDIR/dialplan/default/* - rm -rf $CONFDIR/dialplan/public/* - - cp conf/bbb_conference.xml $CONFDIR/dialplan/default - cp conf/bbb_echo_test.xml $CONFDIR/dialplan/default - cp conf/bbb_echo_to_conference.xml $CONFDIR/dialplan/default - - cp conf/default.xml $CONFDIR/dialplan - - cp conf/bbb_sip.xml $CONFDIR/dialplan/public - cp conf/bbb_webrtc.xml $CONFDIR/dialplan/public - - mkdir -p $CONFDIR/tls - - else rm -rf $CONFDIR/* cp -r config/freeswitch/conf/* $CONFDIR - fi pushd $DESTDIR/opt/freeswitch ln -s ./etc/freeswitch conf diff --git a/freeswitch.placeholder.sh b/freeswitch.placeholder.sh index dc00b2d483..e26afc9991 100644 --- a/freeswitch.placeholder.sh +++ b/freeswitch.placeholder.sh @@ -2,6 +2,6 @@ mkdir freeswitch cd freeswitch git init git remote add origin https://github.com/signalwire/freeswitch.git -git fetch --depth 1 origin 5c6fd51c115f4029926197095d436d527277c0e2 +git fetch --depth 1 origin master git checkout FETCH_HEAD -cp -r ../bbb-voice-conference/config . \ No newline at end of file +cp -r ../bbb-voice-conference/config . From 5ca6e3e3baf05b9cc6e3af0deecaa5f0944fe749 Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Sun, 17 Oct 2021 21:51:15 -0400 Subject: [PATCH 2/2] remove unneeded pip3 code --- build/packages-template/bbb-freeswitch-core/build.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/build/packages-template/bbb-freeswitch-core/build.sh b/build/packages-template/bbb-freeswitch-core/build.sh index b659cf2d42..77fed42e39 100755 --- a/build/packages-template/bbb-freeswitch-core/build.sh +++ b/build/packages-template/bbb-freeswitch-core/build.sh @@ -95,17 +95,6 @@ patch -p0 < floor.patch ./bootstrap.sh -apt update -apt install -y python3-pip - -pip3 --version -pip3 install -python3 -m site -python3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));' - - - - ./configure --disable-core-odbc-support --disable-core-pgsql-support \ --without-python --without-erlang --without-java \ --prefix=/opt/freeswitch CFLAGS="-Wno-error -Og -ggdb" CXXFLAGS="-Wno-error -Og -ggdb"