From b1b8f9b8b5751d40975a8cfb0045b2adcff5262d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 25 Feb 2019 14:51:36 +0100 Subject: [PATCH 01/15] change notifications --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index be31990..489cdc3 100755 --- a/check_process +++ b/check_process @@ -39,5 +39,5 @@ Level 9=0 Level 10=0 ;;; Options -Email=anmol@datamol.org -Notification=yes +Email=anmol@datamol.org;yalh@yahoo.com +Notification=change From 036a5674af68fb23717f2845e0b8bcf2163bf23a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 25 Feb 2019 14:55:31 +0100 Subject: [PATCH 02/15] Add notifications --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 489cdc3..4da5afc 100755 --- a/check_process +++ b/check_process @@ -40,4 +40,4 @@ Level 10=0 ;;; Options Email=anmol@datamol.org;yalh@yahoo.com -Notification=change +Notification=yes From 0330150c88c691944ac78702076bd1749bbb808b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 14 Mar 2019 01:15:26 +0100 Subject: [PATCH 03/15] Apply last example_ynh --- pull_request_template.md | 23 +++++++++++++++++++++++ scripts/_common.sh | 7 +++++++ scripts/install | 3 ++- scripts/restore | 3 +-- scripts/upgrade | 2 +- 5 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 pull_request_template.md diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 0000000..df09865 --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,23 @@ +## Problem +- *Description of why you made this PR* + +## Solution +- *And how do you fix that problem* + +## PR Status +- [ ] Code finished. +- [ ] Tested with Package_check. +- [ ] Fix or enhancement tested. +- [ ] Upgrade from last version tested. +- [ ] Can be reviewed and tested. + +## Validation +--- +- [ ] **Code review** +- [ ] **Approval (LGTM)** +*Code review and approval have to be from a member of @YunoHost/apps group* +- **CI succeeded** : +[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/plume_ynh%20-BRANCH-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/plume_ynh%20-BRANCH-/) +*Please replace '-BRANCH-' in this link by the name of the branch used.* +*If the PR is from a forked repository. Please provide public results from package_check.* +When the PR is marked as ready to merge, you have to wait for 3 days before really merging it. diff --git a/scripts/_common.sh b/scripts/_common.sh index b905339..c5d4d5a 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,5 +1,12 @@ #!/bin/bash +#================================================= +# COMMON VARIABLES +#================================================= + +# dependencies used by the app +pkg_dependencies="gettext postgresql postgresql-contrib libpq-dev git curl gcc make openssl libssl-dev pkg-config" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 0552f38..eeda0f3 100755 --- a/scripts/install +++ b/scripts/install @@ -105,10 +105,11 @@ ynh_print_info "Installing dependencies ..." ### Those deb packages will be installed as dependencies of this package. ### If you're not using this helper: ### - Remove the section "REMOVE DEPENDENCIES" in the remove script +### - Remove the variable "pkg_dependencies" in _common.sh ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script -ynh_install_app_dependencies gettext postgresql postgresql-contrib libpq-dev git curl gcc make openssl libssl-dev pkg-config +ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE A POSTGRESQL DATABASE diff --git a/scripts/restore b/scripts/restore index 4ede30e..002d3a4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -88,8 +88,7 @@ chown -R "$app":"$app" $final_path ynh_print_info "Reinstalling dependencies..." # Define and install dependencies -ynh_install_app_dependencies gettext postgresql postgresql-contrib libpq-dev git curl gcc make openssl libssl-dev pkg-config - +ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE POSTGRESQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index e355cd4..5d22a14 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -122,7 +122,7 @@ ynh_add_nginx_config #================================================= ynh_print_info "Upgrading dependencies..." -ynh_install_app_dependencies gettext postgresql postgresql-contrib libpq-dev git curl gcc make openssl libssl-dev pkg-config +ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER From 7caece6d68b7e45db425d1cda243a4196861b441 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 20 Mar 2019 02:30:59 +0100 Subject: [PATCH 04/15] Adding yunohost panel --- conf/.env | 6 ++++++ conf/nginx.conf | 3 +++ 2 files changed, 9 insertions(+) diff --git a/conf/.env b/conf/.env index b567ad6..9574cd9 100755 --- a/conf/.env +++ b/conf/.env @@ -17,3 +17,9 @@ ROCKET_ADDRESS=127.0.0.1 # Secret key used for private cookies and CSRF protection # You can generate one with `openssl rand -base64 32` ROCKET_SECRET_KEY=__SECRET_KEY__ + +# Mail settings +MAIL_SERVER=localhost +#MAIL_USER=example +#MAIL_PASSWORD=123456 +MAIL_HELO_NAME=__DOMAIN__ \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index 714cd7c..905a312 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -16,4 +16,7 @@ location ~* \.(jpg|jpeg|png|gif|ico|js|pdf)$ { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; client_max_body_size 10m; + + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } From 118fe148c17060fa06661b470b91e0873f82f7e1 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 20 Mar 2019 02:41:09 +0100 Subject: [PATCH 05/15] remove openssl --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index eeda0f3..92967b0 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ password=$YNH_APP_ARG_PASSWORD instance_name=$YNH_APP_ARG_NAME registration=$YNH_APP_ARG_REGISTRATION admin_email=$(ynh_user_get_info $admin 'mail') -secret_key=$(openssl rand -base64 32) +secret_key="$(ynh_string_random 32)=" ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID From 9fc8538b7d214c30977e360ab68aa93df4a91ef9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 20 Mar 2019 02:44:17 +0100 Subject: [PATCH 06/15] Update nginx.conf --- conf/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 905a312..2137baf 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,4 @@ -location ~* \.(jpg|jpeg|png|gif|ico|js|pdf)$ { - root __FINALPATH__/__NAME__; + location ~* \.(jpg|jpeg|png|gif|ico|js|pdf|wasm)$ { add_header Cache-Control "public"; expires 7d; } From 8e8224fea8715b27f07edec8f5077aacbabe1d30 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 20 Mar 2019 04:24:43 +0100 Subject: [PATCH 07/15] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 92967b0..682664e 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ password=$YNH_APP_ARG_PASSWORD instance_name=$YNH_APP_ARG_NAME registration=$YNH_APP_ARG_REGISTRATION admin_email=$(ynh_user_get_info $admin 'mail') -secret_key="$(ynh_string_random 32)=" +secret_key="$(ynh_string_random 256)=" ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID From 27e1050b6865b13175ea11710640bcca0b6666c4 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 20 Mar 2019 12:12:06 +0100 Subject: [PATCH 08/15] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 682664e..6f42d57 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,8 @@ password=$YNH_APP_ARG_PASSWORD instance_name=$YNH_APP_ARG_NAME registration=$YNH_APP_ARG_REGISTRATION admin_email=$(ynh_user_get_info $admin 'mail') -secret_key="$(ynh_string_random 256)=" +secret_key=$(ynh_string_random 32) +secret_key="${secret_key}=" ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID From 945e5d9637e1914b588cd7ac12a530d7759f652b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 20 Mar 2019 13:38:59 +0100 Subject: [PATCH 09/15] Increase key size --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6f42d57..4c3ea03 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ password=$YNH_APP_ARG_PASSWORD instance_name=$YNH_APP_ARG_NAME registration=$YNH_APP_ARG_REGISTRATION admin_email=$(ynh_user_get_info $admin 'mail') -secret_key=$(ynh_string_random 32) +secret_key=$(ynh_string_random 64) secret_key="${secret_key}=" ### If it's a multi-instance app, meaning it can be installed several times independently From 0fdf14b9b53a08fd0b345823c029737b84249197 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 20 Mar 2019 23:37:50 +0100 Subject: [PATCH 10/15] fix ynh_string_random --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 4c3ea03..9ea734b 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ password=$YNH_APP_ARG_PASSWORD instance_name=$YNH_APP_ARG_NAME registration=$YNH_APP_ARG_REGISTRATION admin_email=$(ynh_user_get_info $admin 'mail') -secret_key=$(ynh_string_random 64) +secret_key=$(ynh_string_random 43) secret_key="${secret_key}=" ### If it's a multi-instance app, meaning it can be installed several times independently From c6db1e0f8feb58205138418ccbf4ee7183180c71 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 21 Mar 2019 05:53:01 +0100 Subject: [PATCH 11/15] fix secret key creation --- scripts/_common.sh | 2 +- scripts/install | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index c5d4d5a..aa40270 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="gettext postgresql postgresql-contrib libpq-dev git curl gcc make openssl libssl-dev pkg-config" +pkg_dependencies="gettext postgresql postgresql-contrib libpq-dev git curl gcc make openssl libssl-dev pkg-config openssl" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 9ea734b..7cc05af 100755 --- a/scripts/install +++ b/scripts/install @@ -33,8 +33,6 @@ password=$YNH_APP_ARG_PASSWORD instance_name=$YNH_APP_ARG_NAME registration=$YNH_APP_ARG_REGISTRATION admin_email=$(ynh_user_get_info $admin 'mail') -secret_key=$(ynh_string_random 43) -secret_key="${secret_key}=" ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID @@ -77,7 +75,6 @@ ynh_app_setting_set $app is_public $is_public ynh_app_setting_set $app instance $instance_name ynh_app_setting_set $app registration $registration ynh_app_setting_set $app admin_email $admin_email -ynh_app_setting_set $app secret_key $secret_key #================================================= # STANDARD MODIFICATIONS @@ -200,6 +197,9 @@ chown -R "$app":"$app" "/var/log/$app" # MODIFY A CONFIG FILE #================================================= +secret_key=$(openssl rand -base64 32) +ynh_app_setting_set $app secret_key $secret_key + # setup application config sudo cp "../conf/.env" "$final_path/$app/.env" ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/$app/.env" From 59fa6ffe8174c74eea80f3f2512ae22a40c2b50a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 21 Mar 2019 06:01:58 +0100 Subject: [PATCH 12/15] secret back to original --- scripts/install | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 7cc05af..eeda0f3 100755 --- a/scripts/install +++ b/scripts/install @@ -33,6 +33,7 @@ password=$YNH_APP_ARG_PASSWORD instance_name=$YNH_APP_ARG_NAME registration=$YNH_APP_ARG_REGISTRATION admin_email=$(ynh_user_get_info $admin 'mail') +secret_key=$(openssl rand -base64 32) ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID @@ -75,6 +76,7 @@ ynh_app_setting_set $app is_public $is_public ynh_app_setting_set $app instance $instance_name ynh_app_setting_set $app registration $registration ynh_app_setting_set $app admin_email $admin_email +ynh_app_setting_set $app secret_key $secret_key #================================================= # STANDARD MODIFICATIONS @@ -197,9 +199,6 @@ chown -R "$app":"$app" "/var/log/$app" # MODIFY A CONFIG FILE #================================================= -secret_key=$(openssl rand -base64 32) -ynh_app_setting_set $app secret_key $secret_key - # setup application config sudo cp "../conf/.env" "$final_path/$app/.env" ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/$app/.env" From 8c553d576ac17ab832624737c5ce93cf6138e7f0 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 21 Mar 2019 20:44:54 +0100 Subject: [PATCH 13/15] fix logo not shown --- conf/nginx.conf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 2137baf..b04a44a 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,8 +1,3 @@ - location ~* \.(jpg|jpeg|png|gif|ico|js|pdf|wasm)$ { - add_header Cache-Control "public"; - expires 7d; - } - location / { # Force usage of https if ($scheme = http) { From fab8c15c089a4ef4ed56ee8520335bd41641a0e8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 21 Mar 2019 21:59:44 +0100 Subject: [PATCH 14/15] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 0c80e99..0dddc92 100755 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ Federated blogging engine, based on ActivityPub. It uses the Rocket framework, a 1. **Plume** require a valid **certificate** installed on the domain. Yunohost can **install Letsencrypt certificate** on the domain from **admin web-interface** or through **command-line**. 1. This package is **multi-instance** that means you can run **multiple Plume instances** on a **single server**. 1. There is **No LDAP** support for Plume yet. -1. **Admin username** and **password** will be sent to the **email address** of the admin. ## Screenshots @@ -37,8 +36,7 @@ Federated blogging engine, based on ActivityPub. It uses the Rocket framework, a #### Multi-users support -There is **No LDAP** support for Plume yet -But the app can be used by multiple users +There is **No LDAP** support for Plume yet but the app can be used by multiple users #### Supported architectures From 3f0310d10fd73fd272ed41ebf665c168de94b2d4 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 21 Mar 2019 22:00:50 +0100 Subject: [PATCH 15/15] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 2b937fd..2233860 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Federated blogging application", "fr": "Une application de blogging fédérée." }, - "version": "0.2.0~ynh2", + "version": "0.2.0~ynh3", "url": "https://baptiste.gelez.xyz/", "license": "AGPL-3.0-only", "maintainer": {