From bf14d3cdd81d3419291cc1574eed74bfe04816b3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 20 Feb 2023 19:40:40 +0100 Subject: [PATCH 1/6] Cleanup old actions / useless config panel stuff ... --- actions.toml.old | 38 --------- config_panel.toml | 24 ------ scripts/actions/disable_maintenance | 56 ------------- scripts/actions/reset_default_app | 115 --------------------------- scripts/actions/reset_default_system | 78 ------------------ 5 files changed, 311 deletions(-) delete mode 100644 actions.toml.old delete mode 100755 scripts/actions/disable_maintenance delete mode 100755 scripts/actions/reset_default_app delete mode 100755 scripts/actions/reset_default_system diff --git a/actions.toml.old b/actions.toml.old deleted file mode 100644 index 6a36fd7..0000000 --- a/actions.toml.old +++ /dev/null @@ -1,38 +0,0 @@ -[reset_default_nginx] -name = "Reset the NGINX config for this app." -command = "/bin/bash scripts/actions/reset_default_system nginx" -# user = "root" # optional -# cwd = "/" # optional -# accepted_return_codes = [0, 1, 2, 3] # optional -accepted_return_codes = [0] -description = "Reset the NGINX config for this app." - - -[reset_default_phpfpm] -name = "Reset the PHP-FPM config for this app." -command = "/bin/bash scripts/actions/reset_default_system phpfpm" -# user = "root" # optional -# cwd = "/" # optional -# accepted_return_codes = [0, 1, 2, 3] # optional -accepted_return_codes = [0] -description = "Reset the PHP-FPM config for this app." - - -[reset_default_app] -name = "Reset the app with a default configuration." -command = "/bin/bash scripts/actions/reset_default_app" -# user = "root" # optional -# cwd = "/" # optional -# accepted_return_codes = [0, 1, 2, 3] # optional -accepted_return_codes = [0] -description = "Reset the app to its default configuration to try to fix potential issues.
This action won't remove any data added to the app.
However, if you have modified any configuration, it will be overwritten." - - -[disable_maintenance] -name = "Disable the maintenance mode of WordPress" -command = "/bin/bash scripts/actions/disable_maintenance" -# user = "root" # optional -# cwd = "/" # optional -# accepted_return_codes = [0, 1, 2, 3] # optional -accepted_return_codes = [0] -description = "Disable the maintenance mode of WordPress if you're stuck after an upgrade" diff --git a/config_panel.toml b/config_panel.toml index 87940cc..2785481 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -11,30 +11,6 @@ name = "WordPress configuration" type = "boolean" default = "0" - [main.overwrite_files] - name = "Overwriting config files" - - [main.overwrite_files.overwrite_nginx] - ask = "Overwrite the NGINX config file?" - type = "boolean" - default = true - help = "If the file is overwritten, a backup will be created." - - [main.overwrite_files.overwrite_phpfpm] - ask = "Overwrite the PHP-FPM config file?" - type = "boolean" - default = true - help = "If the file is overwritten, a backup will be created." - - [main.global_config] - name = "Global configuration" - - [main.global_config.admin_mail_html] - ask = "Send HTML email to admin?" - type = "boolean" - default = true - help = "Allow app scripts to send HTML mails instead of plain text." - [main.php_fpm_config] name = "PHP-FPM configuration" diff --git a/scripts/actions/disable_maintenance b/scripts/actions/disable_maintenance deleted file mode 100755 index 03dd196..0000000 --- a/scripts/actions/disable_maintenance +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source scripts/_common.sh -source /usr/share/yunohost/helpers - -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -app=${YNH_APP_INSTANCE_NAME} - -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - -#================================================= -# CHECK IF ARGUMENTS ARE CORRECT -#================================================= - -#================================================= -# CHECK IF AN ACTION HAS TO BE DONE -#================================================= - -# Check the current status of the maintenance mode - -if [ ! -e "$final_path/.maintenance" ] -then - ynh_die --message="WordPress isn't currently under maintenance." --ret_code=0 -fi - -#================================================= -# SPECIFIC ACTION -#================================================= -# DISABLE THE MAINTENANCE MODE -#================================================= - -ynh_script_progression --message="Disabling maintenance mode..." - -ynh_secure_remove --file="$final_path/.maintenance" - -#================================================= -# END OF SCRIPT -#================================================= - -ynh_script_progression --message="Execution completed" --last diff --git a/scripts/actions/reset_default_app b/scripts/actions/reset_default_app deleted file mode 100755 index b7e8f70..0000000 --- a/scripts/actions/reset_default_app +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source scripts/_common.sh -source /usr/share/yunohost/helpers - -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - -#================================================= -# SPECIFIC ACTION -#================================================= -# ACTIVATE MAINTENANCE MODE -#================================================= -ynh_script_progression --message="Activating maintenance mode..." - -ynh_maintenance_mode_ON - -#================================================= -# NGINX CONFIGURATION -#================================================= - -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated nginx config -yunohost app action run $app reset_default_nginx - -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - -#================================================= -# PHP-FPM CONFIGURATION -#================================================= - -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 - -# Create a dedicated php-fpm config -yunohost app action run $app reset_default_phpfpm - -#================================================= -# CREATE A CRON TASK FOR AUTOMATIC UPDATE -#================================================= - -echo "# Reach everyday wp-cron.php to trig the internal WordPress cron. -0 3 * * * $app php$phpversion $final_path/wp-cron.php" > /etc/cron.d/$app - -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -# Files have to be own by the user of wordpress. To allow upgrade from the app. -chown -R $app: $final_path -# Except the file config wp-config.php -chown root:$app $final_path/wp-config.php - -# Reset permissions -find $final_path/ -type f -print0 | xargs -0 chmod 0644 -find $final_path/ -type d -print0 | xargs -0 chmod 0755 - -# Remove permissions for others -chmod 640 $final_path/wp-config.php - -#================================================= -# UPGRADE FAIL2BAN -#================================================= -ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=5 - -# Create a dedicated fail2ban config -ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="PHP message: Leed: wrong login for .* client: " --max_retry=5 - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." - -ynh_systemd_action --service_name=nginx --action=reload - -#================================================= -# DEACTIVE MAINTENANCE MODE -#================================================= -ynh_script_progression --message="Disabling maintenance mode..." - -ynh_maintenance_mode_OFF - -#================================================= -# END OF SCRIPT -#================================================= - -ynh_script_progression --message="Execution completed" --last diff --git a/scripts/actions/reset_default_system b/scripts/actions/reset_default_system deleted file mode 100755 index 9122755..0000000 --- a/scripts/actions/reset_default_system +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source scripts/_common.sh -source /usr/share/yunohost/helpers - -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -app=$YNH_APP_INSTANCE_NAME - -type=$1 - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - -multisite=$(ynh_app_setting_get --app=$app --key=multisite) - -#================================================= -# SPECIFIC ACTION -#================================================= -# RESET THE CONFIG FILE -#================================================= - -if [ $type == nginx ]; then - name=Nginx -elif [ $type == phpfpm ]; then - name=PHP-FPM -else - ynh_die --message="The type $type is not recognized" -fi - -ynh_script_progression --message="Resetting the specific configuration of $name for the app $app..." --weight=3 - -if [ $type == nginx ] -then - (cd scripts; ynh_add_nginx_config) - - if [ $multisite -eq 1 ] - then - ynh_replace_string --match_string="#--MULTISITE--" --replace_string="" --target_file=/etc/nginx/conf.d/$domain.d/$app.conf - - ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf" - - ynh_systemd_action --service_name=nginx --action=reload - fi - -elif [ $type == phpfpm ] -then - # If the app is private, set the usage to low, otherwise to high. - if [ $(ynh_app_setting_get --app=$app --key=is_public) -eq 0 ] - then - usage=low - else - usage=high - fi - (cd scripts; ynh_add_fpm_config --usage=$usage --footprint=medium) -fi - -#================================================= -# END OF SCRIPT -#================================================= - -ynh_script_progression --message="Execution completed" --last From 64ec144cc7092f8140db0c013b81fabc40fa2417 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 20 Feb 2023 18:43:06 +0000 Subject: [PATCH 2/6] Auto-update README --- README.md | 3 ++- README_fr.md | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index bc39f16..804aed3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # WordPress for YunoHost -[![Integration level](https://dash.yunohost.org/integration/wordpress.svg)](https://dash.yunohost.org/appci/app/wordpress) ![Working status](https://ci-apps.yunohost.org/ci/badges/wordpress.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/wordpress.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/wordpress.svg)](https://dash.yunohost.org/appci/app/wordpress) ![Working status](https://ci-apps.yunohost.org/ci/badges/wordpress.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/wordpress.maintain.svg) + [![Install WordPress with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wordpress) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 0841329..d6ca364 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,16 @@ It shall NOT be edited by hand. # WordPress pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/wordpress.svg)](https://dash.yunohost.org/appci/app/wordpress) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/wordpress.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/wordpress.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/wordpress.svg)](https://dash.yunohost.org/appci/app/wordpress) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/wordpress.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/wordpress.maintain.svg) + [![Installer WordPress avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wordpress) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer WordPress 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 WordPress 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.* -## Vue d'ensemble +## Vue d’ensemble WordPress est un logiciel libre que vous pouvez utiliser pour créer un site ou un blog. Avec ce package, vous pouvez même activer l'option [multisite](https://codex.wordpress.org/Glossary#Multisite). @@ -21,9 +22,9 @@ Avec ce package, vous pouvez même activer l'option [multisite](https://codex.wo **Version incluse :** 6.1.1~ynh1 -## Captures d'écran +## Captures d’écran -![Capture d'écran de WordPress](./doc/screenshots/screen-themes.png) +![Capture d’écran de WordPress](./doc/screenshots/screen-themes.png) ## Avertissements / informations importantes @@ -65,9 +66,9 @@ Par ailleurs, vous pourriez avoir besoin de regarder [ce guide](https://wordpres ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -83,4 +84,4 @@ ou sudo yunohost app upgrade wordpress -u https://github.com/YunoHost-Apps/wordpress_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From 80eb94a58d41110c788cb199797f2f648ffe055a Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 23 Feb 2023 23:06:17 +0100 Subject: [PATCH 3/6] [autopatch] Upgrade auto-updater --- .github/workflows/updater.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index 515c49b..fd577d1 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -25,7 +25,7 @@ jobs: - name: Create Pull Request if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} title: Upgrade ${{ env.APP_NAME }} to version ${{ env.VERSION }} From 67192fe698b53325c08a786ddbba72fe07076b38 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 3 Apr 2023 08:09:09 +0000 Subject: [PATCH 4/6] Upgrade to version 6.2 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 78351f6..53b6dbb 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://downloads.wordpress.org/release/wordpress-6.1.1.zip -SOURCE_SUM=088280b34aebc7331693e729d8e6b05eb8b9998c001a74caa9aaa1e09b5c3617 +SOURCE_URL=https://downloads.wordpress.org/release/wordpress-6.2.zip +SOURCE_SUM=0078e0483d3447a465f71d6bbdab5c799cad2e57c221ec1d639d235b0ffced55 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 63acda1..ef00bd7 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Create a beautiful blog or website easily", "fr": "Logiciel de création de blog ou de site Web" }, - "version": "6.1.1~ynh1", + "version": "6.2~ynh1", "url": "https://wordpress.org/", "upstream": { "license": "GPL-2.0", From 366168ff99b0036c296df74b203cbdb6a9dca830 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 25 Apr 2023 18:59:01 +0000 Subject: [PATCH 5/6] 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 804aed3..3fba65c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ WordPress is open source software you can use to create a beautiful website, blo With this package, you can even activate the [multisite](https://wordpress.org/support/article/glossary/#multisite) option. -**Shipped version:** 6.1.1~ynh1 +**Shipped version:** 6.2~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index d6ca364..ddc73fd 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ WordPress est un logiciel libre que vous pouvez utiliser pour créer un site ou Avec ce package, vous pouvez même activer l'option [multisite](https://codex.wordpress.org/Glossary#Multisite). -**Version incluse :** 6.1.1~ynh1 +**Version incluse :** 6.2~ynh1 ## Captures d’écran From a10e8641d9276e1abfd53d3e1498a82abf2028c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 25 Apr 2023 21:30:16 +0200 Subject: [PATCH 6/6] Update manifest.json --- manifest.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index ef00bd7..b1e9927 100644 --- a/manifest.json +++ b/manifest.json @@ -67,11 +67,7 @@ }, { "name": "admin", - "type": "user", - "ask": { - "en": "Choose the WordPress administrator (must be an existing YunoHost user)", - "fr": "Administrateur du site (doit être un utilisateur YunoHost existant)" - } + "type": "user" }, { "name": "multisite",