snapshot of https://github.com/jitsi/jicofo.git @ 9ab59aa3d348e282da89da2c9f11ecbecd3f7b79 (2026-09-15)
Some checks failed
Java CI with Maven / Java 21 (push) Failing after 4m41s
Java CI with Maven / Java 17 (push) Failing after 4m42s

This commit is contained in:
upstream-mirror
2026-09-15 16:13:53 +05:00
commit fcbc274d01
275 changed files with 41230 additions and 0 deletions

71
resources/build_deb_package.sh Executable file
View File

@@ -0,0 +1,71 @@
#!/bin/bash
set -x
set -e
# Make sure you have the following environment variables set, example:
# export DEBFULLNAME="Jitsi Team"
# export DEBEMAIL="dev@jitsi.org"
# You need package devscripts installed (command dch).
echo "==================================================================="
echo " Building DEB packages... "
echo "==================================================================="
SCRIPT_FOLDER=$(dirname "$0")
cd "$SCRIPT_FOLDER/.."
# We are still using old version numbers
VERSIONMAJ="1.0"
VERSION=$VERSIONMAJ-$BUILD_NUMBER
# TODO: uncoment the following and move to the new numbering scheme
## Let's get version from maven
#MVNVER=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='version']/text()" pom.xml)
#TAG_NAME="v${MVNVER/-SNAPSHOT/}"
#echo "Current tag name: $TAG_NAME"
#if ! git rev-parse "$TAG_NAME" >/dev/null 2>&1
#then
# git tag -a "$TAG_NAME" -m "Tagged automatically by Jenkins"
# git push origin "$TAG_NAME"
#else
# echo "Tag: $TAG_NAME already exists."
#fi
#VERSION_FULL=$(git describe --match "v[0-9\.]*" --long)
#echo "Full version: ${VERSION_FULL}"
#VERSION=${VERSION_FULL:1}
echo "Package version: ${VERSION}"
REV=$(git log --pretty=format:'%h' -n 1)
dch -v "$VERSION-1" "Build from git. $REV"
dch -D unstable -r ""
# sets the version in the pom file so it will propagte to resulting jar
mvn versions:set -DnewVersion="${VERSION}"
# Install jicofo-common and jicofo-selector to the local maven repo because they
# are currently not published anywhere else.
mvn install
# We need to make sure all dependencies are downloaded before start building
# the debian package
mvn dependency:resolve
# now build the deb
dpkg-buildpackage -tc -us -uc -A
# clean the current changes as dch had changed the change log
git checkout debian/changelog
git checkout pom.xml
echo "Here are the resulting files in $(pwd ..)"
echo "-----"
ls -l ../{*.changes,*.deb,*.buildinfo}
echo "-----"
# Let's try deploying
cd ..
([ ! -x deploy.sh ] || ./deploy.sh "jicofo" ${BUILD_NUMBER} )

39
resources/collect-dump-logs.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
# script that creates an archive in current folder
# containing the heap and thread dump and the current log file
JAVA_HEAPDUMP_PATH="/tmp/java_*.hprof"
STAMP=`date +%Y-%m-%d-%H%M`
PID_PATH="/var/run/jicofo.pid"
JICOFO_UID=`id -u jicofo`
RUNNING=""
unset PID
#Find any crashes in /var/crash from our user in the past 20 minutes, if they exist
CRASH_FILES=$(find /var/crash -name '*.crash' -uid $JICOFO_UID -mmin -20 -type f)
[ -e $PID_PATH ] && PID=$(cat $PID_PATH)
if [ ! -z $PID ]; then
ps -p $PID | grep -q java
[ $? -eq 0 ] && RUNNING="true"
fi
if [ ! -z $RUNNING ]; then
echo "Jicofo pid $PID"
THREADS_FILE="/tmp/stack-${STAMP}-${PID}.threads"
HEAP_FILE="/tmp/heap-${STAMP}-${PID}.bin"
sudo -u jicofo jstack ${PID} > ${THREADS_FILE}
sudo -u jicofo jmap -dump:live,format=b,file=${HEAP_FILE} ${PID}
tar zcvf jicofo-dumps-${STAMP}-${PID}.tgz ${THREADS_FILE} ${HEAP_FILE} ${CRASH_FILES} /var/log/jitsi/jicofo* /tmp/hs_err_*
rm ${HEAP_FILE} ${THREADS_FILE}
else
ls $JAVA_HEAPDUMP_PATH >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Jicofo not running, but previous heap dump found."
tar zcvf jicofo-dumps-${STAMP}-crash.tgz $JAVA_HEAPDUMP_PATH ${CRASH_FILES} /var/log/jitsi/jicofo* /tmp/hs_err_*
rm ${JAVA_HEAPDUMP_PATH}
else
echo "Jicofo not running, no previous dump found. Including logs only."
tar zcvf jicofo-dumps-${STAMP}-crash.tgz ${CRASH_FILES} /var/log/jitsi/jicofo* /tmp/hs_err_*
fi
fi

View File

@@ -0,0 +1,10 @@
/var/log/jitsi/jicofo.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
copytruncate
su jicofo jitsi
}

22
resources/jicofo.bat Normal file
View File

@@ -0,0 +1,22 @@
@echo off
if "%1"=="/h" goto usage
if "%1"=="/?" goto usage
goto :begin
:usage
echo Usage: %0
exit /B 1
:begin
:: needed to overcome weird loop behavior in conjunction with variable expansion
SETLOCAL enabledelayedexpansion
set mainClass=org.jitsi.jicofo.Main
set cp=jicofo.jar
FOR %%F IN (lib/*.jar) DO (
SET cp=!cp!;lib/%%F%
)
java -Djava.util.logging.config.file=lib/logging.properties -Djdk.tls.ephemeralDHKeySize=2048 -cp %cp% %mainClass% %*

36
resources/jicofo.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
if [[ "$1" == "--help" ]]; then
echo -e "Usage: $0"
echo
echo -e "Supported environment variables: JICOFO_MAX_MEMORY, JAVA_SYS_PROPS."
echo
exit 1
fi
if [[ ! "$JAVA_SYS_PROPS" == *"-Dconfig.file="* ]]; then
if [[ -f /etc/jitsi/jicofo/jicofo.conf ]]; then
JAVA_SYS_PROPS="$JAVA_SYS_PROPS -Dconfig.file=/etc/jitsi/jicofo/jicofo.conf"
else
echo
echo "To run jicofo you need a configuration file. Use environment variable JAVA_SYS_PROPS."
echo "e.g. export JAVA_SYS_PROPS=\"-Dconfig.file=/etc/jitsi/jicofo/jicofo.conf\""
echo
exit 2
fi
fi
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
mainClass="org.jitsi.jicofo.Main"
cp=$(JARS=($SCRIPT_DIR/jicofo*.jar $SCRIPT_DIR/lib/*.jar); IFS=:; echo "${JARS[*]}")
logging_config="$SCRIPT_DIR/lib/logging.properties"
# if there is a logging config file in lib folder use it (running from source)
if [ -f $logging_config ]; then
LOGGING_CONFIG_PARAM="-Djava.util.logging.config.file=$logging_config"
fi
if [ -z "$JICOFO_MAX_MEMORY" ]; then JICOFO_MAX_MEMORY=3072m; fi
exec java -Xmx$JICOFO_MAX_MEMORY -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Djdk.tls.ephemeralDHKeySize=2048 $LOGGING_CONFIG_PARAM $JAVA_SYS_PROPS -cp $cp $mainClass $@

11
resources/mvn-exec.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash -e
if [[ ! "$JAVA_SYS_PROPS" == *"-Dconfig.file="* ]]; then
echo
echo "To run jicofo you need a configuration file. Use environment variable JAVA_SYS_PROPS."
echo "e.g. export JAVA_SYS_PROPS=\"-Dconfig.file=/etc/jitsi/jicofo/jicofo.conf\""
echo
exit 2
fi
exec mvn ${JAVA_SYS_PROPS} compile exec:java -pl jicofo -Dexec.mainClass=org.jitsi.jicofo.Main