From 3dac1d69f894f2d5ea0b56dcfbe33abff734e700 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 16 Oct 2022 10:14:43 +0200 Subject: [PATCH 01/97] Stop auto updating for now --- .github/workflows/updater.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 4740d92..1e22ce2 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -9,6 +9,8 @@ # Since each app is different, maintainers can adapt its contents so as to perform # automatic actions when a new upstream release is detected. +exit 1 + #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS #================================================= From f8ecc40f961b0b38206cdcda867d3d01056f9459 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Oct 2022 09:07:30 +0200 Subject: [PATCH 02/97] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 25b4e8b..ce78217 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": false, "services": [ From d06e86dbdd080bbf09409b7db97ea0abd227ca20 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Oct 2022 09:36:18 +0200 Subject: [PATCH 03/97] Update ynh_install_go --- scripts/ynh_install_go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ynh_install_go b/scripts/ynh_install_go index e3ad06a..80c6708 100644 --- a/scripts/ynh_install_go +++ b/scripts/ynh_install_go @@ -123,7 +123,7 @@ ynh_install_go () { fi popd else - ynh_print_info --message="Installing goenv with git..." + ynh_print_info --message="Installing goenv with Git..." mkdir -p $goenv_install_dir pushd $goenv_install_dir git init -q @@ -139,12 +139,12 @@ ynh_install_go () { ynh_print_info --message="\`goenv latest' command already available in \`$goenv_latest'." pushd "${goenv_latest%/*/*}" if git remote -v 2>/dev/null | grep "https://github.com/momo-lab/xxenv-latest.git"; then - ynh_print_info --message="Trying to update xxenv-latest with git..." + ynh_print_info --message="Trying to update xxenv-latest with Git..." git pull -q origin master fi popd else - ynh_print_info --message="Installing xxenv-latest with git..." + ynh_print_info --message="Installing xxenv-latest with Git..." mkdir -p "${goenv_install_dir}/plugins" git clone -q https://github.com/momo-lab/xxenv-latest.git "${goenv_install_dir}/plugins/xxenv-latest" fi From 3e3aa88aa7db6c7a5345964aea0a414248f20bfe Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Oct 2022 09:37:34 +0200 Subject: [PATCH 04/97] Update ynh_install_go --- scripts/ynh_install_go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/ynh_install_go b/scripts/ynh_install_go index 80c6708..4e0b499 100644 --- a/scripts/ynh_install_go +++ b/scripts/ynh_install_go @@ -123,7 +123,7 @@ ynh_install_go () { fi popd else - ynh_print_info --message="Installing goenv with Git..." + #ynh_print_info --message="Installing goenv with Git..." mkdir -p $goenv_install_dir pushd $goenv_install_dir git init -q @@ -144,7 +144,7 @@ ynh_install_go () { fi popd else - ynh_print_info --message="Installing xxenv-latest with Git..." + #ynh_print_info --message="Installing xxenv-latest with Git..." mkdir -p "${goenv_install_dir}/plugins" git clone -q https://github.com/momo-lab/xxenv-latest.git "${goenv_install_dir}/plugins/xxenv-latest" fi @@ -163,7 +163,7 @@ ynh_install_go () { # Install the requested version of Go local final_go_version=$(goenv latest --print $go_version) - ynh_print_info --message="Installation of Go-$final_go_version" + #ynh_print_info --message="Installation of Go-$final_go_version" goenv install --skip-existing $final_go_version # Store go_version into the config of this app @@ -231,7 +231,7 @@ ynh_cleanup_go () { do if ! `echo ${required_go_versions} | grep "${installed_go_version}" 1>/dev/null 2>&1` then - ynh_print_info --message="Removing of Go-$installed_go_version" + #ynh_print_info --message="Removing of Go-$installed_go_version" $goenv_install_dir/bin/goenv uninstall --force $installed_go_version fi done @@ -240,7 +240,7 @@ ynh_cleanup_go () { if [[ ! $required_go_versions ]] then # Remove goenv environment configuration - ynh_print_info --message="Removing of goenv" + #ynh_print_info --message="Removing of goenv" ynh_secure_remove --file="$goenv_install_dir" ynh_secure_remove --file="/etc/profile.d/goenv.sh" fi From c06336f4788ef4d34df92c1a170023927f134986 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Oct 2022 09:42:12 +0200 Subject: [PATCH 05/97] Update ldap.src --- conf/ldap.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/ldap.src b/conf/ldap.src index 5572ac7..56042fd 100644 --- a/conf/ldap.src +++ b/conf/ldap.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/jech/galene-ldap/archive/d0ffa0eadcf17150450d0222c07a2f8cf4e28d7e.tar.gz -SOURCE_SUM=e779ee173770799e3e0f398461a24f24576d87b1c8918712a8ee70702b74d4c9 +SOURCE_URL=https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz +SOURCE_SUM=00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true From b9746a335a397251e01d50c6833af2981e8afaff Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Oct 2022 09:52:48 +0200 Subject: [PATCH 06/97] Add feature to readme --- doc/DESCRIPTION.md | 1 + doc/DESCRIPTION_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 6575a4e..40f8d90 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -10,6 +10,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - screen and window sharing, including sharing multiple windows simultaneously (not on mobile) - streaming video and audio from disk - activity detection +- LDAP support ### Server features diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index cb17ea2..e4a0524 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -8,3 +8,4 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - partage d'écran et de fenêtre, y compris le partage de plusieurs fenêtres simultanément (pas sur mobile) - streaming vidéo et audio à partir du disque - détection d'activité +- prise en charge LDAP From 8bba8329cc9221659efb9717795d7f21f33070d5 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 18 Oct 2022 07:52:55 +0000 Subject: [PATCH 07/97] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 1130466..43507c1 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - screen and window sharing, including sharing multiple windows simultaneously (not on mobile) - streaming video and audio from disk - activity detection +- LDAP support ### Server features diff --git a/README_fr.md b/README_fr.md index e5f85d8..c747597 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,6 +25,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - partage d'écran et de fenêtre, y compris le partage de plusieurs fenêtres simultanément (pas sur mobile) - streaming vidéo et audio à partir du disque - détection d'activité +- prise en charge LDAP **Version incluse :** 0.6.1~ynh4 From 30873924b973eb7bf8954a9a6cfd186e28f39437 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 11 Jan 2023 21:10:44 +0100 Subject: [PATCH 08/97] 0.6.2 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index de43293..de0a54e 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/jech/galene/archive/refs/tags/galene-0.6.1.tar.gz -SOURCE_SUM=ea7ac0d0c5cff685e1d2a2e077d7197588fb570adfab1a1a924c87271f682f29 +SOURCE_URL=https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz +SOURCE_SUM=7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index ce78217..e22e81e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Videoconferencing server that is easy to deploy", "fr": "Serveur de visioconférence facile à déployer" }, - "version": "0.6.1~ynh4", + "version": "0.6.2~ynh1", "url": "https://galene.org/", "upstream": { "license": "MIT", From 1ad9d3e7baebc2afe6a0070edce7aa36a2dcadcc Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 11 Jan 2023 20:10:50 +0000 Subject: [PATCH 09/97] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 43507c1..1117f08 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - built-in TURN server. -**Shipped version:** 0.6.1~ynh4 +**Shipped version:** 0.6.2~ynh1 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index c747597..4f48abe 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - prise en charge LDAP -**Version incluse :** 0.6.1~ynh4 +**Version incluse :** 0.6.2~ynh1 **Démo :** https://galene.org:8443/ From 3bad4b7826cc596500cd83ea260d067f54511218 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 11 Jan 2023 21:12:21 +0100 Subject: [PATCH 10/97] cleaning --- check_process | 9 ++------- doc/DESCRIPTION.md | 15 --------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/check_process b/check_process index 89ea880..a7e831f 100644 --- a/check_process +++ b/check_process @@ -15,11 +15,6 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=aaae7fbe83ce001fabd40509882e765a5d8da2c1 - # 0.6~ynh1 - upgrade=1 from_commit=c5cc50f1b1f326080f4f657b7805f2c27c1c3f20 - # 0.6.1~ynh1 - upgrade=1 from_commit=f55a3d1990a0fb2fe17eb9b70aefb13337c2b623 # 0.6.1~ynh2 upgrade=1 from_commit=ed1506fa3eb56358fecb06d832c9684acbf682d9 backup_restore=1 @@ -30,6 +25,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=aaae7fbe83ce001fabd40509882e765a5d8da2c1 - name=Testing (#62) + ; commit=ed1506fa3eb56358fecb06d832c9684acbf682d9 + name=0.6.1~ynh2 manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 40f8d90..a527d48 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -11,18 +11,3 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - streaming video and audio from disk - activity detection - LDAP support - -### Server features - -- redistribution of arbitrary numbers of audio and video streams; -- text chat; -- recording to disk; -- user statuses ("raise hand", etc.); -- choice of audio and video codecs (full functionality for VP8, VP9, and H.264, preliminary support for AV1); -- Simulcast; -- Scalable Video Coding (SVC) for VP8 and VP9; -- automatic restarting of failed flows (on ICE failure); -- congestion control in the server → client direction (both loss-based and using REMB indications); -- congestion control in the client → server direction (loss-based, partial REMB support); -- dynamic tuning of buffer sizes depending on the clients' RTT; -- built-in TURN server. From e8fd2165d9f17948ee5970580f4998ce37fda002 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 11 Jan 2023 20:12:34 +0000 Subject: [PATCH 11/97] Auto-update README --- README.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/README.md b/README.md index 1117f08..f290836 100644 --- a/README.md +++ b/README.md @@ -29,21 +29,6 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - activity detection - LDAP support -### Server features - -- redistribution of arbitrary numbers of audio and video streams; -- text chat; -- recording to disk; -- user statuses ("raise hand", etc.); -- choice of audio and video codecs (full functionality for VP8, VP9, and H.264, preliminary support for AV1); -- Simulcast; -- Scalable Video Coding (SVC) for VP8 and VP9; -- automatic restarting of failed flows (on ICE failure); -- congestion control in the server → client direction (both loss-based and using REMB indications); -- congestion control in the client → server direction (loss-based, partial REMB support); -- dynamic tuning of buffer sizes depending on the clients' RTT; -- built-in TURN server. - **Shipped version:** 0.6.2~ynh1 From 2a5fb78d8b20e8d3b8408175d301b4011f672844 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 31 Jan 2023 11:06:03 +0000 Subject: [PATCH 12/97] Auto-update README --- README.md | 2 +- README_fr.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f290836..9f577e1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Galène for YunoHost -[![Integration level](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![Working status](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![Working status](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) [![Install Galène with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 4f48abe..d291126 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,15 @@ It shall NOT be edited by hand. # Galène pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) [![Installer Galène avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Galène rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Galène rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Galène est un serveur de visioconférence (un « SFU ») facile à déployer et qui nécessite des ressources serveur modérées. Il a été conçu à l'origine pour les cours et les conférences (où un seul orateur diffuse de l'audio et de la vidéo à des centaines ou des milliers d'utilisateurs), mais a évolué par la suite pour être utile pour les travaux pratiques des étudiants (où les utilisateurs sont divisés en plusieurs petits groupes) et les réunions (où un douzaine d'utilisateurs interagissent entre eux). @@ -32,9 +32,9 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et **Démo :** https://galene.org:8443/ -## Captures d'écran +## Captures d’écran -![Capture d'écran de Galène](./doc/screenshots/screenshot.png) +![Capture d’écran de Galène](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -90,10 +90,10 @@ Assurez-vous que l'autorisation d'enregistrement est définie dans la configurat ## Documentations et ressources -* Site officiel de l'app : +* Site officiel de l’app : * Documentation officielle utilisateur : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -109,4 +109,4 @@ ou sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From a0f20ebc41dd8ebd8bc89f6f6d90e1b098486939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 31 Jan 2023 12:25:06 +0100 Subject: [PATCH 13/97] Update systemd.service --- conf/systemd.service | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/conf/systemd.service b/conf/systemd.service index 1417126..cdbdbcc 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -11,5 +11,34 @@ WorkingDirectory=__FINALPATH__/live/ ExecStart=__FINALPATH__/live/galene -http "127.0.0.1:__PORT__" -insecure -turn __PUBLIC_IP4__:__TURN_PORT__ -udp-range 49152-65535 -groups __DATADIR__/groups -recordings __DATADIR__/recordings -data __FINALPATH__/live/data/ LimitNOFILE=65536 +# various hardening options +ReadWritePaths=/var/lib/galene/recordings +CapabilityBoundingSet= +AmbientCapabilities= +PrivateTmp=yes +PrivateDevices=yes +DevicePolicy=closed +ProtectSystem=strict +ProtectHome=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +ProtectKernelLogs=yes +ProtectControlGroups=yes +ProtectHostname=yes +ProtectClock=yes +NoNewPrivileges=yes +MountFlags=private +LockPersonality=yes +RestrictRealtime=yes +RestrictNamespaces=yes +RestrictSUIDSGID=yes +KeyringMode=private +MemoryDenyWriteExecute=yes +RemoveIPC=yes +SystemCallArchitectures=native +SystemCallFilter=~ @clock @cpu-emulation @debug @keyring @module @mount @raw-io @reboot @swap @obsolete @timer @resources @privileged @pkey @obsolete @setuid +RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX +UMask=0077 + [Install] WantedBy=multi-user.target From a4714d51737fa0b9be57fbd70f8488f3c51ab271 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Fri, 24 Feb 2023 00:40:02 +0100 Subject: [PATCH 14/97] Upgrade auto-updater (#106) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean --- .github/workflows/updater.yml | 4 ++-- README.md | 1 + README_fr.md | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index fb72ba0..a56d7cb 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run the updater script @@ -33,7 +33,7 @@ jobs: - name: Create Pull Request id: cpr if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update to version ${{ env.VERSION }} diff --git a/README.md b/README.md index 9f577e1..4490ad8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Galène for YunoHost [![Integration level](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![Working status](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) + [![Install Galène with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index d291126..2a0f4b7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Galène pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) + [![Installer Galène avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) *[Read this readme in english.](./README.md)* From 228e03dad1ee799a7f84d0d75a5ce76ce15c3e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 27 Feb 2023 15:42:08 +0100 Subject: [PATCH 15/97] Galene v2 (#104) * v2 * Fix * Auto-update README * Fix * fix * Fix * Fix * Auto-update README * Fix * Auto-update README * Fix * Auto-update README * Update tests.toml * Fix * Update manifest.toml * Update manifest.toml * Update tests.toml * Update tests.toml * Update tests.toml * Update tests.toml * Update tests.toml * Update restore * Update install * Update upgrade * Update manifest.toml * Update ynh_install_go * Update change_url * Auto-update README * Update change_url * fix * Update change_url * Update change_url * Update manifest.toml * fix * Update systemd.service * Update systemd.service * Update systemd.service * Update systemd.service * Update systemd.service * Update upgrade * Update upgrade * Update install * Update upgrade * Update manifest.toml --------- Co-authored-by: yunohost-bot --- README.md | 53 --------- README_fr.md | 52 --------- check_process | 30 ----- conf/galene-ldap.json | 2 +- conf/ldap.service | 4 +- conf/nginx.conf | 2 +- conf/systemd.service | 51 +++++---- doc/{DISCLAIMER.md => ADMIN.md} | 1 - doc/{DISCLAIMER_fr.md => ADMIN_fr.md} | 0 manifest.json | 83 -------------- manifest.toml | 81 +++++++++++++ scripts/_common.sh | 3 - scripts/backup | 25 +--- scripts/change_url | 106 +++-------------- scripts/install | 159 ++++++-------------------- scripts/remove | 57 +-------- scripts/restore | 72 ++---------- scripts/upgrade | 157 +++++++------------------ scripts/ynh_install_go | 6 +- tests.toml | 23 ++++ 20 files changed, 243 insertions(+), 724 deletions(-) delete mode 100644 check_process rename doc/{DISCLAIMER.md => ADMIN.md} (99%) rename doc/{DISCLAIMER_fr.md => ADMIN_fr.md} (100%) delete mode 100644 manifest.json create mode 100644 manifest.toml create mode 100644 tests.toml diff --git a/README.md b/README.md index 4490ad8..58a5889 100644 --- a/README.md +++ b/README.md @@ -39,59 +39,6 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th ![Screenshot of Galène](./doc/screenshots/screenshot.png) -## Disclaimers / important information - -### Accessing groups - -*Galène* meeting rooms are called "groups". Any group is accessible at `https://domain.tld/group/GroupName`, by typing its name in the home page search field, or by selecting it in the public list (if the group is configured as publicly visible, see below). -During install a group is created with YunoHost LDAP authentication, accessible at `https://domain.tld/group/YunoHost_Users`. - -#### Creating and configuring groups - -Groups are defined by JSON files located in the folder `/home/yunohost.app/galene/groups`. Each group is represented by a `GroupName.json` file. -To create a new group, you need to create a `GroupNameExample.json` file and restart Galène service (you can also make subfolder groups, and the groups will be accessible with `https://domain.tld/group/subfolder/GroupName/`). Various configuration options are available (see https://github.com/YunoHost-Apps/galene_ynh/wiki/Configuration-file). - -*NB: Spaces are supported in group file names.* - -When Galène is removed, the data directory (`/home/yunohost.app/galene/`) is preserved. If you want to remove it along with Galène, use the `--purge` option: `sudo yunohost app remove galene --purge`. - -### Configuring your TURN server - -#### Using *Galène*'s internal TURN server -Galène comes with a built-in TURN server that should work out-of-the-box. -- If your server is behind NAT, allow incoming traffic to TCP/UDP port `1194` (or whatever is configured with the `-turn` option in `/etc/systemd/system/galene.service`) - -#### Using your own TURN server -- Install [coturn_ynh](https://github.com/YunoHost-Apps/coturn_ynh). -- Add `/opt/yunohost/galene/data/ice-servers.json` with these lines and change `turn.example.org` and `secret` - -``` - [ - { - "urls": [ - "turn:turn.example.org:5349", - "turn:turn.example.org:5349?transport=tcp" - ], - "username": "galene", - "credential": "secret" - } - ] -``` -- set `/etc/systemd/system/galene.service` `-turn` option to `-turn auto` (or `-turn ""` to disable the built-in TURN server). - -To check if the TURN server is up and running, type `/relay-test` in the chat box. If the TURN server is properly configured, you should see a message saying that the relay test has been successful. - -You can also install Galène with an external TURN server with this branch: https://github.com/YunoHost-Apps/galene_ynh/tree/galene+turn - -### Server Statistics page - -Statistics are available under `/opt/yunohost/galene/stats.json`, with a human-readable version at `domain.ltd/stats.html`. This is only available to the server administrator (the admin/password is set in the `config.json` file: `/opt/yunohost/galene/data/config.json`). - -### How do I record my lecture? - -Make sure allow-recording is set in your group configuration. Log-in as an operator, then say `/record` before you start your lecture. Don't forget to say `/unrecord` at the end. You will find your recordings under `https://server.example.com/recordings/groupname/`. The video recordings are stored in `/home/yunohost.app/galene/recordings` folder. - - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index 2a0f4b7..fe00a32 100644 --- a/README_fr.md +++ b/README_fr.md @@ -37,58 +37,6 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et ![Capture d’écran de Galène](./doc/screenshots/screenshot.png) -## Avertissements / informations importantes - -### Accéder à des groupes - -Les salles de réunion *Galène* sont appelées « groupes ». Tout groupe est accessible sur `https://domain.tld/group/GroupName`, en tapant son nom dans le champ de recherche de la page d'accueil, ou en le sélectionnant dans la liste publique (si le groupe est configuré comme visible publiquement, voir ci-dessous). -Pendant l'installation, un groupe est créé avec l'authentification LDAP de YunoHost, accessible à `https://domain.tld/group/YunoHost_Users`. - -#### Ajouter et configurer des groupes - -Les groupes sont définis par des fichiers JSON situés dans le dossier `/home/yunohost.app/galene/groups`. Chaque groupe est représenté par un fichier `GroupName.json`. -Pour créer un nouveau groupe, vous devez créer un fichier `GroupNameExample.json` et redémarrer le service Galène (vous pouvez également créer un sous-dossier, et les groupes seront accessibles avec` https://domain.tld/group/subfolder/GroupName/`). Différentes options de configurations sont disponibles (voir https://github.com/YunoHost-Apps/galene_ynh/wiki/Configuration-file). - -*NB : Les espaces sont pris en charge dans les noms de fichiers de groupe.* - -Lorsque Galène est supprimé, le répertoire de données (`/home/yunohost.app/galene/`) est conservé. Si vous souhaitez le supprimer avec Galène, utilisez l'option `--purge` : `sudo yunohost app remove galene --purge`. - -### Configurer votre serveur TURN - -#### Utilisation du serveur TURN de *Galène* -Galène est livré avec un serveur TURN intégré qui devrait fonctionner immédiatement. -- Si votre serveur est derrière NAT, autorisez le trafic entrant vers le port TCP/UDP `1194` (ou tout ce qui est configuré avec l'option `-turn` dans `/etc/systemd/system/galene.service`) - -#### Utilisation de votre propre serveur TURN -- Installez [coturn_ynh](https://github.com/YunoHost-Apps/coturn_ynh). -- Ajoutez `/var/www/galene/data/ice-servers.json` avec ces lignes et changez `turn.example.org` et `secret` - -``` - [ - { - "urls": [ - "turn:turn.example.org:5349", - "turn:turn.example.org:5349?transport=tcp" - ], - "username": "galene", - "credential": "secret" - } - ] -``` -- Dans `/etc/systemd/system/galene.service` changer l'option `-turn auto` (ou `-turn ""` pour désactiver le serveur TURN intégré). - -Pour vérifier si le serveur TURN est opérationnel, tapez `/relay-test` dans la boîte de dialogue du chat de *Galène* ; si le serveur TURN est correctement configuré, vous devriez voir un message indiquant que le test du relai a réussi. - -Vous pouvez également installer *Galène* avec un serveur TURN externe avec cette branch : https://github.com/YunoHost-Apps/galene_ynh/tree/galene+turn - -### Statistiques du serveur - -Les statistiques sont disponibles sous `/opt/yunohost/galene/stats.json`, avec une version lisible sur `domain.ltd/stats.html`. Cette page n'est disponible que pour l'administrateur du serveur (le mot de passe et l'administrateur sont définis dans le fichier `config.json` : `/opt/yunohost/galene/data/config.json`). - -### Comment enregistrer ma conférence ? - -Assurez-vous que l'autorisation d'enregistrement est définie dans la configuration de votre groupe. Connectez-vous en tant qu'opérateur, puis dites `/record` dans la fenêtre de chat avant de commencer la visio. N'oubliez pas de dire `/unrecord` à la fin. Vous trouverez vos enregistrements sous `https://server.example.com/recordings/groupname/`. Les enregistrements vidéo sont stockés dans le dossier `/home/yunohost.app/galene/recordings`. - ## Documentations et ressources * Site officiel de l’app : diff --git a/check_process b/check_process deleted file mode 100644 index a7e831f..0000000 --- a/check_process +++ /dev/null @@ -1,30 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - is_public=1 - admin="john" - password="password" - group_name="public with space" - group_description="My public space" - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - # 0.6.1~ynh2 - upgrade=1 from_commit=ed1506fa3eb56358fecb06d832c9684acbf682d9 - backup_restore=1 - multi_instance=0 - port_already_use=0 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=ed1506fa3eb56358fecb06d832c9684acbf682d9 - name=0.6.1~ynh2 - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/conf/galene-ldap.json b/conf/galene-ldap.json index 1480001..c271256 100644 --- a/conf/galene-ldap.json +++ b/conf/galene-ldap.json @@ -1,5 +1,5 @@ { - "httpAddress": "127.0.0.1:__LDAP_PORT__", + "httpAddress": "127.0.0.1:__PORT_LDAP__", "ldapServer": "ldap://localhost:389", "ldapBase": "ou=users,dc=yunohost,dc=org", "key": __KEY__, diff --git a/conf/ldap.service b/conf/ldap.service index 6efb10d..29ca25f 100644 --- a/conf/ldap.service +++ b/conf/ldap.service @@ -7,8 +7,8 @@ After=network.target Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__/live_ldap/ -ExecStart=__FINALPATH__/live_ldap/galene-ldap -data __FINALPATH__/live_ldap/data/ +WorkingDirectory=__INSTALL_DIR__/live_ldap/ +ExecStart=__INSTALL_DIR__/live_ldap/galene-ldap -data __INSTALL_DIR__/live_ldap/data/ LimitNOFILE=65536 [Install] diff --git a/conf/nginx.conf b/conf/nginx.conf index a37e798..087602d 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,6 @@ location /auth/ { - proxy_pass http://127.0.0.1:__LDAP_PORT__/; + proxy_pass http://127.0.0.1:__PORT_LDAP__/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/conf/systemd.service b/conf/systemd.service index cdbdbcc..aa4af39 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,38 +7,43 @@ After=network.target Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__/live/ -ExecStart=__FINALPATH__/live/galene -http "127.0.0.1:__PORT__" -insecure -turn __PUBLIC_IP4__:__TURN_PORT__ -udp-range 49152-65535 -groups __DATADIR__/groups -recordings __DATADIR__/recordings -data __FINALPATH__/live/data/ +WorkingDirectory=__INSTALL_DIR__/live/ +ExecStart=__INSTALL_DIR__/live/galene -http "127.0.0.1:__PORT__" -insecure -turn __PUBLIC_IP4__:__PORT_TURN__ -udp-range 49152-65535 -groups __DATA_DIR__/groups -recordings __DATA_DIR__/recordings -data __INSTALL_DIR__/live/data/ LimitNOFILE=65536 -# various hardening options -ReadWritePaths=/var/lib/galene/recordings -CapabilityBoundingSet= -AmbientCapabilities= +# Sandboxing options to harden security +# Depending on specificities of your service/app, you may need to tweak these +# .. but this should be a good baseline +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes PrivateTmp=yes PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK +RestrictNamespaces=yes +RestrictRealtime=yes DevicePolicy=closed -ProtectSystem=strict -ProtectHome=yes +ProtectClock=yes +ProtectHostname=yes +ProtectProc=invisible +ProtectSystem=full +ProtectControlGroups=yes ProtectKernelModules=yes ProtectKernelTunables=yes -ProtectKernelLogs=yes -ProtectControlGroups=yes -ProtectHostname=yes -ProtectClock=yes -NoNewPrivileges=yes -MountFlags=private LockPersonality=yes -RestrictRealtime=yes -RestrictNamespaces=yes -RestrictSUIDSGID=yes -KeyringMode=private -MemoryDenyWriteExecute=yes -RemoveIPC=yes SystemCallArchitectures=native -SystemCallFilter=~ @clock @cpu-emulation @debug @keyring @module @mount @raw-io @reboot @swap @obsolete @timer @resources @privileged @pkey @obsolete @setuid -RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX -UMask=0077 +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG [Install] WantedBy=multi-user.target diff --git a/doc/DISCLAIMER.md b/doc/ADMIN.md similarity index 99% rename from doc/DISCLAIMER.md rename to doc/ADMIN.md index 35f908f..46cd726 100644 --- a/doc/DISCLAIMER.md +++ b/doc/ADMIN.md @@ -47,4 +47,3 @@ Statistics are available under `/opt/yunohost/galene/stats.json`, with a human-r ### How do I record my lecture? Make sure allow-recording is set in your group configuration. Log-in as an operator, then say `/record` before you start your lecture. Don't forget to say `/unrecord` at the end. You will find your recordings under `https://server.example.com/recordings/groupname/`. The video recordings are stored in `/home/yunohost.app/galene/recordings` folder. - diff --git a/doc/DISCLAIMER_fr.md b/doc/ADMIN_fr.md similarity index 100% rename from doc/DISCLAIMER_fr.md rename to doc/ADMIN_fr.md diff --git a/manifest.json b/manifest.json deleted file mode 100644 index e22e81e..0000000 --- a/manifest.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "Galène", - "id": "galene", - "packaging_format": 1, - "description": { - "en": "Videoconferencing server that is easy to deploy", - "fr": "Serveur de visioconférence facile à déployer" - }, - "version": "0.6.2~ynh1", - "url": "https://galene.org/", - "upstream": { - "license": "MIT", - "website": "https://galene.org/", - "demo": "https://galene.org:8443/", - "admindoc": "https://galene.org/", - "userdoc": "https://galene.org/faq.html", - "code": "https://github.com/jech/galene" - }, - "license": "MIT", - "maintainer": { - "name": "eric_G", - "email": "" - }, - "requirements": { - "yunohost": ">= 11.0.9" - }, - "multi_instance": false, - "services": [ - "nginx" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "is_public", - "type": "boolean", - "help": { - "en": "If enabled, Galène will be accessible by people who do not have an account. This can be changed later via the webadmin.", - "fr": "Si cette case est cochée, Galène sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." - }, - "default": true - }, - { - "name": "admin", - "type": "user" - }, - { - "name": "password", - "type": "password", - "help": { - "en": "Set the administrator password (between 8 and 30 characters)", - "fr": "Définissez le mot de passe administrateur (entre 8 et 30 caractères)" - } - }, - { - "name": "group_name", - "type": "string", - "ask": { - "en": "Choose a name for the group you want to create", - "fr": "Choisissez un nom pour le groupe que vous voulez créer" - }, - "default": "public", - "example": "public" - }, - { - "name": "group_description", - "type": "string", - "optional": true, - "ask": { - "en": "Choose a description for the group you want to create", - "fr": "Décrivez le groupe que vous souhaitez créer" - }, - "help": { - "en": "Add a human-readable description of the group; this is displayed on the landing page for public groups.", - "fr": "Ajoutez une description du groupe; ceci est affiché sur la page de destination des groupes publics." - } - } - ] - } -} diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..bca6d94 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,81 @@ +packaging_format = 2 + +id = "galene" +name = "Galène" +description.en = "Videoconferencing server that is easy to deploy" +description.fr = "Serveur de visioconférence facile à déployer" + +version = "0.6.2~ynh1" + +maintainers = ["eric_G"] + +[upstream] +license = "MIT" +website = "https://galene.org/" +demo = "https://galene.org:8443/" +admindoc = "https://galene.org/" +userdoc = "https://galene.org/faq.html" +code = "https://github.com/jech/galene" + +[integration] +yunohost = ">= 11.1.11" +architectures = "all" +multi_instance = false +ldap = true +sso = "not_relevant" +disk = "50M" +ram.build = "400M" +ram.runtime = "50M" + +[install] + [install.domain] + type = "domain" + full_domain = true + + [install.init_main_permission] + help.en = "If Visitors enabled, Galène will be accessible by people who do not have an account. This can be changed later via the webadmin." + help.fr = "Si la permission Visiteurs est cochée, Galène sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + type = "group" + default = "visitors" + + [install.admin] + type = "user" + + [install.password] + help.en = "Set the administrator password (between 8 and 30 characters)" + help.fr = "Définissez le mot de passe administrateur (entre 8 et 30 caractères)" + type = "password" + + [install.group_name] + ask.en = "Choose a name for the group you want to create" + ask.fr = "Choisissez un nom pour le groupe que vous voulez créer" + type = "string" + default = "public" + example = "public" + + [install.group_description] + ask.en = "Choose a description for the group you want to create" + ask.fr = "Décrivez le groupe que vous souhaitez créer" + help.en = "Add a human-readable description of the group; this is displayed on the landing page for public groups." + help.fr = "Ajoutez une description du groupe; ceci est affiché sur la page de destination des groupes publics." + type = "string" + optional = true + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.data_dir] + + [resources.permissions] + main.url = "/" + + [resources.ports] + main.default = 8095 + ldap.default = 8096 + turn.default = 1194 + turn.exposed = "Both" + + [resources.apt] + packages = "jose" diff --git a/scripts/_common.sh b/scripts/_common.sh index 87199a3..1f273f5 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,9 +6,6 @@ go_version=1.19 -# dependencies used by the app (must be on a single line) -pkg_dependencies="jose" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index cf11da9..2696784 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,27 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - true -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_print_info --message="Loading installation settings..." - -app=$YNH_APP_INSTANCE_NAME - -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -domain=$(ynh_app_setting_get --app=$app --key=domain) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= @@ -40,13 +19,13 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP THE DATA DIR #================================================= -ynh_backup --src_path="$datadir" --is_big +ynh_backup --src_path="$data_dir" --is_big #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/change_url b/scripts/change_url index cb35cc4..fa108f2 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,67 +9,16 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH - -new_domain=$YNH_APP_NEW_DOMAIN -new_path="/" - -app=$YNH_APP_INSTANCE_NAME - #================================================= # LOAD SETTINGS #================================================= ynh_script_progression --message="Loading installation settings..." --weight=1 -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - # Add settings here as needed by your application -admin=$(ynh_app_setting_get --app=$app --key=admin) password=$(ynh_app_setting_get --app=$app --key=password) group_name=$(ynh_app_setting_get --app=$app --key=group_name) -port=$(ynh_app_setting_get --app=$app --key=port) ldap_port=$(ynh_app_setting_get --app=$app --key=ldap_port) key=$(ynh_app_setting_get --app=$app --key=key) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - -change_path=0 -if [ "$old_path" != "$new_path" ] -then - change_path=1 -fi #================================================= # STANDARD MODIFICATIONS @@ -86,29 +35,7 @@ ynh_systemd_action --service_name=${app}_ldap --action="stop" --log_path="system #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" - # Create a dedicated NGINX config - ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi +ynh_change_url_nginx_config #================================================= # SPECIFIC MODIFICATIONS @@ -119,24 +46,24 @@ ynh_script_progression --message="Updating a configuration file..." --weight=2 domain="$new_domain" # Configure Galene -ynh_add_config --template="../conf/config.json" --destination="$final_path/live/data/config.json" -chmod 400 "$final_path/live/data/config.json" -chown $app:$app "$final_path/live/data/config.json" +ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" +chmod 400 "$install_dir/live/data/config.json" +chown $app:$app "$install_dir/live/data/config.json" # Configure Galene LDAP -ynh_add_config --template="../conf/galene-ldap.json" --destination="$final_path/live_ldap/data/galene-ldap.json" -chmod 400 "$final_path/live_ldap/data/galene-ldap.json" -chown $app:$app "$final_path/live_ldap/data/galene-ldap.json" +ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" +chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" +chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" # Create a group name config -ynh_add_config --template="../conf/groupname.json" --destination="$datadir/groups/$group_name.json" -chmod 400 "$datadir/groups/$group_name.json" -chown $app:$app "$datadir/groups/$group_name.json" +ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" +chmod 400 "$data_dir/groups/$group_name.json" +chown $app:$app "$data_dir/groups/$group_name.json" # Create a group name authenticated on LDAP -ynh_add_config --template="../conf/groupname-ldap.json" --destination="$datadir/groups/YunoHost_Users.json" -chmod 400 "$datadir/groups/YunoHost_Users.json" -chown $app:$app "$datadir/groups/YunoHost_Users.json" +ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" +chmod 400 "$data_dir/groups/YunoHost_Users.json" +chown $app:$app "$data_dir/groups/YunoHost_Users.json" #================================================= # GENERIC FINALISATION @@ -149,13 +76,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=3 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=${app}_ldap --action="start" --log_path="systemd" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 591fc3f..0077046 100755 --- a/scripts/install +++ b/scripts/install @@ -10,111 +10,49 @@ source _common.sh source ynh_install_go source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - true -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -domain=$YNH_APP_ARG_DOMAIN -path_url="/" -is_public=$YNH_APP_ARG_IS_PUBLIC -admin=$YNH_APP_ARG_ADMIN -password=$YNH_APP_ARG_PASSWORD group_name=$YNH_APP_ARG_GROUP_NAME group_description=$YNH_APP_ARG_GROUP_DESCRIPTION - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -ynh_script_progression --message="Validating installation parameters..." --weight=1 - -final_path=/var/www/$app -test ! -e "$final_path" || ynh_die --message="This path already contains a folder" - -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url +password=$YNH_APP_ARG_PASSWORD #================================================= # STORE SETTINGS FROM MANIFEST #================================================= ynh_script_progression --message="Storing installation settings..." --weight=4 -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=admin --value=$admin -ynh_app_setting_set --app=$app --key=password --value="$password" ynh_app_setting_set --app=$app --key=group_name --value="$group_name" ynh_app_setting_set --app=$app --key=group_description --value="$group_description" +ynh_app_setting_set --app=$app --key=password --value="$password" #================================================= # STANDARD MODIFICATIONS #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." --weight=3 - -# Find an available port -port=$(ynh_find_port --port=8095) -ynh_app_setting_set --app=$app --key=port --value=$port - -ldap_port=$(ynh_find_port --port=$(($port + 1))) -ynh_app_setting_set --app=$app --key=port --value=$ldap_port - -# Find an available port for TURN -turn_port=$(ynh_find_port --port=1194) -ynh_app_setting_set --app=$app --key=turn_port --value=$turn_port - -# Open TURN port ynh_script_progression --message="Configuring firewall..." --weight=1 -ynh_exec_warn_less yunohost firewall allow Both $turn_port - # Reserve UDP Port range 49152:65535 ynh_exec_warn_less yunohost firewall allow UDP -4 49152:65535 -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Installing dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=3 - -# Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path/build" -ynh_setup_source --dest_dir="$final_path/build_ldap" --source_id="ldap" +ynh_setup_source --dest_dir="$install_dir/build" +ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" -mkdir -p "$final_path/live/data" -mkdir -p "$final_path/live_ldap/data" -cp -r "$final_path/build/static/" "$final_path/live/" -ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$final_path/live/static/galene.html" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +mkdir -p "$install_dir/live/data" +mkdir -p "$install_dir/live_ldap/data" +cp -r "$install_dir/build/static/" "$install_dir/live/" +ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$install_dir/live/static/galene.html" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # NGINX CONFIGURATION @@ -133,32 +71,29 @@ ynh_script_progression --message="Building app..." --weight=1 ynh_exec_warn_less ynh_install_go --go_version=$go_version ynh_use_go -pushd $final_path/build/ - ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $final_path/live/ +pushd $install_dir/build/ + ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/ popd -pushd $final_path/build_ldap/ - ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $final_path/live_ldap/ +pushd $install_dir/build_ldap/ + ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live_ldap/ popd ynh_remove_go -ynh_secure_remove --file="$final_path/build/" -ynh_secure_remove --file="$final_path/build_ldap/" -ynh_secure_remove --file="$final_path/.cache/" -ynh_secure_remove --file="$final_path/go/" -ynh_secure_remove --file="$final_path/.go-version" +ynh_secure_remove --file="$install_dir/build/" +ynh_secure_remove --file="$install_dir/build_ldap/" +ynh_secure_remove --file="$install_dir/.cache/" +ynh_secure_remove --file="$install_dir/go/" +ynh_secure_remove --file="$install_dir/.go-version" #================================================= # CREATE DATA DIRECTORY #================================================= ynh_script_progression --message="Creating a data directory..." --weight=1 -datadir=/home/yunohost.app/$app -ynh_app_setting_set --app=$app --key=datadir --value=$datadir +mkdir -p $data_dir/{groups,recordings} -mkdir -p $datadir/{groups,recordings} - -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" +chmod 750 "$data_dir" +chmod -R o-rwx "$data_dir" +chown -R $app:www-data "$data_dir" #================================================= # ADD A CONFIGURATION @@ -166,26 +101,26 @@ chown -R $app:www-data "$datadir" ynh_script_progression --message="Adding a configuration file..." --weight=1 # Configure Galène -ynh_add_config --template="../conf/config.json" --destination="$final_path/live/data/config.json" -chmod 400 "$final_path/live/data/config.json" -chown $app:$app "$final_path/live/data/config.json" +ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" +chmod 400 "$install_dir/live/data/config.json" +chown $app:$app "$install_dir/live/data/config.json" # Configure Galène LDAP key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}') ynh_app_setting_set --app=$app --key=key --value="$key" -ynh_add_config --template="../conf/galene-ldap.json" --destination="$final_path/live_ldap/data/galene-ldap.json" -chmod 400 "$final_path/live_ldap/data/galene-ldap.json" -chown $app:$app "$final_path/live_ldap/data/galene-ldap.json" +ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" +chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" +chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" # Create a group name config -ynh_add_config --template="../conf/groupname.json" --destination="$datadir/groups/$group_name.json" -chmod 400 "$datadir/groups/$group_name.json" -chown $app:$app "$datadir/groups/$group_name.json" +ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" +chmod 400 "$data_dir/groups/$group_name.json" +chown $app:$app "$data_dir/groups/$group_name.json" # Create a group name authenticated on LDAP -ynh_add_config --template="../conf/groupname-ldap.json" --destination="$datadir/groups/YunoHost_Users.json" -chmod 400 "$datadir/groups/YunoHost_Users.json" -chown $app:$app "$datadir/groups/YunoHost_Users.json" +ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" +chmod 400 "$data_dir/groups/YunoHost_Users.json" +chown $app:$app "$data_dir/groups/YunoHost_Users.json" #================================================= # SETUP SYSTEMD @@ -205,7 +140,7 @@ ynh_add_systemd_config --service=${app}_ldap --template="ldap.service" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$turn_port" +yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$port_turn" yunohost service add ${app}_ldap --description="LDAP integration for the videoconferencing server" #================================================= @@ -217,26 +152,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=${app}_ldap --action="start" --log_path="systemd" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." --weight=2 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission="main" --add="visitors" -fi - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=2 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index dc1df05..23d30bd 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,18 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -turn_port=$(ynh_app_setting_get --app=$app --key=turn_port) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) - #================================================= # STANDARD REMOVE #================================================= @@ -49,25 +37,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..." ynh_remove_systemd_config ynh_remove_systemd_config --service=${app}_ldap -#================================================= -# REMOVE APP MAIN DIR -#================================================= -ynh_script_progression --message="Removing app main directory..." --weight=2 - -# Remove the app directory securely -ynh_secure_remove --file="$final_path" - -#================================================= -# REMOVE DATA DIR -#================================================= - -# Remove the data directory if --purge option is used -if [ "${YNH_APP_PURGE:-0}" -eq 1 ] -then - ynh_script_progression --message="Removing app data directory..." --weight=1 - ynh_secure_remove --file="$datadir" -fi - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -76,22 +45,14 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # CLOSE A PORT #================================================= -if yunohost firewall list | grep -q "\- $turn_port$" +if yunohost firewall list | grep -q "\- $port_turn$" then - ynh_script_progression --message="Closing port $turn_port..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow both $turn_port + ynh_script_progression --message="Closing port $port_turn..." --weight=1 + ynh_exec_warn_less yunohost firewall disallow both $port_turn fi if yunohost firewall list | grep -q "\- 49152:65535" @@ -100,18 +61,6 @@ then ynh_exec_warn_less yunohost firewall disallow UDP 49152:65535 fi -#================================================= -# SPECIFIC REMOVE -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 - -# Delete a system user -ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 3ab3d80..21e6513 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,81 +10,29 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - true -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -group_name=$(ynh_app_setting_get --app=$app --key=group_name) -turn_port=$(ynh_app_setting_get --app=$app --key=turn_port) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=1 - -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " - -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=2 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" - #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." --weight=1 -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= ynh_script_progression --message="Restoring the data directory..." --weight=1 -ynh_restore_file --origin_path="$datadir" --not_mandatory +ynh_restore_file --origin_path="$data_dir" --not_mandatory -mkdir -p $datadir/{groups,recordings} +mkdir -p $data_dir/{groups,recordings} -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" - -#================================================= -# SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 - -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +chmod 750 "$data_dir" +chmod -R o-rwx "$data_dir" +chown -R $app:www-data "$data_dir" #================================================= # RESTORE THE NGINX CONFIGURATION @@ -107,7 +55,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$turn_port" +yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$port_turn" yunohost service add ${app}_ldap --description="LDAP integration for the videoconferencing server" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index bcc8364..42e5e65 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,47 +15,16 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -admin=$(ynh_app_setting_get --app=$app --key=admin) -password=$(ynh_app_setting_get --app=$app --key=password) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) group_name=$(ynh_app_setting_get --app=$app --key=group_name) group_description=$(ynh_app_setting_get --app=$app --key=group_description) -port=$(ynh_app_setting_get --app=$app --key=port) -ldap_port=$(ynh_app_setting_get --app=$app --key=ldap_port) -key=$(ynh_app_setting_get --app=$app --key=key) -turn_port=$(ynh_app_setting_get --app=$app --key=turn_port) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) - -if ynh_compare_current_package_version --comparison le --version 0.3.5~ynh3 -then - ynh_die --message="Please, you need to remove the app and reinstall it" -fi +password=$(ynh_app_setting_get --app=$app --key=password) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." --weight=1 upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -77,75 +46,34 @@ then ynh_exec_warn_less yunohost firewall disallow TCP $port fi -# If final_path doesn't exist, create it -if [ -z "$final_path" ]; then - final_path=/var/www/$app - mkdir -p $final_path - ynh_app_setting_set --app=$app --key=final_path --value=$final_path -fi - -# If ldap_port doesn't exist, create it -if [ -z "$ldap_port" ]; then - ldap_port=$(ynh_find_port --port=$(($port + 1))) - ynh_app_setting_set --app=$app --key=port --value=$ldap_port -fi - -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -# We remove the old admin/password file if present -if [ -f "$final_path/data/passwd" ] ; then - ynh_secure_remove --file="$final_path/data/passwd" -fi - # For version 0.6~ynh1 and before -if [[ ! -d "$final_path/live" ]] +if [[ ! -d "$install_dir/live" ]] then tempdir="$(mktemp -d)" - mv $final_path $tempdir - mkdir -p "$final_path/live" - mv $tempdir/$app/galene "$final_path/live/" - mv $tempdir/$app/data/ "$final_path/live/" - mv $tempdir/$app/static/ "$final_path/live/" + mv $install_dir $tempdir + mkdir -p "$install_dir/live" + mv $tempdir/$app/galene "$install_dir/live/" + mv $tempdir/$app/data/ "$install_dir/live/" + mv $tempdir/$app/static/ "$install_dir/live/" ynh_secure_remove --file="$tempdir" fi -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= - ynh_script_progression --message="Upgrading source files..." --weight=2 -ynh_setup_source --dest_dir="$final_path/build" -ynh_setup_source --dest_dir="$final_path/build_ldap" --source_id="ldap" -mkdir -p "$final_path/live/data" -mkdir -p "$final_path/live_ldap/data" -ynh_secure_remove --file="$final_path/live/static/" -cp -r "$final_path/build/static/" "$final_path/live/" -ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$final_path/live/static/galene.html" +ynh_setup_source --dest_dir="$install_dir/build" +ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" +mkdir -p "$install_dir/live/data" +mkdir -p "$install_dir/live_ldap/data" +#REMOVEME? ynh_secure_remove --file="$install_dir/live/static/" +cp -r "$install_dir/build/static/" "$install_dir/live/" +ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$install_dir/live/static/galene.html" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # NGINX CONFIGURATION @@ -166,18 +94,18 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_exec_warn_less ynh_install_go --go_version=$go_version ynh_use_go - pushd $final_path/build/ - ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $final_path/live/ + pushd $install_dir/build/ + ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/ popd - pushd $final_path/build_ldap/ - ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $final_path/live_ldap/ + pushd $install_dir/build_ldap/ + ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live_ldap/ popd ynh_remove_go - ynh_secure_remove --file="$final_path/build/" - ynh_secure_remove --file="$final_path/build_ldap/" - ynh_secure_remove --file="$final_path/.cache/" - ynh_secure_remove --file="$final_path/go/" - ynh_secure_remove --file="$final_path/.go-version" + ynh_secure_remove --file="$install_dir/build/" + ynh_secure_remove --file="$install_dir/build_ldap/" + ynh_secure_remove --file="$install_dir/.cache/" + ynh_secure_remove --file="$install_dir/go/" + ynh_secure_remove --file="$install_dir/.go-version" fi #================================================= @@ -186,9 +114,9 @@ fi ynh_script_progression --message="Updating a configuration file..." --weight=2 # Configure Galène -ynh_add_config --template="../conf/config.json" --destination="$final_path/live/data/config.json" -chmod 400 "$final_path/live/data/config.json" -chown $app:$app "$final_path/live/data/config.json" +ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" +chmod 400 "$install_dir/live/data/config.json" +chown $app:$app "$install_dir/live/data/config.json" # Configure Galène LDAP # If key doesn't exist, create it @@ -196,19 +124,19 @@ if [ -z "$key" ]; then key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}') ynh_app_setting_set --app=$app --key=key --value=$key fi -ynh_add_config --template="../conf/galene-ldap.json" --destination="$final_path/live_ldap/data/galene-ldap.json" -chmod 400 "$final_path/live_ldap/data/galene-ldap.json" -chown $app:$app "$final_path/live_ldap/data/galene-ldap.json" +ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" +chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" +chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" # Create a group name config -ynh_add_config --template="../conf/groupname.json" --destination="$datadir/groups/$group_name.json" -chmod 400 "$datadir/groups/$group_name.json" -chown $app:$app "$datadir/groups/$group_name.json" +ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" +chmod 400 "$data_dir/groups/$group_name.json" +chown $app:$app "$data_dir/groups/$group_name.json" # Create a group name authenticated on LDAP -ynh_add_config --template="../conf/groupname-ldap.json" --destination="$datadir/groups/YunoHost_Users.json" -chmod 400 "$datadir/groups/YunoHost_Users.json" -chown $app:$app "$datadir/groups/YunoHost_Users.json" +ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" +chmod 400 "$data_dir/groups/YunoHost_Users.json" +chown $app:$app "$data_dir/groups/YunoHost_Users.json" #================================================= # SETUP SYSTEMD @@ -228,7 +156,7 @@ ynh_add_systemd_config --service=${app}_ldap --template="ldap.service" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$turn_port" +yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$port_turn" yunohost service add ${app}_ldap --description="LDAP integration for the videoconferencing server" #================================================= @@ -239,13 +167,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=${app}_ldap --action="start" --log_path="systemd" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=2 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/ynh_install_go b/scripts/ynh_install_go index 4e0b499..c0dfe12 100644 --- a/scripts/ynh_install_go +++ b/scripts/ynh_install_go @@ -30,14 +30,14 @@ export GOENV_ROOT="$goenv_install_dir" # However, $PATH is duplicated into $go_path to outlast any manipulation of $PATH # You can use the variable `$ynh_go_load_path` to quickly load your Go version # in $PATH for an usage into a separate script. -# Exemple: $ynh_go_load_path $final_path/script_that_use_gem.sh` +# Exemple: $ynh_go_load_path $install_dir/script_that_use_gem.sh` # # # Finally, to start a Go service with the correct version, 2 solutions # Either the app is dependent of Go or gem, but does not called it directly. # In such situation, you need to load PATH # `Environment="__YNH_GO_LOAD_PATH__"` -# `ExecStart=__FINALPATH__/my_app` +# `ExecStart=__INSTALL_DIR__/my_app` # You will replace __YNH_GO_LOAD_PATH__ with $ynh_go_load_path # # Or Go start the app directly, then you don't need to load the PATH variable @@ -72,7 +72,7 @@ ynh_use_go () { ynh_go_load_path="PATH=$PATH" # Sets the local application-specific Go version - pushd $final_path + pushd $install_dir $goenv_install_dir/bin/goenv local $go_version popd } diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..8626895 --- /dev/null +++ b/tests.toml @@ -0,0 +1,23 @@ +test_format = 1.0 + +[default] + + # ------------ + # Tests to run + # ------------ + + exclude = ["install.subdir"] + + # ------------------------------- + # Default args to use for install + # ------------------------------- + + args.group_name = "public with space" + args.group_description = "My public space" + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + + test_upgrade_from.212f4439.name = "Upgrade from 0.6.1~ynh2" + \ No newline at end of file From e50a9cd4f7ab0f6a7d6eac8e7fb73ae353b35162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 27 Feb 2023 23:20:19 +0100 Subject: [PATCH 16/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index bca6d94..239fbb5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.6.2~ynh1" +version = "0.6.2~ynh2" maintainers = ["eric_G"] From f376d85d100d996a5830e78d42ae9d3e19acf453 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 27 Feb 2023 22:20:24 +0000 Subject: [PATCH 17/97] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58a5889..b407045 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - LDAP support -**Shipped version:** 0.6.2~ynh1 +**Shipped version:** 0.6.2~ynh2 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index fe00a32..045dbce 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - prise en charge LDAP -**Version incluse :** 0.6.2~ynh1 +**Version incluse :** 0.6.2~ynh2 **Démo :** https://galene.org:8443/ From 02ba2324ae7fb03717d0ad70c26c251b65be691b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 1 Mar 2023 19:33:03 +0100 Subject: [PATCH 18/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 239fbb5..1600c46 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.1.11" +yunohost = ">= 11.1.12" architectures = "all" multi_instance = false ldap = true From eda8293e2552053578f27d47fedfb066ca2603c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:30:36 +0100 Subject: [PATCH 19/97] Fix --- doc/ADMIN.md | 12 ++++++------ doc/ADMIN_fr.md | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 46cd726..5d3be97 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,16 +1,16 @@ ### Accessing groups -*Galène* meeting rooms are called "groups". Any group is accessible at `https://domain.tld/group/GroupName`, by typing its name in the home page search field, or by selecting it in the public list (if the group is configured as publicly visible, see below). -During install a group is created with YunoHost LDAP authentication, accessible at `https://domain.tld/group/YunoHost_Users`. +*Galène* meeting rooms are called "groups". Any group is accessible at `https://__DOMAIN__/group/GroupName`, by typing its name in the home page search field, or by selecting it in the public list (if the group is configured as publicly visible, see below). +During install a group is created with YunoHost LDAP authentication, accessible at `https://__DOMAIN__/group/YunoHost_Users`. #### Creating and configuring groups -Groups are defined by JSON files located in the folder `/home/yunohost.app/galene/groups`. Each group is represented by a `GroupName.json` file. -To create a new group, you need to create a `GroupNameExample.json` file and restart Galène service (you can also make subfolder groups, and the groups will be accessible with `https://domain.tld/group/subfolder/GroupName/`). Various configuration options are available (see https://github.com/YunoHost-Apps/galene_ynh/wiki/Configuration-file). +Groups are defined by JSON files located in the folder `__DATA_DIR__/groups`. Each group is represented by a `GroupName.json` file. +To create a new group, you need to create a `GroupNameExample.json` file and restart Galène service (you can also make subfolder groups, and the groups will be accessible with `https://__DOMAIN__/group/subfolder/GroupName/`). Various configuration options are available (see https://github.com/YunoHost-Apps/galene_ynh/wiki/Configuration-file). *NB: Spaces are supported in group file names.* -When Galène is removed, the data directory (`/home/yunohost.app/galene/`) is preserved. If you want to remove it along with Galène, use the `--purge` option: `sudo yunohost app remove galene --purge`. +When Galène is removed, the data directory (`__DATA_DIR__`) is preserved. If you want to remove it along with Galène, use the `--purge` option: `sudo yunohost app remove galene --purge`. ### Configuring your TURN server @@ -46,4 +46,4 @@ Statistics are available under `/opt/yunohost/galene/stats.json`, with a human-r ### How do I record my lecture? -Make sure allow-recording is set in your group configuration. Log-in as an operator, then say `/record` before you start your lecture. Don't forget to say `/unrecord` at the end. You will find your recordings under `https://server.example.com/recordings/groupname/`. The video recordings are stored in `/home/yunohost.app/galene/recordings` folder. +Make sure allow-recording is set in your group configuration. Log-in as an operator, then say `/record` before you start your lecture. Don't forget to say `/unrecord` at the end. You will find your recordings under `https://__DOMAIN__/recordings/groupname/`. The video recordings are stored in `__DATA_DIR__/recordings` folder. diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 5db048d..f191f0f 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,16 +1,16 @@ ### Accéder à des groupes -Les salles de réunion *Galène* sont appelées « groupes ». Tout groupe est accessible sur `https://domain.tld/group/GroupName`, en tapant son nom dans le champ de recherche de la page d'accueil, ou en le sélectionnant dans la liste publique (si le groupe est configuré comme visible publiquement, voir ci-dessous). -Pendant l'installation, un groupe est créé avec l'authentification LDAP de YunoHost, accessible à `https://domain.tld/group/YunoHost_Users`. +Les salles de réunion *Galène* sont appelées « groupes ». Tout groupe est accessible sur `https://__DOMAIN__/group/GroupName`, en tapant son nom dans le champ de recherche de la page d'accueil, ou en le sélectionnant dans la liste publique (si le groupe est configuré comme visible publiquement, voir ci-dessous). +Pendant l'installation, un groupe est créé avec l'authentification LDAP de YunoHost, accessible à `https://__DOMAIN__/group/YunoHost_Users`. #### Ajouter et configurer des groupes -Les groupes sont définis par des fichiers JSON situés dans le dossier `/home/yunohost.app/galene/groups`. Chaque groupe est représenté par un fichier `GroupName.json`. -Pour créer un nouveau groupe, vous devez créer un fichier `GroupNameExample.json` et redémarrer le service Galène (vous pouvez également créer un sous-dossier, et les groupes seront accessibles avec` https://domain.tld/group/subfolder/GroupName/`). Différentes options de configurations sont disponibles (voir https://github.com/YunoHost-Apps/galene_ynh/wiki/Configuration-file). +Les groupes sont définis par des fichiers JSON situés dans le dossier `__DATA_DIR__/groups`. Chaque groupe est représenté par un fichier `GroupName.json`. +Pour créer un nouveau groupe, vous devez créer un fichier `GroupNameExample.json` et redémarrer le service Galène (vous pouvez également créer un sous-dossier, et les groupes seront accessibles avec` https://__DOMAIN__/group/subfolder/GroupName/`). Différentes options de configurations sont disponibles (voir https://github.com/YunoHost-Apps/galene_ynh/wiki/Configuration-file). *NB : Les espaces sont pris en charge dans les noms de fichiers de groupe.* -Lorsque Galène est supprimé, le répertoire de données (`/home/yunohost.app/galene/`) est conservé. Si vous souhaitez le supprimer avec Galène, utilisez l'option `--purge` : `sudo yunohost app remove galene --purge`. +Lorsque Galène est supprimé, le répertoire de données (`__DATA_DIR__`) est conservé. Si vous souhaitez le supprimer avec Galène, utilisez l'option `--purge` : `sudo yunohost app remove galene --purge`. ### Configurer votre serveur TURN @@ -46,4 +46,4 @@ Les statistiques sont disponibles sous `/opt/yunohost/galene/stats.json`, avec u ### Comment enregistrer ma conférence ? -Assurez-vous que l'autorisation d'enregistrement est définie dans la configuration de votre groupe. Connectez-vous en tant qu'opérateur, puis dites `/record` dans la fenêtre de chat avant de commencer la visio. N'oubliez pas de dire `/unrecord` à la fin. Vous trouverez vos enregistrements sous `https://server.example.com/recordings/groupname/`. Les enregistrements vidéo sont stockés dans le dossier `/home/yunohost.app/galene/recordings`. +Assurez-vous que l'autorisation d'enregistrement est définie dans la configuration de votre groupe. Connectez-vous en tant qu'opérateur, puis dites `/record` dans la fenêtre de chat avant de commencer la visio. N'oubliez pas de dire `/unrecord` à la fin. Vous trouverez vos enregistrements sous `https://__DOMAIN__/recordings/groupname/`. Les enregistrements vidéo sont stockés dans le dossier `__DATA_DIR__/recordings`. From 8d13912cce46263477010e4d120bb836f1ec63ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:30:55 +0100 Subject: [PATCH 20/97] Update DESCRIPTION.md --- doc/DESCRIPTION.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index a527d48..54e9644 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,7 +1,5 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and that requires moderate server resources. It was originally designed for lectures and conferences (where a single speaker streams audio and video to hundreds or thousands of users), but later evolved to be useful for student practicals (where users are divided into many small groups), and meetings (where a dozen users interact with each other). -## Features - ### Client features: - multiparty audio and video From 2c219c27e56e947c4bcaf60708486c841c410a1c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 2 Mar 2023 09:31:03 +0000 Subject: [PATCH 21/97] Auto-update README --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index b407045..5d2fdc7 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,6 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Galène is a videoconference server (an “SFU”) that is easy to deploy and that requires moderate server resources. It was originally designed for lectures and conferences (where a single speaker streams audio and video to hundreds or thousands of users), but later evolved to be useful for student practicals (where users are divided into many small groups), and meetings (where a dozen users interact with each other). -## Features - ### Client features: - multiparty audio and video From c76f728a5df410d4d2979212fc719adc7e08c504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:31:54 +0100 Subject: [PATCH 22/97] Create POST_INSTALL.md --- doc/screenshots/POST_INSTALL.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/screenshots/POST_INSTALL.md diff --git a/doc/screenshots/POST_INSTALL.md b/doc/screenshots/POST_INSTALL.md new file mode 100644 index 0000000..4f05f36 --- /dev/null +++ b/doc/screenshots/POST_INSTALL.md @@ -0,0 +1,3 @@ +#### Using *Galène*'s internal TURN server +Galène comes with a built-in TURN server that should work out-of-the-box. +- If your server is behind NAT, allow incoming traffic to TCP/UDP port `1194` (or whatever is configured with the `-turn` option in `/etc/systemd/system/galene.service`) \ No newline at end of file From a8bb84b446754aa9d5ae4fa9c41734bb3ed5d81e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 2 Mar 2023 09:32:06 +0000 Subject: [PATCH 23/97] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 5d2fdc7..72fa6e0 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th ## Screenshots ![Screenshot of Galène](./doc/screenshots/screenshot.png) +![Screenshot of Galène](./doc/screenshots/POST_INSTALL.md) ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 045dbce..3f7ae73 100644 --- a/README_fr.md +++ b/README_fr.md @@ -36,6 +36,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et ## Captures d’écran ![Capture d’écran de Galène](./doc/screenshots/screenshot.png) +![Capture d’écran de Galène](./doc/screenshots/POST_INSTALL.md) ## Documentations et ressources From 3ff2a18de039b68982793f4a2a182c546a460b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:43:04 +0100 Subject: [PATCH 24/97] fix --- doc/{screenshots => }/POST_INSTALL.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/{screenshots => }/POST_INSTALL.md (100%) diff --git a/doc/screenshots/POST_INSTALL.md b/doc/POST_INSTALL.md similarity index 100% rename from doc/screenshots/POST_INSTALL.md rename to doc/POST_INSTALL.md From 8cfd13bc32effef7440668264e694c0f733eda94 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 2 Mar 2023 09:43:10 +0000 Subject: [PATCH 25/97] Auto-update README --- README.md | 1 - README_fr.md | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index 72fa6e0..5d2fdc7 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th ## Screenshots ![Screenshot of Galène](./doc/screenshots/screenshot.png) -![Screenshot of Galène](./doc/screenshots/POST_INSTALL.md) ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 3f7ae73..045dbce 100644 --- a/README_fr.md +++ b/README_fr.md @@ -36,7 +36,6 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et ## Captures d’écran ![Capture d’écran de Galène](./doc/screenshots/screenshot.png) -![Capture d’écran de Galène](./doc/screenshots/POST_INSTALL.md) ## Documentations et ressources From a72efd6a21c9bbd1fb5e2922a6d7eccc997197df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:51:21 +0100 Subject: [PATCH 26/97] Create POST_INSTALL_fr.md --- doc/POST_INSTALL_fr.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/POST_INSTALL_fr.md diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md new file mode 100644 index 0000000..47ec35a --- /dev/null +++ b/doc/POST_INSTALL_fr.md @@ -0,0 +1,3 @@ +#### Utilisation du serveur TURN interne de *Galène* +Galène est livré avec un serveur TURN intégré qui devrait fonctionner immédiatement. +- Si votre serveur est derrière NAT, autorisez le trafic entrant vers le port TCP/UDP `1194` (ou tout ce qui est configuré avec l'option `-turn` dans `/etc/systemd/system/galene.service`) \ No newline at end of file From b25523ae2717c45726e3f08c42997ff7e9d783d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:59:01 +0100 Subject: [PATCH 27/97] Fix --- doc/ADMIN.md | 4 +--- doc/ADMIN_fr.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 5d3be97..923ce96 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -10,7 +10,7 @@ To create a new group, you need to create a `GroupNameExample.json` file and res *NB: Spaces are supported in group file names.* -When Galène is removed, the data directory (`__DATA_DIR__`) is preserved. If you want to remove it along with Galène, use the `--purge` option: `sudo yunohost app remove galene --purge`. +When Galène is removed, the data directory (`__DATA_DIR__`) is preserved. If you want to remove it along with Galène app, use the `--purge` option: `sudo yunohost app remove galene --purge`. ### Configuring your TURN server @@ -38,8 +38,6 @@ Galène comes with a built-in TURN server that should work out-of-the-box. To check if the TURN server is up and running, type `/relay-test` in the chat box. If the TURN server is properly configured, you should see a message saying that the relay test has been successful. -You can also install Galène with an external TURN server with this branch: https://github.com/YunoHost-Apps/galene_ynh/tree/galene+turn - ### Server Statistics page Statistics are available under `/opt/yunohost/galene/stats.json`, with a human-readable version at `domain.ltd/stats.html`. This is only available to the server administrator (the admin/password is set in the `config.json` file: `/opt/yunohost/galene/data/config.json`). diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index f191f0f..ec87b26 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -10,7 +10,7 @@ Pour créer un nouveau groupe, vous devez créer un fichier `GroupNameExample.js *NB : Les espaces sont pris en charge dans les noms de fichiers de groupe.* -Lorsque Galène est supprimé, le répertoire de données (`__DATA_DIR__`) est conservé. Si vous souhaitez le supprimer avec Galène, utilisez l'option `--purge` : `sudo yunohost app remove galene --purge`. +Lorsque Galène est supprimé, le répertoire de données (`__DATA_DIR__`) est conservé. Si vous souhaitez le supprimer avec l'application Galène, utilisez l'option `--purge` : `sudo yunohost app remove galene --purge`. ### Configurer votre serveur TURN @@ -38,8 +38,6 @@ Galène est livré avec un serveur TURN intégré qui devrait fonctionner imméd Pour vérifier si le serveur TURN est opérationnel, tapez `/relay-test` dans la boîte de dialogue du chat de *Galène* ; si le serveur TURN est correctement configuré, vous devriez voir un message indiquant que le test du relai a réussi. -Vous pouvez également installer *Galène* avec un serveur TURN externe avec cette branch : https://github.com/YunoHost-Apps/galene_ynh/tree/galene+turn - ### Statistiques du serveur Les statistiques sont disponibles sous `/opt/yunohost/galene/stats.json`, avec une version lisible sur `domain.ltd/stats.html`. Cette page n'est disponible que pour l'administrateur du serveur (le mot de passe et l'administrateur sont définis dans le fichier `config.json` : `/opt/yunohost/galene/data/config.json`). From 4ebc6cf87887d36ff07cfaaacd8900fd9437f58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 11:32:07 +0100 Subject: [PATCH 28/97] Fix --- doc/POST_INSTALL.md | 1 - doc/POST_INSTALL_fr.md | 1 - 2 files changed, 2 deletions(-) diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 4f05f36..e05a08d 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,3 +1,2 @@ -#### Using *Galène*'s internal TURN server Galène comes with a built-in TURN server that should work out-of-the-box. - If your server is behind NAT, allow incoming traffic to TCP/UDP port `1194` (or whatever is configured with the `-turn` option in `/etc/systemd/system/galene.service`) \ No newline at end of file diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index 47ec35a..b554d13 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1,3 +1,2 @@ -#### Utilisation du serveur TURN interne de *Galène* Galène est livré avec un serveur TURN intégré qui devrait fonctionner immédiatement. - Si votre serveur est derrière NAT, autorisez le trafic entrant vers le port TCP/UDP `1194` (ou tout ce qui est configuré avec l'option `-turn` dans `/etc/systemd/system/galene.service`) \ No newline at end of file From 438396891dd4128d3e7f8d63d44c43912d13d650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:02:01 +0100 Subject: [PATCH 29/97] Update change_url --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index fa108f2..fe3970e 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -17,7 +17,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 # Add settings here as needed by your application password=$(ynh_app_setting_get --app=$app --key=password) group_name=$(ynh_app_setting_get --app=$app --key=group_name) -ldap_port=$(ynh_app_setting_get --app=$app --key=ldap_port) +port_ldap=$(ynh_app_setting_get --app=$app --key=ldap_port) key=$(ynh_app_setting_get --app=$app --key=key) #================================================= From ca186c4eab66148d300c47208455e739362b6db5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Mar 2023 16:14:00 +0100 Subject: [PATCH 30/97] Update manifest.toml --- manifest.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 1600c46..8f27e48 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.1.12" +yunohost = ">= 11.1.14" architectures = "all" multi_instance = false ldap = true @@ -79,3 +79,8 @@ ram.runtime = "50M" [resources.apt] packages = "jose" + +[resources.sources] + [resources.sources.main] + url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" + sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" From f7376fd934a6b57c44bdca385458d49e9a20eb43 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Mar 2023 16:14:18 +0100 Subject: [PATCH 31/97] Delete app.src --- conf/app.src | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 conf/app.src diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index de0a54e..0000000 --- a/conf/app.src +++ /dev/null @@ -1,7 +0,0 @@ -SOURCE_URL=https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz -SOURCE_SUM=7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= -SOURCE_EXTRACT=true From 5b63c7c3346fb35cf81fae53b8a4779c8b3306bf Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Mar 2023 17:30:45 +0100 Subject: [PATCH 32/97] fix --- conf/ldap.src | 7 ------- manifest.toml | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 conf/ldap.src diff --git a/conf/ldap.src b/conf/ldap.src deleted file mode 100644 index 56042fd..0000000 --- a/conf/ldap.src +++ /dev/null @@ -1,7 +0,0 @@ -SOURCE_URL=https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz -SOURCE_SUM=00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= -SOURCE_EXTRACT=true diff --git a/manifest.toml b/manifest.toml index 8f27e48..c8cf437 100644 --- a/manifest.toml +++ b/manifest.toml @@ -84,3 +84,5 @@ ram.runtime = "50M" [resources.sources.main] url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" + ldap.url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" + ldap.sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" From e1c1751981113bbefd1c1357ba5924cb31c88332 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Mar 2023 17:42:33 +0100 Subject: [PATCH 33/97] Update manifest.toml --- manifest.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index c8cf437..741f4b1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -84,5 +84,7 @@ ram.runtime = "50M" [resources.sources.main] url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" - ldap.url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" - ldap.sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" + + [resources.sources.ldap] + url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" + sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" From bcbeb99e49f7645db3da5152489ed3679eb7b721 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Mar 2023 17:56:52 +0100 Subject: [PATCH 34/97] cleaning --- scripts/install | 2 +- scripts/upgrade | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 0077046..b178862 100755 --- a/scripts/install +++ b/scripts/install @@ -50,7 +50,7 @@ mkdir -p "$install_dir/live/data" mkdir -p "$install_dir/live_ldap/data" cp -r "$install_dir/build/static/" "$install_dir/live/" ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$install_dir/live/static/galene.html" -chmod 750 "$install_dir" + chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 42e5e65..dee0530 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,7 +71,6 @@ mkdir -p "$install_dir/live_ldap/data" cp -r "$install_dir/build/static/" "$install_dir/live/" ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$install_dir/live/static/galene.html" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" From 50de485f117c7adae1b41fa61448a64bdb0b55d1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Mar 2023 19:20:58 +0100 Subject: [PATCH 35/97] Update manifest.toml --- manifest.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 741f4b1..b45d947 100644 --- a/manifest.toml +++ b/manifest.toml @@ -85,6 +85,5 @@ ram.runtime = "50M" url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" - [resources.sources.ldap] - url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" - sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" + ldap.url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" + ldap.sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" From 8b06750337d5b174b6f67e0417dfc04fe77565e7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Mar 2023 19:46:11 +0100 Subject: [PATCH 36/97] Update manifest.toml --- manifest.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index b45d947..36b70ae 100644 --- a/manifest.toml +++ b/manifest.toml @@ -85,5 +85,7 @@ ram.runtime = "50M" url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" - ldap.url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" - ldap.sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" + [resources.sources] + [resources.sources.ldap] + url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" + sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" From 31f191ee835b09a84af58c1bd171ad94acd51018 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 9 Mar 2023 19:53:07 +0100 Subject: [PATCH 37/97] Update manifest.toml --- manifest.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 36b70ae..741f4b1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -85,7 +85,6 @@ ram.runtime = "50M" url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" - [resources.sources] [resources.sources.ldap] url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" From d7f0958cfbfc389727cbefe10cec921e623e712e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 11 Mar 2023 18:01:47 +0100 Subject: [PATCH 38/97] Update manifest.toml --- manifest.toml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/manifest.toml b/manifest.toml index 741f4b1..4dd406f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.1.14" +yunohost = ">= 11.1.15" architectures = "all" multi_instance = false ldap = true @@ -62,6 +62,16 @@ ram.runtime = "50M" optional = true [resources] + +[resources.sources] + [resources.sources.main] + url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" + sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" + + [resources.sources.ldap] + url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" + sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" + [resources.system_user] [resources.install_dir] @@ -79,12 +89,3 @@ ram.runtime = "50M" [resources.apt] packages = "jose" - -[resources.sources] - [resources.sources.main] - url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" - sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" - - [resources.sources.ldap] - url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" - sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" From e7d971c943f66382e8d4b3651e4690d28bd2baf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 18 Mar 2023 20:19:36 +0100 Subject: [PATCH 39/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 4dd406f..a197599 100644 --- a/manifest.toml +++ b/manifest.toml @@ -22,7 +22,7 @@ yunohost = ">= 11.1.15" architectures = "all" multi_instance = false ldap = true -sso = "not_relevant" +sso = false disk = "50M" ram.build = "400M" ram.runtime = "50M" From 88fcefa25bcf57a6888f44b66684078016b693e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 18 Mar 2023 20:21:28 +0100 Subject: [PATCH 40/97] Update install --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index b178862..305c4e6 100755 --- a/scripts/install +++ b/scripts/install @@ -14,8 +14,8 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -group_name=$YNH_APP_ARG_GROUP_NAME -group_description=$YNH_APP_ARG_GROUP_DESCRIPTION +#group_name=$YNH_APP_ARG_GROUP_NAME +#group_description=$YNH_APP_ARG_GROUP_DESCRIPTION password=$YNH_APP_ARG_PASSWORD #================================================= @@ -23,8 +23,8 @@ password=$YNH_APP_ARG_PASSWORD #================================================= ynh_script_progression --message="Storing installation settings..." --weight=4 -ynh_app_setting_set --app=$app --key=group_name --value="$group_name" -ynh_app_setting_set --app=$app --key=group_description --value="$group_description" +#ynh_app_setting_set --app=$app --key=group_name --value="$group_name" +#ynh_app_setting_set --app=$app --key=group_description --value="$group_description" ynh_app_setting_set --app=$app --key=password --value="$password" #================================================= From 6fa519f35d1570665f47b0e1faf6a6cd87b5d8b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 18 Mar 2023 23:20:32 +0100 Subject: [PATCH 41/97] Password generator (#109) * fix * Update install * Update install * Update install * Update install * Update manifest.toml * Update install * Update manifest.toml * fix * Update install * fix * fix --- conf/config.json | 2 +- conf/groupname.json | 2 +- conf/systemd.service | 2 +- scripts/install | 17 +++++++---------- scripts/upgrade | 12 ++++++++---- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/conf/config.json b/conf/config.json index 1a49c26..0d1b371 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,4 +1,4 @@ { "canonicalHost": "__DOMAIN__", - "admin":[{"username":"__ADMIN__","password":"__PASSWORD__"}] + "admin":[{"username":"__ADMIN__", "password":__PASSWORD_HASH__}] } diff --git a/conf/groupname.json b/conf/groupname.json index eff91e8..cef3c09 100644 --- a/conf/groupname.json +++ b/conf/groupname.json @@ -1,5 +1,5 @@ { - "op": [{"username": "__ADMIN__", "password": "__PASSWORD__"}], + "op": [{"username": "__ADMIN__", "password": __PASSWORD_HASH__}], "presenter": [{}], "description": "__GROUP_DESCRIPTION__", "public": true, diff --git a/conf/systemd.service b/conf/systemd.service index aa4af39..8207fb1 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Galène: Videoconferencing server +Description=Galène: videoconferencing server Documentation=https://galene.org After=network.target diff --git a/scripts/install b/scripts/install index 305c4e6..7463851 100755 --- a/scripts/install +++ b/scripts/install @@ -14,17 +14,7 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -#group_name=$YNH_APP_ARG_GROUP_NAME -#group_description=$YNH_APP_ARG_GROUP_DESCRIPTION password=$YNH_APP_ARG_PASSWORD - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." --weight=4 - -#ynh_app_setting_set --app=$app --key=group_name --value="$group_name" -#ynh_app_setting_set --app=$app --key=group_description --value="$group_description" ynh_app_setting_set --app=$app --key=password --value="$password" #================================================= @@ -71,6 +61,9 @@ ynh_script_progression --message="Building app..." --weight=1 ynh_exec_warn_less ynh_install_go --go_version=$go_version ynh_use_go +pushd $install_dir/build/galene-password-generator/ + ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ +popd pushd $install_dir/build/ ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/ popd @@ -84,6 +77,8 @@ ynh_secure_remove --file="$install_dir/.cache/" ynh_secure_remove --file="$install_dir/go/" ynh_secure_remove --file="$install_dir/.go-version" +chmod +x "$install_dir/galene-password-generator" + #================================================= # CREATE DATA DIRECTORY #================================================= @@ -100,6 +95,8 @@ chown -R $app:www-data "$data_dir" #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 +password_hash=$(echo $($install_dir/galene-password-generator $password)) + # Configure Galène ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" chmod 400 "$install_dir/live/data/config.json" diff --git a/scripts/upgrade b/scripts/upgrade index dee0530..f5f7a58 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,10 +13,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 -group_name=$(ynh_app_setting_get --app=$app --key=group_name) -group_description=$(ynh_app_setting_get --app=$app --key=group_description) password=$(ynh_app_setting_get --app=$app --key=password) #================================================= @@ -67,7 +64,7 @@ ynh_setup_source --dest_dir="$install_dir/build" ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" mkdir -p "$install_dir/live/data" mkdir -p "$install_dir/live_ldap/data" -#REMOVEME? ynh_secure_remove --file="$install_dir/live/static/" +ynh_secure_remove --file="$install_dir/live/static/" cp -r "$install_dir/build/static/" "$install_dir/live/" ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$install_dir/live/static/galene.html" @@ -93,6 +90,9 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_exec_warn_less ynh_install_go --go_version=$go_version ynh_use_go + pushd $install_dir/build/galene-password-generator/ + ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ + popd pushd $install_dir/build/ ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/ popd @@ -105,6 +105,8 @@ then ynh_secure_remove --file="$install_dir/.cache/" ynh_secure_remove --file="$install_dir/go/" ynh_secure_remove --file="$install_dir/.go-version" + + chmod +x "$install_dir/galene-password-generator" fi #================================================= @@ -112,6 +114,8 @@ fi #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=2 +password_hash=$(echo $($install_dir/galene-password-generator $password)) + # Configure Galène ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" chmod 400 "$install_dir/live/data/config.json" From acecca2585539d130797a5c618efd98f201edae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 18 Mar 2023 23:25:21 +0100 Subject: [PATCH 42/97] Update config.json --- conf/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.json b/conf/config.json index 0d1b371..81042d0 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,4 +1,4 @@ { "canonicalHost": "__DOMAIN__", - "admin":[{"username":"__ADMIN__", "password":__PASSWORD_HASH__}] + "admin":[{"username":"__ADMIN__", "password": __PASSWORD_HASH__}] } From 784cb684b49f29551c2aec89fe667205bdefa40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 18 Mar 2023 23:44:14 +0100 Subject: [PATCH 43/97] fix --- scripts/change_url | 4 +--- scripts/install | 1 + scripts/upgrade | 13 +++++-------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index fe3970e..a401e68 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -15,10 +15,8 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Loading installation settings..." --weight=1 # Add settings here as needed by your application -password=$(ynh_app_setting_get --app=$app --key=password) -group_name=$(ynh_app_setting_get --app=$app --key=group_name) -port_ldap=$(ynh_app_setting_get --app=$app --key=ldap_port) key=$(ynh_app_setting_get --app=$app --key=key) +password_hash=$(ynh_app_setting_get --app=$app --key=password_hash) #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/install b/scripts/install index 7463851..b67bbaa 100755 --- a/scripts/install +++ b/scripts/install @@ -96,6 +96,7 @@ chown -R $app:www-data "$data_dir" ynh_script_progression --message="Adding a configuration file..." --weight=1 password_hash=$(echo $($install_dir/galene-password-generator $password)) +ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" # Configure Galène ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" diff --git a/scripts/upgrade b/scripts/upgrade index f5f7a58..cfaafe3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,12 +37,6 @@ ynh_systemd_action --service_name=${app}_ldap --action="stop" --log_path="system #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# If open, close direct access to $port in firewall -if yunohost firewall list | grep -q "\- $port$" -then - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - # For version 0.6~ynh1 and before if [[ ! -d "$install_dir/live" ]] then @@ -114,8 +108,11 @@ fi #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=2 -password_hash=$(echo $($install_dir/galene-password-generator $password)) - +# If password_hash doesn't exist, create it +if [ -z "$password_hash" ]; then + password_hash=$(echo $($install_dir/galene-password-generator $password)) + ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" +fi # Configure Galène ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" chmod 400 "$install_dir/live/data/config.json" From 40887de989dde5a9528a7a0cdbd6adf32f475b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 18 Mar 2023 23:44:47 +0100 Subject: [PATCH 44/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index a197599..cbd68a5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.6.2~ynh2" +version = "0.6.2~ynh3" maintainers = ["eric_G"] From b8b27fa97c19f4df5cd0c9184f6ad9b82ebfcd79 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 18 Mar 2023 22:44:53 +0000 Subject: [PATCH 45/97] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5d2fdc7..337e6f7 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - LDAP support -**Shipped version:** 0.6.2~ynh2 +**Shipped version:** 0.6.2~ynh3 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index 045dbce..205a331 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - prise en charge LDAP -**Version incluse :** 0.6.2~ynh2 +**Version incluse :** 0.6.2~ynh3 **Démo :** https://galene.org:8443/ From 6941f078a29bb95521aaa917ceedd180f2ebafc7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Mar 2023 08:10:13 +0100 Subject: [PATCH 46/97] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index cfaafe3..18c5be6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,7 +109,7 @@ fi ynh_script_progression --message="Updating a configuration file..." --weight=2 # If password_hash doesn't exist, create it -if [ -z "$password_hash" ]; then +if [ -z "${password_hash:-}" ]; then password_hash=$(echo $($install_dir/galene-password-generator $password)) ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" fi From 3e24865c82a99542b7ffe706b508b8ef4f81eb42 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Mar 2023 08:10:57 +0100 Subject: [PATCH 47/97] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 18c5be6..37e742c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -120,7 +120,7 @@ chown $app:$app "$install_dir/live/data/config.json" # Configure Galène LDAP # If key doesn't exist, create it -if [ -z "$key" ]; then +if [ -z "${key:-}" ]; then key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}') ynh_app_setting_set --app=$app --key=key --value=$key fi From 02f5a68e69773c6a5a96a3dd995168dbd07d4b28 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Mar 2023 08:16:27 +0100 Subject: [PATCH 48/97] fix --- scripts/change_url | 12 ++++++------ scripts/install | 5 +++++ scripts/upgrade | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index a401e68..3fefb36 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -49,14 +49,14 @@ chmod 400 "$install_dir/live/data/config.json" chown $app:$app "$install_dir/live/data/config.json" # Configure Galene LDAP -ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" -chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" -chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" +#ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" +#chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" +#chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" # Create a group name config -ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" -chmod 400 "$data_dir/groups/$group_name.json" -chown $app:$app "$data_dir/groups/$group_name.json" +#ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" +#chmod 400 "$data_dir/groups/$group_name.json" +#chown $app:$app "$data_dir/groups/$group_name.json" # Create a group name authenticated on LDAP ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" diff --git a/scripts/install b/scripts/install index b67bbaa..893283f 100755 --- a/scripts/install +++ b/scripts/install @@ -38,6 +38,7 @@ ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" mkdir -p "$install_dir/live/data" mkdir -p "$install_dir/live_ldap/data" + cp -r "$install_dir/build/static/" "$install_dir/live/" ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$install_dir/live/static/galene.html" @@ -61,15 +62,19 @@ ynh_script_progression --message="Building app..." --weight=1 ynh_exec_warn_less ynh_install_go --go_version=$go_version ynh_use_go + pushd $install_dir/build/galene-password-generator/ ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ popd + pushd $install_dir/build/ ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/ popd + pushd $install_dir/build_ldap/ ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live_ldap/ popd + ynh_remove_go ynh_secure_remove --file="$install_dir/build/" ynh_secure_remove --file="$install_dir/build_ldap/" diff --git a/scripts/upgrade b/scripts/upgrade index 37e742c..0e05f93 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,8 +56,10 @@ ynh_script_progression --message="Upgrading source files..." --weight=2 ynh_setup_source --dest_dir="$install_dir/build" ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" + mkdir -p "$install_dir/live/data" mkdir -p "$install_dir/live_ldap/data" + ynh_secure_remove --file="$install_dir/live/static/" cp -r "$install_dir/build/static/" "$install_dir/live/" ynh_replace_string --match_string="
Galène
" --replace_string="
Galène
" --target_file="$install_dir/live/static/galene.html" From 709eec6f2286b37bc8fceec4cc566ea71c14ec6b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Mar 2023 08:19:21 +0100 Subject: [PATCH 49/97] Update restore --- scripts/restore | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/scripts/restore b/scripts/restore index 21e6513..7296baa 100755 --- a/scripts/restore +++ b/scripts/restore @@ -17,7 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -35,44 +34,31 @@ chmod -R o-rwx "$data_dir" chown -R $app:www-data "$data_dir" #================================================= -# RESTORE THE NGINX CONFIGURATION +# RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/${app}_ldap.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 - yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$port_turn" yunohost service add ${app}_ldap --description="LDAP integration for the videoconferencing server" #================================================= -# START SYSTEMD SERVICE +# GENERIC FINALIZATION #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=3 +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE +#================================================= +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=${app}_ldap --action="start" --log_path="systemd" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX AND PHP-FPM -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= From ef17057f853fe88bb3dd23ca7372f16071054506 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Mar 2023 08:19:45 +0100 Subject: [PATCH 50/97] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1f273f5..f122fe2 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -go_version=1.19 +go_version=1.20 #================================================= # PERSONAL HELPERS From 715913d564f469c7dce4941664800e77b8b015e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Mar 2023 21:35:53 +0100 Subject: [PATCH 51/97] hash password --- doc/ADMIN.md | 21 +++++++++++++++++++++ doc/ADMIN_fr.md | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 923ce96..ba56d5e 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -12,6 +12,27 @@ To create a new group, you need to create a `GroupNameExample.json` file and res When Galène is removed, the data directory (`__DATA_DIR__`) is preserved. If you want to remove it along with Galène app, use the `--purge` option: `sudo yunohost app remove galene --purge`. +#### Hashed passwords + +If you don’t wish to store cleartext passwords on the server, you may generate hashed passwords with the galene-password-generator utility: + +`./__INSTALL_DIR__/galene-password-generator your_password` + + +A user entry with a hashed password looks like this: +``` +{ + "username": "jch", + "password": { + "type": "pbkdf2", + "hash": "sha-256", + "key": "f591c35604e6aef572851d9c3543c812566b032b6dc083c81edd15cc24449913", + "salt": "92bff2ace56fe38f", + "iterations": 4096 + } +} +``` + ### Configuring your TURN server #### Using *Galène*'s internal TURN server diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index ec87b26..b61a8ea 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -12,6 +12,27 @@ Pour créer un nouveau groupe, vous devez créer un fichier `GroupNameExample.js Lorsque Galène est supprimé, le répertoire de données (`__DATA_DIR__`) est conservé. Si vous souhaitez le supprimer avec l'application Galène, utilisez l'option `--purge` : `sudo yunohost app remove galene --purge`. +#### Mots de passe hachés + +Si vous ne souhaitez pas stocker les mots de passe en clair sur le serveur, vous pouvez générer des mots de passe hachés avec l'utilitaire galene-password-generator : + +`./__INSTALL_DIR__/galene-password-generator votre_mot_de_passe` + +Une entrée utilisateur avec un mot de passe haché ressemble à ceci : + +``` +{ + "username": "jch", + "password": { + "type": "pbkdf2", + "hash": "sha-256", + "key": "f591c35604e6aef572851d9c3543c812566b032b6dc083c81edd15cc24449913", + "salt": "92bff2ace56fe38f", + "iterations": 4096 + } +} +``` + ### Configurer votre serveur TURN #### Utilisation du serveur TURN de *Galène* From d3723c686b72089243eceed6ba6454cab58755bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 28 Mar 2023 09:21:03 +0200 Subject: [PATCH 52/97] autoupdate --- .github/workflows/updater.sh | 137 ---------------------------------- .github/workflows/updater.yml | 49 ------------ manifest.toml | 1 + 3 files changed, 1 insertion(+), 186 deletions(-) delete mode 100644 .github/workflows/updater.sh delete mode 100644 .github/workflows/updater.yml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh deleted file mode 100644 index 1e22ce2..0000000 --- a/.github/workflows/updater.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/bash - -#================================================= -# PACKAGE UPDATING HELPER -#================================================= - -# This script is meant to be run by GitHub Actions -# The YunoHost-Apps organisation offers a template Action to run this script periodically -# Since each app is different, maintainers can adapt its contents so as to perform -# automatic actions when a new upstream release is detected. - -exit 1 - -#================================================= -# FETCHING LATEST RELEASE AND ITS ASSETS -#================================================= - -# Fetching information -current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') -# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) -version=$(curl --silent "https://api.github.com/repos/$repo/tags" | jq -r '.[] | .name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) - -# Later down the script, we assume the version has only digits and dots -# Sometimes the release name starts with a "v", so let's filter it out. -# You may need more tweaks here if the upstream repository has different naming conventions. -if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then - version=${version:1} -fi - -# Setting up the environment variables -echo "Current version: $current_version" -echo "Latest release from upstream: $version" -echo "VERSION=$version" >> $GITHUB_ENV -echo "REPO=$repo" >> $GITHUB_ENV -# For the time being, let's assume the script will fail -echo "PROCEED=false" >> $GITHUB_ENV - -# Proceed only if the retrieved version is greater than the current one -if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then - echo "::warning ::No new version available" - exit 0 -# Proceed only if a PR for this new version does not already exist -elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then - echo "::warning ::A branch already exists for this update" - exit 0 -fi - -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - -#================================================= -# UPDATE SOURCE FILES -#================================================= - -# Here we use the $assets variable to get the resources published in the upstream release. -# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do - - echo "Handling asset at $asset_url" - - # Assign the asset to a source file in conf/ directory - # Here we base the source file name upon a unique keyword in the assets url (admin vs. update) - # Leave $src empty to ignore the asset - case $asset_url in - *"admin"*) - src="app" - ;; - *"update"*) - src="app-upgrade" - ;; - *) - src="" - ;; - esac - - # If $src is not empty, let's process the asset - if [ ! -z "$src" ]; then - - # Create the temporary directory - tempdir="$(mktemp -d)" - - # Download sources and calculate checksum - filename=${asset_url##*/} - curl --silent -4 -L $asset_url -o "$tempdir/$filename" - checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - - # Delete temporary directory - rm -rf $tempdir - - # Get extension - if [[ $filename == *.tar.gz ]]; then - extension=tar.gz - else - extension=${filename##*.} - fi - - # Rewrite source file - cat < conf/$src.src -SOURCE_URL=$asset_url -SOURCE_SUM=$checksum -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=$extension -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= -SOURCE_EXTRACT=true -EOT - echo "... conf/$src.src updated" - - else - echo "... asset ignored" - fi - -done - -#================================================= -# SPECIFIC UPDATE STEPS -#================================================= - -# Any action on the app's source code can be done. -# The GitHub Action workflow takes care of committing all changes after this script ends. - -#================================================= -# GENERIC FINALIZATION -#================================================= - -# Replace new version in manifest -echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json - -# No need to update the README, yunohost-bot takes care of it - -# The Action will proceed only if the PROCEED environment variable is set to true -echo "PROCEED=true" >> $GITHUB_ENV -exit 0 diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml deleted file mode 100644 index a56d7cb..0000000 --- a/.github/workflows/updater.yml +++ /dev/null @@ -1,49 +0,0 @@ -# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected. -# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization. -# This file should be enough by itself, but feel free to tune it to your needs. -# It calls updater.sh, which is where you should put the app-specific update steps. -name: Check for new upstream releases -on: - # Allow to manually trigger the workflow - workflow_dispatch: - # Run it every day at 6:00 UTC - schedule: - - cron: '0 6 * * *' -jobs: - updater: - runs-on: ubuntu-latest - steps: - - name: Fetch the source code - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Run the updater script - id: run_updater - run: | - # Setting up Git user - git config --global user.name 'yunohost-bot' - git config --global user.email 'yunohost-bot@users.noreply.github.com' - # Run the updater script - /bin/bash .github/workflows/updater.sh - - name: Commit changes - id: commit - if: ${{ env.PROCEED == 'true' }} - run: | - git commit -am "Upgrade to v$VERSION" - - name: Create Pull Request - id: cpr - if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update to version ${{ env.VERSION }} - committer: 'yunohost-bot ' - author: 'yunohost-bot ' - signoff: false - base: testing - branch: ci-auto-update-v${{ env.VERSION }} - delete-branch: true - title: 'Upgrade to version ${{ env.VERSION }}' - body: | - Upgrade to v${{ env.VERSION }} - draft: false diff --git a/manifest.toml b/manifest.toml index cbd68a5..6712be0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -67,6 +67,7 @@ ram.runtime = "50M" [resources.sources.main] url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" + autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" From c40f7d760c8121f2e34a3d2486920b4b6045b08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 28 Mar 2023 19:21:38 +0200 Subject: [PATCH 53/97] Update manifest.toml --- manifest.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manifest.toml b/manifest.toml index 6712be0..b06fb43 100644 --- a/manifest.toml +++ b/manifest.toml @@ -72,6 +72,8 @@ ram.runtime = "50M" [resources.sources.ldap] url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" + autoupdate.upstream = "https://github.com/jech/galene-ldap" + autoupdate.strategy = "latest_github_commit" [resources.system_user] From 40e8e991208bcab02a6dce0da3453c0947ed4ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 28 Mar 2023 19:22:03 +0200 Subject: [PATCH 54/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index b06fb43..41765ec 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.6.2~ynh3" +version = "0.6.2~ynh4" maintainers = ["eric_G"] From 20db95d4113a3c17fb5ab198cdefe96f72052cd0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 28 Mar 2023 17:22:08 +0000 Subject: [PATCH 55/97] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 337e6f7..f30ba3e 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - LDAP support -**Shipped version:** 0.6.2~ynh3 +**Shipped version:** 0.6.2~ynh4 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index 205a331..1a7870d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - prise en charge LDAP -**Version incluse :** 0.6.2~ynh3 +**Version incluse :** 0.6.2~ynh4 **Démo :** https://galene.org:8443/ From 85f6a31c1a65a91f872e8b6d87a31895b3e15d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 4 Apr 2023 23:33:08 +0200 Subject: [PATCH 56/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 41765ec..b2ef12e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.1.15" +yunohost = ">= 11.1.16" architectures = "all" multi_instance = false ldap = true From f5d554fe209da8dfd42aadfccc9658f094352708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 10 Apr 2023 16:04:49 +0200 Subject: [PATCH 57/97] 0.7.0 --- manifest.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index b2ef12e..b52f313 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.6.2~ynh4" +version = "0.7.0~ynh1" maintainers = ["eric_G"] @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.1.16" +yunohost = ">= 11.1.17" architectures = "all" multi_instance = false ldap = true @@ -65,8 +65,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/jech/galene/archive/refs/tags/galene-0.6.2.tar.gz" - sha256 = "7caedc1b2cb8cfeee0136e02c006d13d7b2b3cb9908685654c8cec020265428d" + url = "https://github.com/jech/galene/archive/refs/tags/galene-0.7.0.tar.gz" + sha256 = "b916e9df4ef289c6ffc529808c063b2fa6ef456b0fc66a0673129887f25b4f63" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] From 46fdbe098ca79d37d89521c45bd531438c9feb24 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 10 Apr 2023 14:04:54 +0000 Subject: [PATCH 58/97] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f30ba3e..f2785c7 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - LDAP support -**Shipped version:** 0.6.2~ynh4 +**Shipped version:** 0.7.0~ynh1 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index 1a7870d..e8954b6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - prise en charge LDAP -**Version incluse :** 0.6.2~ynh4 +**Version incluse :** 0.7.0~ynh1 **Démo :** https://galene.org:8443/ From e8375a91fa32da3593343946c28db13a812f6cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 10 Apr 2023 16:12:30 +0200 Subject: [PATCH 59/97] Update ldap.service --- conf/ldap.service | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/conf/ldap.service b/conf/ldap.service index 29ca25f..63232f5 100644 --- a/conf/ldap.service +++ b/conf/ldap.service @@ -11,5 +11,39 @@ WorkingDirectory=__INSTALL_DIR__/live_ldap/ ExecStart=__INSTALL_DIR__/live_ldap/galene-ldap -data __INSTALL_DIR__/live_ldap/data/ LimitNOFILE=65536 +# Sandboxing options to harden security +# Depending on specificities of your service/app, you may need to tweak these +# .. but this should be a good baseline +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed +ProtectClock=yes +ProtectHostname=yes +ProtectProc=invisible +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallArchitectures=native +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + [Install] WantedBy=multi-user.target From deec589be56f05a819ca3572aa2b192e7523a3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 10 Apr 2023 16:18:41 +0200 Subject: [PATCH 60/97] add invite user --- doc/DESCRIPTION.md | 1 + doc/DESCRIPTION_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 54e9644..2258c68 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -9,3 +9,4 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - streaming video and audio from disk - activity detection - LDAP support +- invite user diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index e4a0524..a6c1ffa 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -9,3 +9,4 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - streaming vidéo et audio à partir du disque - détection d'activité - prise en charge LDAP +- inviter un utilisateur From 1dbd96de4e9f5976b64ddca1e53eb95f885901f8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 10 Apr 2023 14:18:48 +0000 Subject: [PATCH 61/97] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index f2785c7..8554ca5 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - streaming video and audio from disk - activity detection - LDAP support +- invite user **Shipped version:** 0.7.0~ynh1 diff --git a/README_fr.md b/README_fr.md index e8954b6..e24ad9d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,6 +27,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - streaming vidéo et audio à partir du disque - détection d'activité - prise en charge LDAP +- inviter un utilisateur **Version incluse :** 0.7.0~ynh1 From c779405842222f11eb79ffb150f550bfcac32b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 20 Apr 2023 19:15:16 +0200 Subject: [PATCH 62/97] add sudirs --- manifest.toml | 1 + scripts/install | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/manifest.toml b/manifest.toml index b52f313..1552b00 100644 --- a/manifest.toml +++ b/manifest.toml @@ -80,6 +80,7 @@ ram.runtime = "50M" [resources.install_dir] [resources.data_dir] + subdirs = ["groups","recordings"] [resources.permissions] main.url = "/" diff --git a/scripts/install b/scripts/install index 893283f..2f31bab 100755 --- a/scripts/install +++ b/scripts/install @@ -84,17 +84,6 @@ ynh_secure_remove --file="$install_dir/.go-version" chmod +x "$install_dir/galene-password-generator" -#================================================= -# CREATE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 - -mkdir -p $data_dir/{groups,recordings} - -chmod 750 "$data_dir" -chmod -R o-rwx "$data_dir" -chown -R $app:www-data "$data_dir" - #================================================= # ADD A CONFIGURATION #================================================= From 89b0a2efd81ef766bf7bd995b112383a71d779a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 22:12:37 +0200 Subject: [PATCH 63/97] Update config.json --- conf/config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/config.json b/conf/config.json index 81042d0..30a751f 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,4 +1,5 @@ { "canonicalHost": "__DOMAIN__", + "proxyURL": "__DOMAIN__", "admin":[{"username":"__ADMIN__", "password": __PASSWORD_HASH__}] } From 52e050915ff2f4a15a90e05878bd8a1896bbda0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:01:52 +0200 Subject: [PATCH 64/97] Update config.json --- conf/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.json b/conf/config.json index 30a751f..cde86a9 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,5 +1,5 @@ { "canonicalHost": "__DOMAIN__", - "proxyURL": "__DOMAIN__", + "proxyURL": "https://__DOMAIN__", "admin":[{"username":"__ADMIN__", "password": __PASSWORD_HASH__}] } From 18bbc28cd182ce46c92db5c182c4840e4f184ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 1 May 2023 09:54:25 +0200 Subject: [PATCH 65/97] add description --- doc/ADMIN.md | 4 ++++ doc/ADMIN_fr.md | 4 ++++ doc/DESCRIPTION.md | 1 + doc/DESCRIPTION_fr.md | 1 + manifest.toml | 4 ++-- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index ba56d5e..82c4825 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -66,3 +66,7 @@ Statistics are available under `/opt/yunohost/galene/stats.json`, with a human-r ### How do I record my lecture? Make sure allow-recording is set in your group configuration. Log-in as an operator, then say `/record` before you start your lecture. Don't forget to say `/unrecord` at the end. You will find your recordings under `https://__DOMAIN__/recordings/groupname/`. The video recordings are stored in `__DATA_DIR__/recordings` folder. + +### Command-line client for Galene file transfer + +https://github.com/jech/galene-file-transfer/blob/master/README diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index b61a8ea..72c3d0d 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -66,3 +66,7 @@ Les statistiques sont disponibles sous `/opt/yunohost/galene/stats.json`, avec u ### Comment enregistrer ma conférence ? Assurez-vous que l'autorisation d'enregistrement est définie dans la configuration de votre groupe. Connectez-vous en tant qu'opérateur, puis dites `/record` dans la fenêtre de chat avant de commencer la visio. N'oubliez pas de dire `/unrecord` à la fin. Vous trouverez vos enregistrements sous `https://__DOMAIN__/recordings/groupname/`. Les enregistrements vidéo sont stockés dans le dossier `__DATA_DIR__/recordings`. + +### Client en ligne de commande pour le transfert de fichiers + +https://github.com/jech/galene-file-transfer/blob/master/README \ No newline at end of file diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 2258c68..8c9ef63 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -10,3 +10,4 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - activity detection - LDAP support - invite user +- Command-line client for Galene file transfer diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index a6c1ffa..f57f363 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -10,3 +10,4 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - détection d'activité - prise en charge LDAP - inviter un utilisateur +- Client en ligne de commande pour le transfert de fichiers Galene diff --git a/manifest.toml b/manifest.toml index 1552b00..2cd1711 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.7.0~ynh1" +version = "0.7.0~ynh2" maintainers = ["eric_G"] @@ -80,7 +80,7 @@ ram.runtime = "50M" [resources.install_dir] [resources.data_dir] - subdirs = ["groups","recordings"] + subdirs = ["groups", "recordings"] [resources.permissions] main.url = "/" From a674e408a7c312ce3ecc64e403540dee1b0910da Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 1 May 2023 07:54:31 +0000 Subject: [PATCH 66/97] Auto-update README --- README.md | 3 ++- README_fr.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8554ca5..db07320 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,10 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - activity detection - LDAP support - invite user +- Command-line client for Galene file transfer -**Shipped version:** 0.7.0~ynh1 +**Shipped version:** 0.7.0~ynh2 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index e24ad9d..5558b5e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,9 +28,10 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - détection d'activité - prise en charge LDAP - inviter un utilisateur +- Client en ligne de commande pour le transfert de fichiers Galene -**Version incluse :** 0.7.0~ynh1 +**Version incluse :** 0.7.0~ynh2 **Démo :** https://galene.org:8443/ From 86ea42ae4e43d82dae3f2c466d03ed1ac717dee1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 13 May 2023 08:07:56 +0200 Subject: [PATCH 67/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 2cd1711..c567529 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.1.17" +yunohost = ">= 11.1.19" architectures = "all" multi_instance = false ldap = true From 4acdeb8692d40b80ecb21f6f763269ac08071f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 14 May 2023 21:32:40 +0200 Subject: [PATCH 68/97] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index c567529..a250a75 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.7.0~ynh2" +version = "0.7.1~ynh1" maintainers = ["eric_G"] @@ -65,8 +65,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/jech/galene/archive/refs/tags/galene-0.7.0.tar.gz" - sha256 = "b916e9df4ef289c6ffc529808c063b2fa6ef456b0fc66a0673129887f25b4f63" + url = "https://github.com/jech/galene/archive/refs/tags/galene-0.7.1.tar.gz" + sha256 = "b186b96cb6a59611b86cf3c98a96fc615cdc5f5af66d5a98d0debd8813a4fb0c" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] From 52b476faa9402dbd12ae126be31876dd9a4b8d88 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 14 May 2023 19:32:46 +0000 Subject: [PATCH 69/97] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db07320..afbfa63 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Shipped version:** 0.7.0~ynh2 +**Shipped version:** 0.7.1~ynh1 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index 5558b5e..0128c0b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - Client en ligne de commande pour le transfert de fichiers Galene -**Version incluse :** 0.7.0~ynh2 +**Version incluse :** 0.7.1~ynh1 **Démo :** https://galene.org:8443/ From 2e0d98a8b5c575805e6a15517ff2849f786d3062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 28 Jun 2023 15:37:05 +0200 Subject: [PATCH 70/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index a250a75..6ca80fb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.1.19" +yunohost = ">= 11.1.21" architectures = "all" multi_instance = false ldap = true From ddde99f18c38d3a24f7398fb4c7a4760e5dde96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 9 Jul 2023 14:45:47 +0200 Subject: [PATCH 71/97] Update remove --- scripts/remove | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/remove b/scripts/remove index 23d30bd..1ed6e4b 100755 --- a/scripts/remove +++ b/scripts/remove @@ -49,12 +49,6 @@ ynh_remove_nginx_config # CLOSE A PORT #================================================= -if yunohost firewall list | grep -q "\- $port_turn$" -then - ynh_script_progression --message="Closing port $port_turn..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow both $port_turn -fi - if yunohost firewall list | grep -q "\- 49152:65535" then ynh_script_progression --message="Closing UDP ports..." --weight=1 From 8f9a3e3da30a93736742a4d1db278775ace73901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 9 Jul 2023 14:46:38 +0200 Subject: [PATCH 72/97] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 6ca80fb..2a53e5a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.7.1~ynh1" +version = "0.7.2~ynh1" maintainers = ["eric_G"] @@ -65,8 +65,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/jech/galene/archive/refs/tags/galene-0.7.1.tar.gz" - sha256 = "b186b96cb6a59611b86cf3c98a96fc615cdc5f5af66d5a98d0debd8813a4fb0c" + url = "https://github.com/jech/galene/archive/refs/tags/galene-0.7.2.tar.gz" + sha256 = "d238d862d84b5126762cc82aaeb249eb9c55e96f241050d5e7158a264ae4f0fb" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] From 483c46dc69ed7efcfb94fa1320b5be8f80ea3aeb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 9 Jul 2023 12:46:43 +0000 Subject: [PATCH 73/97] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index afbfa63..e525ea2 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Shipped version:** 0.7.1~ynh1 +**Shipped version:** 0.7.2~ynh1 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index 0128c0b..ff5a531 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - Client en ligne de commande pour le transfert de fichiers Galene -**Version incluse :** 0.7.1~ynh1 +**Version incluse :** 0.7.2~ynh1 **Démo :** https://galene.org:8443/ From 7ec84b70ffa15cb23d08a83ebc83a4e2b8435cfb Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sat, 22 Jul 2023 21:39:42 +0200 Subject: [PATCH 74/97] Upgrade sources (#120) --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 2a53e5a..f9415fa 100644 --- a/manifest.toml +++ b/manifest.toml @@ -70,8 +70,8 @@ ram.runtime = "50M" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] - url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz" - sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070" + url = "https://github.com/jech/galene-ldap/archive/18cbd36080bdc7544f340f716a9ac1b31472ed3c.tar.gz" + sha256 = "2b7b4f7f2ba8eadc64f5f48ebf87a6dac171f29f45340e71c50316681f527f78" autoupdate.upstream = "https://github.com/jech/galene-ldap" autoupdate.strategy = "latest_github_commit" From 7ed816961bb24b068e393317f7efff1518706a08 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Mon, 24 Jul 2023 00:14:51 +0200 Subject: [PATCH 75/97] Upgrade sources (#121) --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index f9415fa..f8f8e95 100644 --- a/manifest.toml +++ b/manifest.toml @@ -70,8 +70,8 @@ ram.runtime = "50M" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] - url = "https://github.com/jech/galene-ldap/archive/18cbd36080bdc7544f340f716a9ac1b31472ed3c.tar.gz" - sha256 = "2b7b4f7f2ba8eadc64f5f48ebf87a6dac171f29f45340e71c50316681f527f78" + url = "https://github.com/jech/galene-ldap/archive/4989ce2f6472eff2681516a47d8a604abd0138d3.tar.gz" + sha256 = "a70916a5e3e6a772f753174225f5ab652ac83e60b0692287270551ed75fe0442" autoupdate.upstream = "https://github.com/jech/galene-ldap" autoupdate.strategy = "latest_github_commit" From 892d5a80f5eb6b992ee22fbf4af22be0aad1818a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 18 Aug 2023 11:23:03 +0200 Subject: [PATCH 76/97] Update manifest.toml --- manifest.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index f8f8e95..5b37d9c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -30,7 +30,6 @@ ram.runtime = "50M" [install] [install.domain] type = "domain" - full_domain = true [install.init_main_permission] help.en = "If Visitors enabled, Galène will be accessible by people who do not have an account. This can be changed later via the webadmin." From 23023aaff6d8457b2009e289f62fa37abe117141 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 25 Aug 2023 12:14:51 +0200 Subject: [PATCH 77/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 5b37d9c..852aad6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.1.21" +yunohost = ">= 11.2" architectures = "all" multi_instance = false ldap = true From 33a82948cedf373105682738174e7b69db94d309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 25 Nov 2023 23:23:09 +0100 Subject: [PATCH 78/97] Update manifest.toml --- manifest.toml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 852aad6..777028c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.7.2~ynh1" +version = "0.8.0~ynh1" maintainers = ["eric_G"] @@ -21,8 +21,11 @@ code = "https://github.com/jech/galene" yunohost = ">= 11.2" architectures = "all" multi_instance = false + ldap = true + sso = false + disk = "50M" ram.build = "400M" ram.runtime = "50M" @@ -64,8 +67,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/jech/galene/archive/refs/tags/galene-0.7.2.tar.gz" - sha256 = "d238d862d84b5126762cc82aaeb249eb9c55e96f241050d5e7158a264ae4f0fb" + url = "https://github.com/jech/galene/archive/refs/tags/galene-0.8.tar.gz" + sha256 = "9970e3407a773511f6b74da789a9ea4bdb24fd6b09b0067c7476506ac1543c91" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] From f9745e8da581bbd79beddf3f86439af3bf694a47 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 25 Nov 2023 22:23:15 +0000 Subject: [PATCH 79/97] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd48076..e1cf812 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Shipped version:** 0.7.2~ynh1 +**Shipped version:** 0.8.0~ynh1 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index 3974e32..12520d4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - Client en ligne de commande pour le transfert de fichiers Galene -**Version incluse :** 0.7.2~ynh1 +**Version incluse :** 0.8.0~ynh1 **Démo :** https://galene.org:8443/ From b4432143240d847fc21b8f613a5e7ab7b3953b77 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sun, 10 Dec 2023 11:13:54 +0100 Subject: [PATCH 80/97] Upgrade sources (#123) --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 777028c..d5c3ca4 100644 --- a/manifest.toml +++ b/manifest.toml @@ -72,8 +72,8 @@ ram.runtime = "50M" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] - url = "https://github.com/jech/galene-ldap/archive/4989ce2f6472eff2681516a47d8a604abd0138d3.tar.gz" - sha256 = "a70916a5e3e6a772f753174225f5ab652ac83e60b0692287270551ed75fe0442" + url = "https://github.com/jech/galene-ldap/archive/4ca51804f43b2f13a10397c5f84c32395a3f17ca.tar.gz" + sha256 = "3db8594b2c09b175adde5dc202110fc095d556def17dfebc21462a5a9b386644" autoupdate.upstream = "https://github.com/jech/galene-ldap" autoupdate.strategy = "latest_github_commit" From 6ab690d963ea3da56431efa0f9f52f6c6b046358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 10 Dec 2023 11:14:34 +0100 Subject: [PATCH 81/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index d5c3ca4..dbee452 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.8.0~ynh1" +version = "0.8.0~ynh2" maintainers = ["eric_G"] From 3b93e0114143cfe47ec82d355932b537388ef544 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 10 Dec 2023 10:14:39 +0000 Subject: [PATCH 82/97] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e1cf812..b5f721e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Shipped version:** 0.8.0~ynh1 +**Shipped version:** 0.8.0~ynh2 **Demo:** https://galene.org:8443/ diff --git a/README_fr.md b/README_fr.md index 12520d4..19f26e7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - Client en ligne de commande pour le transfert de fichiers Galene -**Version incluse :** 0.8.0~ynh1 +**Version incluse :** 0.8.0~ynh2 **Démo :** https://galene.org:8443/ From 352e3589412492a8f38f542e2b778b984e5a4232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:50:51 +0100 Subject: [PATCH 83/97] cleaning --- scripts/install | 8 +++---- scripts/remove | 11 +--------- scripts/upgrade | 55 +++++++++++++++++++++---------------------------- 3 files changed, 29 insertions(+), 45 deletions(-) diff --git a/scripts/install b/scripts/install index 2f31bab..b56ffc8 100755 --- a/scripts/install +++ b/scripts/install @@ -93,24 +93,24 @@ password_hash=$(echo $($install_dir/galene-password-generator $password)) ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" # Configure Galène -ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" +ynh_add_config --template="config.json" --destination="$install_dir/live/data/config.json" chmod 400 "$install_dir/live/data/config.json" chown $app:$app "$install_dir/live/data/config.json" # Configure Galène LDAP key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}') ynh_app_setting_set --app=$app --key=key --value="$key" -ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" +ynh_add_config --template="galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" # Create a group name config -ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" +ynh_add_config --template="groupname.json" --destination="$data_dir/groups/$group_name.json" chmod 400 "$data_dir/groups/$group_name.json" chown $app:$app "$data_dir/groups/$group_name.json" # Create a group name authenticated on LDAP -ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" +ynh_add_config --template="groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" chmod 400 "$data_dir/groups/YunoHost_Users.json" chown $app:$app "$data_dir/groups/YunoHost_Users.json" diff --git a/scripts/remove b/scripts/remove index 1ed6e4b..7d80332 100755 --- a/scripts/remove +++ b/scripts/remove @@ -14,6 +14,7 @@ source /usr/share/yunohost/helpers #================================================= # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null @@ -28,20 +29,10 @@ then yunohost service remove ${app}_ldap fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - # Remove the dedicated systemd config ynh_remove_systemd_config ynh_remove_systemd_config --service=${app}_ldap -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config diff --git a/scripts/upgrade b/scripts/upgrade index 0e05f93..061381c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,12 +16,6 @@ source /usr/share/yunohost/helpers password=$(ynh_app_setting_get --app=$app --key=password) -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -82,28 +76,27 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Building app..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_exec_warn_less ynh_install_go --go_version=$go_version - ynh_use_go - pushd $install_dir/build/galene-password-generator/ - ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ - popd - pushd $install_dir/build/ - ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/ - popd - pushd $install_dir/build_ldap/ - ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live_ldap/ - popd - ynh_remove_go - ynh_secure_remove --file="$install_dir/build/" - ynh_secure_remove --file="$install_dir/build_ldap/" - ynh_secure_remove --file="$install_dir/.cache/" - ynh_secure_remove --file="$install_dir/go/" - ynh_secure_remove --file="$install_dir/.go-version" +ynh_exec_warn_less ynh_install_go --go_version=$go_version +ynh_use_go - chmod +x "$install_dir/galene-password-generator" -fi +pushd $install_dir/build/galene-password-generator/ + ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ +popd +pushd $install_dir/build/ + ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/ +popd +pushd $install_dir/build_ldap/ + ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live_ldap/ +popd + +ynh_remove_go +ynh_secure_remove --file="$install_dir/build/" +ynh_secure_remove --file="$install_dir/build_ldap/" +ynh_secure_remove --file="$install_dir/.cache/" +ynh_secure_remove --file="$install_dir/go/" +ynh_secure_remove --file="$install_dir/.go-version" + +chmod +x "$install_dir/galene-password-generator" #================================================= # UPDATE A CONFIG FILE @@ -116,7 +109,7 @@ if [ -z "${password_hash:-}" ]; then ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" fi # Configure Galène -ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" +ynh_add_config --template="config.json" --destination="$install_dir/live/data/config.json" chmod 400 "$install_dir/live/data/config.json" chown $app:$app "$install_dir/live/data/config.json" @@ -126,17 +119,17 @@ if [ -z "${key:-}" ]; then key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}') ynh_app_setting_set --app=$app --key=key --value=$key fi -ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" +ynh_add_config --template="galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" # Create a group name config -ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" +ynh_add_config --template="groupname.json" --destination="$data_dir/groups/$group_name.json" chmod 400 "$data_dir/groups/$group_name.json" chown $app:$app "$data_dir/groups/$group_name.json" # Create a group name authenticated on LDAP -ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" +ynh_add_config --template="groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" chmod 400 "$data_dir/groups/YunoHost_Users.json" chown $app:$app "$data_dir/groups/YunoHost_Users.json" From 7bb7e50fb085b25b1dfa26403046d2f7697631ee Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 25 Feb 2024 11:50:58 +0000 Subject: [PATCH 84/97] Auto-update README --- README.md | 4 ++-- README_fr.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b5f721e..32ddbf9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -60,4 +60,4 @@ or sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug ``` -**More info regarding app packaging:** +**More info regarding app packaging:** \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 19f26e7..8be747e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,5 +1,5 @@ From 25cb7000c6cf185151f634fa4f60647c339392da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 9 Mar 2024 13:48:32 +0100 Subject: [PATCH 85/97] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index dbee452..14eeebd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.8.0~ynh2" +version = "0.8.1~ynh1" maintainers = ["eric_G"] @@ -67,8 +67,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/jech/galene/archive/refs/tags/galene-0.8.tar.gz" - sha256 = "9970e3407a773511f6b74da789a9ea4bdb24fd6b09b0067c7476506ac1543c91" + url = "https://github.com/jech/galene/archive/refs/tags/galene-0.8.1.tar.gz" + sha256 = "fc06a3c7a0d51642f056384fcda1466d4eb333128ca5efff133fa7610f2fd666" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] From a54454f381a2eb70f0636471dba4647625d39aee Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 10 Mar 2024 13:31:40 +0100 Subject: [PATCH 86/97] Static (#127) * Update systemd.service * cleaning * Update upgrade * Update manifest.toml --- conf/systemd.service | 2 +- manifest.toml | 2 +- scripts/_common.sh | 246 ++++++++++++++++++++++++++++++++++++++++ scripts/change_url | 3 +- scripts/install | 1 - scripts/upgrade | 1 - scripts/ynh_install_go | 247 ----------------------------------------- 7 files changed, 249 insertions(+), 253 deletions(-) delete mode 100644 scripts/ynh_install_go diff --git a/conf/systemd.service b/conf/systemd.service index 8207fb1..1bc60de 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/live/ -ExecStart=__INSTALL_DIR__/live/galene -http "127.0.0.1:__PORT__" -insecure -turn __PUBLIC_IP4__:__PORT_TURN__ -udp-range 49152-65535 -groups __DATA_DIR__/groups -recordings __DATA_DIR__/recordings -data __INSTALL_DIR__/live/data/ +ExecStart=__INSTALL_DIR__/live/galene -http "127.0.0.1:__PORT__" -insecure -turn __PUBLIC_IP4__:__PORT_TURN__ -udp-range 49152-65535 -groups __DATA_DIR__/groups -recordings __DATA_DIR__/recordings -data __INSTALL_DIR__/live/data/ -static __INSTALL_DIR__/live/static LimitNOFILE=65536 # Sandboxing options to harden security diff --git a/manifest.toml b/manifest.toml index 14eeebd..d68447e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.8.1~ynh1" +version = "0.8.1~ynh2" maintainers = ["eric_G"] diff --git a/scripts/_common.sh b/scripts/_common.sh index f122fe2..f5f821e 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -17,3 +17,249 @@ go_version=1.20 #================================================= # FUTURE OFFICIAL HELPERS #================================================= + +ynh_go_try_bash_extension() { + if [ -x src/configure ]; then + src/configure && make -C src || { + ynh_print_info --message="Optional bash extension failed to build, but things will still work normally." + } + fi +} + +goenv_install_dir="/opt/goenv" +go_version_path="$goenv_install_dir/versions" +# goenv_ROOT is the directory of goenv, it needs to be loaded as a environment variable. +export GOENV_ROOT="$goenv_install_dir" + +# Load the version of Go for an app, and set variables. +# +# ynh_use_go has to be used in any app scripts before using Go for the first time. +# This helper will provide alias and variables to use in your scripts. +# +# To use gem or Go, use the alias `ynh_gem` and `ynh_go` +# Those alias will use the correct version installed for the app +# For example: use `ynh_gem install` instead of `gem install` +# +# With `sudo` or `ynh_exec_as`, use instead the fallback variables `$ynh_gem` and `$ynh_go` +# And propagate $PATH to sudo with $ynh_go_load_path +# Exemple: `ynh_exec_as $app $ynh_go_load_path $ynh_gem install` +# +# $PATH contains the path of the requested version of Go. +# However, $PATH is duplicated into $go_path to outlast any manipulation of $PATH +# You can use the variable `$ynh_go_load_path` to quickly load your Go version +# in $PATH for an usage into a separate script. +# Exemple: $ynh_go_load_path $install_dir/script_that_use_gem.sh` +# +# +# Finally, to start a Go service with the correct version, 2 solutions +# Either the app is dependent of Go or gem, but does not called it directly. +# In such situation, you need to load PATH +# `Environment="__YNH_GO_LOAD_PATH__"` +# `ExecStart=__INSTALL_DIR__/my_app` +# You will replace __YNH_GO_LOAD_PATH__ with $ynh_go_load_path +# +# Or Go start the app directly, then you don't need to load the PATH variable +# `ExecStart=__YNH_GO__ my_app run` +# You will replace __YNH_GO__ with $ynh_go +# +# +# one other variable is also available +# - $go_path: The absolute path to Go binaries for the chosen version. +# +# usage: ynh_use_go +# +# Requires YunoHost version 3.2.2 or higher. +ynh_use_go () { + go_version=$(ynh_app_setting_get --app=$app --key=go_version) + + # Get the absolute path of this version of Go + go_path="$go_version_path/$go_version/bin" + + # Allow alias to be used into bash script + shopt -s expand_aliases + + # Create an alias for the specific version of Go and a variable as fallback + ynh_go="$go_path/go" + alias ynh_go="$ynh_go" + + # Load the path of this version of Go in $PATH + if [[ :$PATH: != *":$go_path"* ]]; then + PATH="$go_path:$PATH" + fi + # Create an alias to easily load the PATH + ynh_go_load_path="PATH=$PATH" + + # Sets the local application-specific Go version + pushd $install_dir + $goenv_install_dir/bin/goenv local $go_version + popd +} + +# Install a specific version of Go +# +# ynh_install_go will install the version of Go provided as argument by using goenv. +# +# This helper creates a /etc/profile.d/goenv.sh that configures PATH environment for goenv +# for every LOGIN user, hence your user must have a defined shell (as opposed to /usr/sbin/nologin) +# +# Don't forget to execute go-dependent command in a login environment +# (e.g. sudo --login option) +# When not possible (e.g. in systemd service definition), please use direct path +# to goenv shims (e.g. $goenv_ROOT/shims/bundle) +# +# usage: ynh_install_go --go_version=go_version +# | arg: -v, --go_version= - Version of go to install. +# +# Requires YunoHost version 3.2.2 or higher. +ynh_install_go () { + # Declare an array to define the options of this helper. + local legacy_args=v + local -A args_array=( [v]=go_version= ) + local go_version + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + + # Load goenv path in PATH + local CLEAR_PATH="$goenv_install_dir/bin:$PATH" + + # Remove /usr/local/bin in PATH in case of Go prior installation + PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@') + + # Move an existing Go binary, to avoid to block goenv + test -x /usr/bin/go && mv /usr/bin/go /usr/bin/go_goenv + + # Install or update goenv + goenv="$(command -v goenv $goenv_install_dir/bin/goenv | head -1)" + if [ -n "$goenv" ]; then + ynh_print_info --message="goenv already seems installed in \`$goenv'." + pushd "${goenv%/*/*}" + if git remote -v 2>/dev/null | grep "https://github.com/syndbg/goenv.git"; then + echo "Trying to update with git..." + git pull -q --tags origin master + cd .. + ynh_go_try_bash_extension + fi + popd + else + #ynh_print_info --message="Installing goenv with Git..." + mkdir -p $goenv_install_dir + pushd $goenv_install_dir + git init -q + git remote add -f -t master origin https://github.com/syndbg/goenv.git > /dev/null 2>&1 + git checkout -q -b master origin/master + ynh_go_try_bash_extension + goenv=$goenv_install_dir/bin/goenv + popd + fi + + goenv_latest="$(command -v "$goenv_install_dir"/plugins/*/bin/goenv-latest goenv-latest | head -1)" + if [ -n "$goenv_latest" ]; then + ynh_print_info --message="\`goenv latest' command already available in \`$goenv_latest'." + pushd "${goenv_latest%/*/*}" + if git remote -v 2>/dev/null | grep "https://github.com/momo-lab/xxenv-latest.git"; then + ynh_print_info --message="Trying to update xxenv-latest with Git..." + git pull -q origin master + fi + popd + else + #ynh_print_info --message="Installing xxenv-latest with Git..." + mkdir -p "${goenv_install_dir}/plugins" + git clone -q https://github.com/momo-lab/xxenv-latest.git "${goenv_install_dir}/plugins/xxenv-latest" + fi + + # Enable caching + mkdir -p "${goenv_install_dir}/cache" + + # Create shims directory if needed + mkdir -p "${goenv_install_dir}/shims" + + # Restore /usr/local/bin in PATH + PATH=$CLEAR_PATH + + # And replace the old Go binary + test -x /usr/bin/go_goenv && mv /usr/bin/go_goenv /usr/bin/go + + # Install the requested version of Go + local final_go_version=$(goenv latest --print $go_version) + #ynh_print_info --message="Installation of Go-$final_go_version" + goenv install --skip-existing $final_go_version + + # Store go_version into the config of this app + ynh_app_setting_set --app=$YNH_APP_INSTANCE_NAME --key=go_version --value=$final_go_version + + # Cleanup Go versions + ynh_cleanup_go + + # Set environment for Go users + echo "#goenv +export GOENV_ROOT=$goenv_install_dir +export PATH=\"$goenv_install_dir/bin:$PATH\" +eval \"\$(goenv init -)\" +#goenv" > /etc/profile.d/goenv.sh + + # Load the environment + eval "$(goenv init -)" +} + +# Remove the version of Go used by the app. +# +# This helper will also cleanup Go versions +# +# usage: ynh_remove_go +ynh_remove_go () { + local go_version=$(ynh_app_setting_get --app=$YNH_APP_INSTANCE_NAME --key=go_version) + + # Load goenv path in PATH + local CLEAR_PATH="$goenv_install_dir/bin:$PATH" + + # Remove /usr/local/bin in PATH in case of Go prior installation + PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@') + + # Remove the line for this app + ynh_app_setting_delete --app=$YNH_APP_INSTANCE_NAME --key=go_version + + # Cleanup Go versions + ynh_cleanup_go +} + +# Remove no more needed versions of Go used by the app. +# +# This helper will check what Go version are no more required, +# and uninstall them +# If no app uses Go, goenv will be also removed. +# +# usage: ynh_cleanup_go +ynh_cleanup_go () { + + # List required Go versions + local installed_apps=$(yunohost app list --output-as json --quiet | jq -r .apps[].id) + local required_go_versions="" + for installed_app in $installed_apps + do + local installed_app_go_version=$(ynh_app_setting_get --app=$installed_app --key="go_version") + if [[ $installed_app_go_version ]] + then + required_go_versions="${installed_app_go_version}\n${required_go_versions}" + fi + done + + # Remove no more needed Go versions + local installed_go_versions=$(goenv versions --bare --skip-aliases | grep -Ev '/') + for installed_go_version in $installed_go_versions + do + if ! `echo ${required_go_versions} | grep "${installed_go_version}" 1>/dev/null 2>&1` + then + #ynh_print_info --message="Removing of Go-$installed_go_version" + $goenv_install_dir/bin/goenv uninstall --force $installed_go_version + fi + done + + # If none Go version is required + if [[ ! $required_go_versions ]] + then + # Remove goenv environment configuration + #ynh_print_info --message="Removing of goenv" + ynh_secure_remove --file="$goenv_install_dir" + ynh_secure_remove --file="/etc/profile.d/goenv.sh" + fi +} diff --git a/scripts/change_url b/scripts/change_url index 3fefb36..46d6200 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Loading installation settings..." --weight=1 -# Add settings here as needed by your application key=$(ynh_app_setting_get --app=$app --key=key) password_hash=$(ynh_app_setting_get --app=$app --key=password_hash) @@ -43,7 +42,7 @@ ynh_change_url_nginx_config ynh_script_progression --message="Updating a configuration file..." --weight=2 domain="$new_domain" -# Configure Galene +# Configure Galène ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" chmod 400 "$install_dir/live/data/config.json" chown $app:$app "$install_dir/live/data/config.json" diff --git a/scripts/install b/scripts/install index b56ffc8..6d750bd 100755 --- a/scripts/install +++ b/scripts/install @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_install_go source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 061381c..c460776 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_install_go source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/ynh_install_go b/scripts/ynh_install_go deleted file mode 100644 index c0dfe12..0000000 --- a/scripts/ynh_install_go +++ /dev/null @@ -1,247 +0,0 @@ -#!/bin/bash - -ynh_go_try_bash_extension() { - if [ -x src/configure ]; then - src/configure && make -C src || { - ynh_print_info --message="Optional bash extension failed to build, but things will still work normally." - } - fi -} - -goenv_install_dir="/opt/goenv" -go_version_path="$goenv_install_dir/versions" -# goenv_ROOT is the directory of goenv, it needs to be loaded as a environment variable. -export GOENV_ROOT="$goenv_install_dir" - -# Load the version of Go for an app, and set variables. -# -# ynh_use_go has to be used in any app scripts before using Go for the first time. -# This helper will provide alias and variables to use in your scripts. -# -# To use gem or Go, use the alias `ynh_gem` and `ynh_go` -# Those alias will use the correct version installed for the app -# For example: use `ynh_gem install` instead of `gem install` -# -# With `sudo` or `ynh_exec_as`, use instead the fallback variables `$ynh_gem` and `$ynh_go` -# And propagate $PATH to sudo with $ynh_go_load_path -# Exemple: `ynh_exec_as $app $ynh_go_load_path $ynh_gem install` -# -# $PATH contains the path of the requested version of Go. -# However, $PATH is duplicated into $go_path to outlast any manipulation of $PATH -# You can use the variable `$ynh_go_load_path` to quickly load your Go version -# in $PATH for an usage into a separate script. -# Exemple: $ynh_go_load_path $install_dir/script_that_use_gem.sh` -# -# -# Finally, to start a Go service with the correct version, 2 solutions -# Either the app is dependent of Go or gem, but does not called it directly. -# In such situation, you need to load PATH -# `Environment="__YNH_GO_LOAD_PATH__"` -# `ExecStart=__INSTALL_DIR__/my_app` -# You will replace __YNH_GO_LOAD_PATH__ with $ynh_go_load_path -# -# Or Go start the app directly, then you don't need to load the PATH variable -# `ExecStart=__YNH_GO__ my_app run` -# You will replace __YNH_GO__ with $ynh_go -# -# -# one other variable is also available -# - $go_path: The absolute path to Go binaries for the chosen version. -# -# usage: ynh_use_go -# -# Requires YunoHost version 3.2.2 or higher. -ynh_use_go () { - go_version=$(ynh_app_setting_get --app=$app --key=go_version) - - # Get the absolute path of this version of Go - go_path="$go_version_path/$go_version/bin" - - # Allow alias to be used into bash script - shopt -s expand_aliases - - # Create an alias for the specific version of Go and a variable as fallback - ynh_go="$go_path/go" - alias ynh_go="$ynh_go" - - # Load the path of this version of Go in $PATH - if [[ :$PATH: != *":$go_path"* ]]; then - PATH="$go_path:$PATH" - fi - # Create an alias to easily load the PATH - ynh_go_load_path="PATH=$PATH" - - # Sets the local application-specific Go version - pushd $install_dir - $goenv_install_dir/bin/goenv local $go_version - popd -} - -# Install a specific version of Go -# -# ynh_install_go will install the version of Go provided as argument by using goenv. -# -# This helper creates a /etc/profile.d/goenv.sh that configures PATH environment for goenv -# for every LOGIN user, hence your user must have a defined shell (as opposed to /usr/sbin/nologin) -# -# Don't forget to execute go-dependent command in a login environment -# (e.g. sudo --login option) -# When not possible (e.g. in systemd service definition), please use direct path -# to goenv shims (e.g. $goenv_ROOT/shims/bundle) -# -# usage: ynh_install_go --go_version=go_version -# | arg: -v, --go_version= - Version of go to install. -# -# Requires YunoHost version 3.2.2 or higher. -ynh_install_go () { - # Declare an array to define the options of this helper. - local legacy_args=v - local -A args_array=( [v]=go_version= ) - local go_version - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - - # Load goenv path in PATH - local CLEAR_PATH="$goenv_install_dir/bin:$PATH" - - # Remove /usr/local/bin in PATH in case of Go prior installation - PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@') - - # Move an existing Go binary, to avoid to block goenv - test -x /usr/bin/go && mv /usr/bin/go /usr/bin/go_goenv - - # Install or update goenv - goenv="$(command -v goenv $goenv_install_dir/bin/goenv | head -1)" - if [ -n "$goenv" ]; then - ynh_print_info --message="goenv already seems installed in \`$goenv'." - pushd "${goenv%/*/*}" - if git remote -v 2>/dev/null | grep "https://github.com/syndbg/goenv.git"; then - echo "Trying to update with git..." - git pull -q --tags origin master - cd .. - ynh_go_try_bash_extension - fi - popd - else - #ynh_print_info --message="Installing goenv with Git..." - mkdir -p $goenv_install_dir - pushd $goenv_install_dir - git init -q - git remote add -f -t master origin https://github.com/syndbg/goenv.git > /dev/null 2>&1 - git checkout -q -b master origin/master - ynh_go_try_bash_extension - goenv=$goenv_install_dir/bin/goenv - popd - fi - - goenv_latest="$(command -v "$goenv_install_dir"/plugins/*/bin/goenv-latest goenv-latest | head -1)" - if [ -n "$goenv_latest" ]; then - ynh_print_info --message="\`goenv latest' command already available in \`$goenv_latest'." - pushd "${goenv_latest%/*/*}" - if git remote -v 2>/dev/null | grep "https://github.com/momo-lab/xxenv-latest.git"; then - ynh_print_info --message="Trying to update xxenv-latest with Git..." - git pull -q origin master - fi - popd - else - #ynh_print_info --message="Installing xxenv-latest with Git..." - mkdir -p "${goenv_install_dir}/plugins" - git clone -q https://github.com/momo-lab/xxenv-latest.git "${goenv_install_dir}/plugins/xxenv-latest" - fi - - # Enable caching - mkdir -p "${goenv_install_dir}/cache" - - # Create shims directory if needed - mkdir -p "${goenv_install_dir}/shims" - - # Restore /usr/local/bin in PATH - PATH=$CLEAR_PATH - - # And replace the old Go binary - test -x /usr/bin/go_goenv && mv /usr/bin/go_goenv /usr/bin/go - - # Install the requested version of Go - local final_go_version=$(goenv latest --print $go_version) - #ynh_print_info --message="Installation of Go-$final_go_version" - goenv install --skip-existing $final_go_version - - # Store go_version into the config of this app - ynh_app_setting_set --app=$YNH_APP_INSTANCE_NAME --key=go_version --value=$final_go_version - - # Cleanup Go versions - ynh_cleanup_go - - # Set environment for Go users - echo "#goenv -export GOENV_ROOT=$goenv_install_dir -export PATH=\"$goenv_install_dir/bin:$PATH\" -eval \"\$(goenv init -)\" -#goenv" > /etc/profile.d/goenv.sh - - # Load the environment - eval "$(goenv init -)" -} - -# Remove the version of Go used by the app. -# -# This helper will also cleanup Go versions -# -# usage: ynh_remove_go -ynh_remove_go () { - local go_version=$(ynh_app_setting_get --app=$YNH_APP_INSTANCE_NAME --key=go_version) - - # Load goenv path in PATH - local CLEAR_PATH="$goenv_install_dir/bin:$PATH" - - # Remove /usr/local/bin in PATH in case of Go prior installation - PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@') - - # Remove the line for this app - ynh_app_setting_delete --app=$YNH_APP_INSTANCE_NAME --key=go_version - - # Cleanup Go versions - ynh_cleanup_go -} - -# Remove no more needed versions of Go used by the app. -# -# This helper will check what Go version are no more required, -# and uninstall them -# If no app uses Go, goenv will be also removed. -# -# usage: ynh_cleanup_go -ynh_cleanup_go () { - - # List required Go versions - local installed_apps=$(yunohost app list --output-as json --quiet | jq -r .apps[].id) - local required_go_versions="" - for installed_app in $installed_apps - do - local installed_app_go_version=$(ynh_app_setting_get --app=$installed_app --key="go_version") - if [[ $installed_app_go_version ]] - then - required_go_versions="${installed_app_go_version}\n${required_go_versions}" - fi - done - - # Remove no more needed Go versions - local installed_go_versions=$(goenv versions --bare --skip-aliases | grep -Ev '/') - for installed_go_version in $installed_go_versions - do - if ! `echo ${required_go_versions} | grep "${installed_go_version}" 1>/dev/null 2>&1` - then - #ynh_print_info --message="Removing of Go-$installed_go_version" - $goenv_install_dir/bin/goenv uninstall --force $installed_go_version - fi - done - - # If none Go version is required - if [[ ! $required_go_versions ]] - then - # Remove goenv environment configuration - #ynh_print_info --message="Removing of goenv" - ynh_secure_remove --file="$goenv_install_dir" - ynh_secure_remove --file="/etc/profile.d/goenv.sh" - fi -} From d9c8cbbb7d70763ac08d5b6da7cf10d9b8a6e325 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 9 Apr 2024 16:30:23 +0000 Subject: [PATCH 87/97] Auto-update READMEs --- ALL_README.md | 2 +- README.md | 2 +- README_eu.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 README_eu.md diff --git a/ALL_README.md b/ALL_README.md index 3d6c579..77b7509 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,6 @@ # All available README files by language - [Read the README in English](README.md) +- [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) -- [Leggi il “README” in italiano](README_it.md) diff --git a/README.md b/README.md index f602e51..b0fa816 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It shall NOT be edited by hand. [![Install Galène with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) -*[Read this README is other languages.](./ALL_README.md)* +*[Read this README in other languages.](./ALL_README.md)* > *This package allows you to install Galène quickly and simply on a YunoHost server.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..d2b2863 --- /dev/null +++ b/README_eu.md @@ -0,0 +1,63 @@ + + +# Galène YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) + +[![Instalatu Galène YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek Galène YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +Galène is a videoconference server (an “SFU”) that is easy to deploy and that requires moderate server resources. It was originally designed for lectures and conferences (where a single speaker streams audio and video to hundreds or thousands of users), but later evolved to be useful for student practicals (where users are divided into many small groups), and meetings (where a dozen users interact with each other). + +### Client features: + +- multiparty audio and video +- text chat +- reasonably good support for mobile (Android and iPhone/iPad) +- screen and window sharing, including sharing multiple windows simultaneously (not on mobile) +- streaming video and audio from disk +- activity detection +- LDAP support +- invite user +- Command-line client for Galene file transfer + + +**Paketatutako bertsioa:** 0.8.1~ynh2 + +**Demoa:** + +## Pantaila-argazkiak + +![Galène(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Erabiltzaileen dokumentazio ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/galene_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug +edo +sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** From c6bac8e68e781cba38da2d5b0c2bc6ab324e71b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:33:34 +0200 Subject: [PATCH 88/97] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index d68447e..82a0b85 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.8.1~ynh2" +version = "0.8.2~ynh1" maintainers = ["eric_G"] @@ -67,8 +67,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/jech/galene/archive/refs/tags/galene-0.8.1.tar.gz" - sha256 = "fc06a3c7a0d51642f056384fcda1466d4eb333128ca5efff133fa7610f2fd666" + url = "https://github.com/jech/galene/archive/refs/tags/galene-0.8.2.tar.gz" + sha256 = "d97fa47b6f301396d4ef220cd648099e67471c00793872744e41b908bf898731" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] From d75ceed3671d764cb6f10b34060db453435533c3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 15 Apr 2024 08:33:40 +0000 Subject: [PATCH 89/97] Auto-update READMEs --- ALL_README.md | 1 + README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 README_zh_Hans.md diff --git a/ALL_README.md b/ALL_README.md index 77b7509..a01b345 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -4,3 +4,4 @@ - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index b0fa816..c931b48 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Shipped version:** 0.8.1~ynh2 +**Shipped version:** 0.8.2~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index d2b2863..66850bc 100644 --- a/README_eu.md +++ b/README_eu.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Paketatutako bertsioa:** 0.8.1~ynh2 +**Paketatutako bertsioa:** 0.8.2~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 159fda5..2a7ede9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - Client en ligne de commande pour le transfert de fichiers Galene -**Version incluse :** 0.8.1~ynh2 +**Version incluse :** 0.8.2~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index 48c9a1a..dd5c59c 100644 --- a/README_gl.md +++ b/README_gl.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Versión proporcionada:** 0.8.1~ynh2 +**Versión proporcionada:** 0.8.2~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..8c3fdc3 --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,63 @@ + + +# YunoHost 的 Galène + +[![集成程度](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![工作状态](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) + +[![使用 YunoHost 安装 Galène](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Galène。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +Galène is a videoconference server (an “SFU”) that is easy to deploy and that requires moderate server resources. It was originally designed for lectures and conferences (where a single speaker streams audio and video to hundreds or thousands of users), but later evolved to be useful for student practicals (where users are divided into many small groups), and meetings (where a dozen users interact with each other). + +### Client features: + +- multiparty audio and video +- text chat +- reasonably good support for mobile (Android and iPhone/iPad) +- screen and window sharing, including sharing multiple windows simultaneously (not on mobile) +- streaming video and audio from disk +- activity detection +- LDAP support +- invite user +- Command-line client for Galene file transfer + + +**分发版本:** 0.8.2~ynh1 + +**演示:** + +## 截图 + +![Galène 的截图](./doc/screenshots/screenshot.png) + +## 文档与资源 + +- 官方应用网站: +- 官方用户文档: +- 官方管理文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/galene_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug +或 +sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From 2cda97fe74b000b700f330c65dc2405786837fa3 Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:11:56 +0200 Subject: [PATCH 90/97] [autopatch] TEST BEFORE MERGE ynh_setup_source --full_replace=1 (#129) * Testing (#128) * Stop auto updating for now * Update manifest.json * Update ynh_install_go * Update ynh_install_go * Update ldap.src * Add feature to readme * Auto-update README * 0.6.2 * Auto-update README * cleaning * Auto-update README * Auto-update README * Update systemd.service * Upgrade auto-updater (#106) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean * Galene v2 (#104) * v2 * Fix * Auto-update README * Fix * fix * Fix * Fix * Auto-update README * Fix * Auto-update README * Fix * Auto-update README * Update tests.toml * Fix * Update manifest.toml * Update manifest.toml * Update tests.toml * Update tests.toml * Update tests.toml * Update tests.toml * Update tests.toml * Update restore * Update install * Update upgrade * Update manifest.toml * Update ynh_install_go * Update change_url * Auto-update README * Update change_url * fix * Update change_url * Update change_url * Update manifest.toml * fix * Update systemd.service * Update systemd.service * Update systemd.service * Update systemd.service * Update systemd.service * Update upgrade * Update upgrade * Update install * Update upgrade * Update manifest.toml --------- Co-authored-by: yunohost-bot * Update manifest.toml * Auto-update README * Update manifest.toml * Fix * Update DESCRIPTION.md * Auto-update README * Create POST_INSTALL.md * Auto-update README * fix * Auto-update README * Create POST_INSTALL_fr.md * Fix * Fix * Update change_url * Update manifest.toml * Delete app.src * fix * Update manifest.toml * cleaning * Update manifest.toml * Update manifest.toml * Update manifest.toml * Update manifest.toml * Update manifest.toml * Update install * Password generator (#109) * fix * Update install * Update install * Update install * Update install * Update manifest.toml * Update install * Update manifest.toml * fix * Update install * fix * fix * Update config.json * fix * Update manifest.toml * Auto-update README * Update upgrade * Update upgrade * fix * Update restore * Update _common.sh * hash password * autoupdate * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * 0.7.0 * Auto-update README * Update ldap.service * add invite user * Auto-update README * add sudirs * Update config.json * Update config.json * add description * Auto-update README * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update remove * Update manifest.toml * Auto-update README * Upgrade sources (#120) * Upgrade sources (#121) * Update manifest.toml * Update manifest.toml * Update manifest.toml * Auto-update README * Upgrade sources (#123) * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update manifest.toml * Static (#127) * Update systemd.service * cleaning * Update upgrade * Update manifest.toml --------- Co-authored-by: yunohost-bot Co-authored-by: YunoHost Bot Co-authored-by: tituspijean * [autopatch] TEST BEFORE MERGE ynh_setup_source --full_replace=1 --------- Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot Co-authored-by: YunoHost Bot Co-authored-by: tituspijean Co-authored-by: Yunohost-Bot <> --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index c460776..a4d96f6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,8 +47,8 @@ fi #================================================= ynh_script_progression --message="Upgrading source files..." --weight=2 -ynh_setup_source --dest_dir="$install_dir/build" -ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" +ynh_setup_source --dest_dir="$install_dir/build" --full_replace=1 +ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap" --full_replace=1 mkdir -p "$install_dir/live/data" mkdir -p "$install_dir/live_ldap/data" From c6cb648adc525530ab45485d401791dc4746c7f6 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Thu, 9 May 2024 09:36:39 +0200 Subject: [PATCH 91/97] Upgrade sources (#132) * Upgrade sources * Auto-update READMEs --- README_zh_Hans.md | 2 +- manifest.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 8c3fdc3..57b4083 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,7 +3,7 @@ 请勿手动编辑。 --> -# YunoHost 的 Galène +# YunoHost 上的 Galène [![集成程度](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![工作状态](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) diff --git a/manifest.toml b/manifest.toml index 82a0b85..db2c2d8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -72,8 +72,8 @@ ram.runtime = "50M" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] - url = "https://github.com/jech/galene-ldap/archive/4ca51804f43b2f13a10397c5f84c32395a3f17ca.tar.gz" - sha256 = "3db8594b2c09b175adde5dc202110fc095d556def17dfebc21462a5a9b386644" + url = "https://github.com/jech/galene-ldap/archive/c6b6f3859927a3cb8bf36b6e39614dff79275dd5.tar.gz" + sha256 = "5f261fde39694b2dc4412c9abaf8f2c269119ccdaea5fd0a6f69bd00a42885f3" autoupdate.upstream = "https://github.com/jech/galene-ldap" autoupdate.strategy = "latest_github_commit" From ec1dfe7e9741b78ef9ee824548418f5a01cabf51 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 May 2024 20:59:49 +0200 Subject: [PATCH 92/97] =?UTF-8?q?Gal=C3=A8ne=200.9=20(#133)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix * Update groupname.json * Update manifest.toml * Auto-update READMEs * use core helper * Auto-update READMEs * Update manifest.toml * Auto-update READMEs * Update tests.toml --------- Co-authored-by: yunohost-bot --- ALL_README.md | 1 + README.md | 2 +- README_es.md | 63 ++++++++++++ README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- conf/config.json | 13 ++- conf/groupname.json | 10 +- manifest.toml | 8 +- scripts/_common.sh | 238 -------------------------------------------- tests.toml | 2 +- 12 files changed, 87 insertions(+), 258 deletions(-) create mode 100644 README_es.md diff --git a/ALL_README.md b/ALL_README.md index a01b345..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README.md b/README.md index c931b48..e061aac 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Shipped version:** 0.8.2~ynh1 +**Shipped version:** 0.9~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..128a049 --- /dev/null +++ b/README_es.md @@ -0,0 +1,63 @@ + + +# Galène para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) + +[![Instalar Galène con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarGalène rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +Galène is a videoconference server (an “SFU”) that is easy to deploy and that requires moderate server resources. It was originally designed for lectures and conferences (where a single speaker streams audio and video to hundreds or thousands of users), but later evolved to be useful for student practicals (where users are divided into many small groups), and meetings (where a dozen users interact with each other). + +### Client features: + +- multiparty audio and video +- text chat +- reasonably good support for mobile (Android and iPhone/iPad) +- screen and window sharing, including sharing multiple windows simultaneously (not on mobile) +- streaming video and audio from disk +- activity detection +- LDAP support +- invite user +- Command-line client for Galene file transfer + + +**Versión actual:** 0.9~ynh1 + +**Demo:** + +## Capturas + +![Captura de Galène](./doc/screenshots/screenshot.png) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación usuario oficial: +- Documentación administrador oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/galene_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug +o +sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_eu.md b/README_eu.md index 66850bc..489efaf 100644 --- a/README_eu.md +++ b/README_eu.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Paketatutako bertsioa:** 0.8.2~ynh1 +**Paketatutako bertsioa:** 0.9~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 2a7ede9..5ae2e25 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et - Client en ligne de commande pour le transfert de fichiers Galene -**Version incluse :** 0.8.2~ynh1 +**Version incluse :** 0.9~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index dd5c59c..de8c639 100644 --- a/README_gl.md +++ b/README_gl.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**Versión proporcionada:** 0.8.2~ynh1 +**Versión proporcionada:** 0.9~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 57b4083..7ce2cb5 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th - Command-line client for Galene file transfer -**分发版本:** 0.8.2~ynh1 +**分发版本:** 0.9~ynh1 **演示:** diff --git a/conf/config.json b/conf/config.json index cde86a9..b938482 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,5 +1,10 @@ { - "canonicalHost": "__DOMAIN__", - "proxyURL": "https://__DOMAIN__", - "admin":[{"username":"__ADMIN__", "password": __PASSWORD_HASH__}] -} + "canonicalHost": "__DOMAIN__", + "proxyURL": "https://__DOMAIN__", + "users": { + "__ADMIN__": { + "permissions": "admin", + "password": "__PASSWORD_HASH__" + } + } +} \ No newline at end of file diff --git a/conf/groupname.json b/conf/groupname.json index cef3c09..9d5d4c5 100644 --- a/conf/groupname.json +++ b/conf/groupname.json @@ -1,9 +1,7 @@ -{ - "op": [{"username": "__ADMIN__", "password": __PASSWORD_HASH__}], - "presenter": [{}], - "description": "__GROUP_DESCRIPTION__", +"users": { + "__ADMIN__": {"permissions": "op", "password": "__PASSWORD_HASH__"}, + "description": "__GROUP_DESCRIPTION__", "public": true, - "allow-anonymous": true, "allow-recording": true, - "allow-subgroups": true + "auto-subgroups": true } diff --git a/manifest.toml b/manifest.toml index db2c2d8..6b3c12c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Galène" description.en = "Videoconferencing server that is easy to deploy" description.fr = "Serveur de visioconférence facile à déployer" -version = "0.8.2~ynh1" +version = "0.9~ynh1" maintainers = ["eric_G"] @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.12" architectures = "all" multi_instance = false @@ -67,8 +67,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/jech/galene/archive/refs/tags/galene-0.8.2.tar.gz" - sha256 = "d97fa47b6f301396d4ef220cd648099e67471c00793872744e41b908bf898731" + url = "https://github.com/jech/galene/archive/refs/tags/galene-0.9.tar.gz" + sha256 = "066f2b06fdbda4b8d29d3048166123dc5bc2c0f6f863cee235df82758ddbef90" autoupdate.strategy = "latest_github_tag" [resources.sources.ldap] diff --git a/scripts/_common.sh b/scripts/_common.sh index f5f821e..72acb3f 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -25,241 +25,3 @@ ynh_go_try_bash_extension() { } fi } - -goenv_install_dir="/opt/goenv" -go_version_path="$goenv_install_dir/versions" -# goenv_ROOT is the directory of goenv, it needs to be loaded as a environment variable. -export GOENV_ROOT="$goenv_install_dir" - -# Load the version of Go for an app, and set variables. -# -# ynh_use_go has to be used in any app scripts before using Go for the first time. -# This helper will provide alias and variables to use in your scripts. -# -# To use gem or Go, use the alias `ynh_gem` and `ynh_go` -# Those alias will use the correct version installed for the app -# For example: use `ynh_gem install` instead of `gem install` -# -# With `sudo` or `ynh_exec_as`, use instead the fallback variables `$ynh_gem` and `$ynh_go` -# And propagate $PATH to sudo with $ynh_go_load_path -# Exemple: `ynh_exec_as $app $ynh_go_load_path $ynh_gem install` -# -# $PATH contains the path of the requested version of Go. -# However, $PATH is duplicated into $go_path to outlast any manipulation of $PATH -# You can use the variable `$ynh_go_load_path` to quickly load your Go version -# in $PATH for an usage into a separate script. -# Exemple: $ynh_go_load_path $install_dir/script_that_use_gem.sh` -# -# -# Finally, to start a Go service with the correct version, 2 solutions -# Either the app is dependent of Go or gem, but does not called it directly. -# In such situation, you need to load PATH -# `Environment="__YNH_GO_LOAD_PATH__"` -# `ExecStart=__INSTALL_DIR__/my_app` -# You will replace __YNH_GO_LOAD_PATH__ with $ynh_go_load_path -# -# Or Go start the app directly, then you don't need to load the PATH variable -# `ExecStart=__YNH_GO__ my_app run` -# You will replace __YNH_GO__ with $ynh_go -# -# -# one other variable is also available -# - $go_path: The absolute path to Go binaries for the chosen version. -# -# usage: ynh_use_go -# -# Requires YunoHost version 3.2.2 or higher. -ynh_use_go () { - go_version=$(ynh_app_setting_get --app=$app --key=go_version) - - # Get the absolute path of this version of Go - go_path="$go_version_path/$go_version/bin" - - # Allow alias to be used into bash script - shopt -s expand_aliases - - # Create an alias for the specific version of Go and a variable as fallback - ynh_go="$go_path/go" - alias ynh_go="$ynh_go" - - # Load the path of this version of Go in $PATH - if [[ :$PATH: != *":$go_path"* ]]; then - PATH="$go_path:$PATH" - fi - # Create an alias to easily load the PATH - ynh_go_load_path="PATH=$PATH" - - # Sets the local application-specific Go version - pushd $install_dir - $goenv_install_dir/bin/goenv local $go_version - popd -} - -# Install a specific version of Go -# -# ynh_install_go will install the version of Go provided as argument by using goenv. -# -# This helper creates a /etc/profile.d/goenv.sh that configures PATH environment for goenv -# for every LOGIN user, hence your user must have a defined shell (as opposed to /usr/sbin/nologin) -# -# Don't forget to execute go-dependent command in a login environment -# (e.g. sudo --login option) -# When not possible (e.g. in systemd service definition), please use direct path -# to goenv shims (e.g. $goenv_ROOT/shims/bundle) -# -# usage: ynh_install_go --go_version=go_version -# | arg: -v, --go_version= - Version of go to install. -# -# Requires YunoHost version 3.2.2 or higher. -ynh_install_go () { - # Declare an array to define the options of this helper. - local legacy_args=v - local -A args_array=( [v]=go_version= ) - local go_version - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - - # Load goenv path in PATH - local CLEAR_PATH="$goenv_install_dir/bin:$PATH" - - # Remove /usr/local/bin in PATH in case of Go prior installation - PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@') - - # Move an existing Go binary, to avoid to block goenv - test -x /usr/bin/go && mv /usr/bin/go /usr/bin/go_goenv - - # Install or update goenv - goenv="$(command -v goenv $goenv_install_dir/bin/goenv | head -1)" - if [ -n "$goenv" ]; then - ynh_print_info --message="goenv already seems installed in \`$goenv'." - pushd "${goenv%/*/*}" - if git remote -v 2>/dev/null | grep "https://github.com/syndbg/goenv.git"; then - echo "Trying to update with git..." - git pull -q --tags origin master - cd .. - ynh_go_try_bash_extension - fi - popd - else - #ynh_print_info --message="Installing goenv with Git..." - mkdir -p $goenv_install_dir - pushd $goenv_install_dir - git init -q - git remote add -f -t master origin https://github.com/syndbg/goenv.git > /dev/null 2>&1 - git checkout -q -b master origin/master - ynh_go_try_bash_extension - goenv=$goenv_install_dir/bin/goenv - popd - fi - - goenv_latest="$(command -v "$goenv_install_dir"/plugins/*/bin/goenv-latest goenv-latest | head -1)" - if [ -n "$goenv_latest" ]; then - ynh_print_info --message="\`goenv latest' command already available in \`$goenv_latest'." - pushd "${goenv_latest%/*/*}" - if git remote -v 2>/dev/null | grep "https://github.com/momo-lab/xxenv-latest.git"; then - ynh_print_info --message="Trying to update xxenv-latest with Git..." - git pull -q origin master - fi - popd - else - #ynh_print_info --message="Installing xxenv-latest with Git..." - mkdir -p "${goenv_install_dir}/plugins" - git clone -q https://github.com/momo-lab/xxenv-latest.git "${goenv_install_dir}/plugins/xxenv-latest" - fi - - # Enable caching - mkdir -p "${goenv_install_dir}/cache" - - # Create shims directory if needed - mkdir -p "${goenv_install_dir}/shims" - - # Restore /usr/local/bin in PATH - PATH=$CLEAR_PATH - - # And replace the old Go binary - test -x /usr/bin/go_goenv && mv /usr/bin/go_goenv /usr/bin/go - - # Install the requested version of Go - local final_go_version=$(goenv latest --print $go_version) - #ynh_print_info --message="Installation of Go-$final_go_version" - goenv install --skip-existing $final_go_version - - # Store go_version into the config of this app - ynh_app_setting_set --app=$YNH_APP_INSTANCE_NAME --key=go_version --value=$final_go_version - - # Cleanup Go versions - ynh_cleanup_go - - # Set environment for Go users - echo "#goenv -export GOENV_ROOT=$goenv_install_dir -export PATH=\"$goenv_install_dir/bin:$PATH\" -eval \"\$(goenv init -)\" -#goenv" > /etc/profile.d/goenv.sh - - # Load the environment - eval "$(goenv init -)" -} - -# Remove the version of Go used by the app. -# -# This helper will also cleanup Go versions -# -# usage: ynh_remove_go -ynh_remove_go () { - local go_version=$(ynh_app_setting_get --app=$YNH_APP_INSTANCE_NAME --key=go_version) - - # Load goenv path in PATH - local CLEAR_PATH="$goenv_install_dir/bin:$PATH" - - # Remove /usr/local/bin in PATH in case of Go prior installation - PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@') - - # Remove the line for this app - ynh_app_setting_delete --app=$YNH_APP_INSTANCE_NAME --key=go_version - - # Cleanup Go versions - ynh_cleanup_go -} - -# Remove no more needed versions of Go used by the app. -# -# This helper will check what Go version are no more required, -# and uninstall them -# If no app uses Go, goenv will be also removed. -# -# usage: ynh_cleanup_go -ynh_cleanup_go () { - - # List required Go versions - local installed_apps=$(yunohost app list --output-as json --quiet | jq -r .apps[].id) - local required_go_versions="" - for installed_app in $installed_apps - do - local installed_app_go_version=$(ynh_app_setting_get --app=$installed_app --key="go_version") - if [[ $installed_app_go_version ]] - then - required_go_versions="${installed_app_go_version}\n${required_go_versions}" - fi - done - - # Remove no more needed Go versions - local installed_go_versions=$(goenv versions --bare --skip-aliases | grep -Ev '/') - for installed_go_version in $installed_go_versions - do - if ! `echo ${required_go_versions} | grep "${installed_go_version}" 1>/dev/null 2>&1` - then - #ynh_print_info --message="Removing of Go-$installed_go_version" - $goenv_install_dir/bin/goenv uninstall --force $installed_go_version - fi - done - - # If none Go version is required - if [[ ! $required_go_versions ]] - then - # Remove goenv environment configuration - #ynh_print_info --message="Removing of goenv" - ynh_secure_remove --file="$goenv_install_dir" - ynh_secure_remove --file="/etc/profile.d/goenv.sh" - fi -} diff --git a/tests.toml b/tests.toml index 8626895..8e40990 100644 --- a/tests.toml +++ b/tests.toml @@ -19,5 +19,5 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.212f4439.name = "Upgrade from 0.6.1~ynh2" + test_upgrade_from.a8bb33c7.name = "Upgrade from 0.8.2~ynh1" \ No newline at end of file From a4449be1ba5697ceb0dc866db2439fa8754fea0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 May 2024 21:21:13 +0200 Subject: [PATCH 93/97] Update change_url --- scripts/change_url | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 46d6200..8039c11 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -48,17 +48,17 @@ chmod 400 "$install_dir/live/data/config.json" chown $app:$app "$install_dir/live/data/config.json" # Configure Galene LDAP -#ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" +#ynh_add_config --template="galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" #chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" #chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" # Create a group name config -#ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" +#ynh_add_config --template="groupname.json" --destination="$data_dir/groups/$group_name.json" #chmod 400 "$data_dir/groups/$group_name.json" #chown $app:$app "$data_dir/groups/$group_name.json" # Create a group name authenticated on LDAP -ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" +ynh_add_config --template="groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" chmod 400 "$data_dir/groups/YunoHost_Users.json" chown $app:$app "$data_dir/groups/YunoHost_Users.json" From 3ee81d4803f4898c3adee151f8bb3a4af2e234ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 May 2024 21:21:28 +0200 Subject: [PATCH 94/97] Update change_url --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index 8039c11..af6eb2d 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -43,7 +43,7 @@ ynh_script_progression --message="Updating a configuration file..." --weight=2 domain="$new_domain" # Configure Galène -ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" +ynh_add_config --template="config.json" --destination="$install_dir/live/data/config.json" chmod 400 "$install_dir/live/data/config.json" chown $app:$app "$install_dir/live/data/config.json" From 5820e7bbeb301cb4fb7a09f9f7f4e4662975467d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 May 2024 21:46:01 +0200 Subject: [PATCH 95/97] cleaning --- scripts/_common.sh | 8 -------- scripts/backup | 6 +----- scripts/install | 18 +++--------------- scripts/restore | 4 ---- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 72acb3f..f122fe2 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -17,11 +17,3 @@ go_version=1.20 #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -ynh_go_try_bash_extension() { - if [ -x src/configure ]; then - src/configure && make -C src || { - ynh_print_info --message="Optional bash extension failed to build, but things will still work normally." - } - fi -} diff --git a/scripts/backup b/scripts/backup index 2696784..c2cadee 100755 --- a/scripts/backup +++ b/scripts/backup @@ -28,15 +28,11 @@ ynh_backup --src_path="$install_dir" ynh_backup --src_path="$data_dir" --is_big #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/systemd/system/${app}_ldap.service" diff --git a/scripts/install b/scripts/install index 6d750bd..b0ea608 100755 --- a/scripts/install +++ b/scripts/install @@ -44,14 +44,6 @@ ynh_replace_string --match_string="
Galène
" - chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # SPECIFIC SETUP #================================================= @@ -120,17 +112,13 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1 public_ip4="$(curl -s ip.yunohost.org)" || true +# Create a dedicated NGINX config +ynh_add_nginx_config + # Create a dedicated systemd config ynh_add_systemd_config ynh_add_systemd_config --service=${app}_ldap --template="ldap.service" -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 - yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$port_turn" yunohost service add ${app}_ldap --description="LDAP integration for the videoconferencing server" diff --git a/scripts/restore b/scripts/restore index 7296baa..9dbd5d9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -27,10 +27,6 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1 ynh_restore_file --origin_path="$data_dir" --not_mandatory -mkdir -p $data_dir/{groups,recordings} - -chmod 750 "$data_dir" -chmod -R o-rwx "$data_dir" chown -R $app:www-data "$data_dir" #================================================= From 9499a577fd0afdcffaf54556ab69f75cbbb6242e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 May 2024 21:46:54 +0200 Subject: [PATCH 96/97] cleaning --- scripts/install | 4 ++-- scripts/upgrade | 22 +++++----------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/scripts/install b/scripts/install index b0ea608..0a2fcf1 100755 --- a/scripts/install +++ b/scripts/install @@ -106,9 +106,9 @@ chmod 400 "$data_dir/groups/YunoHost_Users.json" chown $app:$app "$data_dir/groups/YunoHost_Users.json" #================================================= -# SETUP SYSTEMD +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 public_ip4="$(curl -s ip.yunohost.org)" || true diff --git a/scripts/upgrade b/scripts/upgrade index a4d96f6..5bf9c01 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,14 +60,6 @@ ynh_replace_string --match_string="
Galène
" - chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=3 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # SPECIFIC UPGRADE #================================================= @@ -133,23 +125,19 @@ chmod 400 "$data_dir/groups/YunoHost_Users.json" chown $app:$app "$data_dir/groups/YunoHost_Users.json" #================================================= -# SETUP SYSTEMD +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 public_ip4="$(curl -s ip.yunohost.org)" || true +# Create a dedicated NGINX config +ynh_add_nginx_config + # Create a dedicated systemd config ynh_add_systemd_config ynh_add_systemd_config --service=${app}_ldap --template="ldap.service" -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Videoconferencing server" --needs_exposed_ports="$port_turn" yunohost service add ${app}_ldap --description="LDAP integration for the videoconferencing server" From 86e354064c70b2190d5819378bd7e6d2847bdeee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:30:19 +0200 Subject: [PATCH 97/97] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 6b3c12c..d290b4e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ userdoc = "https://galene.org/faq.html" code = "https://github.com/jech/galene" [integration] -yunohost = ">= 11.2.12" +yunohost = ">= 11.2.14" architectures = "all" multi_instance = false