1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jitsi_ynh.git synced 2024-09-03 19:35:57 +02:00

Merge pull request #73 from rosbeef/patch-2

jitsi support for armhf
This commit is contained in:
yalh76 2022-04-16 20:43:21 +02:00 committed by GitHub
commit 68809cfdfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 114 additions and 11 deletions

View file

@ -33,8 +33,12 @@ Jitsi Meet is a libre software (Apache) WebRTC JavaScript app that uses Jitsi Vi
1. **Jitsi** requires a dedicated **root domain**, eg. jitsi.domain.tld
2. **Jitsi** requires the ports TCP/4443 and UDP/10000 to be forwarded to your YunoHost (The same way you forwarded 80 (HTTP), 443 (HTTPS), etc... https://yunohost.org/#/isp_box_config)
3. **Jitsi** will stop and disable Metronome XMPP.
4. LDAP authentication is activated, only authenticated users to create new conference rooms. Whenever a new room is about to be created, Jitsi Meet will prompt for a user name and password. After the room is created, others will be able to join from anonymous domain.
5. **Jitsi** is configured for 50 users maximum, this number can be increase going to the Yunohost config panel
4. LDAP authentication is activated, only authenticated users can create new conference rooms. Whenever a new room is about to be created, Jitsi Meet will prompt for a user name and password. After the room is created, others will be able to join from anonymous domain.
5. **Jitsi** is configured for to user 200MiB memory (next to 50 simultaneus users), this number can be increase going to the Yunohost config panel
5. **Jitsi** is compatible with armhf architecture, it was tested on odroid xu4 and hc1.
## known bug
- if a second user join before the first user declared himself as moderator video and sound should never appear, reload page should correct the problem
## Documentation and resources

View file

@ -30,7 +30,11 @@ Jitsi Meet est un logiciel libre (Apache) dont Jitsi Videobridge, avec WebRTC Ja
2. **Jitsi** demande que les ports TCP/4443 et UDP/10000 soient routés vers votre YunoHost (De la même manière que le sont les ports 80 (HTTP), 443 (HTTPS), etc... https://yunohost.org/#/isp_box_config)
3. **Jitsi** va arréter et désactiver le service XMPP Metronome.
4. L'authentification LDAP est activée, seuls les utilisateurs authentifiés peuvent créer de nouvelles salles de conférence. Chaque fois qu'une nouvelle salle est sur le point d'être créée, Jitsi Meet vous demandera un nom d'utilisateur et un mot de passe. Une fois la salle créée, d'autres personnes pourront la rejoindre à partir d'un domaine anonyme.
5. **Jitsi** est configuré pour 50 utilisateurs maximum, ce nombre peut être augmenté en allant dans le panneau de configuration Yunohost
5. **Jitsi** est configuré pour utiliser 200MiB (equivalent a 50 utilisateurs maximum), ce nombre peut être augmenté en allant dans le panneau de configuration Yunohost
6. **Jitsi** est compatible avec l'architecture armhf (testé sur odroid XU4 et HC1)
## Bugs connus
- si un second utilisateur rejoins le salon avant que le premié ne se soit déclaré comme modérateur, il risque de ne pas y avoir de partage de video et d'audio. Un rechargement de la page devrait suffir apres que le modérateur se soit identifé.
## Documentations et ressources

6
conf/jitsi-sctp.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/jitsi/jitsi-sctp/archive/04269a7342fbd3bd66dd40ed892cfc80559d62d4.tar.gz
SOURCE_SUM=2aa4f596e96186d43f4beb3e9db9907d23b993d974e15dd051031f4d00423bf2
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_EXTRACT=true

6
conf/usrsctp.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/sctplab/usrsctp/archive/c138bc04bbb20b34fc10fd50e34c1723c40896c4.tar.gz
SOURCE_SUM=ff4808da7c4bbd886feeb03a74eee1cb235a7d4c9a20c16a37581fe10d55dd4b
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_EXTRACT=true

View file

@ -11,4 +11,4 @@ services = ["__APP__-jicofo","__APP__-videobridge"]
bind = "null"
ask.en = "Max memory to use for VM"
type = "number"
help = "One user consume about 1,5 Mib memory, for example if plan to have max 50 simultaneous users this parameter should be set to 75 mb"
help = "One user consume about 1,5 Mib memory ,with no user jitsi consume 120 MiB. For example if plan to have max 50 simultaneous users this parameter should be set to 200 mb"

View file

@ -6,7 +6,7 @@
"en": "Video conferencing web application",
"fr": "Application web de conférence vidéo"
},
"version": "1.0.5913~ynh2",
"version": "1.0.5913~ynh3",
"url": "https://jitsi.org/Projects/JitMeet",
"upstream": {
"license": "Apache-2.0",

View file

@ -7,6 +7,13 @@
# dependencies used by the app
pkg_dependencies="openjdk-8-jre-headless|openjdk-11-jre-headless debconf|debconf-2.0 procps uuid-runtime lua-ldap"
if [ $YNH_ARCH == "armhf" ]
then
pkg_dependencies_arm="automake autoconf build-essential libtool git maven m4"
pkg_dependencies="$pkg_dependencies $pkg_dependencies_arm"
pkg_extra_depedencies_arm="openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk openjdk-8-jdk-headless"
fi
#=================================================
# PERSONAL HELPERS
#=================================================
@ -16,6 +23,49 @@ ynh_version_gt ()
dpkg --compare-versions "$1" gt "$2"
}
ynh_jniwrapper_armhf ()
{
# set openjdk-8 as default
# update-alternatives --set java /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java
tempdir="$(mktemp -d)"
# prepare jniwrapper compilation
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-armhf
declare -A packages_arm
packages_arm[jitsi-sctp]="jitsi-sctp"
packages_arm[usrsctp]="jitsi-sctp/usrsctp/usrsctp"
for package_arm in "${!packages_arm[@]}"
do
ynh_setup_source --dest_dir="$tempdir/${packages_arm[$package_arm]}" --source_id=$package_arm
done
# needed to make compile works
if [ ! -d "$tempdir/jitsi-sctp/jniwrapper/native/src/main/resources/lib/linux-arm/" ]
then
mkdir -p $tempdir/jitsi-sctp/jniwrapper/native/src/main/resources/lib/linux-arm/
fi
pushd "$tempdir/jitsi-sctp"
mvn package -DbuildSctp -DbuildNativeWrapper -DdeployNewJnilib -DskipTests
mvn package
popd
# rm official jniwrapper to copy
original_jniwrapper=$(ls $final_path/jitsi-videobridge/lib/jniwrapper-native-*.jar)
ynh_secure_remove --file="$original_jniwrapper"
mv "$tempdir/jitsi-sctp/jniwrapper/native/target/jniwrapper-native-1.0-SNAPSHOT.jar" "$final_path/jitsi-videobridge/lib/"
chmod 640 "$final_path/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar"
chown -R $app:$app "$final_path/jitsi-videobridge/lib/jniwrapper-native-1.0-SNAPSHOT.jar"
ynh_secure_remove --file="$tempdir"
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -42,7 +42,7 @@ focus_user="focus"
videobridge_user="jvb"
max_memory=75
max_memory=200 #125 mib with no user +1,5*50 users=75 mib
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
@ -99,6 +99,12 @@ ynh_app_setting_set --app=$app --key=port_component --value=$port_component
ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies
if [ $YNH_ARCH == "armhf" ]
then
ynh_script_progression --message="Installing specific arm dependencies..."
ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm"
fi
if ! yunohost app list | grep -q "prosody"
then
@ -214,6 +220,17 @@ ynh_add_config --template="../conf/jitsi-videobridge-sip-communicator.properties
ynh_add_config --template="../conf/jitsi-videobridge.config" --destination="/etc/$app/videobridge/config"
#=================================================
# REPLACE JNIWRAPPER FOR ARMHF ARCHITECTURE IN JITSI-VIDEOBRIDGE
#=================================================
if [ $YNH_ARCH == "armhf" ]
then
ynh_script_progression --message="Configuring jniwrapper for armhf ..."
ynh_jniwrapper_armhf
fi
#=================================================
# CONFIGURE JITSI-JICOFO
#=================================================
@ -265,8 +282,6 @@ ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files
chown -R $app: /etc/$app
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP LOGROTATE
#=================================================

View file

@ -82,7 +82,7 @@ fi
# If max_memory doesn't exist, create it and set to default 75 mb value
if [ -z "$max_memory" ]; then
max_memory=75
max_memory=200
ynh_app_setting_set --app=$app --key=max_memory --value=$max_memory
fi
@ -145,6 +145,12 @@ ynh_script_progression --message="Upgrading dependencies..."
ynh_install_app_dependencies $pkg_dependencies
if [ $YNH_ARCH == "armhf" ]
then
ynh_script_progression --message="Installing specific arm dependencies..."
ynh_install_extra_app_dependencies --repo="deb http://security.debian.org/debian-security stretch/updates main" --package="$pkg_extra_depedencies_arm"
fi
if ! yunohost app list | grep -q "prosody"
then
yunohost tools update
@ -200,6 +206,18 @@ then
ynh_add_config --template="../conf/jitsi-videobridge.config" --destination="/etc/$app/videobridge/config"
fi
#=================================================
# REPLACE JNIWRAPPER FOR ARMHF ARCHITECTURE IN JITSI-VIDEOBRIDGE
#=================================================
if [ $YNH_ARCH == "armhf" ]
then
ynh_script_progression --message="Configuring jniwrapper for armhf ..."
ynh_jniwrapper_armhf
fi
#=================================================
# CONFIGURE JITSI-JICOFO
#=================================================