Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jitsi support for armhf #76

Merged
merged 83 commits into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
aa06cfa
add install support for armv7l
rosbeef Apr 13, 2022
7d90a3e
Update install
rosbeef Apr 13, 2022
72d3e5b
Update install
rosbeef Apr 13, 2022
008c685
Update install
rosbeef Apr 13, 2022
e8b7daa
Update install
rosbeef Apr 13, 2022
9661da2
Update install
rosbeef Apr 13, 2022
43381e2
Update install
rosbeef Apr 13, 2022
c6a5d5b
Update install
rosbeef Apr 13, 2022
3a80dd4
Update install
rosbeef Apr 13, 2022
35d24c4
Update install
rosbeef Apr 13, 2022
7f89437
Update install
rosbeef Apr 13, 2022
1e099cb
Update install
rosbeef Apr 13, 2022
74df420
Update install
rosbeef Apr 13, 2022
ad4eb05
Update install
rosbeef Apr 13, 2022
45a22c7
Update install
rosbeef Apr 13, 2022
194f71e
Update install
rosbeef Apr 13, 2022
390dcb3
Update install
rosbeef Apr 13, 2022
a686077
Update install
rosbeef Apr 13, 2022
6470b2e
Update install
rosbeef Apr 13, 2022
568ba52
Update install
rosbeef Apr 13, 2022
15d63dc
Update install
rosbeef Apr 13, 2022
def5222
Update install
rosbeef Apr 13, 2022
0231363
Update _common.sh
rosbeef Apr 13, 2022
33722d5
Update _common.sh
rosbeef Apr 13, 2022
b4b5aa5
Update _common.sh
rosbeef Apr 13, 2022
908ef0b
create file
rosbeef Apr 13, 2022
c5aef46
intermediate update
rosbeef Apr 14, 2022
942e4a8
file creation
rosbeef Apr 14, 2022
0415ee8
Update usrsctp.src
rosbeef Apr 14, 2022
5b79acd
Update jitsi-sctp.src
rosbeef Apr 14, 2022
c472a10
Update install
rosbeef Apr 14, 2022
a9b9997
Update install
rosbeef Apr 14, 2022
d79d8c2
Update install
rosbeef Apr 14, 2022
0ff01a5
Update install
rosbeef Apr 14, 2022
e3496b7
Update install
rosbeef Apr 14, 2022
ce64f60
Update jitsi-sctp.src
rosbeef Apr 14, 2022
c1fc190
Update usrsctp.src
rosbeef Apr 14, 2022
4468ad7
Update install
rosbeef Apr 14, 2022
3d03f6a
Update _common.sh
rosbeef Apr 14, 2022
3aaea89
Update install
rosbeef Apr 14, 2022
2d8053e
Update _common.sh
rosbeef Apr 14, 2022
1aada86
Update install
rosbeef Apr 14, 2022
6baeb88
Update install
rosbeef Apr 14, 2022
ee17fe7
Update _common.sh
rosbeef Apr 14, 2022
fb97d08
Update upgrade
rosbeef Apr 14, 2022
6748a43
Update restore
rosbeef Apr 14, 2022
fb19b7f
Update _common.sh
rosbeef Apr 14, 2022
05146e2
Update _common.sh
rosbeef Apr 14, 2022
a63933e
Update install
rosbeef Apr 14, 2022
80b01d7
Update install
rosbeef Apr 14, 2022
f1f585f
Update upgrade
rosbeef Apr 14, 2022
8f2f077
Update restore
rosbeef Apr 14, 2022
651a055
more sexy
yalh76 Apr 14, 2022
5fa3872
Update _common.sh
rosbeef Apr 14, 2022
39cf957
Merge branch 'patch-2' of https://github.com/rosbeef/jitsi_ynh into p…
yalh76 Apr 14, 2022
b7f4a95
Update _common.sh
rosbeef Apr 14, 2022
3848024
Update _common.sh
rosbeef Apr 14, 2022
aaaa034
Update jitsi-sctp.src
rosbeef Apr 14, 2022
aa1466b
Update _common.sh
rosbeef Apr 14, 2022
37ddece
Update _common.sh
rosbeef Apr 14, 2022
350f20b
Update _common.sh
rosbeef Apr 14, 2022
a17410a
Update upgrade
rosbeef Apr 14, 2022
d7e3690
Update install
rosbeef Apr 14, 2022
60f73a2
Update install
rosbeef Apr 14, 2022
11721e4
Update install
rosbeef Apr 14, 2022
cccbe88
Update upgrade
rosbeef Apr 15, 2022
6ed98d4
Update _common.sh
rosbeef Apr 15, 2022
9e97101
Update _common.sh
rosbeef Apr 15, 2022
b15cfb3
Update install
rosbeef Apr 15, 2022
a07d9e1
Update upgrade
rosbeef Apr 15, 2022
d9d44ca
Update install
rosbeef Apr 15, 2022
23081bf
Update _common.sh
rosbeef Apr 15, 2022
c49e441
Update install
rosbeef Apr 15, 2022
33c7fb5
Update upgrade
rosbeef Apr 15, 2022
0cbb650
Update _common.sh
rosbeef Apr 15, 2022
41382b3
Update README.md
rosbeef Apr 15, 2022
6660d1b
Update README.md
rosbeef Apr 15, 2022
f77c75e
Update manifest.json
rosbeef Apr 15, 2022
4234495
Update README_fr.md
rosbeef Apr 15, 2022
854fca9
Update config_panel.toml
rosbeef Apr 15, 2022
68809cf
Merge pull request #73 from rosbeef/patch-2
yalh76 Apr 16, 2022
f495041
Auto-update README
yunohost-bot Apr 16, 2022
400cdea
Add key
yalh76 Apr 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
2 changes: 1 addition & 1 deletion README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
6 changes: 6 additions & 0 deletions conf/jitsi-sctp.src
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 0 deletions conf/usrsctp.src
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion config_panel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
50 changes: 50 additions & 0 deletions scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
#=================================================
Expand All @@ -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
#=================================================
Expand Down
21 changes: 18 additions & 3 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
#=================================================
Expand Down Expand Up @@ -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
#=================================================
Expand Down
20 changes: 19 additions & 1 deletion scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
#=================================================
Expand Down