From 7513eadf420e19fde3451af1355c7874d1dfe27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 10 Jun 2011 13:13:45 +0300 Subject: main/freeswitch: fix some bugs * use /var/lib/freeswitch as path for db, instead of /usr/db * apply fix for FS-3336 from freeswitch jira * make the lua compiler have alpine search path for modules --- ...pdate-mod_sofia_globals.guess_ip-on-addre.patch | 27 ++++++++++++++++ .../0002-mod_lua-alpine-module-search-path.patch | 37 ++++++++++++++++++++++ main/freeswitch/APKBUILD | 7 +++- 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 main/freeswitch/0001-mod_sofia-update-mod_sofia_globals.guess_ip-on-addre.patch create mode 100644 main/freeswitch/0002-mod_lua-alpine-module-search-path.patch (limited to 'main/freeswitch') diff --git a/main/freeswitch/0001-mod_sofia-update-mod_sofia_globals.guess_ip-on-addre.patch b/main/freeswitch/0001-mod_sofia-update-mod_sofia_globals.guess_ip-on-addre.patch new file mode 100644 index 000000000..ccf4e5c6e --- /dev/null +++ b/main/freeswitch/0001-mod_sofia-update-mod_sofia_globals.guess_ip-on-addre.patch @@ -0,0 +1,27 @@ +From 67a60b5bf50fbfdf184dc4cb20a88d8d88ff59ad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Fri, 10 Jun 2011 11:58:19 +0300 +Subject: [PATCH 1/2] mod_sofia: update mod_sofia_globals.guess_ip on address change + +So that we rebind to the new IP-address after reloading +configuration. Fixes FS-3336. +--- + src/mod/endpoints/mod_sofia/mod_sofia.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c +index 86fa140..b06eacb 100644 +--- a/src/mod/endpoints/mod_sofia/mod_sofia.c ++++ b/src/mod/endpoints/mod_sofia/mod_sofia.c +@@ -4889,6 +4889,8 @@ static void general_event_handler(switch_event_t *event) + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "EVENT_TRAP: IP change detected\n"); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "IP change detected [%s]->[%s] [%s]->[%s]\n", old_ip4, new_ip4, old_ip6, new_ip6); + ++ strncpy(mod_sofia_globals.guess_ip, new_ip4, sizeof(mod_sofia_globals.guess_ip)); ++ + switch_mutex_lock(mod_sofia_globals.hash_mutex); + if (mod_sofia_globals.profile_hash) { + for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) { +-- +1.7.1 + diff --git a/main/freeswitch/0002-mod_lua-alpine-module-search-path.patch b/main/freeswitch/0002-mod_lua-alpine-module-search-path.patch new file mode 100644 index 000000000..c83cfd58b --- /dev/null +++ b/main/freeswitch/0002-mod_lua-alpine-module-search-path.patch @@ -0,0 +1,37 @@ +From ab10000fddd6735ff986d3b0f8092bc733bf5267 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Fri, 10 Jun 2011 13:06:35 +0300 +Subject: [PATCH 2/2] mod_lua: alpine module search path + +--- + src/mod/languages/mod_lua/lua/luaconf.h | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/mod/languages/mod_lua/lua/luaconf.h b/src/mod/languages/mod_lua/lua/luaconf.h +index ca2849b..bc8c17b 100644 +--- a/src/mod/languages/mod_lua/lua/luaconf.h ++++ b/src/mod/languages/mod_lua/lua/luaconf.h +@@ -95,13 +95,18 @@ + + #else + #define LUA_ROOT "/usr/local/" ++#define LUA_ROOT2 "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" ++#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" ++#define LUA_CDIR2 LUA_ROOT2 "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \ + "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ +- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" ++ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ ++ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua" + #define LUA_CPATH_DEFAULT \ +- "./?.so;" "./lib?51.so;" LUA_CDIR"?.so;" LUA_CDIR"lib?51.so;" LUA_CDIR"loadall.so" ++ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so" ++ + #endif + + +-- +1.7.1 + diff --git a/main/freeswitch/APKBUILD b/main/freeswitch/APKBUILD index a06711ec2..552001222 100644 --- a/main/freeswitch/APKBUILD +++ b/main/freeswitch/APKBUILD @@ -4,7 +4,7 @@ pkgname=freeswitch pkgver=1.0.7_p20110602 _ver=${pkgver%_p*} _snapshot=${pkgver#*_p} -pkgrel=0 +pkgrel=1 pkgdesc="A communications platform written in C from the ground up" url="http://www.freeswitch.org" arch="all" @@ -18,6 +18,8 @@ install="$pkgname.pre-install $pkgname.post-install $pkgname.pre-upgrade" subpackages="$pkgname-dev $pkgname-flite $pkgname-sample-config:conf $pkgname-freetdm" source="saveas-http://latest.freeswitch.org/freeswitch-$_ver.tar.gz/freeswitch-$pkgver.tar.gz freeswitch-mod_shout-textrels.patch + 0001-mod_sofia-update-mod_sofia_globals.guess_ip-on-addre.patch + 0002-mod_lua-alpine-module-search-path.patch modules.conf freeswitch.confd freeswitch.initd @@ -42,6 +44,7 @@ build() { # by specifying it here we save our selves from some CPU cycles export lt_cv_sys_max_cmd_len=8192 + sed -i -e 's#^dbdir="${prefix}/db"#dbdir="/var/lib/freeswitch"#' configure.in || return 1 ./bootstrap.sh cp -f "$srcdir/modules.conf" modules.conf || return 1 @@ -129,6 +132,8 @@ conf() { md5sums="813edb2192d1cc0fe224d9ef0492de4f freeswitch-1.0.7_p20110602.tar.gz 11883affe0839a8e15fe680aeb11b86e freeswitch-mod_shout-textrels.patch +5aed9ec61d7ac1f3758a89db159328c4 0001-mod_sofia-update-mod_sofia_globals.guess_ip-on-addre.patch +769eaa127d4dbae687dc4aa961a8cc70 0002-mod_lua-alpine-module-search-path.patch 691fa3aca967203848bbb2a617545265 modules.conf c608cca8ad773acebf201f581438c7e7 freeswitch.confd aa358c9ca0d8b93fabb6a36a5ed4c469 freeswitch.initd" -- cgit v1.2.3