Переглянути джерело

Updates meet default installation. Removes nginx dependency and adds openjdk-8 in order to activate multiplexing inside jvb and use its jetty to serve meet. Updates will not touch current configuration which will continue using nginx.

master
damencho 10 роки тому
джерело
коміт
f8b7d048b0

+ 6
- 4
debian/control Переглянути файл

@@ -10,14 +10,15 @@ Homepage: https://jitsi.org/meet
10 10
 
11 11
 Package: jitsi-meet
12 12
 Architecture: all
13
-Depends: ${misc:Depends}, jitsi-videobridge, nginx, jitsi-meet-prosody, libjs-strophe (>= 1.1.3),
14
- libjs-jquery, libjs-jquery-ui
13
+Depends: ${misc:Depends}, jitsi-videobridge, jitsi-meet-prosody, libjs-strophe (>= 1.1.3),
14
+ libjs-jquery, libjs-jquery-ui, openjdk-8-jre-headless
15 15
 Description: WebRTC JavaScript video conferences
16 16
  Jitsi Meet is a WebRTC JavaScript application that uses Jitsi
17 17
  Videobridge to provide high quality, scalable video conferences.
18 18
  .
19 19
  It is a web interface to Jitsi Videobridge for audio and video
20
- forwarding and relaying, configured to work with nginx
20
+ forwarding and relaying, configured to work with jetty instance
21
+ running embedded into Jitsi Videobridge
21 22
 
22 23
 Package: jitsi-meet-prosody
23 24
 Architecture: all
@@ -27,7 +28,8 @@ Description: Prosody configuration for Jitsi Meet
27 28
  Videobridge to provide high quality, scalable video conferences.
28 29
  .
29 30
  It is a web interface to Jitsi Videobridge for audio and video
30
- forwarding and relaying, configured to work with nginx
31
+ forwarding and relaying, configured to work with jetty instance
32
+ running embedded into Jitsi Videobridge
31 33
  .
32 34
  This package contains configuration for Prosody to be used with
33 35
  Jitsi Meet.

+ 0
- 1
debian/jitsi-meet-prosody.templates Переглянути файл

@@ -1,5 +1,4 @@
1 1
 Template: jitsi-meet-prosody/jvb-hostname
2 2
 Type: string
3
-Default: ${default-key}
4 3
 _Description: The hostname of the current installation:
5 4
  The value for the hostname that is set in Jitsi Videobridge installation.

+ 124
- 37
debian/jitsi-meet.postinst Переглянути файл

@@ -1,4 +1,4 @@
1
-#!/bin/sh
1
+#!/bin/bash
2 2
 # postinst script for jitsi-meet
3 3
 #
4 4
 # see: dh_installdeb(1)
@@ -20,67 +20,154 @@ set -e
20 20
 case "$1" in
21 21
     configure)
22 22
 
23
-        . /etc/jitsi/videobridge/config
23
+        JVB_ETC_CONFIG="/etc/jitsi/videobridge/config"
24
+        JVB_CONFIG="/usr/share/jitsi-videobridge/.sip-communicator/sip-communicator.properties"
25
+
26
+        . $JVB_ETC_CONFIG
24 27
 
25 28
         # loading debconf
26 29
         . /usr/share/debconf/confmodule
27 30
 
28
-        # detect dpkg-reconfigure, just delete old links
31
+        # detect dpkg-reconfigure
32
+        RECONFIGURING="false"
29 33
         db_get jitsi-meet/jvb-hostname
30 34
         JVB_HOSTNAME_OLD=$RET
31 35
         if [ -n "$RET" ] && [ ! "$JVB_HOSTNAME_OLD" = "$JVB_HOSTNAME" ] ; then
32
-            rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME_OLD.conf
36
+            RECONFIGURING="true"
33 37
             rm -f /etc/jitsi/meet/$JVB_HOSTNAME_OLD-config.js
34 38
         fi
35 39
 
40
+        JVB_SERVE="false"
41
+        db_get jitsi-meet/jvb-serve
42
+        if [ -n "$RET" ] && [ "$RET" = "true" ] ; then
43
+            JVB_SERVE="true"
44
+        fi
45
+
36 46
         # stores the hostname so we will reuse it later, like in purge
37 47
         db_set jitsi-meet/jvb-hostname $JVB_HOSTNAME
38 48
 
39
-        # nginx conf
40
-        if [ ! -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf ]; then
41
-            cp /usr/share/doc/jitsi-meet/jitsi-meet.example /etc/nginx/sites-available/$JVB_HOSTNAME.conf
42
-            if [ ! -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf ]; then
43
-                ln -s /etc/nginx/sites-available/$JVB_HOSTNAME.conf /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf
44
-            fi
45
-            sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /etc/nginx/sites-available/$JVB_HOSTNAME.conf
46
-        fi
47
-
48 49
         # SSL for nginx
49 50
         db_get jitsi-meet/cert-choice
50 51
         CERT_CHOICE="$RET"
51
-        if [ "$CERT_CHOICE" = 'A certificate is available and the files are uploaded on the server' ]; then
52
-            db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
53
-            db_input critical jitsi-meet/cert-path-key || true
54
-            db_go
55
-            db_get jitsi-meet/cert-path-key
56
-            CERT_KEY="$RET"
57
-            db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt"
58
-            db_input critical jitsi-meet/cert-path-crt || true
59
-            db_go
60
-            db_get jitsi-meet/cert-path-crt
61
-            CERT_CRT="$RET"
62
-            # replace self-signed certificate paths with user provided ones
63
-            CERT_KEY_ESC=$(echo $CERT_KEY | sed 's/\./\\\./g')
64
-            CERT_KEY_ESC=$(echo $CERT_KEY_ESC | sed 's/\//\\\//g')
65
-            sed -i "s/ssl_certificate_key\ \/var\/lib\/prosody\/.*key/ssl_certificate_key\ $CERT_KEY_ESC/g" \
66
-                /etc/nginx/sites-available/$JVB_HOSTNAME.conf
67
-            CERT_CRT_ESC=$(echo $CERT_CRT | sed 's/\./\\\./g')
68
-            CERT_CRT_ESC=$(echo $CERT_CRT_ESC | sed 's/\//\\\//g')
69
-            sed -i "s/ssl_certificate\ \/var\/lib\/prosody\/.*crt/ssl_certificate\ $CERT_CRT_ESC/g" \
70
-                /etc/nginx/sites-available/$JVB_HOSTNAME.conf
71
-        fi
52
+        UPLOADED_CERT_CHOICE="A certificate is available and the files are uploaded on the server"
72 53
 
73 54
         # jitsi meet
74 55
         JITSI_MEET_CONFIG="/etc/jitsi/meet/$JVB_HOSTNAME-config.js"
75
-        if [ ! -f $JITSI_MEET_CONFIG ]; then
56
+        if [ ! -f $JITSI_MEET_CONFIG ] ; then
76 57
             cp /usr/share/doc/jitsi-meet/config.js $JITSI_MEET_CONFIG
77 58
             sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG
78 59
         fi
79 60
 
61
+        # this is new install let's configure jvb to serve meet
62
+        if [[ -z $FORCE_NGINX && ( -z $JVB_HOSTNAME_OLD || "$JVB_SERVE" = "true" ) ]] ; then
63
+            # this is a reconfigure, lets just delete old links
64
+            if [ "$RECONFIGURING" = "true" ] ; then
65
+                rm -f $JVB_CONFIG
66
+            fi
67
+
68
+            # configure jvb
69
+            echo "AUTHBIND=yes" >> $JVB_ETC_CONFIG
70
+            sed -i "s/JVB_OPTS=.*/JVB_OPTS=--apis=rest,xmpp/g" $JVB_ETC_CONFIG
71
+
72
+            echo "org.jitsi.videobridge.rest.jetty.host=::" >> $JVB_CONFIG
73
+            echo "org.jitsi.videobridge.rest.jetty.port=443" >> $JVB_CONFIG
74
+            echo "org.jitsi.videobridge.rest.jetty.ProxyServlet.hostHeader=$JVB_HOSTNAME" >> $JVB_CONFIG
75
+            echo "org.jitsi.videobridge.rest.jetty.ProxyServlet.pathSpec=/http-bind" >> $JVB_CONFIG
76
+            echo "org.jitsi.videobridge.rest.jetty.ProxyServlet.proxyTo=http://localhost:5280/http-bind" >> $JVB_CONFIG
77
+            echo "org.jitsi.videobridge.rest.jetty.ResourceHandler.resourceBase=/usr/share/jitsi-meet" >> $JVB_CONFIG
78
+            echo "org.jitsi.videobridge.rest.jetty.ResourceHandler.alias./config.js=/etc/jitsi/meet/$JVB_HOSTNAME-config.js" >> $JVB_CONFIG
79
+            echo "org.jitsi.videobridge.rest.jetty.RewriteHandler.regex=^/([a-zA-Z0-9]+)$" >> $JVB_CONFIG
80
+            echo "org.jitsi.videobridge.rest.jetty.RewriteHandler.replacement=/" >> $JVB_CONFIG
81
+            echo "org.jitsi.videobridge.rest.jetty.tls.port=443" >> $JVB_CONFIG
82
+            echo "org.jitsi.videobridge.TCP_HARVESTER_PORT=443" >> $JVB_CONFIG
83
+            echo "org.jitsi.videobridge.rest.jetty.sslContextFactory.keyStorePath=/etc/jitsi/videobridge/$JVB_HOSTNAME.jks" >> $JVB_CONFIG
84
+            echo "org.jitsi.videobridge.rest.jetty.sslContextFactory.keyStorePassword=changeit" >> $JVB_CONFIG
85
+
86
+            # configure authbind to allow jvb to bind to privileged ports
87
+            OWNER=$(stat -c '%U' /usr/share/jitsi-videobridge)
88
+            GROUP=$(stat -c '%G' /usr/share/jitsi-videobridge)
89
+            JVB_UID="`id -u $OWNER`"
90
+            if [ ! -f "/etc/authbind/byuid/$JVB_UID" ] ; then
91
+                if [ ! -d "/etc/authbind/byuid" ] ; then
92
+                        mkdir -p /etc/authbind/byuid
93
+                        chmod 755 /etc/authbind
94
+                        chmod 755 /etc/authbind/byuid
95
+                fi
96
+                echo '::,443' >/etc/authbind/byuid/$JVB_UID
97
+                chown $OWNER:$GROUP /etc/authbind/byuid/$JVB_UID
98
+                chmod 700 /etc/authbind/byuid/$JVB_UID
99
+            fi
100
+
101
+            if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
102
+                # create jks from uploaded certs
103
+                openssl pkcs12 -export \
104
+                    -in /etc/ssl/$JVB_HOSTNAME.crt \
105
+                    -inkey /etc/ssl/$JVB_HOSTNAME.key \
106
+                    -passout pass:changeit > /etc/jitsi/videobridge/$JVB_HOSTNAME.p12
107
+                keytool -importkeystore \
108
+                    -srckeystore /etc/jitsi/videobridge/$JVB_HOSTNAME.p12 \
109
+                    -destkeystore /etc/jitsi/videobridge/$JVB_HOSTNAME.jks \
110
+                    -srcstoretype pkcs12 \
111
+                    -noprompt -storepass changeit -srcstorepass changeit
112
+            else
113
+                # create jks from self-signed certs
114
+                openssl pkcs12 -export \
115
+                    -in /var/lib/prosody/$JVB_HOSTNAME.crt \
116
+                    -inkey /var/lib/prosody/$JVB_HOSTNAME.key \
117
+                    -passout pass:changeit > /etc/jitsi/videobridge/$JVB_HOSTNAME.p12
118
+                keytool -importkeystore \
119
+                    -srckeystore /etc/jitsi/videobridge/$JVB_HOSTNAME.p12 \
120
+                    -destkeystore /etc/jitsi/videobridge/$JVB_HOSTNAME.jks \
121
+                    -srcstoretype pkcs12 \
122
+                    -noprompt -storepass changeit -srcstorepass changeit
123
+            fi
124
+
125
+            db_set jitsi-meet/jvb-serve "true"
126
+
127
+            invoke-rc.d jitsi-videobridge restart
128
+        elif [[ "$FORCE_NGINX" = "true" || ( -n $JVB_HOSTNAME_OLD && "$JVB_SERVE" = "false" ) ]] ; then
129
+            # this is a reconfigure, lets just delete old links
130
+            if [ "$RECONFIGURING" = "true" ] ; then
131
+                rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME_OLD.conf
132
+                rm -f /etc/jitsi/meet/$JVB_HOSTNAME_OLD-config.js
133
+            fi
134
+
135
+            # nginx conf
136
+            if [ ! -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf ] ; then
137
+                cp /usr/share/doc/jitsi-meet/jitsi-meet.example /etc/nginx/sites-available/$JVB_HOSTNAME.conf
138
+                if [ ! -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf ] ; then
139
+                    ln -s /etc/nginx/sites-available/$JVB_HOSTNAME.conf /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf
140
+                fi
141
+                sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /etc/nginx/sites-available/$JVB_HOSTNAME.conf
142
+            fi
143
+
144
+            if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
145
+                db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
146
+                db_input critical jitsi-meet/cert-path-key || true
147
+                db_go
148
+                db_get jitsi-meet/cert-path-key
149
+                CERT_KEY="$RET"
150
+                db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt"
151
+                db_input critical jitsi-meet/cert-path-crt || true
152
+                db_go
153
+                db_get jitsi-meet/cert-path-crt
154
+                CERT_CRT="$RET"
155
+                # replace self-signed certificate paths with user provided ones
156
+                CERT_KEY_ESC=$(echo $CERT_KEY | sed 's/\./\\\./g')
157
+                CERT_KEY_ESC=$(echo $CERT_KEY_ESC | sed 's/\//\\\//g')
158
+                sed -i "s/ssl_certificate_key\ \/var\/lib\/prosody\/.*key/ssl_certificate_key\ $CERT_KEY_ESC/g" \
159
+                    /etc/nginx/sites-available/$JVB_HOSTNAME.conf
160
+                CERT_CRT_ESC=$(echo $CERT_CRT | sed 's/\./\\\./g')
161
+                CERT_CRT_ESC=$(echo $CERT_CRT_ESC | sed 's/\//\\\//g')
162
+                sed -i "s/ssl_certificate\ \/var\/lib\/prosody\/.*crt/ssl_certificate\ $CERT_CRT_ESC/g" \
163
+                    /etc/nginx/sites-available/$JVB_HOSTNAME.conf
164
+            fi
165
+
166
+            invoke-rc.d nginx reload
167
+        fi
168
+
80 169
         # and we're done with debconf
81 170
         db_stop
82
-
83
-        invoke-rc.d nginx reload
84 171
     ;;
85 172
 
86 173
     abort-upgrade|abort-remove|abort-deconfigure)

+ 6
- 3
debian/jitsi-meet.templates Переглянути файл

@@ -10,20 +10,23 @@ _Description: SSL certificate for the Jitsi Meet instance
10 10
 
11 11
 Template: jitsi-meet/cert-path-key
12 12
 Type: string
13
-Default: ${default-key}
14 13
 _Description: Full local server path to the SSL key file:
15 14
  The full path to the SSL key file on the server.
16 15
  If it has not been uploaded, now is a good time to do so.
17 16
 
18 17
 Template: jitsi-meet/cert-path-crt
19 18
 Type: string
20
-Default: ${default-crt}
21 19
 _Description: Full local server path to the SSL certificate file:
22 20
  The full path to the SSL certificate file on the server.
23 21
  If you haven't uploaded it, now is a good time to upload it in another console.
24 22
 
25 23
 Template: jitsi-meet/jvb-hostname
26 24
 Type: string
27
-Default: ${default-key}
28 25
 _Description: The hostname of the current installation:
29 26
  The value for the hostname that is set in Jitsi Videobridge installation.
27
+
28
+Template: jitsi-meet/jvb-serve
29
+Type: boolean
30
+Default: false
31
+_Description: for internal use
32
+ for internal use.

+ 6
- 4
debian/patches/jquery-package Переглянути файл

@@ -3,14 +3,16 @@ Index: jitsi-meet/index.html
3 3
 ===================================================================
4 4
 --- jitsi-meet.orig/index.html
5 5
 +++ jitsi-meet/index.html
6
-@@ -9,12 +9,12 @@
7
-     <meta itemprop="name" content="Jitsi Meet"/>
6
+@@ -10,14 +10,14 @@
8 7
      <meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
9 8
      <meta itemprop="image" content="/images/jitsilogo.png"/>
9
+     <script src="https://api.callstats.io/static/callstats.min.js"></script>
10 10
 -    <script src="libs/jquery-2.1.1.min.js"></script>
11 11
 +    <script src="libs/jquery.min.js"></script>
12
-     <script src="config.js?v=9"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
13
-     <script src="libs/strophe/strophe.min.js?v=1"></script>
12
+     <script src="https://cdn.socket.io/socket.io-1.2.0.js"></script>
13
+     <script src="https://cdnjs.cloudflare.com/ajax/libs/jsSHA/1.5.0/sha.js"></script>
14
+     <script src="config.js?v=11"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
15
+     <script src="libs/strophe/strophe.min.js?v=2"></script>
14 16
      <script src="libs/strophe/strophe.disco.min.js?v=1"></script>
15 17
      <script src="libs/strophe/strophe.caps.jsonly.min.js?v=1"></script>
16 18
 -    <script src="libs/jquery-ui.js"></script>

+ 14
- 5
debian/po/templates.pot Переглянути файл

@@ -1,7 +1,3 @@
1
-# SOME DESCRIPTIVE TITLE.
2
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
-# This file is distributed under the same license as the PACKAGE package.
4
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 1
 #
6 2
 #, fuzzy
7 3
 msgid ""
@@ -74,7 +70,6 @@ msgid ""
74 70
 "uploaded it, now is a good time to upload it in another console."
75 71
 msgstr ""
76 72
 
77
-
78 73
 #. Type: string
79 74
 #. Description
80 75
 #: ../jitsi-meet.templates:4001
@@ -87,3 +82,17 @@ msgstr ""
87 82
 msgid ""
88 83
 "The value for the hostname that is set in Jitsi Videobridge installation."
89 84
 msgstr ""
85
+
86
+
87
+#. Type: string
88
+#. Description
89
+#: ../jitsi-meet.templates:5001
90
+msgid "for internal use"
91
+msgstr ""
92
+
93
+#. Type: string
94
+#. Description
95
+#: ../jitsi-meet.templates:5001
96
+msgid ""
97
+"Jitsi Videobridge installation can use its internal jetty to serve static meet pages."
98
+msgstr ""

Завантаження…
Відмінити
Зберегти