aboutsummaryrefslogtreecommitdiff
path: root/app/jitsi/build/jitsi-conference-focus
diff options
context:
space:
mode:
Diffstat (limited to 'app/jitsi/build/jitsi-conference-focus')
-rw-r--r--app/jitsi/build/jitsi-conference-focus/0001-Remove-broken-command-line-args-parameters-setting.patch91
-rw-r--r--app/jitsi/build/jitsi-conference-focus/Dockerfile22
-rwxr-xr-xapp/jitsi/build/jitsi-conference-focus/jicofo7
3 files changed, 103 insertions, 17 deletions
diff --git a/app/jitsi/build/jitsi-conference-focus/0001-Remove-broken-command-line-args-parameters-setting.patch b/app/jitsi/build/jitsi-conference-focus/0001-Remove-broken-command-line-args-parameters-setting.patch
new file mode 100644
index 0000000..14d48c5
--- /dev/null
+++ b/app/jitsi/build/jitsi-conference-focus/0001-Remove-broken-command-line-args-parameters-setting.patch
@@ -0,0 +1,91 @@
+From 3da458fc04560e8ddd597f7910c4f53b714d58ab Mon Sep 17 00:00:00 2001
+From: Quentin Dufour <quentin@dufour.io>
+Date: Mon, 1 Feb 2021 06:53:21 +0100
+Subject: [PATCH] Remove broken command line args parameters setting
+
+---
+ src/main/java/org/jitsi/jicofo/Main.java | 61 ------------------------
+ 1 file changed, 61 deletions(-)
+
+diff --git a/src/main/java/org/jitsi/jicofo/Main.java b/src/main/java/org/jitsi/jicofo/Main.java
+index 558d1b3..59e04bb 100644
+--- a/src/main/java/org/jitsi/jicofo/Main.java
++++ b/src/main/java/org/jitsi/jicofo/Main.java
+@@ -50,7 +50,6 @@ public static void main(String[] args)
+ logger.error("An uncaught exception occurred in thread=" + t, e));
+
+ setupMetaconfigLogger();
+- setSystemProperties(args);
+ JitsiConfig.Companion.reloadNewConfig();
+
+ // Make sure that passwords are not printed by ConfigurationService
+@@ -80,66 +79,6 @@ public static void main(String[] args)
+ JicofoServices.jicofoServicesSingleton = null;
+ }
+
+- /**
+- * Read the command line arguments and env variables, and set the corresponding system properties used for
+- * configuration of the XMPP component and client connections.
+- */
+- private static void setSystemProperties(String[] args)
+- throws ParseException
+- {
+- CmdLine cmdLine = new CmdLine();
+-
+- // We may end execution here if one of required arguments is missing
+- cmdLine.parse(args);
+-
+- // XMPP host/domain
+- String host;
+- String componentDomain;
+- // Try to get domain, can be null after this call(we'll fix that later)
+- componentDomain = cmdLine.getOptionValue("domain");
+- // Host name
+- host = cmdLine.getOptionValue("--host", componentDomain == null ? "localhost" : componentDomain);
+- // Try to fix component domain
+- if (isBlank(componentDomain))
+- {
+- componentDomain = host;
+- }
+- if (componentDomain != null)
+- {
+- // For backward compat, the "--domain" command line argument controls the domain for the XMPP component
+- // as well as XMPP client connection.
+- System.setProperty(XmppClientConnectionConfig.legacyXmppDomainPropertyName, componentDomain);
+- }
+- if (host != null)
+- {
+- // For backward compat, the "--host" command line argument controls the hostname for the XMPP component
+- // as well as XMPP client connection.
+- System.setProperty(XmppClientConnectionConfig.legacyHostnamePropertyName, host);
+- }
+-
+- // XMPP client connection
+- String focusDomain = cmdLine.getOptionValue("--user_domain");
+- String focusUserName = cmdLine.getOptionValue("--user_name");
+- String focusPassword = cmdLine.getOptionValue("--user_password");
+- if (isBlank(focusPassword))
+- {
+- focusPassword = System.getenv("JICOFO_AUTH_PASSWORD");
+- }
+-
+- if (focusDomain != null)
+- {
+- System.setProperty(XmppClientConnectionConfig.legacyDomainPropertyName, focusDomain);
+- }
+- if (focusUserName != null)
+- {
+- System.setProperty(XmppClientConnectionConfig.legacyUsernamePropertyName, focusUserName);
+- }
+- if (isNotBlank(focusPassword))
+- {
+- System.setProperty(XmppClientConnectionConfig.legacyPasswordPropertyName, focusPassword);
+- }
+- }
+-
+ private static void setupMetaconfigLogger()
+ {
+ org.jitsi.utils.logging2.Logger configLogger = new org.jitsi.utils.logging2.LoggerImpl("org.jitsi.config");
+--
+2.25.1
+
diff --git a/app/jitsi/build/jitsi-conference-focus/Dockerfile b/app/jitsi/build/jitsi-conference-focus/Dockerfile
index cb6b127..0e11df9 100644
--- a/app/jitsi/build/jitsi-conference-focus/Dockerfile
+++ b/app/jitsi/build/jitsi-conference-focus/Dockerfile
@@ -3,25 +3,15 @@ FROM fedora:33 AS builder
# unzip is required when executing the mvn package command
RUN dnf install -y java-latest-openjdk-headless maven git unzip
-ARG PREFIXV
-ARG VERSION
-
-# Create a cache
-RUN git clone https://github.com/superboum/jicofo && \
- cd jicofo && \
- mvn package -DskipTests -Dassembly.skipAssembly=false
+ARG JICOFO_TAG
+RUN git clone --depth 1 --branch $JICOFO_TAG https://github.com/jitsi/jicofo
WORKDIR jicofo
-# Ensure latest version is compiled
-RUN git pull && \
- git checkout 194795ed2a3ca08c25322c99f1ee89d134e1e1a2
-
-# Wild patch for debug, once it will work we can safely remove this dead code
-#COPY jicofogit/src/main/kotlin/org/jitsi/jicofo/JicofoServices.kt src/main/kotlin/org/jitsi/jicofo/JicofoServices.kt
-#COPY jicofogit/src/main/java/org/jitsi/impl/protocol/xmpp/XmppProtocolProvider.java src/main/java/org/jitsi/impl/protocol/xmpp/XmppProtocolProvider.java
+COPY *.patch .
+RUN git apply 0001-Remove-broken-command-line-args-parameters-setting.patch
+RUN mvn package -DskipTests -Dassembly.skipAssembly=false
-RUN mvn package -DskipTests -Dassembly.skipAssembly=false && \
- unzip target/jicofo-1.1-SNAPSHOT-archive.zip && \
+RUN unzip target/jicofo-1.1-SNAPSHOT-archive.zip && \
mv jicofo-1.1-SNAPSHOT /srv/build
FROM debian:bullseye
diff --git a/app/jitsi/build/jitsi-conference-focus/jicofo b/app/jitsi/build/jitsi-conference-focus/jicofo
index 2225e98..344b293 100755
--- a/app/jitsi/build/jitsi-conference-focus/jicofo
+++ b/app/jitsi/build/jitsi-conference-focus/jicofo
@@ -2,8 +2,13 @@
update-ca-certificates -f
+if [ -z "${JICOFO_MEMORY}" ]; then
+ echo "You must set the env variable 'JICOFO_MEMORY'. eg. JICOFO_MEMORY=3072m"
+ exit 1
+fi
+
exec java \
- -Xmx400m \
+ -Xmx${JICOFO_MEMORY} \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/tmp \
-Djdk.tls.ephemeralDHKeySize=2048 \