From c7398fb4b8e6e9da4738f46d530970a4577e3ac4 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 2 Mar 2021 18:02:16 +0100 Subject: [PATCH 01/16] Extension install: admin is not allowed to sudo -u --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0c1ec2c..3c10327 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Replace `vendor/extension` with the appropriate names. Read the extension docume ```bash app=flarum cd /var/www/$app +sudo su sudo -u $app php7.3 composer.phar require vendor/extension ``` From eae3c1e7b3809b01a0d3456bfb4829ee1b9cde99 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 2 Mar 2021 18:03:02 +0100 Subject: [PATCH 02/16] Extension install: wrote too fast --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c10327..d851019 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,9 @@ Replace `flarum` with your app ID in case of multiple installation. Replace `vendor/extension` with the appropriate names. Read the extension documentation if it requires additional steps. ```bash +sudo su app=flarum cd /var/www/$app -sudo su sudo -u $app php7.3 composer.phar require vendor/extension ``` From 1e61302fbc16f6e8a9f562fdf8955a860862ad51 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 18 Mar 2021 23:50:24 +0100 Subject: [PATCH 03/16] Fix linter warnings --- manifest.json | 29 ++++------------------------- scripts/install | 7 +++---- scripts/upgrade | 38 ++++++++------------------------------ 3 files changed, 15 insertions(+), 59 deletions(-) diff --git a/manifest.json b/manifest.json index 819a1ef..cb7f203 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.14~ynh2", + "version": "0.1.0.14~ynh3", "url": "http://flarum.org/", "license": "MIT", "maintainer": { @@ -15,7 +15,7 @@ "email": "tituspijean@outlook.com" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1" }, "multi_instance": true, "services": [ @@ -26,7 +26,7 @@ "arguments": { "install" : [ { - "name": "domain", + "name": "swap", "type": "display_text", "ask": { "en": "The installation will add a 1 GB swap file if your system has less than 1 GB free RAM.", @@ -36,32 +36,16 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Flarum", - "fr": "Choisissez un nom de domaine pour Flarum", - "de": "Wählen einen Domain-Namen für Flarum" - }, - "example": "example.com" - }, + "example": "example.com" { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Flarum", - "fr": "Choisissez un chemin pour Flarum", - "de": "Wählen einen Pfad für Flarum" - }, "example": "/flarum", "default": "/flarum" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose the admin user", - "fr": "Choisissez l’administrateur", - "de": "Wählen einen Administrator" - }, "example": "johndoe" }, { @@ -78,11 +62,6 @@ { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?", - "de": "Ist es eine öffentliche Applikation ?" - }, "help": { "en": "If public, it will be open to all visitors like any forum. If private, only the YunoHost server users can access it.", "fr": "Si public, le forum sera accessible à tous, comme pour tout forum. Si privé, seuls les utilisateurs du serveur YunoHost pourront y accéder." diff --git a/scripts/install b/scripts/install index fcb7dc7..ff73c95 100644 --- a/scripts/install +++ b/scripts/install @@ -58,7 +58,6 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin -ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=language --value=$language ynh_app_setting_set --app=$app --key=project_version --value=$project_version ynh_app_setting_set --app=$app --key=core_version --value=$core_version @@ -136,13 +135,13 @@ ynh_script_progression --message="Installing composer dependencies..." --weight= ynh_exec_warn_less ynh_install_composer --user=$app --phpversion="$phpversion" --workdir="$final_path" # Set Flarum version -ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require flarum/core:$core_version --prefer-lowest --no-update" +ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require flarum/core:$core_version --prefer-lowest --no-update" # Require SSOwat extension -ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require tituspijean/flarum-ext-auth-ssowat:$ssowat_version --no-update" +ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require tituspijean/flarum-ext-auth-ssowat:$ssowat_version --no-update" # Update and download dependencies -ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="update" +ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="update" #================================================= # FLARUM POST-INSTALL diff --git a/scripts/upgrade b/scripts/upgrade index a4eceed..53b0ec8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) @@ -44,15 +43,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) @@ -66,14 +56,15 @@ if [ -z "$final_path" ]; then fi # Cleaning legacy permissions -is_public=$(ynh_app_setting_get --app=$app --key=is_public) skipped_uris=$(ynh_app_setting_get --app=$app --key=skipped_uris) unprotected_uris=$(ynh_app_setting_get --app=$app --key=unprotected_uris) protected_uris=$(ynh_app_setting_get --app=$app --key=protected_uris) -# Remove is_public if exists -if [ ! -z "$is_public" ]; then - ynh_app_setting_delete --app=$app --key=is_public +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public fi # Remove skipped_uris if exists @@ -203,13 +194,13 @@ then chown -R $app:www-data $final_path # Install Composer and Flarum - ynh_install_composer --user=$app --phpversion=$phpversion --workdir=$final_path + ynh_exec_warn_less ynh_install_composer --user=$app --phpversion=$phpversion --workdir=$final_path # Perform migrations and clear cache pushd $final_path ynh_script_progression --message="Upgrading Flarum and its extensions..." --weight=1 - ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require tituspijean/flarum-ext-auth-ssowat:$ssowat_version --no-update" - ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies" + ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require tituspijean/flarum-ext-auth-ssowat:$ssowat_version --no-update" + ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies" exec_as $app php$phpversion flarum migrate exec_as $app php$phpversion flarum cache:clear popd @@ -276,19 +267,6 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions on app files chown -R $app:www-data $final_path -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission "main" --add "visitors" -fi - #================================================= # RELOAD NGINX #================================================= From 56ec85a82957836045c8bcaf78a56290c932037c Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 19 Mar 2021 00:00:09 +0100 Subject: [PATCH 04/16] Use ynh_add_config --- conf/configuration.yml | 6 +++--- scripts/install | 15 ++------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/conf/configuration.yml b/conf/configuration.yml index 6a2432f..44f1c2a 100644 --- a/conf/configuration.yml +++ b/conf/configuration.yml @@ -1,4 +1,4 @@ -baseUrl : "https://__DOMAIN__/__PATH__" +baseUrl : "https://__DOMAIN____PATH__" databaseConfiguration : host : "localhost" database : "__USER__" @@ -8,6 +8,6 @@ adminUser : username : "__ADMIN__" password : "__ADMIN_PWD__" password_confirmation : "__ADMIN_PWD__" - email : "__ADMIN_EML__" + email : "__ADMIN_MAIL__" settings : - forum_title : "__FORUM_TITLE__" + forum_title : "__TITLE__" diff --git a/scripts/install b/scripts/install index ff73c95..a22963d 100644 --- a/scripts/install +++ b/scripts/install @@ -148,19 +148,8 @@ ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --work #================================================= ynh_script_progression --message="Configuring Flarum..." --weight=2 -# Copy the configuration.yml to working directory -finalflarumconf="$final_path/configuration.yml" -cp ../conf/configuration.yml $finalflarumconf - -# Populate configuration.yml -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$finalflarumconf" -ynh_replace_string --match_string="/__PATH__" --replace_string="$path_url" --target_file="$finalflarumconf" -ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="$finalflarumconf" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$finalflarumconf" -ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$finalflarumconf" -ynh_replace_string --match_string="__ADMIN_PWD__" --replace_string="$admin_pwd" --target_file="$finalflarumconf" -ynh_replace_string --match_string="__ADMIN_EML__" --replace_string="$admin_mail" --target_file="$finalflarumconf" -ynh_replace_string --match_string="__FORUM_TITLE__" --replace_string="$title" --target_file="$finalflarumconf" +# Copy and populate configuration.yml to working directory +ynh_add_config --template="../conf/configuration.yml" --destination="$final_path/configuration.yml" # Execute post-installation pushd $final_path From 21860847ec3c9f52a509c094692b5e58345a2f65 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 19 Mar 2021 07:48:12 +0100 Subject: [PATCH 05/16] Fix broken manifest.json --- manifest.json | 1 + 1 file changed, 1 insertion(+) diff --git a/manifest.json b/manifest.json index cb7f203..e586b5f 100644 --- a/manifest.json +++ b/manifest.json @@ -37,6 +37,7 @@ "name": "domain", "type": "domain", "example": "example.com" + }, { "name": "path", "type": "path", From 3e35924e65b409efe2886bd0eaf5e64b003bbd80 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 19 Mar 2021 08:16:27 +0100 Subject: [PATCH 06/16] Escape quotes for ynh_exec_warn_less --- scripts/install | 6 +++--- scripts/upgrade | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index a22963d..b597a39 100644 --- a/scripts/install +++ b/scripts/install @@ -135,13 +135,13 @@ ynh_script_progression --message="Installing composer dependencies..." --weight= ynh_exec_warn_less ynh_install_composer --user=$app --phpversion="$phpversion" --workdir="$final_path" # Set Flarum version -ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require flarum/core:$core_version --prefer-lowest --no-update" +ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require flarum/core:$core_version --prefer-lowest --no-update\" # Require SSOwat extension -ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require tituspijean/flarum-ext-auth-ssowat:$ssowat_version --no-update" +ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require tituspijean/flarum-ext-auth-ssowat:$ssowat_version --no-update\" # Update and download dependencies -ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="update" +ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"update\" #================================================= # FLARUM POST-INSTALL diff --git a/scripts/upgrade b/scripts/upgrade index 53b0ec8..2c87852 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -199,8 +199,8 @@ then # Perform migrations and clear cache pushd $final_path ynh_script_progression --message="Upgrading Flarum and its extensions..." --weight=1 - ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require tituspijean/flarum-ext-auth-ssowat:$ssowat_version --no-update" - ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies" + ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require tituspijean/flarum-ext-auth-ssowat:$ssowat_version --no-update\" + ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies\" exec_as $app php$phpversion flarum migrate exec_as $app php$phpversion flarum cache:clear popd From 91342f4ac236130228a4cdd7f021a357ebe049ce Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 19 Mar 2021 08:43:37 +0100 Subject: [PATCH 07/16] Fix configuration file removal --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b597a39..34714ff 100644 --- a/scripts/install +++ b/scripts/install @@ -155,7 +155,7 @@ ynh_add_config --template="../conf/configuration.yml" --destination="$final_path pushd $final_path exec_as $app php$phpversion -d $final_path -d memory_limit=-1 flarum install -f configuration.yml # Delete configuration.yml as it contains sensitive data - ynh_secure_remove $finalflarumconf + ynh_secure_remove --file="$final_path/configuration.yml" popd # Email setup From f352bc53c9d2921a8d578db82ad2447978b8bac0 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 19 Mar 2021 12:45:33 +0100 Subject: [PATCH 08/16] Bump requirement to YunoHost 4.1.2 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index e586b5f..f7c0a08 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "email": "tituspijean@outlook.com" }, "requirements": { - "yunohost": ">= 4.1" + "yunohost": ">= 4.1.2" }, "multi_instance": true, "services": [ From 13e6fb2d211663cf136d113a2529fb3c148ee108 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 19 Mar 2021 12:49:06 +0100 Subject: [PATCH 09/16] Remove old permissions... removal --- scripts/upgrade | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2c87852..f9262c2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -55,11 +55,6 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi -# Cleaning legacy permissions -skipped_uris=$(ynh_app_setting_get --app=$app --key=skipped_uris) -unprotected_uris=$(ynh_app_setting_get --app=$app --key=unprotected_uris) -protected_uris=$(ynh_app_setting_get --app=$app --key=protected_uris) - # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -67,21 +62,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -# Remove skipped_uris if exists -if [ ! -z "$skipped_uris" ]; then - ynh_app_setting_delete --app=$app --key=skipped_uris -fi - -# Remove unprotected_uris if exists -if [ ! -z "$unprotected_uris" ]; then - ynh_app_setting_delete --app=$app --key=unprotected_uris -fi - -# Remove protected_uris if exists -if [ ! -z "$protected_uris" ]; then - ynh_app_setting_delete --app=$app --key=protected_uris -fi - # Remove the v before version number if [[ $old_project_version == "v*" ]]; then $old_project_version = ${old_project_version:1}; fi From 26cb5d256bf87136a6c873c2e5a5a838b585c254 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 21 Mar 2021 15:04:44 +0100 Subject: [PATCH 10/16] Ask for admin password during installation Better than assigning a random password --- manifest.json | 9 +++++++++ scripts/install | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index f7c0a08..23c0e3d 100644 --- a/manifest.json +++ b/manifest.json @@ -49,6 +49,15 @@ "type": "user", "example": "johndoe" }, + { + "name": "password", + "type": "password", + "help": { + "en": "Choose your password. It will be useful if logging in from YunoHost fails or is disrupted.", + "fr": "Choisissez votre mot de passe. Il sera utile si la connexion via YunoHost échoue ou est perturbée." + }, + "example": "Choose a password" + }, { "name": "title", "type": "string", diff --git a/scripts/install b/scripts/install index 34714ff..4732e46 100644 --- a/scripts/install +++ b/scripts/install @@ -30,11 +30,11 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN +admin_pwd=$YNH_APP_ARG_PASSWORD is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE title=$YNH_APP_ARG_TITLE -admin_pwd=$(ynh_string_random --length=8) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) app=$YNH_APP_INSTANCE_NAME From fef4982edb761fc861e0aeb5459b51a25b1da7ef Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 21 Mar 2021 15:13:11 +0100 Subject: [PATCH 11/16] Update check_process with password --- check_process | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/check_process b/check_process index 1663765..672b1e9 100644 --- a/check_process +++ b/check_process @@ -1,14 +1,18 @@ -;; flarum_ynh package check -# ; pre-install -# echo -n "Here your commands to execute in the container" -# echo ", before each installation of the app." +# See here for more information +# https://github.com/YunoHost/package_check#syntax-check_process-file + +# Move this file from check_process.default to check_process when you have filled it. + +;; Test complet ; Manifest domain="domain.tld" (DOMAIN) path="/path" (PATH) admin="john" (USER) - title="Test flarum" - language="en" + language="fr" is_public=1 (PUBLIC|public=1|private=0) + password="pass" + port="666" (PORT) + title="My forum" ; Checks pkg_linter=1 setup_sub_dir=1 @@ -17,19 +21,20 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=6c0f19d95b5a7cec8e8278173472f3bf4a1adab6 + upgrade=1 from_commit=0d30809a2903544a660635f62a25bc6057ea2f15 backup_restore=1 multi_instance=1 - # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. - # incorrect_path=1 port_already_use=0 change_url=1 -;;; Levels - # If the level 5 (Package linter) is forced to 1. Please add justifications here. - Level 5=auto ;;; Options -#Email= -#Notification=none -#;;; Upgrade options -# ; commit=46ca549825e311f4095b173e79d58a349d70d9a2 -# name=Name of this previous version -#manifest_arg=domain=DOMAIN&path=PATH&admin=USER&title=TITLE&is_public=1& +Email= +Notification=none +;;; Upgrade options + ; commit=6c0f19d95b5a7cec8e8278173472f3bf4a1adab6 + name=2020-03-18 0.1.0-beta.12~ynh1 + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&title=\"My forum\"& + ; 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=\"My forum\"& + From d4cf1decf50891739632252cc14f4aaff71ff893 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 08:03:41 +0100 Subject: [PATCH 12/16] Fix check_process --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 672b1e9..91df91f 100644 --- a/check_process +++ b/check_process @@ -33,8 +33,8 @@ Notification=none ;;; Upgrade options ; commit=6c0f19d95b5a7cec8e8278173472f3bf4a1adab6 name=2020-03-18 0.1.0-beta.12~ynh1 - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&title=\"My forum\"& + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&title=Forum& ; 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=\"My forum\"& + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&title=Forum& From c39bbc2a54ccce04c3fecb0ee02f43ad43080768 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 08:05:59 +0100 Subject: [PATCH 13/16] Silence language extension installation warnings --- scripts/install | 4 ++-- scripts/upgrade | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 4732e46..4ead117 100644 --- a/scripts/install +++ b/scripts/install @@ -178,14 +178,14 @@ ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name case $language in fr) ynh_script_progression --message="Installing French extension..." --weight=2 - ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require qiaeru/lang-french" + ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\" activate_flarum_extension $db_name "qiaeru-lang-french" sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name ;; de) ynh_script_progression --message="Installing German extension..." --weight=2 - ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require cbmainz/flarum-de" + ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\" activate_flarum_extension $db_name "cbmainz-de" sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name diff --git a/scripts/upgrade b/scripts/upgrade index f9262c2..531b61f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -204,14 +204,14 @@ fi case $language in fr) ynh_script_progression --message="Installing French extension..." --weight=2 - ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require qiaeru/lang-french" + ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\" activate_flarum_extension $db_name "qiaeru-lang-french" sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root "$sql_command" $db_name ;; de) ynh_script_progression --message="Installing German extension..." --weight=2 - ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands="require cbmainz/flarum-de" + ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\" activate_flarum_extension $db_name "cbmainz-de" sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root "$sql_command" $db_name From c084978f37c614e8d875807d04077b83bf6b8885 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 16:42:29 +0100 Subject: [PATCH 14/16] Remove old upgrade test --- check_process | 4 ---- 1 file changed, 4 deletions(-) diff --git a/check_process b/check_process index 91df91f..579209c 100644 --- a/check_process +++ b/check_process @@ -21,7 +21,6 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=6c0f19d95b5a7cec8e8278173472f3bf4a1adab6 upgrade=1 from_commit=0d30809a2903544a660635f62a25bc6057ea2f15 backup_restore=1 multi_instance=1 @@ -31,9 +30,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=6c0f19d95b5a7cec8e8278173472f3bf4a1adab6 - name=2020-03-18 0.1.0-beta.12~ynh1 - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&title=Forum& ; 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& From 49024719ee3a01bbbbd2ca0ec26d68dc745915f7 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 16:43:01 +0100 Subject: [PATCH 15/16] Fix check_process I do not actually know how to put spaces in arguments --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 579209c..c581f08 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,7 @@ is_public=1 (PUBLIC|public=1|private=0) password="pass" port="666" (PORT) - title="My forum" + title="Forum" ; Checks pkg_linter=1 setup_sub_dir=1 From 8a1976114bf0d3304b8a9e676b87ef0c516e6949 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 28 Apr 2021 02:30:23 +0200 Subject: [PATCH 16/16] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 23c0e3d..5556bda 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "email": "tituspijean@outlook.com" }, "requirements": { - "yunohost": ">= 4.1.2" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [