From 60009c3971a8b89b3c09c9dd35ac42e1db7639df Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 12 Nov 2021 23:35:01 +0100 Subject: [PATCH 1/5] Fix language extension version requirement in install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 3f1ecd5..3e70558 100644 --- a/scripts/install +++ b/scripts/install @@ -173,14 +173,14 @@ ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../c case $language in fr) ynh_script_progression --message="Installing French extension..." --weight=2 - ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands="require qiaeru/lang-french:^2.0.0" + ynh_exec_warn_less ynh_composer_exec --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_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands="require kakifrucht/flarum-de:^1.0.0" + ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands="require kakifrucht/flarum-de:*" activate_flarum_extension $db_name "kakifrucht-de" sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name From 588a76c27a735255c5a7bdc1bc64c9631d652ee8 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 12 Nov 2021 23:37:15 +0100 Subject: [PATCH 2/5] Ensure files belong to app's user even after Composer commands --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 8e0072c..98d5fb3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -244,6 +244,11 @@ ynh_app_setting_set $app project_version "$project_version" ynh_app_setting_set $app core_version "$core_version" ynh_app_setting_set $app ldap_version "$ldap_version" +# Set files and directories permissions +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # GENERIC FINALIZATION #================================================= From 855fbbbc6b53527ee180c35680b787e3f0c5cc6d Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 12 Nov 2021 23:38:11 +0100 Subject: [PATCH 3/5] Bump package version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index f65f256..8dca414 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Forum de nouvelle génération, simplement", "de": "Forum der nächsten Generation leicht gemacht" }, - "version": "1.1.1~ynh1", + "version": "1.1.1~ynh2", "url": "http://flarum.org/", "upstream": { "license": "MIT", From 119736eeb76ad89df69e94a76d415dfc95f68d29 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 12 Nov 2021 22:38:27 +0000 Subject: [PATCH 4/5] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b530e4..cbf8174 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Flarum is a simple discussion platform for your website. It's fast and easy to use, with all the features you need to run a successful community. -**Shipped version:** 1.1.1~ynh1 +**Shipped version:** 1.1.1~ynh2 **Demo:** https://discuss.flarum.org/d/21101-demos-come-to-flarum diff --git a/README_fr.md b/README_fr.md index 5eda6e0..4be563b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Flarum est une plate-forme de discussion simple pour votre site Web. C'est rapide et facile à utiliser, avec toutes les fonctionnalités dont vous avez besoin pour gérer une communauté. -**Version incluse :** 1.1.1~ynh1 +**Version incluse :** 1.1.1~ynh2 **Démo :** https://discuss.flarum.org/d/21101-demos-come-to-flarum From b5f921c5e4b2ed508c6154e6cbfba58355bf518d Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 12 Nov 2021 23:49:39 +0100 Subject: [PATCH 5/5] Ensure files belong to app's user even after Composer commands, in install --- scripts/install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/install b/scripts/install index 3e70558..3794626 100644 --- a/scripts/install +++ b/scripts/install @@ -187,6 +187,11 @@ case $language in ;; esac +# Set files and directories permissions +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # GENERIC FINALIZATION #=================================================