From 92bf7992dd6cc828985b80e214113dafda35e0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 22 Oct 2020 15:16:29 +0200 Subject: [PATCH 1/8] Add badges --- README.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fec6d41..57b007a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Wallabag for YunoHost -[![Integration level](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) +[![Integration level](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) [![Install Wallabag with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=wallabag2) *[Lire ce readme en français.](./README_fr.md)* @@ -10,8 +10,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview -[Wallabag](https://www.wallabag.org/) is a self hostable Read-It-Later application allowing -you to not miss any content anymore. Click, save, read it when you can. +[Wallabag](https://www.wallabag.org/) is a self hostable Read-It-Later application allowing you to not miss any content anymore. Click, save, read it when you can. It extracts content so that you can read it when you have time. It provides a web interface, browser (Firefox / Chrome / Opera) add-ons, mobile apps (Android / iOS / Windows Phone) and even on e-reader (PocketBook / Kobo). @@ -36,8 +35,7 @@ It provides a web interface, browser (Firefox / Chrome / Opera) add-ons, mobile ## YunoHost specific features -In addition to Wallabag core features, the following are made available with -this package: +In addition to Wallabag core features, the following are made available with this package: * Integrate with YunoHost users and SSO - i.e. logout button * Allow one user to be the administrator (set at the installation) @@ -47,9 +45,8 @@ this package: #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/wallabag2%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/wallabag2%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/wallabag2%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/wallabag2/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/wallabag2%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/wallabag2/) ## Limitations @@ -75,10 +72,8 @@ For the migration process, please refer to the --- -Developers and testers info ----------------- +## Developers and testers info -**Only if you want to use a testing branch for coding, instead of merging directly into master.** Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing). To try the testing branch, please proceed like that: From 655fa6c34bf89f98fc1eda2178642aa0c8948107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 22 Oct 2020 15:19:43 +0200 Subject: [PATCH 2/8] Add badges --- README_fr.md | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/README_fr.md b/README_fr.md index b44b297..d47f30e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,18 +1,18 @@ # Wallabag pour YunoHost -[![Integration level](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) +[![Integration level](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) [![Install Wallabag with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=wallabag2) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Wallabag rapidement et simplement sur un serveur Yunohost. +> *Ce package vous permet d'installer Wallabag rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble [Wallabag](https://www.wallabag.org/) est une application de lecture différée : elle permet simplement d’archiver une page web en ne conservant que le contenu. Les éléments superflus (menus, publicités, etc.) sont supprimés. -Sont disponibles: une interface web, des add-ons pour navigateurs (Firefox / Chrome / Opera), des applications pour mobile (Android / iOS / Windows Phone) et même sur liseuse (PocketBook / Kobo). +Sont disponibles une interface web, des add-ons pour navigateurs (Firefox / Chrome / Opera), des applications pour mobile (Android / iOS / Windows Phone) et même sur liseuse (PocketBook / Kobo). **Version incluse:** 2.3.8 @@ -29,14 +29,14 @@ Sont disponibles: une interface web, des add-ons pour navigateurs (Firefox / Chr ## Documentation - * Documentation officielle: https://doc.wallabag.org/fr/ - * Documentation YunoHost: https://yunohost.org/#/app_wallabag2 + * Documentation officielle : https://doc.wallabag.org/fr/ + * Documentation YunoHost : https://yunohost.org/#/app_wallabag2 ## Caractéristiques spécifiques YunoHost -En plus des fonctionnalités principales de Wallabag, ce paquet propose également: +En plus des fonctionnalités principales de Wallabag, ce paquet propose également : - * Une intégration avec le système de gestion des utilisateurs et le SSO de Yunohost - e.g. un bouton de déconnexion + * Une intégration avec le système de gestion des utilisateurs et le SSO de YunoHost - e.g. un bouton de déconnexion * De permettre à un utilisateur d'être administrateur (réglage lors de l'installation) * Un import asynchrone utilisant Redis (à activer dans les *Paramètres Internes*). L'import via RabbitMQ n'est pas (encore ?) supporté. @@ -44,13 +44,12 @@ En plus des fonctionnalités principales de Wallabag, ce paquet propose égaleme #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/wallabag2%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/wallabag2%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/wallabag2%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/wallabag2/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/wallabag2%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/wallabag2/) ## Limitations -* Supprimer un utilisateur Yunohost ne supprimera pas l'utilisateur Wallabag lié, il sera seulement désactivé. Vous devez le supprimer manuellement avant. Voir: https://github.com/YunoHost-Apps/wallabag2_ynh/issues/39 +* Supprimer un utilisateur YunoHost ne supprimera pas l'utilisateur Wallabag lié, il sera seulement désactivé. Vous devez le supprimer manuellement avant. Voir : https://github.com/YunoHost-Apps/wallabag2_ynh/issues/39 ## Informations additionnelles @@ -59,25 +58,23 @@ En plus des fonctionnalités principales de Wallabag, ce paquet propose égaleme #### Mettre à niveau depuis la v1 -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. +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). ## Links - * Signaler un bug: https://github.com/YunoHost-Apps/wallabag2_ynh/issues - * Site de l'application: https://www.wallabag.org/ - * Dépôt de l'application principale: https://github.com/wallabag/wallabag - * Site web YunoHost: https://yunohost.org/ + * Signaler un bug : https://github.com/YunoHost-Apps/wallabag2_ynh/issues + * Site de l'application : https://www.wallabag.org/ + * Dépôt de l'application principale : https://github.com/wallabag/wallabag + * Site web YunoHost : https://yunohost.org/ --- -Informations pour les développeurs ----------------- +## Informations pour les développeurs -**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing). -Pour essayer la branche testing, procédez comme ceci: +Pour essayer la branche testing, procédez comme ceci : ``` sudo yunohost app install https://github.com/YunoHost-Apps/wallabag2_ynh/tree/testing --debug ou From 6cb77845482c89b3e8e8be8b29ac0da4813db7ee Mon Sep 17 00:00:00 2001 From: Yunohost-Bot Date: Mon, 15 Mar 2021 00:23:05 +0100 Subject: [PATCH 3/8] [autopatch] Missing ynh_abort_if_errors in change_url scripts --- scripts/change_url | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/change_url b/scripts/change_url index d26bf9f..7db3313 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -8,6 +8,7 @@ source _common.sh source /usr/share/yunohost/helpers +ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS From d30c500de0cacaa6aff141be14e85ad440fd42ba Mon Sep 17 00:00:00 2001 From: Yunohost-Bot Date: Mon, 15 Mar 2021 00:27:47 +0100 Subject: [PATCH 4/8] [autopatch] Autopatch to migrate to new permission system --- scripts/install | 3 ++- scripts/upgrade | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1005880..692bddf 100644 --- a/scripts/install +++ b/scripts/install @@ -178,9 +178,10 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil # SETUP SSOWAT #================================================= ynh_script_progression --message="Configuring SSOwat..." +ynh_permission_update --permission="main" --add="visitors" # Set SSOwat rules -ynh_app_setting_set $app unprotected_uris "/" + #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index baa15cf..1170198 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,6 +68,16 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# Migrate legacy permissions to new system +#================================================= +if ynh_legacy_permissions_exists +then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # CHECK THE PATH #================================================= From 8407715c9869528da4f42d0d5584e7c3616f5053 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 6 Apr 2021 14:44:43 +0200 Subject: [PATCH 5/8] Remove stale comment --- scripts/install | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/install b/scripts/install index 692bddf..375add7 100644 --- a/scripts/install +++ b/scripts/install @@ -180,9 +180,6 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil ynh_script_progression --message="Configuring SSOwat..." ynh_permission_update --permission="main" --add="visitors" -# Set SSOwat rules - - #================================================= # RELOAD NGINX #================================================= From dddcb5789fc4f579b521f83de89d3045d74b5ac5 Mon Sep 17 00:00:00 2001 From: Jules-Bertholet Date: Thu, 8 Apr 2021 16:59:54 -0400 Subject: [PATCH 6/8] Tighten permissions (#99) * Tighten permissions * Check for existence of cache file before chmoding it --- scripts/_common.sh | 16 ++++++++++++++++ scripts/install | 7 +------ scripts/restore | 5 +++-- scripts/upgrade | 7 +------ 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index ab8759c..bf96bab 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,6 +7,22 @@ # dependencies used by the app pkg_dependencies="php-cli php-mysql php-json php-gd php-tidy php-curl php-gettext php-redis" +#================================================= +# PERSONAL HELPERS +#================================================= + +function set_permissions { + # Set permissions to app files + chown -R $app:www-data $final_path + chmod -R g=u,g-w,o-rwx $final_path + + # Restrict rights to Wallabag user only + chmod 600 $wb_conf + if [ -e $final_path/var/cache/prod/appProdProjectContainer.php ]; then + chmod 700 $final_path/var/cache/prod/appProdProjectContainer.php + fi +} + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 375add7..8867d0f 100644 --- a/scripts/install +++ b/scripts/install @@ -160,12 +160,7 @@ ynh_add_fail2ban_config --logpath="/var/www/$app/var/logs/prod.log" --failregex= # SECURE FILES AND DIRECTORIES #================================================= -# Restrict rights to Wallabag user only -chmod 600 $wb_conf - -# Set permissions to app files -chown -R $app: $final_path -chmod 755 $final_path +set_permissions #================================================= # SETUP HOOKS diff --git a/scripts/restore b/scripts/restore index ec62624..1654db7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,8 +66,9 @@ ynh_system_user_create --username=$app # RESTORE USER RIGHTS #================================================= -# Restore permissions on app files -chown -R $app: $final_path +wb_conf=$final_path/app/config/parameters.yml + +set_permissions #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 1170198..94bc0d9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -191,12 +191,7 @@ fi # SECURE FILES AND DIRECTORIES #================================================= -# Restrict rights to Wallabag user only -chmod 600 $wb_conf - -# Set permissions to app files -chown -R $app: $final_path -chmod 755 $final_path +set_permissions #================================================= # SETUP HOOKS From 46b0882ca1e6f6f4aa5721608e1e94df4fe3f02f Mon Sep 17 00:00:00 2001 From: Jules-Bertholet Date: Thu, 8 Apr 2021 17:01:03 -0400 Subject: [PATCH 7/8] Install PHP packages of YNH_PHP_VERSION (#100) Quash the last package_check warning --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index bf96bab..f58d4bf 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="php-cli php-mysql php-json php-gd php-tidy php-curl php-gettext php-redis" +pkg_dependencies="php$YNH_DEFAULT_PHP_VERSION-cli php$YNH_DEFAULT_PHP_VERSION-mysql php$YNH_DEFAULT_PHP_VERSION-json php$YNH_DEFAULT_PHP_VERSION-gd php$YNH_DEFAULT_PHP_VERSION-tidy php$YNH_DEFAULT_PHP_VERSION-curl php$YNH_DEFAULT_PHP_VERSION-gettext php$YNH_DEFAULT_PHP_VERSION-redis" #================================================= # PERSONAL HELPERS From fc847322efbede1654d4c201ffd5855e3cb53774 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 9 Apr 2021 10:04:14 +0200 Subject: [PATCH 8/8] Update package version + yunohost requirements CI gives us this warning: > ! Using official helper ynh_permission_update implies requiring at least version 3.7.0, but manifest only requires 3.5 --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 6908b1c..af4a8cd 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A self hostable read-it-later app", "fr": "Une application de lecture-plus-tard auto-hébergeable" }, - "version": "2.3.8~ynh2", + "version": "2.3.8~ynh3", "url": "https://www.wallabag.org", "license": "MIT", "maintainer": { @@ -14,7 +14,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 3.5" + "yunohost": ">= 3.7.0" }, "multi_instance": true, "services": [