From cef229f925be8b463b02b2c725af4b6ac4268657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 15:04:43 +0200 Subject: [PATCH 01/14] fix --- tests.toml | 8 +++++++ tests.toml.example | 55 ---------------------------------------------- 2 files changed, 8 insertions(+), 55 deletions(-) create mode 100644 tests.toml delete mode 100644 tests.toml.example diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..f4b67ff --- /dev/null +++ b/tests.toml @@ -0,0 +1,8 @@ +test_format = 1.0 + +[default] + + # ------------ + # Tests to run + # ------------ + diff --git a/tests.toml.example b/tests.toml.example deleted file mode 100644 index 3a732e4..0000000 --- a/tests.toml.example +++ /dev/null @@ -1,55 +0,0 @@ -test_format = 1.0 - -[default] - - # ------------ - # Tests to run - # ------------ - - # NB: the tests to run are automatically deduced by the CI script according to the - # content of the app's manifest. The declarations below allow to customize which - # tests are ran, possibly add special test suite to test special args, or - # declare which commits to test upgrade from. - # - # You can also decide (though this is discouraged!) to ban/ignore some tests, - - exclude = ["install.private", "install.multi"] # The test IDs to be used in only/exclude statements are: install.root, install.subdir, install.nourl, install.multi, backup_restore, upgrade, upgrade.someCommitId change_url - # NB: you should NOT need this except if you really have a good reason... - - # For special usecases, sometimes you need to setup other things on the machine - # prior to installing the app (such as installing another app) - # (Remove this key entirely if not needed) - preinstall = """ - sudo yunohost app install foobar - sudo yunohost user list - """ - - # ------------------------------- - # Default args to use for install - # ------------------------------- - - # By default, the CI will automagically fill the 'standard' args - # such as domain, path, admin, is_public and password with relevant values - # and also install args with a "default" provided in the manifest.. - # It should only make sense to declare custom args here for args with no default values - - args.language = "fr_FR" # NB: you should NOT need those lines unless for custom questions with no obvious/default value - args.multisite = 0 - - # ------------------------------- - # Commits to test upgrade from - # ------------------------------- - - test_upgrade_from.00a1a6e7.name = "Upgrade from 5.4" - test_upgrade_from.00a1a6e7.args.foo = "bar" - - -# This is an additional test suite -[some_additional_testsuite] - - # On additional tests suites, you can decide to run only specific tests - - only = ["install.subdir"] - - args.language = "en_GB" - args.multisite = 1 From 5cf81866d3fd7a10cbda9a81973324bb3378b77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 16:33:15 +0200 Subject: [PATCH 02/14] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b59b752..7d7da00 100755 --- a/scripts/install +++ b/scripts/install @@ -20,7 +20,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_remove_go mkdir -p "$install_dir" -git clone https://git.j3s.sh/vore "$install_dir" --quiet +ynh_exec_warn_less git clone https://git.j3s.sh/vore "$install_dir" --quiet ynh_add_config --template="../conf/index.tmpl.html" --destination="$install_dir/files/index.tmpl.html" chmod -R o-rwx "$install_dir" From e0f7c9e74681c8c983ab5728e8f4232313d735c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 16:38:53 +0200 Subject: [PATCH 03/14] Update upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index dec3d96..afb927d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,6 +7,7 @@ #================================================= source _common.sh +source ynh_install_go source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) From a534d0618db04c7f5fc2fb7d127bfa8c3efc7c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 16:38:57 +0200 Subject: [PATCH 04/14] Update remove --- scripts/remove | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/remove b/scripts/remove index 0fbc0ba..75e0fb4 100755 --- a/scripts/remove +++ b/scripts/remove @@ -7,6 +7,7 @@ #================================================= source _common.sh +source ynh_install_go source /usr/share/yunohost/helpers #================================================= From 1acd81b8ab7c54cfaf3b4e50b7041f1361f28355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 16:40:04 +0200 Subject: [PATCH 05/14] fix --- scripts/_common.sh | 249 +++++++++++++++++++++++++++++++++++++++++ scripts/install | 1 - scripts/remove | 1 - scripts/upgrade | 1 - scripts/ynh_install_go | 247 ---------------------------------------- 5 files changed, 249 insertions(+), 250 deletions(-) delete mode 100644 scripts/ynh_install_go diff --git a/scripts/_common.sh b/scripts/_common.sh index f122fe2..b5b0121 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -17,3 +17,252 @@ go_version=1.20 #================================================= # FUTURE OFFICIAL HELPERS #================================================= + +#!/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 +} + diff --git a/scripts/install b/scripts/install index 7d7da00..2b7f8c8 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/remove b/scripts/remove index 75e0fb4..0fbc0ba 100755 --- a/scripts/remove +++ b/scripts/remove @@ -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 afb927d..dec3d96 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_install_go source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) 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 7a6dbf34c5050f5bf7c2364af3cd729bfa155d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 16:43:03 +0200 Subject: [PATCH 06/14] fix --- doc/DESCRIPTION.md | 2 -- doc/DESCRIPTION_fr.md | 9 ++++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index e4f0c92..14347c0 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -6,5 +6,3 @@ A simple, multi-tenant feed reader - minimal, simple, reliable, fast - refresh your feeds automatically - display a chronological list of feed items -- open source & free of charge forever - diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index 13f4b64..63ac67c 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1,8 @@ -Ceci est une fausse description des fonctionalités de l'app +Un lecteur de flux simple et multi-locataires + +### Client: + +- support rss et atom +- minimal, simple, fiable, rapide +- rafraîchir vos flux automatiquement +- afficher une liste chronologique des éléments du flux From 97ba15621ab1cd844099eec35bbe5fe9ef037f02 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 15 May 2023 14:43:08 +0000 Subject: [PATCH 07/14] Auto-update README --- README.md | 2 -- README_fr.md | 9 ++++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8d4512d..96a8c18 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,6 @@ A simple, multi-tenant feed reader - minimal, simple, reliable, fast - refresh your feeds automatically - display a chronological list of feed items -- open source & free of charge forever - **Shipped version:** 2023.05.15~ynh1 diff --git a/README_fr.md b/README_fr.md index 6d45f37..bea5c3e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,7 +16,14 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Ceci est une fausse description des fonctionalités de l'app +Un lecteur de flux simple et multi-locataires + +### Client: + +- support rss et atom +- minimal, simple, fiable, rapide +- rafraîchir vos flux automatiquement +- afficher une liste chronologique des éléments du flux **Version incluse :** 2023.05.15~ynh1 From e6656f7eba8b067d02bad6c7ed54a427de498bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 16:48:00 +0200 Subject: [PATCH 08/14] Update _common.sh --- scripts/_common.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b5b0121..f5f821e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -18,8 +18,6 @@ go_version=1.20 # FUTURE OFFICIAL HELPERS #================================================= -#!/bin/bash - ynh_go_try_bash_extension() { if [ -x src/configure ]; then src/configure && make -C src || { @@ -265,4 +263,3 @@ ynh_cleanup_go () { ynh_secure_remove --file="/etc/profile.d/goenv.sh" fi } - From 2fa3c9dbddc719a0138cba2b8ede07e8a6cdf16a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 16:58:33 +0200 Subject: [PATCH 09/14] Update upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index dec3d96..33de990 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,6 +29,7 @@ then ynh_use_go pushd $install_dir + git config --global --add safe.directory $install_dir git pull https://git.j3s.sh/vore "$install_dir" --quiet ynh_add_config --template="../conf/index.tmpl.html" --destination="$install_dir/files/index.tmpl.html" ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ From 4f0057ebfd460d69c23668625fa23cae60a2c9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 17:02:41 +0200 Subject: [PATCH 10/14] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index a270a2e..7d2c909 100644 --- a/manifest.toml +++ b/manifest.toml @@ -10,7 +10,7 @@ version = "2023.05.15~ynh1" maintainers = [""] [upstream] -license = "free" +license = "MIT" website = "https://git.j3s.sh/vore" demo = "https://vore.website/j3s" admindoc = "https://j3s.sh/thought/vore-a-new-rss-feed-reader.html" From 2a188fd99faf6f81429c50db6013e264782b7311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 17:06:18 +0200 Subject: [PATCH 11/14] fix --- conf/systemd.service | 2 +- manifest.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index ba92f1e..b947353 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Vore +Description=Vore: Multi-tenant feed reader After=network.target [Service] diff --git a/manifest.toml b/manifest.toml index 7d2c909..77e77e2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,7 +19,7 @@ code = "https://git.j3s.sh/vore/tree/main/" [integration] yunohost = ">= 11.1.19" architectures = "all" -multi_instance = true +multi_instance = false ldap = false sso = false disk = "50M" From 4c079c9a7dbd0cd7b5fd691f1be113a7c71c1aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 17:29:26 +0200 Subject: [PATCH 12/14] fix --- scripts/install | 1 + scripts/remove | 2 -- scripts/upgrade | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 2b7f8c8..87cfd0b 100755 --- a/scripts/install +++ b/scripts/install @@ -37,6 +37,7 @@ pushd $install_dir ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ popd +ynh_remove_go chmod +x "$install_dir/vore" #================================================= diff --git a/scripts/remove b/scripts/remove index 0fbc0ba..5db6c8a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -27,8 +27,6 @@ ynh_remove_systemd_config ynh_remove_nginx_config -ynh_remove_go - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 33de990..b9ae98d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,6 +35,8 @@ then ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ popd + ynh_remove_go + chown -R $app:www-data "$install_dir" chmod +x "$install_dir/vore" fi From f5d08919bee2e4bb83e231d821153d4f44f3fe43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 18:23:26 +0200 Subject: [PATCH 13/14] Update upgrade --- scripts/upgrade | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index b9ae98d..7b277e7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,8 +29,10 @@ then ynh_use_go pushd $install_dir - git config --global --add safe.directory $install_dir - git pull https://git.j3s.sh/vore "$install_dir" --quiet + chown -R $app:www-data "$install_dir" + git config --system --add safe.directory $install_dir + + ynh_exec_warn_less git pull https://git.j3s.sh/vore "$install_dir" --quiet ynh_add_config --template="../conf/index.tmpl.html" --destination="$install_dir/files/index.tmpl.html" ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ popd From 96518ebeead3c7741308080ef217850ad2592e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 15 May 2023 18:40:08 +0200 Subject: [PATCH 14/14] Update upgrade --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7b277e7..a27fe72 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -31,8 +31,8 @@ then pushd $install_dir chown -R $app:www-data "$install_dir" git config --system --add safe.directory $install_dir - - ynh_exec_warn_less git pull https://git.j3s.sh/vore "$install_dir" --quiet + + ynh_exec_warn_less git pull https://git.j3s.sh/vore --quiet ynh_add_config --template="../conf/index.tmpl.html" --destination="$install_dir/files/index.tmpl.html" ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/ popd