Supports prosody 0.11 when configuring.

Doing few changes needed for general config and for tokens.
This commit is contained in:
damencho 2019-04-05 00:18:53 +01:00 committed by Saúl Ibarra Corretgé
parent 5a99697ae2
commit ea54713f9a
4 changed files with 23 additions and 19 deletions

4
debian/control vendored
View File

@ -36,7 +36,7 @@ Description: Configuration for web serving of Jitsi Meet
Package: jitsi-meet-prosody Package: jitsi-meet-prosody
Architecture: all Architecture: all
Depends: openssl, prosody | prosody-trunk Depends: openssl, prosody | prosody-trunk | prosody-0.11
Description: Prosody configuration for Jitsi Meet Description: Prosody configuration for Jitsi Meet
Jitsi Meet is a WebRTC JavaScript application that uses Jitsi Jitsi Meet is a WebRTC JavaScript application that uses Jitsi
Videobridge to provide high quality, scalable video conferences. Videobridge to provide high quality, scalable video conferences.
@ -50,6 +50,6 @@ Description: Prosody configuration for Jitsi Meet
Package: jitsi-meet-tokens Package: jitsi-meet-tokens
Architecture: all Architecture: all
Depends: ${misc:Depends}, prosody-trunk (>= 1nightly607), libssl-dev, luarocks, jitsi-meet-prosody Depends: ${misc:Depends}, prosody-trunk (>= 1nightly747) | prosody-0.11 | prosody (>= 0.11.2), libssl-dev, luarocks, jitsi-meet-prosody
Description: Prosody token authentication plugin for Jitsi Meet Description: Prosody token authentication plugin for Jitsi Meet

View File

@ -125,6 +125,19 @@ case "$1" in
ln -sf /var/lib/prosody/$JVB_HOSTNAME.crt /etc/prosody/certs/$JVB_HOSTNAME.crt ln -sf /var/lib/prosody/$JVB_HOSTNAME.crt /etc/prosody/certs/$JVB_HOSTNAME.crt
fi fi
PR11_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-0.11' 2>/dev/null | awk '{print $3}' || true)"
echo "PR11_INSTALL_CHECK is $PR11_INSTALL_CHECK"
PR_VER_INSTALLED=$(dpkg-query -f='${Version}\n' --show prosody 2>/dev/null || true)
echo "PR_VER_INSTALLED is $PR_VER_INSTALLED"
if [ "$PR11_INSTALL_CHECK" = "installed" ] \
|| [ "$PR11_INSTALL_CHECK" = "unpacked" ] \
|| dpkg --compare-versions "$PR_VER_INSTALLED" gt "0.11" ; then
sed -i 's/storage = \"null\"/storage = \"memory\"/g' $PROSODY_HOST_CONFIG
# trigger a restart
PROSODY_CONFIG_PRESENT="false"
fi
if [ ! -f /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt ]; then if [ ! -f /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt ]; then
# prosodyctl takes care for the permissions # prosodyctl takes care for the permissions
# echo for using all default values # echo for using all default values

View File

@ -69,14 +69,17 @@ case "$1" in
echo "Failed to install basexx - try installing it manually" echo "Failed to install basexx - try installing it manually"
fi fi
PR11_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-0.11' 2>/dev/null | awk '{print $3}' || true)"
PR_VER_INSTALLED=$(dpkg-query -f='${Version}\n' --show prosody 2>/dev/null || true)
if [ "$PR11_INSTALL_CHECK" = "installed" ] \
|| [ "$PR11_INSTALL_CHECK" = "unpacked" ] \
|| dpkg --compare-versions "$PR_VER_INSTALLED" gt "0.11" ; then
sed -i 's/module:hook/module:hook_global/g' /usr/share/jitsi-meet/prosody-plugins/mod_auth_token.lua
fi
if [ -x "/etc/init.d/prosody" ]; then if [ -x "/etc/init.d/prosody" ]; then
invoke-rc.d prosody restart invoke-rc.d prosody restart
fi fi
echo "This package requires BOSH Prosody module to be patched !"
echo "Use the following command, after this package has been installed and"
echo "after every prosody-trunk upgrade:"
echo "sudo patch -N /usr/lib/prosody/modules/mod_bosh.lua /usr/share/jitsi-meet/prosody-plugins/mod_bosh.lua.patch"
fi fi
else else
echo "Prosody config not found at $PROSODY_HOST_CONFIG - unable to auto-configure token authentication" echo "Prosody config not found at $PROSODY_HOST_CONFIG - unable to auto-configure token authentication"

View File

@ -1,12 +0,0 @@
--- /usr/lib/prosody/modules/mod_bosh.lua 2015-12-16 14:28:34.000000000 -0600
+++ /usr/lib/prosody/modules/mod_bosh.lua 2015-12-22 10:45:59.818197967 -0600
@@ -294,6 +294,9 @@
session.log("debug", "BOSH session created for request from %s", session.ip);
log("info", "New BOSH session, assigned it sid '%s'", sid);
+
+ hosts[session.host].events.fire_event(
+ "bosh-session", { session = session, request = request });
-- Send creation response
local creating_session = true;