From 93a96b9fd37788a77de9fb4daae3232dcedad09a Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 11 May 2021 19:09:09 +0200 Subject: [PATCH 1/5] Composer helpers are now official in v4.2 --- manifest.json | 4 +- scripts/_common.sh | 1 - scripts/experimental_helpers/ynh_composer | 61 ----------------------- 3 files changed, 2 insertions(+), 64 deletions(-) delete mode 100644 scripts/experimental_helpers/ynh_composer diff --git a/manifest.json b/manifest.json index 78699a1..ea70193 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Un forum de nouvelle génération, simplement.", "de": "Forum der nächsten Generation leicht gemacht." }, - "version": "0.1.0.16~ynh2", + "version": "0.1.0.16~ynh3", "url": "http://flarum.org/", "license": "MIT", "maintainer": { @@ -15,7 +15,7 @@ "email": "tituspijean@outlook.com" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index f668ce3..264bb9b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -10,7 +10,6 @@ swap_needed=1024 YNH_PHP_VERSION="7.3" YNH_COMPOSER_VERSION="2.0.13" - extra_php_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-pdo-mysql php${YNH_PHP_VERSION}-tokenizer php${YNH_PHP_VERSION}-zip" # Version numbers diff --git a/scripts/experimental_helpers/ynh_composer b/scripts/experimental_helpers/ynh_composer deleted file mode 100644 index 37c50ed..0000000 --- a/scripts/experimental_helpers/ynh_composer +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -readonly YNH_DEFAULT_COMPOSER_VERSION=1.10.17 -# Declare the actual composer version to use. -# A packager willing to use another version of composer can override the variable into its _common.sh. -YNH_COMPOSER_VERSION=${YNH_COMPOSER_VERSION:-$YNH_DEFAULT_COMPOSER_VERSION} - -# Execute a command with Composer -# -# usage: ynh_composer_exec [--phpversion=phpversion] [--workdir=$final_path] --commands="commands" -# | arg: -v, --phpversion - PHP version to use with composer -# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. -# | arg: -c, --commands - Commands to execute. -ynh_composer_exec () { - # Declare an array to define the options of this helper. - local legacy_args=vwc - declare -Ar args_array=( [v]=phpversion= [w]=workdir= [c]=commands= ) - local phpversion - local workdir - local commands - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - workdir="${workdir:-$final_path}" - phpversion="${phpversion:-$YNH_PHP_VERSION}" - - COMPOSER_HOME="$workdir/.composer" \ - php${phpversion} "$workdir/composer.phar" $commands \ - -d "$workdir" --quiet --no-interaction -} - -# Install and initialize Composer in the given directory -# -# usage: ynh_install_composer [--phpversion=phpversion] [--workdir=$final_path] [--install_args="--optimize-autoloader"] [--composerversion=composerversion] -# | arg: -v, --phpversion - PHP version to use with composer -# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. -# | arg: -a, --install_args - Additional arguments provided to the composer install. Argument --no-dev already include -# | arg: -c, --composerversion - Composer version to install -ynh_install_composer () { - # Declare an array to define the options of this helper. - local legacy_args=vwac - declare -Ar args_array=( [v]=phpversion= [w]=workdir= [a]=install_args= [c]=composerversion=) - local phpversion - local workdir - local install_args - local composerversion - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - workdir="${workdir:-$final_path}" - phpversion="${phpversion:-$YNH_PHP_VERSION}" - install_args="${install_args:-}" - composerversion="${composerversion:-$YNH_COMPOSER_VERSION}" - - curl -sS https://getcomposer.org/installer \ - | COMPOSER_HOME="$workdir/.composer" \ - php${phpversion} -- --quiet --install-dir="$workdir" --version=$composerversion \ - || ynh_die "Unable to install Composer." - - # install dependencies - ynh_composer_exec --phpversion="${phpversion}" --workdir="$workdir" --commands="install --no-dev $install_args" \ - || ynh_die "Unable to install core dependencies with Composer." -} From ed2c6726690de5996cd538333531df0d0608e956 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 11 May 2021 21:07:33 +0200 Subject: [PATCH 2/5] Do not source removed helper --- scripts/install | 1 - scripts/upgrade | 1 - 2 files changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index d7438bb..8a49743 100644 --- a/scripts/install +++ b/scripts/install @@ -8,7 +8,6 @@ source _common.sh source experimental_helpers/ynh_exec_as -source experimental_helpers/ynh_composer source experimental_helpers/ynh_add_swap source /usr/share/yunohost/helpers diff --git a/scripts/upgrade b/scripts/upgrade index d77a2ab..f4a35c6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -8,7 +8,6 @@ source _common.sh source experimental_helpers/ynh_exec_as -source experimental_helpers/ynh_composer source experimental_helpers/ynh_add_swap source /usr/share/yunohost/helpers From 01a63158b73fb5d6d87c97a97978bfb11eb5b0f0 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 12 May 2021 10:28:43 +0200 Subject: [PATCH 3/5] Update check_process --- check_process | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check_process b/check_process index fca7121..93bc82e 100644 --- a/check_process +++ b/check_process @@ -21,7 +21,8 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=0d30809a2903544a660635f62a25bc6057ea2f15 +# upgrade=1 from_commit=0d30809a2903544a660635f62a25bc6057ea2f15 + upgrade=1 from_commit=70e962faa875070b0fcc29f45cc70e2a51de76a6 backup_restore=1 multi_instance=1 port_already_use=0 @@ -33,3 +34,6 @@ Notification=none ; commit=0d30809a2903544a660635f62a25bc6057ea2f15 name=2021-02-19 0.1.0.14~ynh2 manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&title=Forum& + ; commit=70e962faa875070b0fcc29f45cc70e2a51de76a6 + name=2021-05-06 0.1.0.16~ynh2 + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=PASSWORD&language=fr&is_public=1&title=Forum& From 86a1d61c35716fcfaf57033a5410bf953c974b62 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot Date: Thu, 13 May 2021 17:46:45 +0200 Subject: [PATCH 4/5] [autopatch] Update issue and PR templates --- .../ISSUE_TEMPLATE.md | 39 ++++++++++------- .github/ISSUE_TEMPLATE/bug_report.md | 43 ------------------- .github/PULL_REQUEST_TEMPLATE.md | 16 +++++++ pull_request_template.md | 18 -------- 4 files changed, 40 insertions(+), 76 deletions(-) rename issue_template.md => .github/ISSUE_TEMPLATE.md (51%) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 pull_request_template.md diff --git a/issue_template.md b/.github/ISSUE_TEMPLATE.md similarity index 51% rename from issue_template.md rename to .github/ISSUE_TEMPLATE.md index b31dd4b..2729a6b 100644 --- a/issue_template.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,46 +1,55 @@ --- name: Bug report -about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all. +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. --- **How to post a meaningful bug report** 1. *Read this whole template first.* 2. *Determine if you are on the right place:* - - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* - - *Otherwise, the issue may be due to Flarum itself. Refer to its documentation or repository for help.* - - *If you have a doubt, post here, we will figure it out together.* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* --- -**Describe the bug** +### Describe the bug + *A clear and concise description of what the bug is.* -**Versions** +### Context + - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* - YunoHost version: x.x.x - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* -- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* - If yes, please explain: - Using, or trying to install package version/branch: - If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* -**To Reproduce** -*Steps to reproduce the behavior.* +### Steps to reproduce + - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh - sudo yunohost app install flarum + sudo yunohost app install the_app ``` - *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If the error occurs in your browser, explain what you did:* 1. *Go to '...'* - 2. *Click on '....'* - 3. *Scroll down to '....'* + 2. *Click on '...'* + 3. *Scroll down to '...'* 4. *See error* -**Expected behavior** +### Expected behavior + *A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* -**Logs** -*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.* +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + *If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index a142225..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: Bug report -about: Create a report to help us debug - ---- - -**How to post a meaningful bug report** -1. *Read this whole template first.* -2. *Determine if you are on the right place:* - - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* - - *If the issue is about logging in and out of the forum, it is most likely due to the SSOwat extension. Please post the issue on its [repository](https://github.com/tituspijean/flarum-ext-auth-ssowat/issue).* - - *Otherwise, the issue may be due to Flarum itself. Refer to its [forum](https://discuss.flarum.org) for help.* - - *If you have a doubt, post here, we will figure it out together.* -3. *Delete the italic comments as you write over them below, and remove this guide.* ---- - -**Describe the bug** -*A clear and concise description of what the bug is.* - -**Versions** -- YunoHost version: -- Using, or trying to install package version/branch: -- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* - -**To Reproduce** -*Steps to reproduce the behavior.* -- *If you performed a command from the CLI, the command itself is enough. For example:* - ```sh - sudo yunohost app install flarum - ``` -- *If you used the webadmin, please perform the equivalent command from the CLI first.* -- *If the error occurs in your browser, explain what you did:* - 1. *Go to '...'* - 2. *Click on '....'* - 3. *Scroll down to '....'* - 4. *See error* - -**Expected behavior** -*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* - -**Logs** -*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.* -*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 6043c45..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,18 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* - - From de93da0233fe891231541941516dde777618bcb2 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 13 May 2021 21:05:32 +0200 Subject: [PATCH 5/5] Change upgrade tests in check_process --- check_process | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check_process b/check_process index 93bc82e..142c972 100644 --- a/check_process +++ b/check_process @@ -22,7 +22,8 @@ setup_public=1 upgrade=1 # upgrade=1 from_commit=0d30809a2903544a660635f62a25bc6057ea2f15 - upgrade=1 from_commit=70e962faa875070b0fcc29f45cc70e2a51de76a6 + upgrade=1 from_commit=0175b7a3b0a551e14f39c65290d194ccc71cd6ee +# upgrade=1 from_commit=70e962faa875070b0fcc29f45cc70e2a51de76a6 backup_restore=1 multi_instance=1 port_already_use=0 @@ -34,6 +35,9 @@ Notification=none ; commit=0d30809a2903544a660635f62a25bc6057ea2f15 name=2021-02-19 0.1.0.14~ynh2 manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&title=Forum& + ; commit=0175b7a3b0a551e14f39c65290d194ccc71cd6ee + name=2021-03-21 0.1.0.14~ynh3 + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=PASSWORD&language=fr&is_public=1&title=Forum& ; commit=70e962faa875070b0fcc29f45cc70e2a51de76a6 name=2021-05-06 0.1.0.16~ynh2 manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=PASSWORD&language=fr&is_public=1&title=Forum&