From aa1f98f3740d01a678ed171f78e3bec4f19f304e Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:08:50 +0200 Subject: [PATCH 1/2] Testing (#78) * Upgrade to v5.8.15 (#75) * Upgrade sources - `main` v5.8.15: https://github.com/pluxml/PluXml/releases/tag/5.8.15 * Auto-update READMEs * Upgrade to v5.8.16 (#77) * Upgrade sources - `main` v5.8.16: https://github.com/pluxml/PluXml/releases/tag/5.8.16 * Auto-update READMEs --------- Co-authored-by: YunoHost Bot --- ALL_README.md | 1 + README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 4 ++-- README_ru.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 2 +- manifest.toml | 6 +++--- 10 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 README_ru.md diff --git a/ALL_README.md b/ALL_README.md index 4ed64dd..e3c80d2 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -6,4 +6,5 @@ - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) - [Baca README dalam bahasa bahasa Indonesia](README_id.md) +- [Прочитать README на русский](README_ru.md) - [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index 1dd17f5..99e8a1d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Blog or CMS storing data in XML flat files. -**Shipped version:** 5.8.15~ynh1 +**Shipped version:** 5.8.16~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index 7b063d5..85bfa87 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Blog or CMS storing data in XML flat files. -**Versión actual:** 5.8.15~ynh1 +**Versión actual:** 5.8.16~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 11be75f..1c58a15 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Blog or CMS storing data in XML flat files. -**Paketatutako bertsioa:** 5.8.15~ynh1 +**Paketatutako bertsioa:** 5.8.16~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 8f20479..f3d275b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Blog ou CMS stockant ses données dans des fichiers XML plats. -**Version incluse :** 5.8.15~ynh1 +**Version incluse :** 5.8.16~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index f89895f..1982ecf 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Blog or CMS storing data in XML flat files. -**Versión proporcionada:** 5.8.15~ynh1 +**Versión proporcionada:** 5.8.16~ynh1 **Demo:** diff --git a/README_id.md b/README_id.md index 381226c..ab2513e 100644 --- a/README_id.md +++ b/README_id.md @@ -19,7 +19,7 @@ Ini TIDAK boleh diedit dengan tangan. Blog or CMS storing data in XML flat files. -**Versi terkirim:** 5.8.15~ynh1 +**Versi terkirim:** 5.8.16~ynh1 **Demo:** @@ -31,7 +31,7 @@ Blog or CMS storing data in XML flat files. - Website aplikasi resmi: - Dokumentasi admin resmi: -- Repositori kode aplikasi hulu: +- Depot kode aplikasi hulu: - Gudang YunoHost: - Laporkan bug: diff --git a/README_ru.md b/README_ru.md new file mode 100644 index 0000000..0eadc72 --- /dev/null +++ b/README_ru.md @@ -0,0 +1,50 @@ + + +# PluXml для YunoHost + +[![Уровень интеграции](https://dash.yunohost.org/integration/pluxml.svg)](https://ci-apps.yunohost.org/ci/apps/pluxml/) ![Состояние работы](https://ci-apps.yunohost.org/ci/badges/pluxml.status.svg) ![Состояние сопровождения](https://ci-apps.yunohost.org/ci/badges/pluxml.maintain.svg) + +[![Установите PluXml с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pluxml) + +*[Прочтите этот README на других языках.](./ALL_README.md)* + +> *Этот пакет позволяет Вам установить PluXml быстро и просто на YunoHost-сервер.* +> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.* + +## Обзор + +Blog or CMS storing data in XML flat files. + + +**Поставляемая версия:** 5.8.16~ynh1 + +**Демо-версия:** + +## Снимки экрана + +![Снимок экрана PluXml](./doc/screenshots/screenshot.png) + +## Документация и ресурсы + +- Официальный веб-сайт приложения: +- Официальная документация администратора: +- Репозиторий кода главной ветки приложения: +- Магазин YunoHost: +- Сообщите об ошибке: + +## Информация для разработчиков + +Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/pluxml_ynh/tree/testing). + +Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/pluxml_ynh/tree/testing --debug +или +sudo yunohost app upgrade pluxml -u https://github.com/YunoHost-Apps/pluxml_ynh/tree/testing --debug +``` + +**Больше информации о пакетировании приложений:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 557e28f..a4cd4bb 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Blog or CMS storing data in XML flat files. -**分发版本:** 5.8.15~ynh1 +**分发版本:** 5.8.16~ynh1 **演示:** diff --git a/manifest.toml b/manifest.toml index b727085..8be3013 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "PluXml" description.en = "Blog or CMS storing data in XML flat files." description.fr = "Blog ou CMS stockant ses données dans des fichiers XML plats." -version = "5.8.15~ynh1" +version = "5.8.16~ynh1" maintainers = ["Antoine"] @@ -53,8 +53,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/pluxml/PluXml/archive/refs/tags/v5.8.15.tar.gz" - sha256 = "b48d4a7decce1574324304fda157b2b0cebe8659c9a405953aecbfc89b0ebd1d" + url = "https://github.com/pluxml/PluXml/archive/refs/tags/v5.8.16.tar.gz" + sha256 = "a716c43428793ed19f2b8346b2d6d64ac99b2ff041c1474db28481f525f196e3" autoupdate.strategy = "latest_github_tag" [resources.system_user] From 83adefc115752f66a0f6a62220e48ba52e89079b Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 31 Aug 2024 02:54:02 +0200 Subject: [PATCH 2/2] [autopatch] Automatic patch attempt for helpers 2.1 --- conf/extra_php-fpm.conf | 4 ---- conf/nginx.conf | 2 +- manifest.toml | 4 +++- scripts/_common.sh | 14 +------------- scripts/backup | 19 +++++-------------- scripts/change_url | 14 +++----------- scripts/install | 33 ++++++++++++++------------------- scripts/remove | 16 +++++----------- scripts/restore | 33 ++++++++++++--------------------- scripts/upgrade | 40 ++++++++++++++-------------------------- 10 files changed, 58 insertions(+), 121 deletions(-) delete mode 100644 conf/extra_php-fpm.conf diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf deleted file mode 100644 index 017da9e..0000000 --- a/conf/extra_php-fpm.conf +++ /dev/null @@ -1,4 +0,0 @@ -; Additional php.ini defines, specific to this pool of workers. - -php_admin_value[upload_max_filesize] = 256M -php_admin_value[post_max_size] = 256M diff --git a/conf/nginx.conf b/conf/nginx.conf index 8ce73de..1b67955 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,7 +17,7 @@ location __PATH__/ { # Parseur PHP location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; diff --git a/manifest.toml b/manifest.toml index 8be3013..3b5492d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,8 @@ admindoc = "https://wiki.pluxml.org/" code = "https://github.com/pluxml/PluXml" [integration] -yunohost = ">= 11.1.17" +yunohost = ">= 11.2.18" +helpers_version = "2.1" architectures = "all" multi_instance = true ldap = false @@ -60,6 +61,7 @@ ram.runtime = "50M" [resources.system_user] [resources.install_dir] + group = "www-data:r-x" [resources.permissions] main.url = "/" diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..3d7f008 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,17 +1,5 @@ #!/bin/bash #================================================= -# COMMON VARIABLES -#================================================= - -#================================================= -# PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS -#================================================= - -#================================================= -# FUTURE OFFICIAL HELPERS +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index 18f83fe..c409047 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,40 +1,31 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# DECLARE DATA AND CONF FILES TO BACKUP -#================================================= -ynh_print_info --message="Declaring files to be backed up..." +ynh_print_info "Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$install_dir" +ynh_backup "$install_dir" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE PHP-FPM CONFIGURATION #================================================= -ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" #================================================= # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index a4fcb69..39d37fc 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,25 +1,17 @@ #!/bin/bash -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD MODIFICATIONS #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 +ynh_script_progression "Updating NGINX web server configuration..." -ynh_change_url_nginx_config +ynh_config_change_url_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression "Change of URL completed for $app" diff --git a/scripts/install b/scripts/install index 49d83a9..0f47246 100644 --- a/scripts/install +++ b/scripts/install @@ -1,58 +1,53 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers +ynh_app_setting_set --key=php_upload_max_filesize --value=256M + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=1 +ynh_script_progression "Setting up source files..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 +ynh_script_progression "Configuring PHP-FPM..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_config_add_phpfpm #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 +ynh_script_progression "Configuring NGINX web server..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # SPECIFIC SETUP #================================================= # SETUP APPLICATION WITH CURL #================================================= -ynh_script_progression --message="Setuping application with CURL..." --weight=1 +ynh_script_progression "Setuping application with CURL..." # Installation with curl -ynh_script_progression --message="Finalizing installation..." --weight=1 +ynh_script_progression "Finalizing installation..." ynh_local_curl "/install.php" "default_lang=$language" "install=Installer" "name=$admin" "login=$admin" "pwd=$password" "pwd2=$password" "data=1" "email=$admin@$domain" "timezone=Europe/Paris" #Removing install.php and /update" -ynh_secure_remove --file="${install_dir}/install.php" -ynh_secure_remove --file="${install_dir}/update" +ynh_safe_rm "${install_dir}/install.php" +ynh_safe_rm "${install_dir}/update" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression "Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index 79cb058..df26f5a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,32 +1,26 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 +ynh_script_progression "Removing NGINX web server configuration..." # Remove the dedicated NGINX config -ynh_remove_nginx_config +ynh_config_remove_nginx #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 +ynh_script_progression "Removing PHP-FPM configuration..." # Remove the dedicated PHP-FPM config -ynh_remove_fpm_config +ynh_config_remove_phpfpm #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index b080003..d7ccdab 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -13,39 +7,36 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=1 +ynh_script_progression "Restoring the app main directory..." -ynh_restore_file --origin_path="$install_dir" - -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +ynh_restore "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 +ynh_script_progression "Restoring the PHP-FPM configuration..." -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf" #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 +ynh_script_progression "Restoring the NGINX web server configuration..." -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 +ynh_script_progression "Reloading NGINX web server and PHP-FPM..." -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemctl --service=php$php_version-fpm --action=reload +ynh_systemctl --service=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index 3e072d1..bbbcd47 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,66 +1,54 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) +ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] +# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed +if ynh_app_upstream_version_changed then - ynh_script_progression --message="Upgrading source files..." --weight=1 + ynh_script_progression "Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" fi -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 +ynh_script_progression "Upgrading PHP-FPM configuration..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_config_add_phpfpm #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 +ynh_script_progression "Upgrading NGINX web server configuration..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx -#================================================= -# SPECIFIC UPGRADE #================================================= # SETUP APPLICATION WITH CURL #================================================= -ynh_script_progression --message="Setting up application with cURL..." --weight=1 +ynh_script_progression "Setting up application with cURL..." ynh_local_curl "/update/index.php" "submit=submit" #Removing install.php and /update" -ynh_secure_remove --file="${install_dir}/install.php" -ynh_secure_remove --file="${install_dir}/update" +ynh_safe_rm "${install_dir}/install.php" +ynh_safe_rm "${install_dir}/update" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression "Upgrade of $app completed"