diff --git a/README.md b/README.md index d3e976e..a962331 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Jitsi Meet is a libre software (Apache) WebRTC JavaScript app that uses Jitsi Videobridge to provide high quality, secure, and scalable video conferences. -**Shipped version:** 1.0.5913~ynh2 +**Shipped version:** 1.0.5913~ynh3 **Demo:** https://meet.jit.si/ diff --git a/README_fr.md b/README_fr.md index 58bd579..b86db42 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Jitsi Meet est un logiciel libre (Apache) dont Jitsi Videobridge, avec WebRTC Javascript, propose des vidéos-conférences de haute qualité, sécurisées et évolutives. -**Version incluse :** 1.0.5913~ynh2 +**Version incluse :** 1.0.5913~ynh3 **Démo :** https://meet.jit.si/ diff --git a/conf/jitsi-sctp.src b/conf/jitsi-sctp.src new file mode 100644 index 0000000..034ec40 --- /dev/null +++ b/conf/jitsi-sctp.src @@ -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 diff --git a/conf/usrsctp.src b/conf/usrsctp.src new file mode 100644 index 0000000..aeb80da --- /dev/null +++ b/conf/usrsctp.src @@ -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 diff --git a/config_panel.toml b/config_panel.toml index 53f6da1..1089624 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -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" diff --git a/manifest.json b/manifest.json index 876adda..5103063 100644 --- a/manifest.json +++ b/manifest.json @@ -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", diff --git a/scripts/_common.sh b/scripts/_common.sh index 45d1c9f..992eb27 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -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 #================================================= diff --git a/scripts/install b/scripts/install index 102e153..80e81fe 100644 --- a/scripts/install +++ b/scripts/install @@ -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" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc" +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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index b716c03..1480702 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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" --key="https://ftp-master.debian.org/keys/archive-key-9-security.asc" +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 #=================================================