From 96494729d7f641277b790f22beec14333213a0de Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 9 Mar 2024 18:54:23 +0100 Subject: [PATCH 1/4] Testing (#126) * 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 --------- Co-authored-by: yunohost-bot Co-authored-by: YunoHost Bot Co-authored-by: tituspijean --- 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 5ff499146546266a6771900eae7904c0c0387556 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:27:27 +0100 Subject: [PATCH 2/4] 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 --- 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 1298020f822490b2b1885266979f7b619b56472c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 29 Mar 2024 07:03:53 +0100 Subject: [PATCH 3/4] Auto-update README --- ALL_README.md | 6 +++++ README.md | 32 +++++++++++++------------- README_fr.md | 34 +++++++++++++-------------- README_gl.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ README_it.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 165 insertions(+), 33 deletions(-) create mode 100644 ALL_README.md create mode 100644 README_gl.md create mode 100644 README_it.md diff --git a/ALL_README.md b/ALL_README.md new file mode 100644 index 0000000..3d6c579 --- /dev/null +++ b/ALL_README.md @@ -0,0 +1,6 @@ +# All available README files by language + +- [Read the README in English](README.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 32ddbf9..f602e51 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -9,10 +9,10 @@ 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) -*[Lire ce readme en français.](./README_fr.md)* +*[Read this README is 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.* +> *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.* ## Overview @@ -31,9 +31,9 @@ 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~ynh2 +**Shipped version:** 0.8.1~ynh2 -**Demo:** https://galene.org:8443/ +**Demo:** ## Screenshots @@ -41,23 +41,23 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th ## Documentation and resources -* Official app website: -* Official user documentation: -* Official admin documentation: -* Upstream app code repository: -* YunoHost Store: -* Report a bug: +- Official app website: +- Official user documentation: +- Official admin documentation: +- Upstream app code repository: +- YunoHost Store: +- Report a bug: ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/galene_ynh/tree/testing). +Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/galene_ynh/tree/testing). -To try the testing branch, please proceed like that. +To try the `testing` branch, please proceed like that: -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug or sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug ``` -**More info regarding app packaging:** \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 8be747e..159fda5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,6 +1,6 @@ # Galène pour YunoHost @@ -9,10 +9,10 @@ It shall NOT be edited by hand. [![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)* +*[Lire le README dans d'autres langues.](./ALL_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, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* ## Vue d’ensemble @@ -31,9 +31,9 @@ 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~ynh2 +**Version incluse :** 0.8.1~ynh2 -**Démo :** https://galene.org:8443/ +**Démo :** ## Captures d’écran @@ -41,23 +41,23 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et ## Documentations et ressources -* Site officiel de l’app : -* Documentation officielle utilisateur : -* Documentation officielle de l’admin : -* Dépôt de code officiel de l’app : -* YunoHost Store: -* Signaler un bug : +- Site officiel de l’app : +- Documentation officielle utilisateur : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : ## Informations pour les développeurs -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/galene_ynh/tree/testing). +Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/galene_ynh/tree/testing). -Pour essayer la branche testing, procédez comme suit. +Pour essayer la branche `testing`, procédez comme suit : -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug 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 :** \ No newline at end of file +**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..48c9a1a --- /dev/null +++ b/README_gl.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 de funcionamento](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) + +[![Instalar Galène con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar Galène de xeito rápido e doado nun servidor YunoHost.* +> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* + +## Vista xeral + +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 proporcionada:** 0.8.1~ynh2 + +**Demo:** + +## Capturas de pantalla + +![Captura de pantalla de Galène](./doc/screenshots/screenshot.png) + +## Documentación e recursos + +- Web oficial da app: +- Documentación oficial para usuarias: +- Documentación oficial para admin: +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/galene_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug +ou +sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** diff --git a/README_it.md b/README_it.md new file mode 100644 index 0000000..e769ec7 --- /dev/null +++ b/README_it.md @@ -0,0 +1,63 @@ + + +# Galène per YunoHost + +[![Livello di integrazione](https://dash.yunohost.org/integration/galene.svg)](https://dash.yunohost.org/appci/app/galene) ![Stato di funzionamento](https://ci-apps.yunohost.org/ci/badges/galene.status.svg) ![Stato di manutenzione](https://ci-apps.yunohost.org/ci/badges/galene.maintain.svg) + +[![Installa Galène con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galene) + +*[Leggi questo README in altre lingue.](./ALL_README.md)* + +> *Questo pacchetto ti permette di installare Galène su un server YunoHost in modo semplice e veloce.* +> *Se non hai YunoHost, consulta [la guida](https://yunohost.org/install) per imparare a installarlo.* + +## Panoramica + +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 + + +**Versione pubblicata:** 0.8.1~ynh2 + +**Prova:** + +## Screenshot + +![Screenshot di Galène](./doc/screenshots/screenshot.png) + +## Documentazione e risorse + +- Sito web ufficiale dell’app: +- Documentazione ufficiale per gli utenti: +- Documentazione ufficiale per gli amministratori: +- Repository upstream del codice dell’app: +- Store di YunoHost: +- Segnala un problema: + +## Informazioni per sviluppatori + +Si prega di inviare la tua pull request alla [branch di `testing`](https://github.com/YunoHost-Apps/galene_ynh/tree/testing). + +Per provare la branch di `testing`, si prega di procedere in questo modo: + +```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 +``` + +**Maggiori informazioni riguardo il pacchetto di quest’app:** From d9c8cbbb7d70763ac08d5b6da7cf10d9b8a6e325 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 9 Apr 2024 16:30:23 +0000 Subject: [PATCH 4/4] 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:**