Browse Source

Supports prosody 0.11 when configuring.

Doing few changes needed for general config and for tokens.
j8
damencho 6 years ago
parent
commit
ea54713f9a

+ 2
- 2
debian/control View File

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

+ 13
- 0
debian/jitsi-meet-prosody.postinst View File

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

+ 8
- 5
debian/jitsi-meet-tokens.postinst View File

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

+ 0
- 12
resources/prosody-plugins/mod_bosh.lua.patch View File

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

Loading…
Cancel
Save