From 2ba1306ec185fa31a665cc940e71cd368affbc72 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 May 2024 21:23:52 +0200 Subject: [PATCH 1/4] Testing (#134) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * Auto-update READMEs * Update manifest.toml * Auto-update READMEs * [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 <> * Upgrade sources (#132) * Upgrade sources * Auto-update READMEs * Galène 0.9 (#133) * 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 * Update change_url * Update change_url --------- Co-authored-by: yunohost-bot Co-authored-by: YunoHost Bot Co-authored-by: tituspijean Co-authored-by: Salamandar <6552989+Salamandar@users.noreply.github.com> --- 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 | 4 +- conf/config.json | 13 ++- conf/groupname.json | 10 +- manifest.toml | 12 +-- scripts/_common.sh | 238 -------------------------------------------- scripts/change_url | 8 +- scripts/upgrade | 4 +- tests.toml | 2 +- 14 files changed, 96 insertions(+), 267 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 8c3fdc3..7ce2cb5 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) @@ -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 82a0b85..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,13 +67,13 @@ 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] - 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" 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/scripts/change_url b/scripts/change_url index 46d6200..af6eb2d 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -43,22 +43,22 @@ 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" # 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" 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" 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 dd969a02d239bf7914c0b27741cc69e962955498 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:44:05 +0200 Subject: [PATCH 2/4] Update _common.sh --- scripts/_common.sh | 8 -------- 1 file changed, 8 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 -} 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 3/4] 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 4/4] 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"