From ea8311f922c19108dec4b3fdb45c8b8c797e4342 Mon Sep 17 00:00:00 2001 From: Kayou Date: Sat, 20 Jul 2024 10:59:46 +0200 Subject: [PATCH 01/24] Fix hook (#206) * Auto-update READMEs * fix hook --------- Co-authored-by: yunohost-bot --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- hooks/post_user_create | 6 +++--- hooks/post_user_delete | 3 +++ 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5f9eaed..aa7f8be 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Wallabag for YunoHost -[![Integration level](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Working status](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Working status](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) [![Install Wallabag with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2) diff --git a/README_es.md b/README_es.md index 968ab78..8f76cf2 100644 --- a/README_es.md +++ b/README_es.md @@ -5,7 +5,7 @@ No se debe editar a mano. # Wallabag para Yunohost -[![Nivel de integración](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) [![Instalar Wallabag con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2) diff --git a/README_eu.md b/README_eu.md index 07dee23..b08edb5 100644 --- a/README_eu.md +++ b/README_eu.md @@ -5,7 +5,7 @@ EZ editatu eskuz. # Wallabag YunoHost-erako -[![Integrazio maila](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) +[![Integrazio maila](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) [![Instalatu Wallabag YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2) diff --git a/README_fr.md b/README_fr.md index 898967b..10f5def 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main. # Wallabag pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) [![Installer Wallabag avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2) diff --git a/README_gl.md b/README_gl.md index 60cdef2..ce7b029 100644 --- a/README_gl.md +++ b/README_gl.md @@ -5,7 +5,7 @@ NON debe editarse manualmente. # Wallabag para YunoHost -[![Nivel de integración](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) [![Instalar Wallabag con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2) diff --git a/README_zh_Hans.md b/README_zh_Hans.md index cdd221c..d46d991 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -5,7 +5,7 @@ # YunoHost 上的 Wallabag -[![集成程度](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![工作状态](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) +[![集成程度](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) [![使用 YunoHost 安装 Wallabag](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2) diff --git a/hooks/post_user_create b/hooks/post_user_create index 44fba5b..e15237a 100644 --- a/hooks/post_user_create +++ b/hooks/post_user_create @@ -1,5 +1,8 @@ #!/bin/bash +# Source YunoHost helpers +source /usr/share/yunohost/helpers + app="__APP__" user="__APP__" install_dir=$(ynh_app_setting_get --app="$app" --key=install_dir) @@ -9,9 +12,6 @@ phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) username=$1 user_email=$2 -# Source YunoHost helpers -source /usr/share/yunohost/helpers - # Generate a random password user_pass=$(ynh_string_random) diff --git a/hooks/post_user_delete b/hooks/post_user_delete index ebf27c4..b181ac1 100644 --- a/hooks/post_user_delete +++ b/hooks/post_user_delete @@ -1,5 +1,8 @@ #!/bin/bash +# Source YunoHost helpers +source /usr/share/yunohost/helpers + app="__APP__" user="__APP__" install_dir=$(ynh_app_setting_get --app="$app" --key=install_dir) From 6f02e0732a529858ba762bd535a730477a807309 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 20 Jul 2024 11:41:47 +0200 Subject: [PATCH 02/24] Update manifest.toml (#208) --- manifest.toml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/manifest.toml b/manifest.toml index b4f08d6..ca7c579 100644 --- a/manifest.toml +++ b/manifest.toml @@ -63,18 +63,18 @@ ram.runtime = "50M" [resources.apt] packages = [ "mariadb-server", - "php7.4-cli", - "php7.4-curl", - "php7.4-gd", - "php7.4-gettext", - "php7.4-intl", - "php7.4-json", - "php7.4-ldap", - "php7.4-mbstring", - "php7.4-mysql", - "php7.4-redis", - "php7.4-tidy", - "php7.4-xml", + "php8.2-cli", + "php8.2-curl", + "php8.2-gd", + "php8.2-gettext", + "php8.2-intl", + "php8.2-json", + "php8.2-ldap", + "php8.2-mbstring", + "php8.2-mysql", + "php8.2-redis", + "php8.2-tidy", + "php8.2-xml", ] [resources.database] From be88e12fd2bbd2374a744ff59bb3396f1811a84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 20 Jul 2024 11:42:33 +0200 Subject: [PATCH 03/24] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index ca7c579..3521977 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Wallabag" description.en = "Save and classify articles. Read them later" description.fr = "Enregistrez et classez les articles. Lisez-les plus tard" -version = "2.5.4~ynh3" +version = "2.5.4~ynh4" maintainers = ["lapineige"] From a2316d7f7d3444afe06abe64dd5d36e695d92bf8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 20 Jul 2024 09:42:38 +0000 Subject: [PATCH 04/24] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index aa7f8be..2f4be89 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Shipped version:** 2.5.4~ynh3 +**Shipped version:** 2.5.4~ynh4 **Demo:** diff --git a/README_es.md b/README_es.md index 8f76cf2..08f5b13 100644 --- a/README_es.md +++ b/README_es.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión actual:** 2.5.4~ynh3 +**Versión actual:** 2.5.4~ynh4 **Demo:** diff --git a/README_eu.md b/README_eu.md index b08edb5..a2cc594 100644 --- a/README_eu.md +++ b/README_eu.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Paketatutako bertsioa:** 2.5.4~ynh3 +**Paketatutako bertsioa:** 2.5.4~ynh4 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 10f5def..2ba83eb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Sont disponibles une interface web, des add-ons pour navigateurs (Firefox/Chrome La mise à niveau depuis le paquet YunoHost de [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) demande une opération manuelle, c'est pourquoi un nouveau paquet est fournit. Pour le processus de migration, merci de vous référer à [la documentation officiel de Wallabag](https://doc.wallabag.org/fr/user/import/wallabagv1.html). -**Version incluse :** 2.5.4~ynh3 +**Version incluse :** 2.5.4~ynh4 **Démo :** diff --git a/README_gl.md b/README_gl.md index ce7b029..05a8409 100644 --- a/README_gl.md +++ b/README_gl.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión proporcionada:** 2.5.4~ynh3 +**Versión proporcionada:** 2.5.4~ynh4 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index d46d991..b4f6c5b 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**分发版本:** 2.5.4~ynh3 +**分发版本:** 2.5.4~ynh4 **演示:** From 686fb36ca02706815ccc74c0322f008c689ff91f Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 20 Jul 2024 14:17:04 +0200 Subject: [PATCH 05/24] Add parameters.yml (#209) * Add parameters.yml * Update upgrade * Update change_url --- conf/parameters.yml | 74 +++++++++++++++++++++++++++++++++++++++++++++ scripts/_common.sh | 2 -- scripts/change_url | 2 +- scripts/install | 17 +++-------- scripts/restore | 2 -- scripts/upgrade | 19 ------------ 6 files changed, 79 insertions(+), 37 deletions(-) create mode 100644 conf/parameters.yml diff --git a/conf/parameters.yml b/conf/parameters.yml new file mode 100644 index 0000000..5cc47fb --- /dev/null +++ b/conf/parameters.yml @@ -0,0 +1,74 @@ +# This file is a "template" of what your parameters.yml file should look like +parameters: + # Uncomment these settings or manually update your parameters.yml + # to use docker-compose + # + # database_driver: %env.database_driver% + # database_host: %env.database_host% + # database_port: %env.database_port% + # database_name: %env.database_name% + # database_user: %env.database_user% + # database_password: %env.database_password% + + database_driver: pdo_mysql + database_host: 127.0.0.1 + database_port: ~ + database_name: __DB_NAME__ + database_user: __DB_USER__ + database_password: __DB_PWD__ + # For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite" + database_path: null + database_table_prefix: null + database_socket: null + # with PostgreSQL and SQLite, you must set "utf8" + database_charset: utf8mb4 + + domain_name: https://__DOMAIN____PATH__ + server_name: "Your wallabag instance" + + mailer_transport: smtp + mailer_user: ~ + mailer_password: ~ + mailer_host: 127.0.0.1 + mailer_port: false + mailer_encryption: ~ + mailer_auth_mode: ~ + + locale: en + + # A secret key that's used to generate certain security-related tokens + secret: __DESKEY__ + + # two factor stuff + twofactor_auth: true + twofactor_sender: no-reply@wallabag.org + + # fosuser stuff + fosuser_registration: false + fosuser_confirmation: true + + # how long the access token should live in seconds for the API + fos_oauth_server_access_token_lifetime: 3600 + # how long the refresh token should life in seconds for the API + fos_oauth_server_refresh_token_lifetime: 1209600 + + from_email: no-reply@wallabag.org + + rss_limit: 50 + + # RabbitMQ processing + rabbitmq_host: localhost + rabbitmq_port: 5672 + rabbitmq_user: guest + rabbitmq_password: guest + rabbitmq_prefetch_count: 10 + + # Redis processing + redis_scheme: tcp + redis_host: localhost + redis_port: 6379 + redis_path: null + redis_password: null + + # sentry logging + sentry_dsn: ~ diff --git a/scripts/_common.sh b/scripts/_common.sh index 7760641..599c71e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,8 +4,6 @@ # COMMON VARIABLES #================================================= -wb_conf="$install_dir/app/config/parameters.yml" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/change_url b/scripts/change_url index ae6fd3f..05e3046 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -24,7 +24,7 @@ ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name <<< "UPDATE internal_setting SET value = 'https://$new_domain$new_path' WHERE name = 'wallabag_url'" # Change domain name in parameters.yml -ynh_replace_string --target_file="$wb_conf" --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path" +ynh_replace_string --target_file="$install_dir/app/config/parameters.yml" --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path" # If "Download images locally" option has been enabled in Internal Settings download_images_enabled=$(ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \ diff --git a/scripts/install b/scripts/install index 21f3764..359b84b 100644 --- a/scripts/install +++ b/scripts/install @@ -40,19 +40,10 @@ fi #================================================= ynh_script_progression --message="Adding $app's configuration files..." --weight=1 -# Copy and set Wallabag dist configuration -cp "$install_dir/app/config/parameters.yml.dist" "$wb_conf" - -ynh_replace_string --target_file="$wb_conf" --match_string="fosuser_registration: true" --replace_string="fosuser_registration: false" -ynh_replace_string --target_file="$wb_conf" --match_string="database_name: wallabag" --replace_string="database_name: $db_name" -ynh_replace_string --target_file="$wb_conf" --match_string="database_user: root" --replace_string="database_user: $db_user" -ynh_replace_string --target_file="$wb_conf" --match_string="database_password: ~" --replace_string="database_password: $db_pwd" -ynh_replace_string --target_file="$wb_conf" --match_string="database_table_prefix: wallabag_" --replace_string="database_table_prefix: null" -ynh_replace_string --target_file="$wb_conf" --match_string="secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv" --replace_string="secret: $deskey" -ynh_replace_string --target_file="$wb_conf" --match_string="domain_name: https://your-wallabag-url-instance.com" --replace_string="domain_name: https://$domain$path" - -chmod 600 "$wb_conf" -chown -R "$app:www-data" "$install_dir" +ynh_add_config --template="parameters.yml" --destination="$install_dir/app/config/parameters.yml" + +chmod 600 "$install_dir/app/config/parameters.yml" +chown "$app:$app" "$install_dir/app/config/parameters.yml" # Alias for php-cli execution command php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod) diff --git a/scripts/restore b/scripts/restore index d9fc61c..dd1c787 100644 --- a/scripts/restore +++ b/scripts/restore @@ -23,8 +23,6 @@ if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then chmod 700 "$install_dir/var/cache/prod/appProdProjectContainer.php" fi -chmod 600 "$wb_conf" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 605472d..916c9ca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,11 +7,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -# ynh_script_progression --message="Ensuring downward compatibility..." - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -37,20 +32,6 @@ fi #================================================= ynh_script_progression --message="Reconfiguring $app..." --weight=1 -# Copy and set Wallabag dist configuration -cp "$install_dir/app/config/parameters.yml.dist" "$wb_conf" - -ynh_replace_string --target_file="$wb_conf" --match_string="fosuser_registration: true" --replace_string="fosuser_registration: false" -ynh_replace_string --target_file="$wb_conf" --match_string="database_name: wallabag" --replace_string="database_name: $db_name" -ynh_replace_string --target_file="$wb_conf" --match_string="database_user: root" --replace_string="database_user: $db_user" -ynh_replace_string --target_file="$wb_conf" --match_string="database_password: ~" --replace_string="database_password: $db_pwd" -ynh_replace_string --target_file="$wb_conf" --match_string="database_table_prefix: wallabag_" --replace_string="database_table_prefix: null" -ynh_replace_string --target_file="$wb_conf" --match_string="secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv" --replace_string="secret: $deskey" -ynh_replace_string --target_file="$wb_conf" --match_string="domain_name: https://your-wallabag-url-instance.com" --replace_string="domain_name: https://$domain$path" - -chmod 600 "$wb_conf" -chown -R "$app:www-data" "$install_dir" - # Alias for php-cli execution command php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod) From d7c0790559243a2f942ebb7bc3d0f8feb562363f Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 20 Jul 2024 14:19:28 +0200 Subject: [PATCH 06/24] Function (#210) * Add parameters.yml * Update upgrade * add function --- scripts/_common.sh | 6 ++++++ scripts/install | 9 +++------ scripts/upgrade | 7 ++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 599c71e..9934791 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,12 @@ # COMMON VARIABLES #================================================= +# Define a function to execute commands with `php_exec` +php_exec() { + (cd "$install_dir" && ynh_exec_as "$app" \ + php${phpversion} "$install_dir/bin/console" --no-interaction --env=prod "$@") +} + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 359b84b..fc4b7cb 100644 --- a/scripts/install +++ b/scripts/install @@ -45,22 +45,19 @@ ynh_add_config --template="parameters.yml" --destination="$install_dir/app/confi chmod 600 "$install_dir/app/config/parameters.yml" chown "$app:$app" "$install_dir/app/config/parameters.yml" -# Alias for php-cli execution command -php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod) - # Install dependencies and Wallabag -ynh_exec_warn_less ynh_exec_as "$app" "${php_exec[@]}" wallabag:install +php_exec wallabag:install # Add users to Wallabag for username in $(ynh_user_list); do user_email=$(ynh_user_get_info --username="$username" --key=mail) # We don't care about that thanks to LDAP user_pass=$(ynh_string_random) - ynh_exec_as "$app" "${php_exec[@]}" fos:user:create "$username" "$user_email" "$user_pass" + php_exec fos:user:create "$username" "$user_email" "$user_pass" done # Set admin user -ynh_exec_as "$app" "${php_exec[@]}" fos:user:promote --super "$admin" +php_exec fos:user:promote --super "$admin" # Configure Wallabag instance URL ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \ diff --git a/scripts/upgrade b/scripts/upgrade index 916c9ca..e040482 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,12 +32,9 @@ fi #================================================= ynh_script_progression --message="Reconfiguring $app..." --weight=1 -# Alias for php-cli execution command -php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod) - # Upgrade database and clear the cache -ynh_exec_as "$app" "${php_exec[@]}" doctrine:migrations:migrate -ynh_exec_as "$app" "${php_exec[@]}" cache:clear +php_exec doctrine:migrations:migrate +php_exec cache:clear # Configure Wallabag instance URL ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \ From cef003b2453782bcdd5604bb348e84e320569349 Mon Sep 17 00:00:00 2001 From: Gofannon <17145502+Gofannon@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:46:47 +0200 Subject: [PATCH 07/24] fix: add time for php script to run a 'long sync' with an application (#213) --- conf/extra_php-fpm.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index 700c37c..89caf08 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -2,3 +2,4 @@ php_admin_value[upload_max_filesize] = 50M php_admin_value[post_max_size] = 50M +php_admin_value[max_execution_time] = 300 From a717c559f6b5d3ca955016204ee7bc0adbe33669 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 28 Aug 2024 08:46:51 +0000 Subject: [PATCH 08/24] Auto-update READMEs --- ALL_README.md | 2 ++ README_id.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ README_ru.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 README_id.md create mode 100644 README_ru.md diff --git a/ALL_README.md b/ALL_README.md index 152f2e7..e3c80d2 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -5,4 +5,6 @@ - [Irakurri README euskaraz](README_eu.md) - [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_id.md b/README_id.md new file mode 100644 index 0000000..c688f1f --- /dev/null +++ b/README_id.md @@ -0,0 +1,53 @@ + + +# Wallabag untuk YunoHost + +[![Tingkat integrasi](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) + +[![Pasang Wallabag dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2) + +*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)* + +> *Paket ini memperbolehkan Anda untuk memasang Wallabag secara cepat dan mudah pada server YunoHost.* +> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.* + +## Ringkasan + +Wallabag is a self hostable Read-It-Later application allowing you to not miss any content anymore. Click, save, read it when you can. +It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps (Android/iOS/Windows Phone) and even on e-reader (PocketBook/Kobo). + +Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). + + +**Versi terkirim:** 2.5.4~ynh4 + +**Demo:** + +## Tangkapan Layar + +![Tangkapan Layar pada Wallabag](./doc/screenshots/screenshot1.webp) + +## Dokumentasi dan sumber daya + +- Website aplikasi resmi: +- Dokumentasi admin resmi: +- Depot kode aplikasi hulu: +- Gudang YunoHost: +- Laporkan bug: + +## Info developer + +Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing). + +Untuk mencoba branch `testing`, silakan dilanjutkan seperti: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing --debug +atau +sudo yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing --debug +``` + +**Info lebih lanjut mengenai pemaketan aplikasi:** diff --git a/README_ru.md b/README_ru.md new file mode 100644 index 0000000..857f340 --- /dev/null +++ b/README_ru.md @@ -0,0 +1,53 @@ + + +# Wallabag для YunoHost + +[![Уровень интеграции](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Состояние работы](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Состояние сопровождения](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) + +[![Установите Wallabag с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2) + +*[Прочтите этот README на других языках.](./ALL_README.md)* + +> *Этот пакет позволяет Вам установить Wallabag быстро и просто на YunoHost-сервер.* +> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.* + +## Обзор + +Wallabag is a self hostable Read-It-Later application allowing you to not miss any content anymore. Click, save, read it when you can. +It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps (Android/iOS/Windows Phone) and even on e-reader (PocketBook/Kobo). + +Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). + + +**Поставляемая версия:** 2.5.4~ynh4 + +**Демо-версия:** + +## Снимки экрана + +![Снимок экрана Wallabag](./doc/screenshots/screenshot1.webp) + +## Документация и ресурсы + +- Официальный веб-сайт приложения: +- Официальная документация администратора: +- Репозиторий кода главной ветки приложения: +- Магазин YunoHost: +- Сообщите об ошибке: + +## Информация для разработчиков + +Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing). + +Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing --debug +или +sudo yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing --debug +``` + +**Больше информации о пакетировании приложений:** From c5515d90b196a8107f09c2c9666ff8ede77063ee Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sun, 1 Sep 2024 21:23:23 +0200 Subject: [PATCH 09/24] [autopatch] Automatic patch attempt for helpers 2.1 (#214) * Testing (#207) * Fix hook (#206) * Auto-update READMEs * fix hook --------- Co-authored-by: yunohost-bot * Update manifest.toml (#208) * Update manifest.toml * Auto-update READMEs * Add parameters.yml (#209) * Add parameters.yml * Update upgrade * Update change_url * Function (#210) * Add parameters.yml * Update upgrade * add function --------- Co-authored-by: Kayou Co-authored-by: yunohost-bot * Auto-update READMEs * [autopatch] Automatic patch attempt for helpers 2.1 * cleaning --------- Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Kayou Co-authored-by: Yunohost-Bot <> --- README_id.md | 2 +- conf/extra_php-fpm.conf | 5 -- conf/nginx.conf | 6 +- manifest.toml | 4 +- scripts/_common.sh | 14 +---- scripts/backup | 25 ++++---- scripts/change_url | 20 +++--- scripts/install | 37 +++++------ scripts/remove | 12 ++-- scripts/restore | 32 +++++----- scripts/upgrade | 29 ++++----- sources/patches/main-00-ldap-auth.patch | 46 -------------- .../main-01-logout-success-handler.patch | 63 ------------------- .../patches/main-02-oauth-workaround.patch | 11 ---- 14 files changed, 79 insertions(+), 227 deletions(-) delete mode 100644 conf/extra_php-fpm.conf delete mode 100644 sources/patches/main-00-ldap-auth.patch delete mode 100644 sources/patches/main-01-logout-success-handler.patch delete mode 100644 sources/patches/main-02-oauth-workaround.patch diff --git a/README_id.md b/README_id.md index c688f1f..bcfc66e 100644 --- a/README_id.md +++ b/README_id.md @@ -34,7 +34,7 @@ Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallaba - Website aplikasi resmi: - Dokumentasi admin resmi: -- Depot kode aplikasi hulu: +- Repositori kode aplikasi hulu: - Gudang YunoHost: - Laporkan bug: diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf deleted file mode 100644 index 89caf08..0000000 --- a/conf/extra_php-fpm.conf +++ /dev/null @@ -1,5 +0,0 @@ -; Additional php.ini defines, specific to this pool of workers. - -php_admin_value[upload_max_filesize] = 50M -php_admin_value[post_max_size] = 50M -php_admin_value[max_execution_time] = 300 diff --git a/conf/nginx.conf b/conf/nginx.conf index 962767d..cb303de 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,7 +9,7 @@ location __PATH__/ { fastcgi_read_timeout 60m; client_max_body_size 50M; - try_files $uri @__NAME__; + try_files $uri @__APP__; location ~ ^__PATH__/app\.php(/|$) { include fastcgi_params; @@ -17,7 +17,7 @@ location __PATH__/ { fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param REMOTE_USER $remote_user; - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock; fastcgi_intercept_errors on; } @@ -31,6 +31,6 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; } -location @__NAME__ { +location @__APP__ { rewrite ^ __PATH__/app.php/$is_args$args; } diff --git a/manifest.toml b/manifest.toml index 3521977..47cbf19 100644 --- a/manifest.toml +++ b/manifest.toml @@ -21,7 +21,8 @@ cpe = "cpe:2.3:a:wallabag:wallabag" fund = "https://liberapay.com/wallabag" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.29" +helpers_version = "2.1" architectures = "all" multi_instance = true ldap = true @@ -56,6 +57,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 9934791..2a416c6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,19 +1,11 @@ #!/bin/bash #================================================= -# COMMON VARIABLES +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= # Define a function to execute commands with `php_exec` php_exec() { - (cd "$install_dir" && ynh_exec_as "$app" \ - php${phpversion} "$install_dir/bin/console" --no-interaction --env=prod "$@") + (cd "$install_dir" && ynh_exec_as_app \ + php${php_version} "$install_dir/bin/console" --no-interaction --env=prod "$@") } - -#================================================= -# PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS -#================================================= diff --git a/scripts/backup b/scripts/backup index 5fb5b0d..641e844 100644 --- a/scripts/backup +++ b/scripts/backup @@ -8,42 +8,39 @@ 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 #================================================= # Clean cache files before backup (saved some disk space) -ynh_secure_remove --file=$install_dir/var/cache/prod +ynh_safe_rm $install_dir/var/cache/prod -ynh_backup --src_path="$install_dir" +ynh_backup "$install_dir" #================================================= # BACKUP THE SYSTEM CONFIGURATION #================================================= -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" -ynh_backup --src_path="/etc/logrotate.d/$app" +ynh_backup "/etc/logrotate.d/$app" -ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" -ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" +ynh_backup "/etc/fail2ban/jail.d/$app.conf" +ynh_backup "/etc/fail2ban/filter.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= -ynh_print_info --message="Backing up the MySQL database..." +ynh_print_info "Backing up the MySQL database..." -ynh_mysql_dump_db --database="$db_name" > db.sql +ynh_mysql_dump_db > db.sql #================================================= # 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 05e3046..885b59a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -10,35 +10,35 @@ source /usr/share/yunohost/helpers #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 +ynh_script_progression "Updating NGINX web server configuration..." -ynh_change_url_nginx_config +ynh_config_change_url_nginx #================================================= # UPDATE CONFIGURATION #================================================= -ynh_script_progression --message="Updating wallabag configuration..." +ynh_script_progression "Updating wallabag configuration..." # Configure Wallabag instance URL -ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \ +ynh_mysql_db_shell \ <<< "UPDATE internal_setting SET value = 'https://$new_domain$new_path' WHERE name = 'wallabag_url'" # Change domain name in parameters.yml -ynh_replace_string --target_file="$install_dir/app/config/parameters.yml" --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path" +ynh_replace --file="$install_dir/app/config/parameters.yml" --match="domain_name: .*" --replace="domain_name: https://$new_domain$new_path" # If "Download images locally" option has been enabled in Internal Settings -download_images_enabled=$(ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \ +download_images_enabled=$(ynh_mysql_db_shell \ <<< "SELECT value from internal_setting WHERE name='download_images_enabled '" | tail -n 1) if [ "$download_images_enabled" = "1" ]; then - ynh_print_info --message="Updating images URL; this operation may take a while..." + ynh_print_info "Updating images URL; this operation may take a while..." # Query/replace the domain/path in every entry.content in mysql database - ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \ + ynh_mysql_db_shell \ <<< "UPDATE entry SET content = REPLACE(content, '$old_domain$old_path', '$new_domain$new_path');" fi # Clear assets cache -ynh_secure_remove --file="$install_dir/var/cache" +ynh_safe_rm "$install_dir/var/cache" mkdir "$install_dir/var/cache" chown "$app:www-data" "$install_dir/var/cache" @@ -46,4 +46,4 @@ chown "$app:www-data" "$install_dir/var/cache" # 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 fc4b7cb..552c47c 100644 --- a/scripts/install +++ b/scripts/install @@ -13,23 +13,21 @@ source /usr/share/yunohost/helpers # Generate random DES key & password deskey=$(ynh_string_random --length=24) -ynh_app_setting_set --app="$app" --key="deskey" --value="$deskey" +ynh_app_setting_set --key="deskey" --value="$deskey" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=6 +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" -# Create log dir/file FIXME: is it useless? +# Create log dir/file is it useless? mkdir -p "$install_dir/var/logs/" touch "$install_dir/var/logs/prod.log" # Set permissions to app files -chown -R "$app:www-data" "$install_dir" - # Restrict rights to Wallabag user only if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then chmod 700 "$install_dir/var/cache/prod/appProdProjectContainer.php" @@ -38,12 +36,9 @@ fi #================================================= # APP INITIAL CONFIGURATION #================================================= -ynh_script_progression --message="Adding $app's configuration files..." --weight=1 - -ynh_add_config --template="parameters.yml" --destination="$install_dir/app/config/parameters.yml" +ynh_script_progression "Adding $app's configuration files..." -chmod 600 "$install_dir/app/config/parameters.yml" -chown "$app:$app" "$install_dir/app/config/parameters.yml" +ynh_config_add --template="parameters.yml" --destination="$install_dir/app/config/parameters.yml" # Install dependencies and Wallabag php_exec wallabag:install @@ -60,38 +55,34 @@ done php_exec fos:user:promote --super "$admin" # Configure Wallabag instance URL -ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \ - <<< "UPDATE internal_setting SET value = 'https://$domain$path' WHERE name = 'wallabag_url'" - -# Set permissions to app files -chown -R "$app:www-data" "$install_dir" +ynh_mysql_db_shell <<< "UPDATE internal_setting SET value = 'https://$domain$path' WHERE name = 'wallabag_url'" #================================================= # SETUP HOOKS #================================================= -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_user_create" -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_user_delete" +ynh_replace --match="__APP__" --replace="$app" --file="../hooks/post_user_create" +ynh_replace --match="__APP__" --replace="$app" --file="../hooks/post_user_delete" #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 +ynh_script_progression "Adding system configurations related to $app..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_config_add_phpfpm # Use logrotate to manage application logfile(s) -ynh_use_logrotate --logfile="$install_dir/var/logs/prod.log" +ynh_config_add_logrotate "$install_dir/var/logs/prod.log" # Create a dedicated Fail2Ban config -ynh_add_fail2ban_config --logpath="$install_dir/var/logs/prod.log" --failregex='app.ERROR: Authentication failure for user "([\w]+)?", from IP ""' --max_retry=5 +ynh_config_add_fail2ban --logpath="$install_dir/var/logs/prod.log" --failregex='app.ERROR: Authentication failure for user "([\w]+)?", from IP ""' #================================================= # 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 aabd88a..ec528f5 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,22 +10,22 @@ source /usr/share/yunohost/helpers #================================================= # REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 +ynh_script_progression "Removing system configurations related to $app..." # Remove the app-specific logrotate config -ynh_remove_logrotate +ynh_config_remove_logrotate # Remove the dedicated NGINX config -ynh_remove_nginx_config +ynh_config_remove_nginx # Remove the dedicated PHP-FPM config -ynh_remove_fpm_config +ynh_config_remove_phpfpm # Remove the dedicated Fail2Ban config -ynh_remove_fail2ban_config +ynh_config_remove_fail2ban #================================================= # 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 dd1c787..5e73e7b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -11,13 +11,11 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression "Restoring the app main directory..." -ynh_restore_file --origin_path="$install_dir" +ynh_restore "$install_dir" # Set permissions to app files -chown -R "$app:www-data" "$install_dir" - # Restrict rights to Wallabag user only if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then chmod 700 "$install_dir/var/cache/prod/appProdProjectContainer.php" @@ -26,36 +24,36 @@ fi #================================================= # RESTORE THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=1 +ynh_script_progression "Restoring the MySQL database..." -ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql +ynh_mysql_db_shell < ./db.sql #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 +ynh_script_progression "Restoring system configurations related to $app..." -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf" -ynh_restore_file --origin_path="/etc/logrotate.d/$app" +ynh_restore "/etc/logrotate.d/$app" -ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" -ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" -ynh_systemd_action --action=restart --service_name=fail2ban +ynh_restore "/etc/fail2ban/jail.d/$app.conf" +ynh_restore "/etc/fail2ban/filter.d/$app.conf" +ynh_systemctl --action=restart --service=fail2ban #================================================= # RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 +ynh_script_progression "Reloading NGINX web server and $app's service..." -ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload +ynh_systemctl --service="php$php_version-fpm" --action=reload -ynh_systemd_action --service_name=nginx --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 e040482..b251691 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -10,18 +10,16 @@ source /usr/share/yunohost/helpers #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Upgrading source files..." --weight=6 +ynh_script_progression "Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="app/config/parameters.yml var/logs web/assets/images" +ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="app/config/parameters.yml var/logs web/assets/images" -# Create log dir/file FIXME: is it useless? +# Create log dir/file is it useless? mkdir -p "$install_dir/var/logs/" touch "$install_dir/var/logs/prod.log" # Set permissions to app files -chown -R "$app:www-data" "$install_dir" - # Restrict rights to Wallabag user only if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then chmod 700 "$install_dir/var/cache/prod/appProdProjectContainer.php" @@ -30,41 +28,40 @@ fi #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Reconfiguring $app..." --weight=1 +ynh_script_progression "Reconfiguring $app..." # Upgrade database and clear the cache php_exec doctrine:migrations:migrate php_exec cache:clear # Configure Wallabag instance URL -ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \ - <<< "UPDATE internal_setting SET value = 'https://$domain$path' WHERE name = 'wallabag_url'" +ynh_mysql_db_shell <<< "UPDATE internal_setting SET value = 'https://$domain$path' WHERE name = 'wallabag_url'" #================================================= # SETUP HOOKS #================================================= -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_user_create" -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_user_delete" +ynh_replace --match="__APP__" --replace="$app" --file="../hooks/post_user_create" +ynh_replace --match="__APP__" --replace="$app" --file="../hooks/post_user_delete" #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 +ynh_script_progression "Upgrading system configurations related to $app..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_config_add_phpfpm -ynh_use_logrotate --non-append --logfile="$install_dir/var/logs/prod.log" +ynh_config_add_logrotate "$install_dir/var/logs/prod.log" # Add fail2ban config -ynh_add_fail2ban_config --logpath="$install_dir/var/logs/prod.log" --failregex='app.ERROR: Authentication failure for user "([\w]+)?", from IP ""' --max_retry=5 # same as install config +ynh_config_add_fail2ban --logpath="$install_dir/var/logs/prod.log" --failregex='app.ERROR: Authentication failure for user "([\w]+)?", from IP ""' # same as install config #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression "Upgrade of $app completed" diff --git a/sources/patches/main-00-ldap-auth.patch b/sources/patches/main-00-ldap-auth.patch deleted file mode 100644 index 3a36f5e..0000000 --- a/sources/patches/main-00-ldap-auth.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/app/config/security.yml b/app/config/security.yml -index 02afc9ea..5a3f7a34 100644 ---- a/app/config/security.yml -+++ b/app/config/security.yml -@@ -13,6 +13,14 @@ security: - property: username - fos_userbundle: - id: fos_user.user_provider.username_email -+ yunohost_users: -+ ldap: -+ service: yunohost.ldap -+ base_dn: ou=users,dc=yunohost,dc=org -+ search_dn: -+ search_password: -+ filter: (&(uid={username})(objectClass=posixAccount)) -+ default_roles: ROLE_USER - - # the main part of the security, where you can set up firewalls - # for specific sections of your app -@@ -38,6 +46,9 @@ security: - - secured_area: - pattern: ^/ -+ http_basic_ldap: -+ service: yunohost.ldap -+ dn_string: "uid={username},ou=users,dc=yunohost,dc=org" - form_login: - provider: fos_userbundle - csrf_token_generator: security.csrf.token_manager -diff --git a/app/config/services.yml b/app/config/services.yml -index 7b85d846..f23961c5 100644 ---- a/app/config/services.yml -+++ b/app/config/services.yml -@@ -43,6 +43,10 @@ services: - tags: - - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } - -+ yunohost.ldap: -+ class: Symfony\Component\Ldap\LdapClient -+ arguments: ["localhost"] -+ - craue_config_cache_provider: - class: Symfony\Component\Cache\Adapter\FilesystemAdapter - public: false --- -2.17.1 diff --git a/sources/patches/main-01-logout-success-handler.patch b/sources/patches/main-01-logout-success-handler.patch deleted file mode 100644 index d321d54..0000000 --- a/sources/patches/main-01-logout-success-handler.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/app/config/security.yml b/app/config/security.yml -index 5a3f7a34..1720e741 100644 ---- a/app/config/security.yml -+++ b/app/config/security.yml -@@ -62,7 +62,7 @@ security: - - logout: - path: /logout -- target: / -+ success_handler: yunohost.logout_success_handler - - access_control: - - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } -diff --git a/app/config/services.yml b/app/config/services.yml -index f23961c5..f266e6d1 100644 ---- a/app/config/services.yml -+++ b/app/config/services.yml -@@ -43,6 +43,10 @@ services: - tags: - - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } - -+ yunohost.logout_success_handler: -+ class: Wallabag\YunoHostBundle\Security\LogoutSuccessHandler -+ -+ - yunohost.ldap: - class: Symfony\Component\Ldap\LdapClient - arguments: ["localhost"] -diff --git a/src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php b/src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php -new file mode 100644 -index 00000000..b3268243 ---- /dev/null -+++ b/src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php -@@ -0,0 +1,27 @@ -+encoderFactory->getEncoder($user); - -- if ($encoder->isPasswordValid($user->getPassword(), $password, $user->getSalt())) { -+ if (true) { - return array( - 'data' => $user, - ); From 781c612897e87ba78e2e4992f4a611d5e881662e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 1 Sep 2024 19:23:26 +0000 Subject: [PATCH 10/24] Auto-update READMEs --- README_id.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_id.md b/README_id.md index bcfc66e..c688f1f 100644 --- a/README_id.md +++ b/README_id.md @@ -34,7 +34,7 @@ Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallaba - Website aplikasi resmi: - Dokumentasi admin resmi: -- Repositori kode aplikasi hulu: +- Depot kode aplikasi hulu: - Gudang YunoHost: - Laporkan bug: From a60a45775906d2caa6cc753eb615c7ec1e8aac48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 1 Sep 2024 22:03:18 +0200 Subject: [PATCH 11/24] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 47cbf19..0f7cb35 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Wallabag" description.en = "Save and classify articles. Read them later" description.fr = "Enregistrez et classez les articles. Lisez-les plus tard" -version = "2.5.4~ynh4" +version = "2.5.4~ynh5" maintainers = ["lapineige"] From b6891a343f24d07ce541466a7a0af41afcc6a026 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 1 Sep 2024 20:03:22 +0000 Subject: [PATCH 12/24] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 2 +- README_ru.md | 2 +- README_zh_Hans.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2f4be89..4c7d342 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Shipped version:** 2.5.4~ynh4 +**Shipped version:** 2.5.4~ynh5 **Demo:** diff --git a/README_es.md b/README_es.md index 08f5b13..a678d88 100644 --- a/README_es.md +++ b/README_es.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión actual:** 2.5.4~ynh4 +**Versión actual:** 2.5.4~ynh5 **Demo:** diff --git a/README_eu.md b/README_eu.md index a2cc594..9030b54 100644 --- a/README_eu.md +++ b/README_eu.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Paketatutako bertsioa:** 2.5.4~ynh4 +**Paketatutako bertsioa:** 2.5.4~ynh5 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 2ba83eb..222a450 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Sont disponibles une interface web, des add-ons pour navigateurs (Firefox/Chrome La mise à niveau depuis le paquet YunoHost de [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) demande une opération manuelle, c'est pourquoi un nouveau paquet est fournit. Pour le processus de migration, merci de vous référer à [la documentation officiel de Wallabag](https://doc.wallabag.org/fr/user/import/wallabagv1.html). -**Version incluse :** 2.5.4~ynh4 +**Version incluse :** 2.5.4~ynh5 **Démo :** diff --git a/README_gl.md b/README_gl.md index 05a8409..b1b622e 100644 --- a/README_gl.md +++ b/README_gl.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión proporcionada:** 2.5.4~ynh4 +**Versión proporcionada:** 2.5.4~ynh5 **Demo:** diff --git a/README_id.md b/README_id.md index c688f1f..a48b36e 100644 --- a/README_id.md +++ b/README_id.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versi terkirim:** 2.5.4~ynh4 +**Versi terkirim:** 2.5.4~ynh5 **Demo:** diff --git a/README_ru.md b/README_ru.md index 857f340..4bca681 100644 --- a/README_ru.md +++ b/README_ru.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Поставляемая версия:** 2.5.4~ynh4 +**Поставляемая версия:** 2.5.4~ynh5 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index b4f6c5b..a878cee 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**分发版本:** 2.5.4~ynh4 +**分发版本:** 2.5.4~ynh5 **演示:** From 2408697a7b95e3595095da94fd5201478701b060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:27:20 +0200 Subject: [PATCH 13/24] fix --- scripts/install | 2 ++ scripts/upgrade | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/install b/scripts/install index 552c47c..3769250 100644 --- a/scripts/install +++ b/scripts/install @@ -28,6 +28,8 @@ mkdir -p "$install_dir/var/logs/" touch "$install_dir/var/logs/prod.log" # Set permissions to app files +chown -R "$app:www-data" "$install_dir" + # Restrict rights to Wallabag user only if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then chmod 700 "$install_dir/var/cache/prod/appProdProjectContainer.php" diff --git a/scripts/upgrade b/scripts/upgrade index b251691..e3d768e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,8 @@ mkdir -p "$install_dir/var/logs/" touch "$install_dir/var/logs/prod.log" # Set permissions to app files +chown -R "$app:www-data" "$install_dir" + # Restrict rights to Wallabag user only if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then chmod 700 "$install_dir/var/cache/prod/appProdProjectContainer.php" From a3ea9dc26410bcc6ab60638d78ce43e9fd46ceb7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 10 Sep 2024 10:27:25 +0000 Subject: [PATCH 14/24] Auto-update READMEs --- ALL_README.md | 1 + README_es.md | 2 +- README_nl.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 README_nl.md diff --git a/ALL_README.md b/ALL_README.md index e3c80d2..df3708b 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -6,5 +6,6 @@ - [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) +- [Lees de README in het Nederlands](README_nl.md) - [Прочитать README на русский](README_ru.md) - [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README_es.md b/README_es.md index a678d88..ec234a3 100644 --- a/README_es.md +++ b/README_es.md @@ -40,7 +40,7 @@ Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallaba ## Información para desarrolladores -Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing +Por favor enviar sus correcciones a la [rama `testing`](https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing). Para probar la rama `testing`, sigue asÍ: diff --git a/README_nl.md b/README_nl.md new file mode 100644 index 0000000..5edede1 --- /dev/null +++ b/README_nl.md @@ -0,0 +1,53 @@ + + +# Wallabag voor Yunohost + +[![Integratieniveau](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Mate van functioneren](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Onderhoudsstatus](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg) + +[![Wallabag met Yunohost installeren](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2) + +*[Deze README in een andere taal lezen.](./ALL_README.md)* + +> *Met dit pakket kun je Wallabag snel en eenvoudig op een YunoHost-server installeren.* +> *Als je nog geen YunoHost hebt, lees dan [de installatiehandleiding](https://yunohost.org/install), om te zien hoe je 'm installeert.* + +## Overzicht + +Wallabag is a self hostable Read-It-Later application allowing you to not miss any content anymore. Click, save, read it when you can. +It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps (Android/iOS/Windows Phone) and even on e-reader (PocketBook/Kobo). + +Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). + + +**Geleverde versie:** 2.5.4~ynh5 + +**Demo:** + +## Schermafdrukken + +![Schermafdrukken van Wallabag](./doc/screenshots/screenshot1.webp) + +## Documentatie en bronnen + +- Officiele website van de app: +- Officiele beheerdersdocumentatie: +- Upstream app codedepot: +- YunoHost-store: +- Meld een bug: + +## Ontwikkelaarsinformatie + +Stuur je pull request alsjeblieft naar de [`testing`-branch](https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing). + +Om de `testing`-branch uit te proberen, ga als volgt te werk: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing --debug +of +sudo yunohost app upgrade wallabag2 -u https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing --debug +``` + +**Verdere informatie over app-packaging:** From ac9a715634b7041382e8174fab281043fdb02049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:28:06 +0200 Subject: [PATCH 15/24] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 0f7cb35..6fde5fb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Wallabag" description.en = "Save and classify articles. Read them later" description.fr = "Enregistrez et classez les articles. Lisez-les plus tard" -version = "2.5.4~ynh5" +version = "2.5.4~ynh6" maintainers = ["lapineige"] From a2d5b3fbbc9b7fd84f8e7fd2978601fd3eec8055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:28:18 +0200 Subject: [PATCH 16/24] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 6fde5fb..82d8d25 100644 --- a/manifest.toml +++ b/manifest.toml @@ -21,7 +21,7 @@ cpe = "cpe:2.3:a:wallabag:wallabag" fund = "https://liberapay.com/wallabag" [integration] -yunohost = ">= 11.2.29" +yunohost = ">= 11.2.30" helpers_version = "2.1" architectures = "all" multi_instance = true From cf0dfcbdfc0cdcedc0e0df8469db05c0e19df549 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 10 Sep 2024 10:28:25 +0000 Subject: [PATCH 17/24] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 2 +- README_nl.md | 2 +- README_ru.md | 2 +- README_zh_Hans.md | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4c7d342..32f0cd0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Shipped version:** 2.5.4~ynh5 +**Shipped version:** 2.5.4~ynh6 **Demo:** diff --git a/README_es.md b/README_es.md index ec234a3..eda8163 100644 --- a/README_es.md +++ b/README_es.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión actual:** 2.5.4~ynh5 +**Versión actual:** 2.5.4~ynh6 **Demo:** diff --git a/README_eu.md b/README_eu.md index 9030b54..28471b8 100644 --- a/README_eu.md +++ b/README_eu.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Paketatutako bertsioa:** 2.5.4~ynh5 +**Paketatutako bertsioa:** 2.5.4~ynh6 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 222a450..59d7fd4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Sont disponibles une interface web, des add-ons pour navigateurs (Firefox/Chrome La mise à niveau depuis le paquet YunoHost de [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) demande une opération manuelle, c'est pourquoi un nouveau paquet est fournit. Pour le processus de migration, merci de vous référer à [la documentation officiel de Wallabag](https://doc.wallabag.org/fr/user/import/wallabagv1.html). -**Version incluse :** 2.5.4~ynh5 +**Version incluse :** 2.5.4~ynh6 **Démo :** diff --git a/README_gl.md b/README_gl.md index b1b622e..6096d3f 100644 --- a/README_gl.md +++ b/README_gl.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión proporcionada:** 2.5.4~ynh5 +**Versión proporcionada:** 2.5.4~ynh6 **Demo:** diff --git a/README_id.md b/README_id.md index a48b36e..385788e 100644 --- a/README_id.md +++ b/README_id.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versi terkirim:** 2.5.4~ynh5 +**Versi terkirim:** 2.5.4~ynh6 **Demo:** diff --git a/README_nl.md b/README_nl.md index 5edede1..4b2dfc1 100644 --- a/README_nl.md +++ b/README_nl.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Geleverde versie:** 2.5.4~ynh5 +**Geleverde versie:** 2.5.4~ynh6 **Demo:** diff --git a/README_ru.md b/README_ru.md index 4bca681..1c3d15a 100644 --- a/README_ru.md +++ b/README_ru.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Поставляемая версия:** 2.5.4~ynh5 +**Поставляемая версия:** 2.5.4~ynh6 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index a878cee..c42d58e 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**分发版本:** 2.5.4~ynh5 +**分发版本:** 2.5.4~ynh6 **演示:** From 16913fb1353fb6e6caa886ad609fd0c426cb207d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:30:21 +0200 Subject: [PATCH 18/24] cleaning --- scripts/backup | 1 - scripts/install | 3 --- scripts/remove | 4 ---- scripts/restore | 1 - scripts/upgrade | 4 ---- 5 files changed, 13 deletions(-) diff --git a/scripts/backup b/scripts/backup index 641e844..0e57a25 100644 --- a/scripts/backup +++ b/scripts/backup @@ -4,7 +4,6 @@ # 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 diff --git a/scripts/install b/scripts/install index 3769250..d5580b9 100644 --- a/scripts/install +++ b/scripts/install @@ -71,13 +71,10 @@ ynh_replace --match="__APP__" --replace="$app" --file="../hooks/post_user_delete #================================================= ynh_script_progression "Adding system configurations related to $app..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm -# Use logrotate to manage application logfile(s) ynh_config_add_logrotate "$install_dir/var/logs/prod.log" # Create a dedicated Fail2Ban config diff --git a/scripts/remove b/scripts/remove index ec528f5..1cc3851 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,16 +12,12 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Removing system configurations related to $app..." -# Remove the app-specific logrotate config ynh_config_remove_logrotate -# Remove the dedicated NGINX config ynh_config_remove_nginx -# Remove the dedicated PHP-FPM config ynh_config_remove_phpfpm -# Remove the dedicated Fail2Ban config ynh_config_remove_fail2ban #================================================= diff --git a/scripts/restore b/scripts/restore index 5e73e7b..b4b5d07 100644 --- a/scripts/restore +++ b/scripts/restore @@ -4,7 +4,6 @@ # 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 diff --git a/scripts/upgrade b/scripts/upgrade index e3d768e..73f9da4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Upgrading source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="app/config/parameters.yml var/logs web/assets/images" # Create log dir/file is it useless? @@ -51,15 +50,12 @@ ynh_replace --match="__APP__" --replace="$app" --file="../hooks/post_user_delete #================================================= ynh_script_progression "Upgrading system configurations related to $app..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm ynh_config_add_logrotate "$install_dir/var/logs/prod.log" -# Add fail2ban config ynh_config_add_fail2ban --logpath="$install_dir/var/logs/prod.log" --failregex='app.ERROR: Authentication failure for user "([\w]+)?", from IP ""' # same as install config #================================================= From 2dd626e7cab0644d050b059983c67af2e5293362 Mon Sep 17 00:00:00 2001 From: JimboJoe Date: Mon, 16 Sep 2024 22:37:25 +0200 Subject: [PATCH 19/24] Put back upstream patches to fix auth problems (#218) --- sources/patches/main-00-ldap-auth.patch | 46 ++++++++++++++ .../main-01-logout-success-handler.patch | 63 +++++++++++++++++++ .../patches/main-02-oauth-workaround.patch | 11 ++++ 3 files changed, 120 insertions(+) create mode 100644 sources/patches/main-00-ldap-auth.patch create mode 100644 sources/patches/main-01-logout-success-handler.patch create mode 100644 sources/patches/main-02-oauth-workaround.patch diff --git a/sources/patches/main-00-ldap-auth.patch b/sources/patches/main-00-ldap-auth.patch new file mode 100644 index 0000000..3a36f5e --- /dev/null +++ b/sources/patches/main-00-ldap-auth.patch @@ -0,0 +1,46 @@ +diff --git a/app/config/security.yml b/app/config/security.yml +index 02afc9ea..5a3f7a34 100644 +--- a/app/config/security.yml ++++ b/app/config/security.yml +@@ -13,6 +13,14 @@ security: + property: username + fos_userbundle: + id: fos_user.user_provider.username_email ++ yunohost_users: ++ ldap: ++ service: yunohost.ldap ++ base_dn: ou=users,dc=yunohost,dc=org ++ search_dn: ++ search_password: ++ filter: (&(uid={username})(objectClass=posixAccount)) ++ default_roles: ROLE_USER + + # the main part of the security, where you can set up firewalls + # for specific sections of your app +@@ -38,6 +46,9 @@ security: + + secured_area: + pattern: ^/ ++ http_basic_ldap: ++ service: yunohost.ldap ++ dn_string: "uid={username},ou=users,dc=yunohost,dc=org" + form_login: + provider: fos_userbundle + csrf_token_generator: security.csrf.token_manager +diff --git a/app/config/services.yml b/app/config/services.yml +index 7b85d846..f23961c5 100644 +--- a/app/config/services.yml ++++ b/app/config/services.yml +@@ -43,6 +43,10 @@ services: + tags: + - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } + ++ yunohost.ldap: ++ class: Symfony\Component\Ldap\LdapClient ++ arguments: ["localhost"] ++ + craue_config_cache_provider: + class: Symfony\Component\Cache\Adapter\FilesystemAdapter + public: false +-- +2.17.1 diff --git a/sources/patches/main-01-logout-success-handler.patch b/sources/patches/main-01-logout-success-handler.patch new file mode 100644 index 0000000..d321d54 --- /dev/null +++ b/sources/patches/main-01-logout-success-handler.patch @@ -0,0 +1,63 @@ +diff --git a/app/config/security.yml b/app/config/security.yml +index 5a3f7a34..1720e741 100644 +--- a/app/config/security.yml ++++ b/app/config/security.yml +@@ -62,7 +62,7 @@ security: + + logout: + path: /logout +- target: / ++ success_handler: yunohost.logout_success_handler + + access_control: + - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } +diff --git a/app/config/services.yml b/app/config/services.yml +index f23961c5..f266e6d1 100644 +--- a/app/config/services.yml ++++ b/app/config/services.yml +@@ -43,6 +43,10 @@ services: + tags: + - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } + ++ yunohost.logout_success_handler: ++ class: Wallabag\YunoHostBundle\Security\LogoutSuccessHandler ++ ++ + yunohost.ldap: + class: Symfony\Component\Ldap\LdapClient + arguments: ["localhost"] +diff --git a/src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php b/src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php +new file mode 100644 +index 00000000..b3268243 +--- /dev/null ++++ b/src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php +@@ -0,0 +1,27 @@ ++encoderFactory->getEncoder($user); + +- if ($encoder->isPasswordValid($user->getPassword(), $password, $user->getSalt())) { ++ if (true) { + return array( + 'data' => $user, + ); From d228d3fc0c0466387949a054e4abec90606eb2d4 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 16 Sep 2024 22:39:04 +0200 Subject: [PATCH 20/24] bump version --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index f9b062c..fcc25a8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -6,7 +6,7 @@ id = "wallabag2" name = "Wallabag" description.en = "Save and classify articles. Read them later" description.fr = "Enregistrez et classez les articles. Lisez-les plus tard" -version = "2.5.4~ynh6" +version = "2.5.4~ynh7" maintainers = ["lapineige"] From 8249e23ba886ca23479de1e47320314c9c673c84 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 16 Sep 2024 20:39:09 +0000 Subject: [PATCH 21/24] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 2 +- README_nl.md | 2 +- README_ru.md | 2 +- README_zh_Hans.md | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 32f0cd0..9c180c7 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Shipped version:** 2.5.4~ynh6 +**Shipped version:** 2.5.4~ynh7 **Demo:** diff --git a/README_es.md b/README_es.md index eda8163..59026a1 100644 --- a/README_es.md +++ b/README_es.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión actual:** 2.5.4~ynh6 +**Versión actual:** 2.5.4~ynh7 **Demo:** diff --git a/README_eu.md b/README_eu.md index 28471b8..6413d14 100644 --- a/README_eu.md +++ b/README_eu.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Paketatutako bertsioa:** 2.5.4~ynh6 +**Paketatutako bertsioa:** 2.5.4~ynh7 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 59d7fd4..486ed25 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Sont disponibles une interface web, des add-ons pour navigateurs (Firefox/Chrome La mise à niveau depuis le paquet YunoHost de [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) demande une opération manuelle, c'est pourquoi un nouveau paquet est fournit. Pour le processus de migration, merci de vous référer à [la documentation officiel de Wallabag](https://doc.wallabag.org/fr/user/import/wallabagv1.html). -**Version incluse :** 2.5.4~ynh6 +**Version incluse :** 2.5.4~ynh7 **Démo :** diff --git a/README_gl.md b/README_gl.md index 6096d3f..2c9c64f 100644 --- a/README_gl.md +++ b/README_gl.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión proporcionada:** 2.5.4~ynh6 +**Versión proporcionada:** 2.5.4~ynh7 **Demo:** diff --git a/README_id.md b/README_id.md index 385788e..1dd1cec 100644 --- a/README_id.md +++ b/README_id.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versi terkirim:** 2.5.4~ynh6 +**Versi terkirim:** 2.5.4~ynh7 **Demo:** diff --git a/README_nl.md b/README_nl.md index 4b2dfc1..fe579f1 100644 --- a/README_nl.md +++ b/README_nl.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Geleverde versie:** 2.5.4~ynh6 +**Geleverde versie:** 2.5.4~ynh7 **Demo:** diff --git a/README_ru.md b/README_ru.md index 1c3d15a..a000145 100644 --- a/README_ru.md +++ b/README_ru.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Поставляемая версия:** 2.5.4~ynh6 +**Поставляемая версия:** 2.5.4~ynh7 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index c42d58e..a5a8963 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**分发版本:** 2.5.4~ynh6 +**分发版本:** 2.5.4~ynh7 **演示:** From 43a05ddb4ed816865dc65dba9bf570902b9800af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 28 Sep 2024 23:18:22 +0200 Subject: [PATCH 22/24] cleaning --- scripts/backup | 4 ---- scripts/change_url | 4 ---- scripts/install | 4 ---- scripts/remove | 4 ---- scripts/restore | 4 ---- scripts/upgrade | 4 ---- 6 files changed, 24 deletions(-) diff --git a/scripts/backup b/scripts/backup index 0e57a25..3ad090b 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,9 +1,5 @@ #!/bin/bash -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/change_url b/scripts/change_url index 885b59a..f297b7f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,9 +1,5 @@ #!/bin/bash -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers diff --git a/scripts/install b/scripts/install index 47cabf9..b3b284c 100644 --- a/scripts/install +++ b/scripts/install @@ -1,9 +1,5 @@ #!/bin/bash -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers diff --git a/scripts/remove b/scripts/remove index 1cc3851..0021f2f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,9 +1,5 @@ #!/bin/bash -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers diff --git a/scripts/restore b/scripts/restore index b4b5d07..feea5e7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,9 +1,5 @@ #!/bin/bash -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/upgrade b/scripts/upgrade index 1555c17..d187fa4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,9 +1,5 @@ #!/bin/bash -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers From 47a2967c861ff18cc75804a3b5f3e846357e4c99 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:10:55 +0200 Subject: [PATCH 23/24] fix (#220) --- scripts/install | 3 ++- scripts/upgrade | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b3b284c..bd65801 100644 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,8 @@ ynh_setup_source --dest_dir="$install_dir" mkdir -p "$install_dir/var/logs/" touch "$install_dir/var/logs/prod.log" +chown -R "$app:www-data" "$install_dir" + # Set permissions to app files # Restrict rights to Wallabag user only if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then @@ -71,7 +73,6 @@ ynh_config_add_phpfpm ynh_config_add_logrotate "$install_dir/var/logs/prod.log" -# Create a dedicated Fail2Ban config ynh_config_add_fail2ban --logpath="$install_dir/var/logs/prod.log" --failregex='app.ERROR: Authentication failure for user "([\w]+)?", from IP ""' #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d187fa4..58af3f7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -14,6 +14,8 @@ ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="app/config/par mkdir -p "$install_dir/var/logs/" touch "$install_dir/var/logs/prod.log" +chown -R "$app:www-data" "$install_dir" + # Set permissions to app files # Restrict rights to Wallabag user only if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then From 36d9a121f50b5f552eb169674ef43d5387f6efe1 Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Sun, 13 Oct 2024 08:04:33 +0200 Subject: [PATCH 24/24] Moved patches around (#223) * Moved patches around * Bump version * Auto-update READMEs --------- Co-authored-by: lapineige Co-authored-by: yunohost-bot --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 2 +- README_nl.md | 2 +- README_ru.md | 2 +- README_zh_Hans.md | 2 +- manifest.toml | 2 +- .../{main-00-ldap-auth.patch => main/00-ldap-auth.patch} | 0 .../01-logout-success-handler.patch} | 0 .../02-oauth-workaround.patch} | 0 13 files changed, 10 insertions(+), 10 deletions(-) rename sources/patches/{main-00-ldap-auth.patch => main/00-ldap-auth.patch} (100%) rename sources/patches/{main-01-logout-success-handler.patch => main/01-logout-success-handler.patch} (100%) rename sources/patches/{main-02-oauth-workaround.patch => main/02-oauth-workaround.patch} (100%) diff --git a/README.md b/README.md index 9c180c7..6d97d95 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Shipped version:** 2.5.4~ynh7 +**Shipped version:** 2.5.4~ynh9 **Demo:** diff --git a/README_es.md b/README_es.md index 59026a1..05de54e 100644 --- a/README_es.md +++ b/README_es.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión actual:** 2.5.4~ynh7 +**Versión actual:** 2.5.4~ynh9 **Demo:** diff --git a/README_eu.md b/README_eu.md index 6413d14..f10cfda 100644 --- a/README_eu.md +++ b/README_eu.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Paketatutako bertsioa:** 2.5.4~ynh7 +**Paketatutako bertsioa:** 2.5.4~ynh9 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 486ed25..350c4a2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Sont disponibles une interface web, des add-ons pour navigateurs (Firefox/Chrome La mise à niveau depuis le paquet YunoHost de [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) demande une opération manuelle, c'est pourquoi un nouveau paquet est fournit. Pour le processus de migration, merci de vous référer à [la documentation officiel de Wallabag](https://doc.wallabag.org/fr/user/import/wallabagv1.html). -**Version incluse :** 2.5.4~ynh7 +**Version incluse :** 2.5.4~ynh9 **Démo :** diff --git a/README_gl.md b/README_gl.md index 2c9c64f..819cbb7 100644 --- a/README_gl.md +++ b/README_gl.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versión proporcionada:** 2.5.4~ynh7 +**Versión proporcionada:** 2.5.4~ynh9 **Demo:** diff --git a/README_id.md b/README_id.md index 1dd1cec..e46b560 100644 --- a/README_id.md +++ b/README_id.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Versi terkirim:** 2.5.4~ynh7 +**Versi terkirim:** 2.5.4~ynh9 **Demo:** diff --git a/README_nl.md b/README_nl.md index fe579f1..2498f4d 100644 --- a/README_nl.md +++ b/README_nl.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Geleverde versie:** 2.5.4~ynh7 +**Geleverde versie:** 2.5.4~ynh9 **Demo:** diff --git a/README_ru.md b/README_ru.md index a000145..9e68a09 100644 --- a/README_ru.md +++ b/README_ru.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**Поставляемая версия:** 2.5.4~ynh7 +**Поставляемая версия:** 2.5.4~ynh9 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index a5a8963..1d841aa 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -22,7 +22,7 @@ It provides a web interface, browser (Firefox/Chrome/Opera) add-ons, mobile apps Upgrade from the YunoHost [Wallabag v1](https://github.com/YunoHost-Apps/wallabag_ynh) app requires a manual operation. That's why it's provided as a new package. For the migration process, please refer to the [Wallabag official documentation](https://doc.wallabag.org/en/user/import/wallabagv1.html). -**分发版本:** 2.5.4~ynh7 +**分发版本:** 2.5.4~ynh9 **演示:** diff --git a/manifest.toml b/manifest.toml index fcc25a8..f210ff3 100644 --- a/manifest.toml +++ b/manifest.toml @@ -6,7 +6,7 @@ id = "wallabag2" name = "Wallabag" description.en = "Save and classify articles. Read them later" description.fr = "Enregistrez et classez les articles. Lisez-les plus tard" -version = "2.5.4~ynh7" +version = "2.5.4~ynh9" maintainers = ["lapineige"] diff --git a/sources/patches/main-00-ldap-auth.patch b/sources/patches/main/00-ldap-auth.patch similarity index 100% rename from sources/patches/main-00-ldap-auth.patch rename to sources/patches/main/00-ldap-auth.patch diff --git a/sources/patches/main-01-logout-success-handler.patch b/sources/patches/main/01-logout-success-handler.patch similarity index 100% rename from sources/patches/main-01-logout-success-handler.patch rename to sources/patches/main/01-logout-success-handler.patch diff --git a/sources/patches/main-02-oauth-workaround.patch b/sources/patches/main/02-oauth-workaround.patch similarity index 100% rename from sources/patches/main-02-oauth-workaround.patch rename to sources/patches/main/02-oauth-workaround.patch