Merge pull request #354 from micmac1/fs-1.8

freeswitch-stable: bump to 1.8.1
This commit is contained in:
micmac1 2018-08-01 13:35:40 +02:00 committed by GitHub
commit aa966ce4eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 25 additions and 579 deletions

View file

@ -45,29 +45,6 @@ config FS_STABLE_WITH_SRTP
help
Compile with SRTP support.
config FS_STABLE_WITH_V8
bool "Compile with V8 support"
depends on arm||i386||mipsel||x86_64
default y if x86_64
help
The sole purpose of this symbol is to prevent mod_v8 from being built
by the build bots. Currently the only exception is x86_64. The build is
time-consuming and the module is quite large, making it an unlikely
choice for devices with limited resources.
If you want mod_v8 to become available, select 'y'.
config FS_STABLE_WITH_V8_SNAPSHOT
bool "Include heap snapshot"
depends on FS_STABLE_WITH_V8
default n
help
V8 can be built with a heap snapshot for faster initialization. Default
is 'n' because of seemingly random segmentation faults observed when
generating the snapshot.
Only select 'y' if you know what you are doing.
config FS_STABLE_WITH_VPX
bool "Compile with VPx support"
depends on FS_STABLE_WITH_LIBYUV

View file

@ -9,15 +9,19 @@ include $(TOPDIR)/rules.mk
PRG_NAME:=freeswitch
PKG_NAME:=$(PRG_NAME)-stable
PKG_VERSION:=1.6.20
PKG_RELEASE:=10
PKG_VERSION:=1.8.1
PKG_RELEASE:=1
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://files.$(PRG_NAME).org/releases/$(PRG_NAME)
PKG_HASH:=dbb0f73109171bd381772b247b8ef581f6a176964619082a1fe031b004086f6b
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://$(PRG_NAME).org/stash/scm/fs/$(PRG_NAME).git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=b33bc925c52b19eda0cafc079015f5bac8fe68d1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PRG_NAME)-$(PKG_VERSION)
PKG_MIRROR_HASH:=8587be34ea2194c64cdb0e19ce84519d260fb529ac40d4a7f7eb62b1fe3ef9b2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
# configure in libs/spandsp fails without libjpeg and tiff
PKG_BUILD_DEPENDS:= \
@ -203,7 +207,6 @@ FS_STABLE_MOD_AVAILABLE:= \
translate \
tts_commandline \
unimrcp \
v8 \
valet_parking \
verto \
vmd \
@ -226,7 +229,6 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_FS_STABLE_WITH_PGSQL \
CONFIG_FS_STABLE_WITH_PNG \
CONFIG_FS_STABLE_WITH_SRTP \
CONFIG_FS_STABLE_WITH_V8_SNAPSHOT \
CONFIG_FS_STABLE_WITH_VPX \
CONFIG_FS_STABLE_WITH_ZRTP \
CONFIG_LIBC \
@ -684,12 +686,6 @@ CONFIGURE_ARGS+= \
--with-erlang=no
endif
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
CONFIGURE_ARGS+= \
--enable-static-v8 \
$(if $(CONFIG_FS_STABLE_WITH_V8_SNAPSHOT),,--disable-snapshot-v8)
endif
# Make mod_spandsp use fixed point math when soft float support is
# enabled on target devices.
ifeq ($(CONFIG_SOFT_FLOAT),y)
@ -771,84 +767,6 @@ endif
MAKE_VARS+= \
ac_cv_dev_urandom=yes
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
# arm
ifeq ($(CONFIG_arm),y)
FS_STABLE_MYARCH:=arm
FS_STABLE_MYDEFINES:=v8_target_arch=arm
ifeq ($(CONFIG_arm_v6),y)
FS_STABLE_MYDEFINES+=arm_version=6
else
ifeq ($(CONFIG_arm_v7),y)
FS_STABLE_MYDEFINES+=arm_version=7
else
FS_STABLE_MYDEFINES+=arm_version=default
endif
endif
ifeq ($(CONFIG_VFP),y)
ifeq ($(CONFIG_VFPv3),y)
ifeq ($(CONFIG_NEON),y)
FS_STABLE_MYDEFINES+=arm_fpu=neon
else
FS_STABLE_MYDEFINES+=arm_fpu=vfpv3
endif
else
FS_STABLE_MYDEFINES+=arm_fpu=vfp
endif
else
FS_STABLE_MYDEFINES+=arm_fpu=default
endif
ifeq ($(CONFIG_SOFT_FLOAT),y)
FS_STABLE_MYDEFINES+=arm_float_abi=softfp
else
FS_STABLE_MYDEFINES+=arm_float_abi=hard
endif
endif
# i386
ifeq ($(CONFIG_i386),y)
FS_STABLE_MYARCH:=ia32
FS_STABLE_MYDEFINES:=v8_target_arch=ia32
endif
# mipsel
ifeq ($(CONFIG_mipsel),y)
FS_STABLE_MYARCH:=mipsel
FS_STABLE_MYDEFINES:=v8_target_arch=mipsel
ifeq ($(CONFIG_CPU_MIPS32),y)
ifeq ($(CONFIG_CPU_MIPS32_R2),y)
FS_STABLE_MYDEFINES+=mips_arch_variant=mips32r2
else
ifeq ($(CONFIG_CPU_MIPS32_R1),y)
FS_STABLE_MYDEFINES+=mips_arch_variant=mips32r1
endif
endif
endif
ifeq ($(CONFIG_SOFT_FLOAT),y)
FS_STABLE_MYDEFINES+=v8_use_mips_abi_hardfloat=false
else
FS_STABLE_MYDEFINES+=v8_use_mips_abi_hardfloat=true
endif
endif
# x86_64
ifeq ($(CONFIG_x86_64),y)
FS_STABLE_MYARCH:=x64
FS_STABLE_MYDEFINES:=v8_target_arch=x64
endif
MAKE_VARS+= \
FS_STABLE_HOSTCC="$(HOSTCC)" \
FS_STABLE_HOSTCXX="$(HOSTCXX)" \
FS_STABLE_HOST_CFLAGS="$(HOST_CFLAGS)" \
FS_STABLE_HOST_LDFLAGS="$(HOST_LDFLAGS)" \
FS_STABLE_HOST_PYTHONPATH="$(HOST_PYTHONPATH)" \
FS_STABLE_MYARCH="$(FS_STABLE_MYARCH)" \
FS_STABLE_MYDEFINES="$(FS_STABLE_MYDEFINES)"
endif
# Make sphinxbase use fixed point math when soft float support is
# enabled on target devices.
ifeq ($(CONFIG_SOFT_FLOAT),y)
@ -876,12 +794,8 @@ FS_STABLE_SPHINXMODEL_FILE:=communicator_semi_6000_20080321.tar.gz
FS_STABLE_SPHINXMODEL_HASH:=dbb5e9fb85000a7cb97d6958a3ef8d77532dc55fc730ac6979705e8645cb0c18
# mod_radius_cdr
FS_STABLE_FREERADIUS_CLIENT_FILE:=freeradius-client-1.1.6.tar.gz
FS_STABLE_FREERADIUS_CLIENT_HASH:=3fc609af328258e00345389d5478b099fe4ea3ad694d0472525ef3adab9cf053
# mod_v8
FS_STABLE_V8_FILE:=v8-3.24.14.tar.bz2
FS_STABLE_V8_HASH:=395f4eaf5580b973b1e33fe0aa27f8d013ddf1b163ad76992c50dd91ff182828
FS_STABLE_FREERADIUS_CLIENT_FILE:=freeradius-client-1.1.7.tar.gz
FS_STABLE_FREERADIUS_CLIENT_HASH:=eada2861b8f4928e3ac6b5bbfe11e92cd6cdcacfce40cae1085e77c1b6add0e9
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
$(eval $(call Download/files,zmq,$(FS_STABLE_ZEROMQ_FILE),$(FS_STABLE_ZEROMQ_URL),$(FS_STABLE_ZEROMQ_HASH)))
@ -897,20 +811,18 @@ ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius-cdr),)
$(eval $(call Download/files,freeradius-client,$(FS_STABLE_FREERADIUS_CLIENT_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_FREERADIUS_CLIENT_HASH)))
endif
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
$(eval $(call Download/files,v8,$(FS_STABLE_V8_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_V8_HASH)))
endif
# Need to update LDFLAGS for libs/unimrcp, otherwise it will try to link to a
# different apr/apr-util if found.
# FS_STABLE_ANCHOR: string in build/acmacros/apr.m4 that will be replaced
FS_STABLE_ANCHOR:=dnl Get build information from APR
FS_STABLE_APR_LIBS:=-L$(PKG_BUILD_DIR)/libs/apr -L$(PKG_BUILD_DIR)/libs/apr-util
# With a release tarball we can just call Build/Prepare/Default. But with the
# git checkout we need to call bootstrap and apply our patches afterward.
define Build/Prepare
$(call Build/Prepare/Default)
$(RM) -r $(PKG_BUILD_DIR)/libs/tiff-*
$(PKG_UNPACK)
cd $(PKG_BUILD_DIR) && $(AM_TOOL_PATHS) ./bootstrap.sh
$(Build/Patch)
echo '#applications/mod_random' >> $(PKG_BUILD_DIR)/modules.conf
echo '#codecs/mod_yuv' >> $(PKG_BUILD_DIR)/modules.conf
@ -966,10 +878,6 @@ ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius-cdr),)
$(CP) $(DL_DIR)/$(FS_STABLE_FREERADIUS_CLIENT_FILE) $(PKG_BUILD_DIR)/libs
endif
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
$(CP) $(DL_DIR)/$(FS_STABLE_V8_FILE) $(PKG_BUILD_DIR)/libs
endif
# Compile FreeTDM first
ifneq ($(CONFIG_PACKAGE_$(PKG_LIBFTDM)),)
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/$(FTDM))
@ -1231,7 +1139,6 @@ $(eval $(call Package/$(PKG_NAME)/Module,tone_stream,Tone stream,Tone generation
$(eval $(call Package/$(PKG_NAME)/Module,translate,Number translation,This module implements number translation.,))
$(eval $(call Package/$(PKG_NAME)/Module,tts_commandline,TTS command-line,Run a command-line and play the output file.,))
$(eval $(call Package/$(PKG_NAME)/Module,unimrcp,UniMRCP,Allows communication with Media Resource Control Protocol servers.,))
$(eval $(call Package/$(PKG_NAME)/Module,v8,V8,This package contains mod_v8 for FreeSWITCH.,@!USE_UCLIBCXX @FS_STABLE_WITH_V8 @arm||i386||mipsel||x86_64))
$(eval $(call Package/$(PKG_NAME)/Module,valet_parking,Valet parking,This module implements the valet call parking strategy.,))
$(eval $(call Package/$(PKG_NAME)/Module,verto,Verto,Verto signaling protocol.,))
$(eval $(call Package/$(PKG_NAME)/Module,vmd,Voicemail detection,This module detects voicemail beeps.,))

View file

@ -31,7 +31,7 @@
else
CC_FOR_BUILD='$(CC)'
fi
@@ -667,7 +643,7 @@ AC_ARG_ENABLE(core-pgsql-pkgconfig,
@@ -662,7 +638,7 @@ AC_ARG_ENABLE(core-pgsql-pkgconfig,
[AS_HELP_STRING([--disable-core-pgsql-pkgconfig], [Use pg_config to get PGQSL build options])],[enable_core_pgsql_pkgconfig="$enableval"],[enable_core_pgsql_pkgconfig="yes"])
if test x"$enable_core_pgsql_support" = x"yes" ; then
@ -40,7 +40,7 @@
AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
if test "$PKG_CONFIG" = "no" \
|| test x"$enable_core_pgsql_pkgconfig" = x"no" \
@@ -1555,13 +1531,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
@@ -1575,13 +1551,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
# -a "x$ac_cv_have_EXTERN_h" != "xno"
if test "x$ac_cv_have_perl" != "xno"; then
@ -55,7 +55,7 @@
save_CFLAGS="$CFLAGS"
CFLAGS="$PERL_CFLAGS"
@@ -1656,24 +1626,12 @@ then
@@ -1676,24 +1646,12 @@ then
if test "$python_has_distutils" != "no" ; then
AC_MSG_CHECKING([location of site-packages])

View file

@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1941,7 +1941,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
@@ -1961,7 +1961,12 @@ AC_SUBST(OUR_DISABLED_INSTALL_MODS)
AC_SUBST(OUR_DISABLED_UNINSTALL_MODS)
AC_SUBST(AM_MAKEFLAGS)

View file

@ -1,6 +1,6 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -549,8 +549,13 @@ libs/libedit/src/.libs/libedit.a:
@@ -572,8 +572,13 @@ libs/libedit/src/.libs/libedit.a:
libs/libzrtp/libzrtp.a:
cd libs/libzrtp && $(MAKE)
@ -8,10 +8,10 @@
+# - added CROSS and set target to generic-gnu for cross-compile
+# - added CPPFLAGS to CFLAGS, otherwise they would be ignored
+# - disabled optimizations that would override OpenWrt's CFLAGS
+# - added a size limit like Debian does to address CVE-2017-0641
+
libs/libvpx/Makefile:
- cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)"
+ cd libs/libvpx && CROSS="$(CROSS)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)" --disable-optimizations --size-limit=16384x16384
- cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --size-limit=16384x16384 --extra-cflags="$(VISIBILITY_FLAG)"
+ cd libs/libvpx && CROSS="$(CROSS)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --target=generic-gnu --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --size-limit=16384x16384 --extra-cflags="$(VISIBILITY_FLAG)" --disable-optimizations
libs/libvpx/libvpx.a: libs/libvpx/Makefile
@cd libs/libvpx && $(MAKE)

View file

@ -1,87 +0,0 @@
--- a/src/mod/languages/mod_v8/Makefile.am
+++ b/src/mod/languages/mod_v8/Makefile.am
@@ -15,12 +15,17 @@ V8_LIBEXT=dylib
V8_BUILDPARAMS=snapshot=off i18nsupport=off
V8_SNAPSHOT=nosnapshot
else
-V8_LIBDIR=$(V8_BUILDDIR)/out/native/lib.target
+V8_LIBDIR=$(V8_BUILDDIR)/out/$(FS_STABLE_MYARCH).release/lib.target
V8_LIBEXT=so
# Some gcc versions report warnings incorrectly
V8_BUILDPARAMS=strictaliasing=off werror=no i18nsupport=off
+if DISABLE_SNAPSHOT_V8
+V8_BUILDPARAMS+=snapshot=off
+V8_SNAPSHOT=nosnapshot
+else
V8_SNAPSHOT=snapshot
endif
+endif
if ENABLE_STATIC_V8
# Build the static lib version of V8
@@ -29,8 +34,8 @@ V8_STATIC_DIR=$(V8_BUILDDIR)/out/native
V8_ICU_STATIC_DIR=$(V8_BUILDDIR)/out/native
V8_CXXFLAGS =
else
-V8_STATIC_DIR=$(V8_BUILDDIR)/out/native/obj.target/tools/gyp
-V8_ICU_STATIC_DIR=$(V8_BUILDDIR)/out/native/obj.target/third_party/icu
+V8_STATIC_DIR=$(V8_BUILDDIR)/out/$(FS_STABLE_MYARCH).release/obj.target/tools/gyp
+V8_ICU_STATIC_DIR=$(V8_BUILDDIR)/out/$(FS_STABLE_MYARCH).release/obj.target/third_party/icu
V8_CXXFLAGS = -fPIC
endif
V8LIB=$(V8_STATIC_DIR)/libv8_base*.a
@@ -46,11 +51,6 @@ else
V8_EXTRA_BUILD_PARAMS=--no-parallel
endif
-# Try to find the target platform for our configured CXX compiler
-# Parse the result one extra time to handle different i386 platforms (i386, i486 etc)
-CXX_TARGET_PLATFORM := $(shell $(CXX) -v 2>&1 | grep Target | cut '-d:' -f2 | cut '-d-' -f1 | tr -d ' ')
-CXX_TARGET_PLATFORM_I386 := $(shell echo "$(CXX_TARGET_PLATFORM)" | sed 's/^\(.\{1\}\)\(.\{1\}\)/\13/')
-
MODNAME=mod_v8
AM_CFLAGS += -I. -I./include -I$(switch_srcdir)/src/mod/languages/mod_v8/include -I$(V8_DIR)/include
@@ -121,21 +121,13 @@ $(V8_DIR)/.stamp-patch: $(V8_DIR)
$(V8LIB): $(V8_DIR) $(V8_DIR)/.stamp-patch
mkdir -p $(V8_BUILDDIR)
- if test "$(CXX_TARGET_PLATFORM)" = "x86_64"; then \
- defines="v8_target_arch=x64 target_arch=x64"; \
- else \
- if test "$(CXX_TARGET_PLATFORM)" = "arm"; then \
- defines="v8_target_arch=arm target_arch=arm"; \
- else \
- if test "$(CXX_TARGET_PLATFORM_I386)" = "i386"; then \
- defines="v8_target_arch=ia32 target_arch=ia32"; \
- fi; \
- fi; \
- fi; \
- cd $(V8_BUILDDIR) && CFLAGS="$(V8_CXXFLAGS)" CXXFLAGS="$(V8_CXXFLAGS)" \
- LINK=@CXX@ CXX=@CXX@ GYPFLAGS="$(V8_EXTRA_BUILD_PARAMS)" GYP_DEFINES="$$defines" \
- OUTDIR=$(V8_BUILDDIR)/out \
- PYTHONPATH="$(V8_DIR)/build/gyp/pylib:$(PYTHONPATH)" $(MAKE) -C $(V8_DIR) $(V8_BUILDPARAMS) native
+ cd $(V8_BUILDDIR) && sed -i "/'want_separate_host_toolset': 0,/s/0/1/" build/standalone.gypi && \
+ $(DEFAULT_VARS) CFLAGS+="$(V8_CXXFLAGS)" CXXFLAGS+="$(V8_CXXFLAGS)" \
+ LINK=@CXX@ CXX=@CXX@ GYPFLAGS="$(V8_EXTRA_BUILD_PARAMS)" OUTDIR=./out/ \
+ PYTHONPATH="$(V8_DIR)/build/gyp/pylib:$(FS_STABLE_HOST_PYTHONPATH)" $(MAKE) -C $(V8_DIR) \
+ CC.host="$(FS_STABLE_HOSTCC)" CFLAGS.host="$(FS_STABLE_HOST_CFLAGS)" CXX.host="$(FS_STABLE_HOSTCXX)" \
+ CXXFLAGS.host="$(FS_STABLE_HOST_CFLAGS)" LDFLAGS.host="$(FS_STABLE_HOST_LDFLAGS)" \
+ $(V8_BUILDPARAMS) $(FS_STABLE_MYDEFINES) $(FS_STABLE_MYARCH).release
if ENABLE_STATIC_V8
install-exec-local: $(V8LIB)
--- a/configure.ac
+++ b/configure.ac
@@ -1519,6 +1519,11 @@ AC_ARG_ENABLE(parallel-build-v8,
[AS_HELP_STRING([--disable-parallel-build-v8], [Disable parallel build of V8])], [enable_parallel_build_v8="$enableval"], [enable_parallel_build_v8="yes"])
AM_CONDITIONAL([ENABLE_PARALLEL_BUILD_V8],[test "x$enable_parallel_build_v8" != "xno"])
+# Option to force heap snapshot generation of Google's V8 to off
+AC_ARG_ENABLE(snapshot-v8,
+[AS_HELP_STRING([--disable-snapshot-v8], [Disable heap snapshot generation of V8])], [enable_snapshot_v8="$enableval"], [enable_snapshot_v8="yes"])
+AM_CONDITIONAL([DISABLE_SNAPSHOT_V8],[test "x$enable_snapshot_v8" != "xyes"])
+
AM_CONDITIONAL([HAVE_ODBC],[test "x$enable_core_odbc_support" != "xno"])
AM_CONDITIONAL([HAVE_MYSQL],[test "$found_mysql" = "yes"])

View file

@ -1,87 +0,0 @@
commit 34c48368dcfef09ba4a694256aa9615d91252461
Author: Mike Jerris <mike@jerris.com>
Date: Tue Mar 14 17:39:05 2017 -0500
FS-10074: [libtiff] stop using embedded libtiff. Build now requires system libtiff
--- a/Makefile.am
+++ b/Makefile.am
@@ -125,7 +125,6 @@ CORE_CFLAGS += -DSWITCH_HAVE_YUV
endif
CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/crypto/include -Ilibs/srtp/crypto/include
CORE_CFLAGS += -I$(switch_builddir)/libs/spandsp/src -I$(switch_srcdir)/libs/spandsp/src
-CORE_CFLAGS += -I$(switch_builddir)/libs/tiff-4.0.2/libtiff -I$(switch_srcdir)/libs/tiff-4.0.2/libtiff
if ENABLE_LIBVPX
CORE_CFLAGS += -DSWITCH_HAVE_VPX
endif
@@ -736,11 +735,6 @@ sndfile-reconf:
cd libs/libsndfile && ./config.status --recheck
cd libs/libsndfile && ./config.status
-tiff-reconf:
- cd libs/tiff-4.0.2 && autoreconf -fi
- cd libs/tiff-4.0.2 && sh ./configure.gnu $(MY_DEFAULT_ARGS)
- cd libs/tiff-4.0.2 && make
-
python-reconf:
rm -f src/mod/languages/mod_python/Makefile
./config.status
@@ -762,7 +756,7 @@ iks-reconf:
cd libs/iksemel && sh ./configure.gnu $(MY_DEFAULT_ARGS)
$(MAKE) mod_dingaling-clean
-spandsp-reconf: tiff-reconf
+spandsp-reconf:
cd libs/spandsp && $(MAKE) clean || echo
cd libs/spandsp && autoreconf -fi
cd libs/spandsp && sh ./configure.gnu $(MY_DEFAULT_ARGS)
--- a/configure.ac
+++ b/configure.ac
@@ -1969,7 +1969,6 @@ AC_CONFIG_SUBDIRS([libs/libdingaling])
AC_CONFIG_SUBDIRS([libs/sofia-sip])
AC_CONFIG_SUBDIRS([libs/freetdm])
AC_CONFIG_SUBDIRS([libs/unimrcp])
-AC_CONFIG_SUBDIRS([libs/tiff-4.0.2])
AC_CONFIG_SUBDIRS([libs/spandsp])
if test "x${enable_zrtp}" = "xyes"; then
AC_CONFIG_SUBDIRS([libs/libzrtp])
--- a/libs/spandsp/configure.gnu
+++ b/libs/spandsp/configure.gnu
@@ -1,4 +1,4 @@
#! /bin/sh
srcpath=$(dirname $0 2>/dev/null ) || srcpath="."
-$srcpath/configure "$@" --disable-shared --with-pic --enable-builtin-tiff
+$srcpath/configure "$@" --disable-shared --with-pic
--- a/src/mod/applications/mod_spandsp/Makefile.am
+++ b/src/mod/applications/mod_spandsp/Makefile.am
@@ -1,24 +1,17 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_spandsp
-TIFF_DIR=$(switch_srcdir)/libs/tiff-4.0.2
-TIFF_BUILDDIR=$(switch_builddir)/libs/tiff-4.0.2
-TIFF_LA=$(TIFF_BUILDDIR)/libtiff/libtiff.la
SPANDSP_DIR=$(switch_srcdir)/libs/spandsp
SPANDSP_BUILDDIR=$(switch_builddir)/libs/spandsp
SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
mod_LTLIBRARIES = mod_spandsp.la
mod_spandsp_la_SOURCES = mod_spandsp.c udptl.c mod_spandsp_fax.c mod_spandsp_dsp.c mod_spandsp_codecs.c mod_spandsp_modem.c
-mod_spandsp_la_CFLAGS = $(AM_CFLAGS)
-mod_spandsp_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(TIFF_BUILDDIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I.
-mod_spandsp_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TIFF_LA) $(SPANDSP_LA_JBIG) $(SPANDSP_LA_LZMA) -ljpeg -lz
+mod_spandsp_la_CFLAGS = $(AM_CFLAGS)
+mod_spandsp_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(SPANDSP_BUILDDIR)/src -I.
+mod_spandsp_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(SPANDSP_LA_JBIG) $(SPANDSP_LA_LZMA) -ljpeg -lz -ltiff
mod_spandsp_la_LDFLAGS = -avoid-version -module -no-undefined -shared
-$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
- cd $(SPANDSP_BUILDDIR) && $(MAKE) CPPFLAGS="$(CPPFLAGS) -I$(TIFF_BUILDDIR)/libtiff -I$(TIFF_DIR)/libtiff" CFLAGS="$(CFLAGS)"
- $(TOUCH_TARGET)
-
-$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
- cd $(TIFF_BUILDDIR) && $(MAKE)
+$(SPANDSP_LA): $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
+ cd $(SPANDSP_BUILDDIR) && $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
$(TOUCH_TARGET)

View file

@ -1,34 +0,0 @@
commit f51ab63c2628e3ff21bd8a301dbacbc23766554a
Author: Mike Jerris <mike@jerris.com>
Date: Wed Mar 15 09:57:03 2017 -0500
FS-10074: [libtiff] stop using embedded libtiff. Build now requires system libtiff
--- a/debian/bootstrap.sh
+++ b/debian/bootstrap.sh
@@ -310,6 +310,7 @@ Build-Depends:
libpcre3-dev,
libedit-dev (>= 2.11),
libsqlite3-dev,
+ libtiff5-dev,
wget, pkg-config,
yasm,
# core codecs
--- a/freeswitch.spec
+++ b/freeswitch.spec
@@ -150,6 +150,7 @@ BuildRequires: openssl-devel >= 1.0.1e
BuildRequires: pcre-devel
BuildRequires: speex-devel
BuildRequires: sqlite-devel
+BuildRequires: libtiff-devel
BuildRequires: ldns-devel
BuildRequires: libedit-devel
BuildRequires: perl
@@ -208,6 +209,7 @@ Requires: ncurses
Requires: pcre
Requires: speex
Requires: sqlite
+Requires: libtiff
Requires: libedit
Requires: openssl >= 1.0.1e
Requires: unixODBC

View file

@ -1,41 +0,0 @@
commit 920d10afe725566a33c1c570d99ad2dc99625712
Author: Mike Jerris <mike@jerris.com>
Date: Wed Mar 15 15:00:15 2017 -0500
FS-10074: [libtiff] stop using embedded libtiff. Build now requires system libtiff
--- a/src/mod/endpoints/mod_skypopen/Makefile.am
+++ b/src/mod/endpoints/mod_skypopen/Makefile.am
@@ -1,10 +1,6 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_skypopen
-TIFF_DIR=$(switch_srcdir)/libs/tiff-4.0.2
-TIFF_BUILDDIR=$(switch_builddir)/libs/tiff-4.0.2
-TIFF_LA=$(TIFF_BUILDDIR)/libtiff/libtiff.la
-
SPANDSP_DIR=$(switch_srcdir)/libs/spandsp
SPANDSP_BUILDDIR=$(switch_builddir)/libs/spandsp
SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
@@ -12,16 +8,12 @@ SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libsp
mod_LTLIBRARIES = mod_skypopen.la
mod_skypopen_la_SOURCES = mod_skypopen.c skypopen_protocol.c
mod_skypopen_la_CFLAGS = $(AM_CFLAGS)
-mod_skypopen_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I.
-mod_skypopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TIFF_LA)
+mod_skypopen_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(SPANDSP_BUILDDIR)/src -I.
+mod_skypopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA)
mod_skypopen_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lX11
-BUILT_SOURCES = $(TIFF_LA) $(SPANDSP_LA)
-
-$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
- cd $(SPANDSP_BUILDDIR) && $(MAKE) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -I$(TIFF_BUILDDIR)/libtiff -I$(TIFF_DIR)/libtiff"
- $(TOUCH_TARGET)
+BUILT_SOURCES = $(SPANDSP_LA)
-$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
- cd $(TIFF_BUILDDIR) && $(MAKE)
+$(SPANDSP_LA): $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
+ cd $(SPANDSP_BUILDDIR) && $(MAKE) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)"
$(TOUCH_TARGET)

View file

@ -1,41 +0,0 @@
commit 4a7c459e37d77b05f258001ccae99935fb660caf
Author: Mike Jerris <mike@jerris.com>
Date: Wed Mar 15 15:02:04 2017 -0500
FS-10074: [libtiff] stop using embedded libtiff. Build now requires system libtiff
--- a/src/mod/endpoints/mod_gsmopen/Makefile.am
+++ b/src/mod/endpoints/mod_gsmopen/Makefile.am
@@ -1,10 +1,6 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_gsmopen
-TIFF_DIR=$(switch_srcdir)/libs/tiff-4.0.2
-TIFF_BUILDDIR=$(switch_builddir)/libs/tiff-4.0.2
-TIFF_LA=$(TIFF_BUILDDIR)/libtiff/libtiff.la
-
SPANDSP_DIR=$(switch_srcdir)/libs/spandsp
SPANDSP_BUILDDIR=$(switch_builddir)/libs/spandsp
SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
@@ -12,16 +8,12 @@ SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libsp
mod_LTLIBRARIES = mod_gsmopen.la
mod_gsmopen_la_SOURCES = mod_gsmopen.cpp gsmopen_protocol.cpp
mod_gsmopen_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
-mod_gsmopen_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I.
-mod_gsmopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TIFF_LA)
+mod_gsmopen_la_CPPFLAGS = -I$(SPANDSP_DIR)/src -I$(SPANDSP_BUILDDIR)/src -I.
+mod_gsmopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA)
mod_gsmopen_la_LDFLAGS = -avoid-version -module -no-undefined -lctb-0.16 -lgsmme
-BUILT_SOURCES = $(TIFF_LA) $(SPANDSP_LA)
-
-$(SPANDSP_LA): $(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
- cd $(SPANDSP_BUILDDIR) && $(MAKE) CPPFLAGS="$(CPPFLAGS) -I$(TIFF_BUILDDIR)/libtiff -I$(TIFF_DIR)/libtiff" CFLAGS="$(CFLAGS)"
- $(TOUCH_TARGET)
+BUILT_SOURCES = $(SPANDSP_LA)
-$(TIFF_LA): $(TIFF_DIR) $(TIFF_DIR)/.update
- cd $(TIFF_BUILDDIR) && $(MAKE)
+$(SPANDSP_LA): $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
+ cd $(SPANDSP_BUILDDIR) && $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
$(TOUCH_TARGET)

View file

@ -1,92 +0,0 @@
commit 7a4c76119114b82d26dab5d5adfe5a2429e32434
Author: Mike Jerris <mike@jerris.com>
Date: Thu Mar 16 11:29:08 2017 -0500
FS-10074: [libtiff] remove more libtiff references
--- a/debian/copyright
+++ b/debian/copyright
@@ -1700,27 +1700,6 @@ Copyright: 2007 <robs@users.sourceforge.
2007-2009 Erik de Castro Lopo <erikd@mega-nerd.com>
License: LGPL-2+
-Files: libs/tiff-4.0.2/*
-Copyright: 1988-1997 Sam Leffler
- 1991-1997 Silicon Graphics, Inc.
- 2006-2010 Richard Nolde
- 1999-2000 Frank Warmerdam
- 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
- 1990 by Sun Microsystems, Inc.
- Joris Van Damme <info@awaresystems.be>
- AWare Systems <http://www.awaresystems.be/>
-License: MIT/X11 (BSD like)
-
-Files: libs/tiff-4.0.2/port/getopt.c
- libs/tiff-4.0.2/port/strcasecmp.c
- libs/tiff-4.0.2/port/lfind.c
-Copyright: 1987, 1993, 1994, The Regents of the University of California.
-License: BSD-3-clause
-
-Files: libs/tiff-4.0.2/port/strtoull.c
-Copyright: 1992, 1993, The Regents of the University of California.
-License: BSD-4-clause
-
Files: src/switch_dso.c
Copyright: 2008 Michael Jerris
License: BSD-like
--- a/debian/license-reconcile.yml
+++ b/debian/license-reconcile.yml
@@ -186,21 +186,6 @@ Rules:
Copyright: 1999-2009 Erik de Castro Lopo <erikd@mega-nerd.com>
Justification: prevent false-psitive copyright detection
-
- Glob: libs/tiff-4.0.2/libtiff/tif_tile.c
- Matches: Copyright\s(c)\s1991-1997\sSam\sLeffler
- Matches: copyright\snotices\sand\sthis\spermission\snotice\sappear\sin
- Copyright: 1991-1997 Sam Leffler
- -
- Glob: libs/tiff-4.0.2/*
- Matches: Additions\s\(c\)\sRichard\sNolde\s2006-2010
- Matches: copyright\snotices\sand\sthis\spermission\snotice\sappear\sin
- Copyright: 2006-2010 Richard Nolde
- -
- Glob: libs/tiff-4.0.2/libtiff/tiffvers.h
- Matches: 1988-1996\sSam\sLeffler..Copyright\s\(c\)\s1991-1996\sSilicon\sGraphics,\sInc.
- Copyright: 1991-1996 Sam Leffler
- Copyright: 1991-1996 Silicon Graphics, Inc
- -
Glob: src/mod/endpoints/mod_khomp/*
Matches: The\scontents\sof\sthis\sfile\sare\ssubject\sto\sthe\sMozilla\sPublic\sLicense\sVersion\s1.1
Matches: Alternatively,\sthe\scontents\sof\sthis\sfile\smay\sbe\sused\sunder\sthe\sterms\sof\sthe
--- a/docs/Doxygen.conf
+++ b/docs/Doxygen.conf
@@ -1240,15 +1240,9 @@ SEARCH_INCLUDES = YES
# contain include files that are not input files but should be processed by
# the preprocessor.
-INCLUDE_PATH =../libs/apr ../libs/apr-util \
- ../libs/iksemel ../libs/ilbc ../libs/js \
- ../libs/libg722_1 ../libs/libnatpmp \
- ../libs/libsndfile ../libs/miniupnpc \
- ../libs/portaudio ../libs/sofia-sip ../libs/spandsp \
- ../libs/srtp \
- ../libs/tiff-4.0.2 ../libs/udns \
- ../libs/unimrcp ../libs/voipcodecs ../libs/win32 \
- ../libs/xmlrpc-c
+INCLUDE_PATH =../libs/apr ../libs/apr-util ../libs/iksemel ../libs/libnatpmp \
+ ../libs/miniupnpc ../libs/sofia-sip ../libs/spandsp \
+ ../libs/srtp ../libs/unimrcp ../libs/win32 ../libs/xmlrpc-c
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
--- a/rebootstrap.sh
+++ b/rebootstrap.sh
@@ -8,7 +8,7 @@ BGJOB=false
VERBOSE=false
BASEDIR=`pwd`;
LIBDIR=${BASEDIR}/libs;
-SUBDIRS="apr libzrtp iksemel libdingaling sofia-sip srtp freetdm spandsp unimrcp tiff-4.0.2 fs";
+SUBDIRS="apr libzrtp iksemel libdingaling sofia-sip srtp freetdm spandsp unimrcp fs";
while getopts 'jhd:v' o; do
case "$o" in

View file

@ -1,45 +0,0 @@
Subject: Fix OOB caused by odd frame width, CVE-2017-13194
Origin: https://android.googlesource.com/platform/external/libvpx/+/55cd1dd7c8d0a3de907d22e0f12718733f4e41d
diff --git a/libs/libvpx/libvpx/vpx/src/vpx_image.c b/libs/libvpx/libvpx/vpx/src/vpx_image.c
index dba439c..af7c529 100644
--- a/libs/libvpx/vpx/src/vpx_image.c
+++ b/libs/libvpx/vpx/src/vpx_image.c
@@ -88,11 +88,10 @@
default: ycs = 0; break;
}
- /* Calculate storage sizes given the chroma subsampling */
- align = (1 << xcs) - 1;
- w = (d_w + align) & ~align;
- align = (1 << ycs) - 1;
- h = (d_h + align) & ~align;
+ /* Calculate storage sizes. If the buffer was allocated externally, the width
+ * and height shouldn't be adjusted. */
+ w = d_w;
+ h = d_h;
s = (fmt & VPX_IMG_FMT_PLANAR) ? w : bps * w / 8;
s = (s + stride_align - 1) & ~(stride_align - 1);
stride_in_bytes = (fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? s * 2 : s;
@@ -111,9 +110,18 @@
img->img_data = img_data;
if (!img_data) {
- const uint64_t alloc_size = (fmt & VPX_IMG_FMT_PLANAR)
- ? (uint64_t)h * s * bps / 8
- : (uint64_t)h * s;
+ uint64_t alloc_size;
+ /* Calculate storage sizes given the chroma subsampling */
+ align = (1 << xcs) - 1;
+ w = (d_w + align) & ~align;
+ align = (1 << ycs) - 1;
+ h = (d_h + align) & ~align;
+
+ s = (fmt & VPX_IMG_FMT_PLANAR) ? w : bps * w / 8;
+ s = (s + stride_align - 1) & ~(stride_align - 1);
+ stride_in_bytes = (fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? s * 2 : s;
+ alloc_size = (fmt & VPX_IMG_FMT_PLANAR) ? (uint64_t)h * s * bps / 8
+ : (uint64_t)h * s;
if (alloc_size != (size_t)alloc_size) goto fail;

View file

@ -1,11 +0,0 @@
--- a/src/switch_regex.c
+++ b/src/switch_regex.c
@@ -37,7 +37,7 @@ SWITCH_DECLARE(switch_regex_t *) switch_
int options, const char **errorptr, int *erroroffset, const unsigned char *tables)
{
- return pcre_compile(pattern, options, errorptr, erroroffset, tables);
+ return (switch_regex_t *)pcre_compile(pattern, options, errorptr, erroroffset, tables);
}