Commit 5d4ba24f authored by Ghislain MARY's avatar Ghislain MARY

Use linphone-sdk.

parent 171c40b7
Pipeline #746 passed with stage
in 24 minutes and 1 second
variables:
GIT_SUBMODULE_STRATEGY: recursive
DEFAULT_CMAKE_OPTIONS: -DENABLE_CONFERENCE=ON -DENABLE_JWE_AUTH_PLUGIN=ON -DENABLE_PRESENCE=ON -DENABLE_PROTOBUF=ON -DENABLE_SNMP=ON -DENABLE_SOCI=ON -DENABLE_TRANSCODER=ON
DEFAULT_MACOS_CMAKE_OPTIONS: -DENABLE_CONFERENCE=ON -DENABLE_JWE_AUTH_PLUGIN=ON -DENABLE_PRESENCE=ON -DENABLE_PROTOBUF=ON -DENABLE_SNMP=OFF -DENABLE_SOCI=ON -DENABLE_TRANSCODER=ON
.linux-ccache:
cache:
key: $CI_JOB_NAME
paths:
- ccache/
before_script:
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
.job-linux:
tags: [ "docker" ]
extends: .linux-ccache
script:
- export CC=$CC
- export CXX=$CXX
- ccache -s
- ./prepare.py -G "$CMAKE_GENERATOR" -cc $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build WORK/flexisip/cmake -- $ADDITIONAL_BUILD_OPTIONS
- ccache -s
.job-linux-rpm:
tags: [ "docker" ]
script:
- sudo rpm -e `rpm -qa | grep "^bc-[^0-9]"` || true
- ./prepare.py flexisip-rpm $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build WORK/flexisip-rpm/cmake -- $ADDITIONAL_BUILD_OPTIONS
artifacts:
paths:
- WORK/flexisip-rpm/rpmbuild/RPMS/x86_64/*.rpm
when: always
expire_in: 1 week
.job-linux-deb:
tags: [ "docker" ]
script:
- sudo apt-get -y remove `dpkg-query -f '${binary:Package}\n' -W | grep "^bc-"` || true
- ./prepare.py flexisip-rpm $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build WORK/flexisip-rpm/cmake -- $ADDITIONAL_BUILD_OPTIONS
artifacts:
paths:
- WORK/flexisip-rpm/rpmbuild/DEBS/*.deb
when: always
expire_in: 1 week
.scheduled-job-linux:
extends: .job-linux
only:
- schedules
job-centos7-makefile-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
ADDITIONAL_BUILD_OPTIONS: -j4
extends: .job-linux
job-centos7-makefile-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
ADDITIONAL_BUILD_OPTIONS: -j4
extends: .job-linux
#job-centos7-ninja-gcc:
#
# image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
# variables:
# CMAKE_GENERATOR: Ninja
# CC: gcc
# CXX: g++
# extends: .job-linux
#job-centos7-ninja-clang:
#
# image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
# variables:
# CMAKE_GENERATOR: Ninja
# CC: clang
# CXX: clang++
# extends: .job-linux
job-centos7-rpm:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
extends: .job-linux-rpm
job-debian8-makefile-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
ADDITIONAL_BUILD_OPTIONS: -j4
extends: .scheduled-job-linux
job-debian8-makefile-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
ADDITIONAL_BUILD_OPTIONS: -j4
extends: .scheduled-job-linux
job-debian8-ninja-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
extends: .job-linux
job-debian8-ninja-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
extends: .job-linux
job-debian8-deb:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
extends: .job-linux-deb
job-debian9-makefile-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
ADDITIONAL_BUILD_OPTIONS: -j4
extends: .scheduled-job-linux
job-debian9-makefile-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
ADDITIONAL_BUILD_OPTIONS: -j4
extends: .scheduled-job-linux
job-debian9-ninja-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
extends: .job-linux
job-debian9-ninja-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
extends: .job-linux
job-debian9-deb:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
extends: .job-linux-deb
.job-macosx:
tags: [ "macosx" ]
script:
- ccache -s
- export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
- export MYSQL_DIR=/usr/local/opt/mysql-client
- ./prepare.py -G "$CMAKE_GENERATOR" -cc $DEFAULT_MACOS_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build WORK/flexisip/cmake -- $ADDITIONAL_BUILD_OPTIONS
- ccache -s
.scheduled-job-macosx:
extends: .job-macosx
only:
- schedules
job-macosx-makefile:
variables:
CMAKE_GENERATOR: Unix Makefiles
ADDITIONAL_BUILD_OPTIONS: -j4
extends: .scheduled-job-macosx
job-macosx-ninja:
variables:
CMAKE_GENERATOR: Ninja
extends: .job-macosx
job-macosx-xcode:
tags: [ "macosx" ]
only:
- schedules
script:
- export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
- export MYSQL_DIR=/usr/local/opt/mysql-client
- python prepare.py -G Xcode -cc $DEFAULT_MACOS_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build WORK/flexisip/cmake -- -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu`
[submodule "submodules/belle-sip"]
path = submodules/belle-sip
url = https://gitlab.linphone.org/BC/public/belle-sip.git
[submodule "submodules/externals/polarssl"]
path = submodules/externals/polarssl
url = https://gitlab.linphone.org/BC/public/external/polarssl.git
[submodule "submodules/externals/sofia-sip"] [submodule "submodules/externals/sofia-sip"]
path = submodules/externals/sofia-sip path = submodules/externals/sofia-sip
url = https://gitlab.linphone.org/BC/public/external/sofia-sip.git url = https://gitlab.linphone.org/BC/public/external/sofia-sip.git
[submodule "submodules/ortp"]
path = submodules/ortp
url = https://gitlab.linphone.org/BC/public/ortp.git
[submodule "submodules/cmake-builder"]
path = submodules/cmake-builder
url = https://gitlab.linphone.org/BC/public/linphone-cmake-builder.git
[submodule "submodules/mediastreamer2"]
path = submodules/mediastreamer2
url = https://gitlab.linphone.org/BC/public/mediastreamer2.git
[submodule "submodules/externals/speex"]
path = submodules/externals/speex
url = https://gitlab.linphone.org/BC/public/external/speex.git
[submodule "submodules/bctoolbox"]
path = submodules/bctoolbox
url = https://gitlab.linphone.org/BC/public/bctoolbox.git
[submodule "submodules/bcunit"]
path = submodules/bcunit
url = https://gitlab.linphone.org/BC/public/bcunit.git
[submodule "submodules/linphone"]
path = submodules/linphone
url = https://gitlab.linphone.org/BC/public/linphone.git
[submodule "submodules/externals/xerces-c"]
path = submodules/externals/xerces-c
url = https://gitlab.linphone.org/BC/public/external/xerces-c.git
[submodule "submodules/externals/libxsd"]
path = submodules/externals/libxsd
url = https://gitlab.linphone.org/BC/public/external/libxsd.git
[submodule "submodules/belr"]
path = submodules/belr
url = https://gitlab.linphone.org/BC/public/belr.git
[submodule "submodules/externals/libxml2"]
path = submodules/externals/libxml2
url = https://gitlab.linphone.org/BC/public/external/libxml2.git
[submodule "submodules/externals/zlib"]
path = submodules/externals/zlib
url = https://gitlab.linphone.org/BC/public/external/zlib.git
branch = 1.2.11
[submodule "submodules/externals/hiredis"] [submodule "submodules/externals/hiredis"]
path = submodules/externals/hiredis path = submodules/externals/hiredis
url = https://gitlab.linphone.org/BC/public/external/hiredis.git url = https://gitlab.linphone.org/BC/public/external/hiredis.git
[submodule "submodules/externals/sqlite3"]
path = submodules/externals/sqlite3
url = https://gitlab.linphone.org/BC/public/external/sqlite3.git
[submodule "submodules/externals/soci"]
path = submodules/externals/soci
url = https://gitlab.linphone.org/BC/public/external/soci.git
[submodule "submodules/externals/jansson"] [submodule "submodules/externals/jansson"]
path = submodules/externals/jansson path = submodules/externals/jansson
url = https://gitlab.linphone.org/BC/public/external/jansson.git url = https://gitlab.linphone.org/BC/public/external/jansson.git
[submodule "submodules/externals/jose"] [submodule "submodules/externals/jose"]
path = submodules/externals/jose path = submodules/externals/jose
url = https://gitlab.linphone.org/BC/public/external/jose.git url = https://gitlab.linphone.org/BC/public/external/jose.git
[submodule "submodules/externals/mbedtls"] [submodule "linphone-sdk"]
path = submodules/externals/mbedtls path = linphone-sdk
url = https://gitlab.linphone.org/BC/public/external/mbedtls.git url = https://gitlab.linphone.org/BC/public/linphone-sdk.git
...@@ -208,7 +208,7 @@ endif() ...@@ -208,7 +208,7 @@ endif()
if(ENABLE_SOCI) if(ENABLE_SOCI)
find_package(Soci REQUIRED COMPONENTS mysql) find_package(Soci REQUIRED COMPONENTS mysql)
find_path(SOCI_MYSQL_INCLUDES NAMES mysql.h PATH_SUFFIXES mysql HINTS /usr/include/mariadb /usr/local/include) find_path(SOCI_MYSQL_INCLUDES NAMES mysql.h PATH_SUFFIXES mysql HINTS $ENV{MYSQL_DIR}/include /usr/include/mariadb /usr/local/include)
endif() endif()
......
...@@ -39,6 +39,7 @@ set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}) ...@@ -39,6 +39,7 @@ set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${PROJECT_VERSION})
set(CPACK_SOURCE_GENERATOR "TGZ") set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES set(CPACK_SOURCE_IGNORE_FILES
"${CMAKE_BINARY_DIR}" "${CMAKE_BINARY_DIR}"
"^${PROJECT_SOURCE_DIR}/linphone-sdk"
"^${PROJECT_SOURCE_DIR}/submodules*" "^${PROJECT_SOURCE_DIR}/submodules*"
"^${PROJECT_SOURCE_DIR}/WORK*" "^${PROJECT_SOURCE_DIR}/WORK*"
"^${PROJECT_SOURCE_DIR}/.git*" "^${PROJECT_SOURCE_DIR}/.git*"
......
Subproject commit c10aecd76ab9fa0d1c2b22d8882fd46d2ad6c211
...@@ -27,12 +27,12 @@ import platform ...@@ -27,12 +27,12 @@ import platform
import sys import sys
from logging import error, warning, info from logging import error, warning, info
sys.dont_write_bytecode = True sys.dont_write_bytecode = True
sys.path.insert(0, 'submodules/cmake-builder') sys.path.insert(0, 'linphone-sdk/cmake-builder')
try: try:
import prepare import prepare
except Exception as e: except Exception as e:
error( error(
"Could not find prepare module: {}, probably missing submodules/cmake-builder? Try running:\n" "Could not find prepare module: {}, probably missing linphone-sdk/cmake-builder? Try running:\n"
"git submodule sync && git submodule update --init --recursive".format(e)) "git submodule sync && git submodule update --init --recursive".format(e))
exit(1) exit(1)
...@@ -44,7 +44,8 @@ class FlexisipRpmTarget(prepare.Target): ...@@ -44,7 +44,8 @@ class FlexisipRpmTarget(prepare.Target):
current_path = os.path.dirname(os.path.realpath(__file__)) current_path = os.path.dirname(os.path.realpath(__file__))
self.required_build_platforms = ['Linux', 'Darwin'] self.required_build_platforms = ['Linux', 'Darwin']
self.config_file = 'configs/config-flexisip-rpm.cmake' self.config_file = 'configs/config-flexisip-rpm.cmake'
self.external_source_path = os.path.join(current_path, 'submodules') self.external_source_path = os.path.join(current_path, 'linphone-sdk')
self.alternate_external_source_path = os.path.join(current_path, 'submodules')
self.additional_args = [ '-DLINPHONE_BUILDER_TARGET=flexisip', '-DLINPHONE_BUILDER_TOP_DIR=' + current_path ] self.additional_args = [ '-DLINPHONE_BUILDER_TARGET=flexisip', '-DLINPHONE_BUILDER_TOP_DIR=' + current_path ]
class FlexisipTarget(prepare.Target): class FlexisipTarget(prepare.Target):
...@@ -54,7 +55,8 @@ class FlexisipTarget(prepare.Target): ...@@ -54,7 +55,8 @@ class FlexisipTarget(prepare.Target):
current_path = os.path.dirname(os.path.realpath(__file__)) current_path = os.path.dirname(os.path.realpath(__file__))
self.required_build_platforms = ['Linux', 'Darwin'] self.required_build_platforms = ['Linux', 'Darwin']
self.config_file = 'configs/config-flexisip.cmake' self.config_file = 'configs/config-flexisip.cmake'
self.external_source_path = os.path.join(current_path, 'submodules') self.external_source_path = os.path.join(current_path, 'linphone-sdk')
self.alternate_external_source_path = os.path.join(current_path, 'submodules')
self.additional_args = [ '-DLINPHONE_BUILDER_TARGET=flexisip', '-DLINPHONE_BUILDER_TOP_DIR=' + current_path ] self.additional_args = [ '-DLINPHONE_BUILDER_TARGET=flexisip', '-DLINPHONE_BUILDER_TOP_DIR=' + current_path ]
...@@ -78,7 +80,6 @@ class FlexisipPreparator(prepare.Preparator): ...@@ -78,7 +80,6 @@ class FlexisipPreparator(prepare.Preparator):
def check_environment(self, submodule_directory_to_check=None): def check_environment(self, submodule_directory_to_check=None):
ret = prepare.Preparator.check_environment(self) ret = prepare.Preparator.check_environment(self)
ret |= not self.check_is_installed('doxygen', 'doxygen') ret |= not self.check_is_installed('doxygen', 'doxygen')
ret |= not self.check_is_installed('dot', 'graphviz')
if 'flexisip-rpm' in self.args.target: if 'flexisip-rpm' in self.args.target:
ret |= not self.check_is_installed('rpmbuild', 'rpm-build') ret |= not self.check_is_installed('rpmbuild', 'rpm-build')
ret |= not self.check_is_installed('bison', 'bison') ret |= not self.check_is_installed('bison', 'bison')
...@@ -140,7 +141,7 @@ help: help-prepare-options ...@@ -140,7 +141,7 @@ help: help-prepare-options
def main(argv=None): def main(argv=None):
preparator = FlexisipPreparator() preparator = FlexisipPreparator()
preparator.parse_args() preparator.parse_args()
if preparator.check_environment(submodule_directory_to_check="submodules/belle-sip/src") != 0: if preparator.check_environment(submodule_directory_to_check="linphone-sdk/belle-sip/src") != 0:
preparator.show_environment_errors() preparator.show_environment_errors()
return 1 return 1
return preparator.run() return preparator.run()
......
...@@ -1067,7 +1067,7 @@ int Authentication::AuthenticationListener::checkPasswordMd5(const char *passwd) ...@@ -1067,7 +1067,7 @@ int Authentication::AuthenticationListener::checkPasswordMd5(const char *passwd)
if (passwd) { if (passwd) {
mPasswordFound = true; mPasswordFound = true;
++*getModule()->mCountPassFound; ++*getModule()->mCountPassFound;
strncpy(a1buf, passwd, 33); // remove trailing NULL character strncpy(a1buf, passwd, sizeof(a1buf) - 1); // remove trailing NULL character
a1 = a1buf; a1 = a1buf;
} else { } else {
++*getModule()->mCountPassNotFound; ++*getModule()->mCountPassNotFound;
...@@ -1094,7 +1094,7 @@ int Authentication::AuthenticationListener::checkPasswordForAlgorithm(const char ...@@ -1094,7 +1094,7 @@ int Authentication::AuthenticationListener::checkPasswordForAlgorithm(const char
if (passwd) { if (passwd) {
mPasswordFound = true; mPasswordFound = true;
++*getModule()->mCountPassFound; ++*getModule()->mCountPassFound;
strncpy(a1, passwd, 65); // remove trailing NULL character strncpy(a1, passwd, sizeof(a1) - 1); // remove trailing NULL character
} else { } else {
++*getModule()->mCountPassNotFound; ++*getModule()->mCountPassNotFound;
auth_digest_a1_for_algorithm(&mAr, "xyzzy", a1); auth_digest_a1_for_algorithm(&mAr, "xyzzy", a1);
......
...@@ -30,7 +30,7 @@ find_package(Jansson REQUIRED) ...@@ -30,7 +30,7 @@ find_package(Jansson REQUIRED)
find_package(Jose REQUIRED) find_package(Jose REQUIRED)
set(JWE_AUTH_LIBRARIES set(JWE_AUTH_LIBRARIES
${FLEXISIP_LIBS} flexisip
${JANSSON_LIBRARIES} ${JANSSON_LIBRARIES}
${JOSE_LIBRARIES} ${JOSE_LIBRARIES}
) )
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <array>
#include <dirent.h> #include <dirent.h>
#include <fstream> #include <fstream>
#include <unordered_map> #include <unordered_map>
......
Subproject commit d3e747b3d0b3f3098d8dee79d24bef034cf8fd16
Subproject commit 8f5e72c3428ad6ff9bfa59da5a83524ff0764fa5
Subproject commit 2aafb7f0d699338c3c28bd9accb8097b46ce3cd8
Subproject commit 8e841b047641b1812a83880a90e89d702747ca5b
Subproject commit b345258770ee6258a84faa7579271ff8e79f9298
Subproject commit 3211973961d01b9c5efb5c5f3b8620a2a3c17561
Subproject commit 34af5de2ee71dde72a010fde336d2efa9c386abd
Subproject commit cb152c35ddf7cc837221072e7dc99809f0f7c885
Subproject commit 8a701f9205d175d624c28f60a922f8a58d2552d7
Subproject commit bf1e6775e58b2e72382eaf276888d46d7b6310d9
Subproject commit ca176a1f78b9b00d9589d2f28f1459315b8eca5c
Subproject commit 63b7418ed6184673e051a85761dc940f95813849
Subproject commit 4a6d98d2ad797c37a9d12c1da772ca813c2f95b7
Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f
Subproject commit bea5412053c59014d7e8e0114420bd45fc994528
Subproject commit 5de9bb4086b036bfe84e088c87211cdf48f37cd6
Subproject commit 1fcd6fd1558f26255ae9dac687191ddf988bfd5b
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment