From 60d8cbe481ec12c2821f2bc1a0f718ecb21110e6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 31 Jan 2022 23:25:11 +0100 Subject: [PATCH 01/35] Set env path --- scripts/install | 3 +-- scripts/upgrade | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 23c4c4d..6dbebbe 100644 --- a/scripts/install +++ b/scripts/install @@ -107,8 +107,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" - +env_path="$PATH" ynh_add_systemd_config #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0cafe05..ec81c07 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -134,8 +134,7 @@ popd #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" - +env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config From eed8dac48b149f77416b68c38b31daa51273d710 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 31 Jan 2022 23:25:54 +0100 Subject: [PATCH 02/35] Set 4.3 --- conf/nginx.conf | 5 ----- manifest.json | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 6f67957..1fd74de 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,5 @@ location ^~ / { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - proxy_pass http://127.0.0.1:__PORT__; proxy_redirect off; proxy_set_header Host $host; diff --git a/manifest.json b/manifest.json index dc4451c..dbe6564 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "url": "https://frju365.yunohost.support" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ From d576b2bb026881bc105c2a647aed3536311e637b Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Tue, 1 Feb 2022 00:57:07 +0100 Subject: [PATCH 03/35] Update DISCLAIMER.md --- doc/DISCLAIMER.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index bdc64b0..74af53c 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -9,3 +9,4 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` +3. Restart the CryptPad service From dbdfea00fbace22e8a68ffc97e1211c0ea549cf0 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Mon, 31 Jan 2022 23:59:19 +0000 Subject: [PATCH 04/35] Update DISCLAIMER_fr.md --- doc/DISCLAIMER_fr.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index ca9d712..1f2d169 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -9,3 +9,4 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` +3. Redémarrer le service CryptPad From a5e3f4a682fbb1765bc2213fdfbb9087eb75017b Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 1 Feb 2022 08:27:47 +0000 Subject: [PATCH 05/35] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 06842b6..068895f 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` +3. Restart the CryptPad service ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 28272bc..235eab2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -34,6 +34,7 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` +3. Redémarrer le service CryptPad ## Documentations et ressources From 26fb178af72beb6867294158ac5aeb2a83c1b9cc Mon Sep 17 00:00:00 2001 From: rungeard <61117338+rungeard@users.noreply.github.com> Date: Tue, 1 Feb 2022 09:44:12 +0100 Subject: [PATCH 06/35] Update DISCLAIMER.md It would help beginners. Cf -> https://forum.yunohost.org/t/cryptpad-augmentation-stockage-50mo-pour-linstant/18662/6 --- doc/DISCLAIMER.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index bdc64b0..3baf32a 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -9,3 +9,4 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` +3. Restart CryptPad (In YunoHost webadmin -> Services -> Cryptpad -> Restart From 0203c1377a5273bea59a6c77fe2412f6c1687372 Mon Sep 17 00:00:00 2001 From: rungeard <61117338+rungeard@users.noreply.github.com> Date: Tue, 1 Feb 2022 09:46:46 +0100 Subject: [PATCH 07/35] Update DISCLAIMER_fr.md Same as #121 but in french --- doc/DISCLAIMER_fr.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index ca9d712..f7f3fb7 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -9,3 +9,4 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` +3. Redémarrer CryptPad (Dans WebAdmin YunoHost -> Services -> Cryptpad -> Redémarrer) From 180c3615f24b185d0f72a54875e7f9f469928e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 1 Feb 2022 09:56:29 +0100 Subject: [PATCH 08/35] Update doc/DISCLAIMER.md --- doc/DISCLAIMER.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 3baf32a..8ddcd48 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -9,4 +9,4 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` -3. Restart CryptPad (In YunoHost webadmin -> Services -> Cryptpad -> Restart +3. Restart CryptPad (In YunoHost webadmin -> Services -> cryptpad -> Restart) From 9bb609c24be432bd98473c99812a3be97e99992c Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 1 Feb 2022 08:57:52 +0000 Subject: [PATCH 09/35] Auto-update README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 068895f..edce6bf 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,8 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` -3. Restart the CryptPad service + +3. Restart CryptPad service (In YunoHost webadmin -> Services -> cryptpad -> Restart) ## Documentation and resources From ccf85bd82ba95c453a19630c5fa66fd3f2b9a8b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 1 Feb 2022 10:00:53 +0100 Subject: [PATCH 10/35] Update doc/DISCLAIMER_fr.md --- doc/DISCLAIMER_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index f7f3fb7..9de6f5c 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -9,4 +9,4 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` -3. Redémarrer CryptPad (Dans WebAdmin YunoHost -> Services -> Cryptpad -> Redémarrer) +3. Redémarrer le service CryptPad (Dans webadmin YunoHost -> Services -> cryptpad -> Redémarrer) From 2576c55aa997bd05b490d7566774571a43533c61 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 1 Feb 2022 09:01:33 +0000 Subject: [PATCH 11/35] Auto-update README --- README_fr.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 235eab2..91b9f9a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -34,7 +34,8 @@ adminKeys: [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]", ], ``` -3. Redémarrer le service CryptPad + +3. Redémarrer le service CryptPad (Dans webadmin YunoHost -> Services -> cryptpad -> Redémarrer) ## Documentations et ressources From 397a43aaa38955852cef6cd885598747dca18d01 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 17 Feb 2022 06:18:24 +0000 Subject: [PATCH 12/35] Upgrade to v4.13.0 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index dc4451c..eda2ddf 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Zero Knowledge realtime collaborative editor", "fr": "Éditeur chiffré collaboratif en temps réel" }, - "version": "4.12.0~ynh1", + "version": "4.13.0~ynh1", "url": "https://cryptpad.fr/", "upstream": { "license": "AGPL-3.0-only", From 8b1e760cc1730a8d2b960634853998c90152725f Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 17 Feb 2022 06:18:28 +0000 Subject: [PATCH 13/35] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 06842b6..b6cd4f8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in CryptPad is a collaboration suite that is end-to-end-encrypted and open-source. It is built to enable collaboration, synchronizing changes to documents in real time. Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored. -**Shipped version:** 4.12.0~ynh1 +**Shipped version:** 4.13.0~ynh1 **Demo:** https://cryptpad.fr/ diff --git a/README_fr.md b/README_fr.md index 28272bc..4c42bd8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour CryptPad est une suite de collaboration chiffrée de bout en bout et open source. Il est conçu pour permettre la collaboration, en synchronisant les modifications apportées aux documents en temps réel. Étant donné que toutes les données sont chiffrées, le service et ses administrateurs n'ont aucun moyen de voir le contenu modifié et stocké. -**Version incluse :** 4.12.0~ynh1 +**Version incluse :** 4.13.0~ynh1 **Démo :** https://cryptpad.fr/ From 00d1ba29c01bfc416392c8912324cc8ee99fd791 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Apr 2022 13:40:29 +0200 Subject: [PATCH 14/35] 4.14.0 --- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/_common.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/app.src b/conf/app.src index 70ad03b..1460bbb 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/4.11.0.tar.gz -SOURCE_SUM=e529b484c297f73227f991971189c51f64da1ab53fc78334d1fb08e320d4385e +SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/4.14.0.tar.gz +SOURCE_SUM=c49cb335b473ecf6b4e9904a8e702eb66a27fe23badc8f7cea144baedda96b27 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 37a8661..1591152 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Zero Knowledge realtime collaborative editor", "fr": "Éditeur chiffré collaboratif en temps réel" }, - "version": "4.13.0~ynh1", + "version": "4.14.0~ynh1", "url": "https://cryptpad.fr/", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index f9d06de..abe565d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version="14" +nodejs_version="16" #================================================= # PERSONAL HELPERS From 12267e366ffb0d6588f91fb715ad52b0dce03ef8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 4 Apr 2022 11:40:38 +0000 Subject: [PATCH 15/35] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9a1c4dd..9870314 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in CryptPad is a collaboration suite that is end-to-end-encrypted and open-source. It is built to enable collaboration, synchronizing changes to documents in real time. Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored. -**Shipped version:** 4.13.0~ynh1 +**Shipped version:** 4.14.0~ynh1 **Demo:** https://cryptpad.fr/ diff --git a/README_fr.md b/README_fr.md index 6d1ee40..47df878 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour CryptPad est une suite de collaboration chiffrée de bout en bout et open source. Il est conçu pour permettre la collaboration, en synchronisant les modifications apportées aux documents en temps réel. Étant donné que toutes les données sont chiffrées, le service et ses administrateurs n'ont aucun moyen de voir le contenu modifié et stocké. -**Version incluse :** 4.13.0~ynh1 +**Version incluse :** 4.14.0~ynh1 **Démo :** https://cryptpad.fr/ From 5162591244118d927fe6607fee901da97be75a73 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Apr 2022 14:01:27 +0200 Subject: [PATCH 16/35] Fix --- .github/workflows/updater.sh | 5 +---- scripts/backup | 6 ++++++ scripts/change_url | 2 +- scripts/install | 10 +++++++++- scripts/restore | 9 ++++++++- scripts/upgrade | 8 ++++++++ 6 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 7ce2f3c..6274d07 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -63,7 +63,7 @@ echo "Handling asset at $asset_url" # Here we base the source file name upon a unique keyword in the assets url (admin vs. update) # Leave $src empty to ignore the asset case $asset_url in - *".tar.gz"*) + *".tar.gz") src="app" ;; esac @@ -117,9 +117,6 @@ done # GENERIC FINALIZATION #================================================= -# Install moreutils, needed for sponge -sudo apt-get install moreutils - # Replace new version in manifest echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json diff --git a/scripts/backup b/scripts/backup index c6c42c3..6d6d631 100644 --- a/scripts/backup +++ b/scripts/backup @@ -45,6 +45,12 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# BACKUP LOGROTATE +#================================================= + +ynh_backup --src_path="/etc/logrotate.d/$app" + #================================================= # SPECIFIC BACKUP #================================================= diff --git a/scripts/change_url b/scripts/change_url index 4dff8ab..c292b89 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -107,7 +107,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server available" +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Serving content" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 6dbebbe..eaa37bb 100644 --- a/scripts/install +++ b/scripts/install @@ -130,6 +130,14 @@ pushd "$final_path" ynh_exec_warn_less bower install --allow-root popd +#================================================= +# SETUP LOGROTATE +#================================================= +ynh_script_progression --message="Configuring log rotation..." --weight=1 + +# Use logrotate to manage application logfile(s) +ynh_use_logrotate + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -143,7 +151,7 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="server available" +ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="Serving content" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index ad1593c..25fabf5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -84,6 +84,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet +#================================================= +# RESTORE THE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -96,7 +103,7 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server available" +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Serving content" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index ec81c07..1a70a51 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -138,6 +138,14 @@ env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config +#================================================= +# SETUP LOGROTATE +#================================================= +ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 + +# Use logrotate to manage app-specific logfile(s) +ynh_use_logrotate --non-append + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= From a57bcb21239281c4378643cfb450b714ed69b36a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Apr 2022 15:08:59 +0200 Subject: [PATCH 17/35] Update install --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index eaa37bb..53d2138 100644 --- a/scripts/install +++ b/scripts/install @@ -125,9 +125,9 @@ ynh_script_progression --message="Building $app... (this will take some time and pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less npm install --allow-root - ynh_exec_warn_less npm install -g bower - ynh_exec_warn_less bower install --allow-root + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install --allow-root + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install -g bower + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH bower install --allow-root popd #================================================= From ced6a09a1547ab564a3a3f17f0c6cd68c584b0ea Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Apr 2022 15:13:45 +0200 Subject: [PATCH 18/35] Fix --- scripts/install | 8 ++++---- scripts/upgrade | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index 53d2138..6f23bde 100644 --- a/scripts/install +++ b/scripts/install @@ -90,10 +90,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:$app "$final_path" - #================================================= # NGINX CONFIGURATION #================================================= @@ -130,6 +126,10 @@ pushd "$final_path" ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH bower install --allow-root popd +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1a70a51..397e090 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -123,10 +123,10 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=60 pushd "$final_path" - ynh_exec_warn_less npm install --allow-root - ynh_exec_warn_less npm install -g bower - ynh_exec_warn_less bower update --allow-root - ynh_exec_warn_less npm i + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install --allow-root + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install -g bower + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH bower update --allow-root + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm i popd #================================================= From 369c87afb5b7b6ca0455f0ab4a1e8fb37448833f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Apr 2022 15:15:57 +0200 Subject: [PATCH 19/35] Fix --- scripts/install | 14 +++++++------- scripts/upgrade | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 6f23bde..eaa37bb 100644 --- a/scripts/install +++ b/scripts/install @@ -90,6 +90,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -121,15 +125,11 @@ ynh_script_progression --message="Building $app... (this will take some time and pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install --allow-root - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install -g bower - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH bower install --allow-root + ynh_exec_warn_less npm install --allow-root + ynh_exec_warn_less npm install -g bower + ynh_exec_warn_less bower install --allow-root popd -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:$app "$final_path" - #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 397e090..1a70a51 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -123,10 +123,10 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=60 pushd "$final_path" - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install --allow-root - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install -g bower - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH bower update --allow-root - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm i + ynh_exec_warn_less npm install --allow-root + ynh_exec_warn_less npm install -g bower + ynh_exec_warn_less bower update --allow-root + ynh_exec_warn_less npm i popd #================================================= From d8c9493feedd816c73205373e0ddd4006f466b4d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Apr 2022 15:55:58 +0200 Subject: [PATCH 20/35] Fix --- conf/config.js | 2 +- conf/nginx.conf | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ manifest.json | 8 +++++ scripts/install | 2 ++ 4 files changed, 88 insertions(+), 1 deletion(-) diff --git a/conf/config.js b/conf/config.js index e3dd5ad..b27b979 100644 --- a/conf/config.js +++ b/conf/config.js @@ -72,7 +72,7 @@ module.exports = { * * CUSTOMIZE AND UNCOMMENT THIS FOR PRODUCTION INSTALLATIONS. */ - // httpSafeOrigin: "https://some-other-domain.xyz", + httpSafeOrigin: "https://__SANDBOX_DOMAIN__", /* httpAddress specifies the address on which the nodejs server * should be accessible. By default it will listen on 127.0.0.1 diff --git a/conf/nginx.conf b/conf/nginx.conf index 1fd74de..0d7db65 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,3 +1,68 @@ + set $main_domain "__DOMAIN__"; + set $sandbox_domain "__SANDBOX_DOMAIN__"; + + set $allowed_origins "*"; + # set $allowed_origins "https://${sandbox_domain}"; + + set $api_domain "api.__DOMAIN__"; + set $files_domain "files.__DOMAIN__"; + + server_name __DOMAIN__ __SANDBOX_DOMAIN__; + + + # https://cipherli.st/ + ssl_ciphers EECDH+AESGCM:EDH+AESGCM; + ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0 + + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Content-Type-Options nosniff; + add_header Access-Control-Allow-Origin "${allowed_origins}"; + # add_header X-Frame-Options "SAMEORIGIN"; + + # Enable SharedArrayBuffer in Firefox (for .xlsx export) + add_header Cross-Origin-Resource-Policy cross-origin; + add_header Cross-Origin-Embedder-Policy require-corp; + + # Insert the path to your CryptPad repository root here + root /home/cryptpad/cryptpad; + index index.html; + error_page 404 /customize.dist/404.html; + + # any static assets loaded with "ver=" in their URL will be cached for a year + if ($args ~ ver=) { + set $cacheControl max-age=31536000; + } + if ($uri ~ ^/.*(\/|\.html)$) { + set $cacheControl no-cache; + } + # Will not set any header if it is emptystring + add_header Cache-Control $cacheControl; + + set $styleSrc "'unsafe-inline' 'self' https://${main_domain}"; + set $connectSrc "'self' https://${main_domain} blob: wss://${api_domain} https://${sandbox_domain}"; + set $fontSrc "'self' data: https://${main_domain}"; + set $imgSrc "'self' data: blob: https://${main_domain}"; + set $frameSrc "'self' https://${sandbox_domain} blob:"; + set $mediaSrc "blob:"; + set $childSrc "https://${main_domain}"; + set $workerSrc "'self'"; + set $scriptSrc "'self' resource: https://${main_domain}"; + + + set $frameAncestors "'self' https://${main_domain}"; + # set $frameAncestors "'self' https: vector:"; + + set $unsafe 0; + + if ($uri ~ ^\/(sheet|doc|presentation)\/inner.html.*$) { set $unsafe 1; } + if ($uri ~ ^\/common\/onlyoffice\/.*\/.*\.html.*$) { set $unsafe 1; } + if ($host != $sandbox_domain) { set $unsafe 0; } + if ($uri ~ ^\/unsafeiframe\/inner\.html.*$) { set $unsafe 1; } + if ($unsafe) { + set $scriptSrc "'self' 'unsafe-eval' 'unsafe-inline' resource: https://${main_domain}"; + } + location ^~ / { proxy_pass http://127.0.0.1:__PORT__; @@ -16,3 +81,15 @@ location ^~ / { include conf.d/yunohost_panel.conf.inc; more_clear_input_headers 'Accept-Encoding'; } + + location ^~ /cryptpad_websocket { + proxy_pass http://localhost:__PORT__; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # WebSocket support (nginx 1.4) + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection upgrade; + } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 1591152..9ce7af4 100644 --- a/manifest.json +++ b/manifest.json @@ -38,6 +38,14 @@ "fr": "CryptPad doit être installé dans un domaine ou sous-domaine dédié." } }, + { + "name": "sandbox_domain", + "type": "domain", + "help": { + "en": "CryptPad needs to be installed in a dedicated domain or sub-domain.", + "fr": "CryptPad doit être installé dans un domaine ou sous-domaine dédié." + } + }, { "name": "admin", "type": "user" diff --git a/scripts/install b/scripts/install index eaa37bb..4ff38ba 100644 --- a/scripts/install +++ b/scripts/install @@ -28,6 +28,7 @@ is_public=$YNH_APP_ARG_IS_PUBLIC path_url="/" admin=$YNH_APP_ARG_ADMIN email=$(ynh_user_get_info --username=$admin --key=mail) +sandbox_domain=$YNH_APP_ARG_SANDBOX_DOMAIN app=$YNH_APP_INSTANCE_NAME @@ -49,6 +50,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path_url --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin +ynh_app_setting_set --app=$app --key=sandbox_domain --value=$sandbox_domain #================================================= # STANDARD MODIFICATIONS From 15012de91a1b8183ea59f93eb35cc0a3f8e6a434 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Apr 2022 16:04:40 +0200 Subject: [PATCH 21/35] Update nginx.conf --- conf/nginx.conf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 0d7db65..b6d82eb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,11 +9,6 @@ server_name __DOMAIN__ __SANDBOX_DOMAIN__; - - # https://cipherli.st/ - ssl_ciphers EECDH+AESGCM:EDH+AESGCM; - ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0 - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options nosniff; From 9219a7da5be088bf18b3d4c322eaacfa542dcefa Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Apr 2022 16:20:12 +0200 Subject: [PATCH 22/35] Update nginx.conf --- conf/nginx.conf | 8 -------- 1 file changed, 8 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index b6d82eb..241e988 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -14,16 +14,9 @@ add_header X-Content-Type-Options nosniff; add_header Access-Control-Allow-Origin "${allowed_origins}"; # add_header X-Frame-Options "SAMEORIGIN"; - - # Enable SharedArrayBuffer in Firefox (for .xlsx export) add_header Cross-Origin-Resource-Policy cross-origin; add_header Cross-Origin-Embedder-Policy require-corp; - # Insert the path to your CryptPad repository root here - root /home/cryptpad/cryptpad; - index index.html; - error_page 404 /customize.dist/404.html; - # any static assets loaded with "ver=" in their URL will be cached for a year if ($args ~ ver=) { set $cacheControl max-age=31536000; @@ -44,7 +37,6 @@ set $workerSrc "'self'"; set $scriptSrc "'self' resource: https://${main_domain}"; - set $frameAncestors "'self' https://${main_domain}"; # set $frameAncestors "'self' https: vector:"; From ae70a35075fc7b28168dc2be606044f8fd0378e3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 5 Apr 2022 08:38:13 +0200 Subject: [PATCH 23/35] remove sandbox --- conf/config.js | 2 +- conf/nginx.conf | 64 ------------------------------------------------- manifest.json | 8 ------- scripts/install | 2 -- 4 files changed, 1 insertion(+), 75 deletions(-) diff --git a/conf/config.js b/conf/config.js index b27b979..9e79c87 100644 --- a/conf/config.js +++ b/conf/config.js @@ -72,7 +72,7 @@ module.exports = { * * CUSTOMIZE AND UNCOMMENT THIS FOR PRODUCTION INSTALLATIONS. */ - httpSafeOrigin: "https://__SANDBOX_DOMAIN__", + //httpSafeOrigin: "https://_SANDBOX_DOMAIN_", /* httpAddress specifies the address on which the nodejs server * should be accessible. By default it will listen on 127.0.0.1 diff --git a/conf/nginx.conf b/conf/nginx.conf index 241e988..1fd74de 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,55 +1,3 @@ - set $main_domain "__DOMAIN__"; - set $sandbox_domain "__SANDBOX_DOMAIN__"; - - set $allowed_origins "*"; - # set $allowed_origins "https://${sandbox_domain}"; - - set $api_domain "api.__DOMAIN__"; - set $files_domain "files.__DOMAIN__"; - - server_name __DOMAIN__ __SANDBOX_DOMAIN__; - - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - add_header X-XSS-Protection "1; mode=block"; - add_header X-Content-Type-Options nosniff; - add_header Access-Control-Allow-Origin "${allowed_origins}"; - # add_header X-Frame-Options "SAMEORIGIN"; - add_header Cross-Origin-Resource-Policy cross-origin; - add_header Cross-Origin-Embedder-Policy require-corp; - - # any static assets loaded with "ver=" in their URL will be cached for a year - if ($args ~ ver=) { - set $cacheControl max-age=31536000; - } - if ($uri ~ ^/.*(\/|\.html)$) { - set $cacheControl no-cache; - } - # Will not set any header if it is emptystring - add_header Cache-Control $cacheControl; - - set $styleSrc "'unsafe-inline' 'self' https://${main_domain}"; - set $connectSrc "'self' https://${main_domain} blob: wss://${api_domain} https://${sandbox_domain}"; - set $fontSrc "'self' data: https://${main_domain}"; - set $imgSrc "'self' data: blob: https://${main_domain}"; - set $frameSrc "'self' https://${sandbox_domain} blob:"; - set $mediaSrc "blob:"; - set $childSrc "https://${main_domain}"; - set $workerSrc "'self'"; - set $scriptSrc "'self' resource: https://${main_domain}"; - - set $frameAncestors "'self' https://${main_domain}"; - # set $frameAncestors "'self' https: vector:"; - - set $unsafe 0; - - if ($uri ~ ^\/(sheet|doc|presentation)\/inner.html.*$) { set $unsafe 1; } - if ($uri ~ ^\/common\/onlyoffice\/.*\/.*\.html.*$) { set $unsafe 1; } - if ($host != $sandbox_domain) { set $unsafe 0; } - if ($uri ~ ^\/unsafeiframe\/inner\.html.*$) { set $unsafe 1; } - if ($unsafe) { - set $scriptSrc "'self' 'unsafe-eval' 'unsafe-inline' resource: https://${main_domain}"; - } - location ^~ / { proxy_pass http://127.0.0.1:__PORT__; @@ -68,15 +16,3 @@ location ^~ / { include conf.d/yunohost_panel.conf.inc; more_clear_input_headers 'Accept-Encoding'; } - - location ^~ /cryptpad_websocket { - proxy_pass http://localhost:__PORT__; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # WebSocket support (nginx 1.4) - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection upgrade; - } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 9ce7af4..1591152 100644 --- a/manifest.json +++ b/manifest.json @@ -38,14 +38,6 @@ "fr": "CryptPad doit être installé dans un domaine ou sous-domaine dédié." } }, - { - "name": "sandbox_domain", - "type": "domain", - "help": { - "en": "CryptPad needs to be installed in a dedicated domain or sub-domain.", - "fr": "CryptPad doit être installé dans un domaine ou sous-domaine dédié." - } - }, { "name": "admin", "type": "user" diff --git a/scripts/install b/scripts/install index 4ff38ba..eaa37bb 100644 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,6 @@ is_public=$YNH_APP_ARG_IS_PUBLIC path_url="/" admin=$YNH_APP_ARG_ADMIN email=$(ynh_user_get_info --username=$admin --key=mail) -sandbox_domain=$YNH_APP_ARG_SANDBOX_DOMAIN app=$YNH_APP_INSTANCE_NAME @@ -50,7 +49,6 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path_url --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin -ynh_app_setting_set --app=$app --key=sandbox_domain --value=$sandbox_domain #================================================= # STANDARD MODIFICATIONS From e60c1cf1f3e1babeda23d66c2884c10d5b5a7c35 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 28 May 2022 01:29:55 +0200 Subject: [PATCH 24/35] Apply example_ynh --- check_process | 8 +++--- conf/app.src | 1 + conf/nginx.conf | 29 ++++++++++---------- manifest.json | 8 +++--- scripts/backup | 6 +++-- scripts/change_url | 9 ++++--- scripts/install | 39 +++++++++++++++------------ scripts/remove | 22 +++++++-------- scripts/restore | 10 +++---- scripts/upgrade | 67 ++++++++++++++++++++++------------------------ 10 files changed, 103 insertions(+), 96 deletions(-) diff --git a/check_process b/check_process index 6493356..86b0fb0 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,8 @@ -;; Nom du test - auto_remove=1 +;; Test complet ; Manifest domain="domain.tld" + is_public=1 admin="john" - is_public="1" ; Checks pkg_linter=1 setup_sub_dir=0 @@ -13,9 +12,10 @@ setup_public=1 upgrade=1 #4.10.0 - upgrade=1 from_commit=2a54cd03f90c93b07150a64644ffc7f208110a18 + upgrade=1 from_commit=2a54cd03f90c93b07150a64644ffc7f208110a18 backup_restore=1 multi_instance=0 + port_already_use=0 change_url=1 ;;; Options Email= diff --git a/conf/app.src b/conf/app.src index 70ad03b..1650aef 100644 --- a/conf/app.src +++ b/conf/app.src @@ -4,3 +4,4 @@ SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_FILENAME=cryptpad.tar.gz +SOURCE_EXTRACT=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 1fd74de..c46b37c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,18 +1,19 @@ -location ^~ / { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; + proxy_pass http://127.0.0.1:__PORT__; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; - more_clear_input_headers 'Accept-Encoding'; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; + more_clear_input_headers 'Accept-Encoding'; } diff --git a/manifest.json b/manifest.json index 37a8661..63f6a53 100644 --- a/manifest.json +++ b/manifest.json @@ -38,10 +38,6 @@ "fr": "CryptPad doit être installé dans un domaine ou sous-domaine dédié." } }, - { - "name": "admin", - "type": "user" - }, { "name": "is_public", "type": "boolean", @@ -50,6 +46,10 @@ "fr": "Si cette case est cochée, CryptPad sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." }, "default": true + }, + { + "name": "admin", + "type": "user" } ] } diff --git a/scripts/backup b/scripts/backup index c6c42c3..d72c557 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,6 +6,7 @@ # 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 @@ -14,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + true } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -22,11 +23,12 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP diff --git a/scripts/change_url b/scripts/change_url index 4dff8ab..f1d87e1 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,17 +30,18 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=2 # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - # restore it if the upgrade fails + # Restore it if the upgrade fails ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script @@ -69,7 +70,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" #================================================= # MODIFY URL IN NGINX CONF @@ -107,7 +108,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server available" +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="server available" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 6dbebbe..77ad500 100644 --- a/scripts/install +++ b/scripts/install @@ -1,7 +1,7 @@ #!/bin/bash #================================================= -# GENERIC STARTING +# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -10,7 +10,7 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# MANAGE FAILURE OF THE SCRIPT +# MANAGE SCRIPT FAILURE #================================================= ynh_clean_setup () { @@ -24,20 +24,20 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -is_public=$YNH_APP_ARG_IS_PUBLIC path_url="/" +is_public=$YNH_APP_ARG_IS_PUBLIC admin=$YNH_APP_ARG_ADMIN email=$(ynh_user_get_info --username=$admin --key=mail) app=$YNH_APP_INSTANCE_NAME #================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THIS ARGS +# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= ynh_script_progression --message="Validating installation parameters..." --weight=1 final_path=/var/www/$app -test ! -e "$final_path" || ynh_die "This path already contains a folder" +test ! -e "$final_path" || ynh_die --message="This path already contains a folder" # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -45,9 +45,10 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= +ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path_url --value=$path_url +ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin #================================================= @@ -66,11 +67,10 @@ porti=$(ynh_find_port --port=$(($port + 1))) ynh_app_setting_set --app=$app --key=porti --value=$porti #================================================= -# INSTALL NODEJS & YARN +# INSTALL DEPENDENCIES #================================================= ynh_script_progression --message="Installing dependencies..." --weight=20 -# Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= @@ -102,22 +102,25 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." + +ynh_add_config --template="../conf/config.js" --destination="$final_path/config/config.js" + +chmod 600 "$final_path/config/config.js" +chown $app "$final_path/config/config.js" + #================================================= # SETUP SYSTEMD #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 env_path="$PATH" +# Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# CONFIGURE CONFIG.JS -#================================================= - -ynh_add_config --template="../conf/config.js" --destination="$final_path/config/config.js" -chmod 600 "$final_path/config/config.js" -chown $app "$final_path/config/config.js" - #================================================= # INSTALL CRYPTPAD #================================================= @@ -130,6 +133,8 @@ pushd "$final_path" ynh_exec_warn_less bower install --allow-root popd +#================================================= +# GENERIC FINALIZATION #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -143,7 +148,7 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="server available" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="server available" #================================================= # SETUP SSOWAT diff --git a/scripts/remove b/scripts/remove index a9e6f33..e201fda 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,7 +1,7 @@ #!/bin/bash #================================================= -# GENERIC STARTING +# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -16,8 +16,8 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME -port=$(ynh_app_setting_get --app=$app --key=port) domain=$(ynh_app_setting_get --app=$app --key=domain) +port=$(ynh_app_setting_get --app=$app --key=port) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= @@ -29,7 +29,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service..." --weight=3 + ynh_script_progression --message="Removing $app service integration..." --weight=3 yunohost service remove $app fi @@ -41,17 +41,10 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE NODEJS -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=3 - -ynh_remove_nodejs - #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing $app main directory..." --weight=3 +ynh_script_progression --message="Removing app main directory..." --weight=3 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -64,6 +57,13 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=3 + +ynh_remove_nodejs + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index ad1593c..81c92b5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +# 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 @@ -44,6 +44,7 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -58,11 +59,10 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring CryptPad main directory..." --weight=6 +ynh_script_progression --message="Restoring the app main directory..." --weight=6 ynh_restore_file --origin_path="$final_path" -# Restore permissions on app files chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" @@ -73,7 +73,7 @@ chmod 600 "$final_path/config/config.js" #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=7 -# Install Nodejs +# Define and install dependencies ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= @@ -96,7 +96,7 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server available" +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="server available" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index ec81c07..7b46a12 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,7 +1,7 @@ #!/bin/bash #================================================= -# GENERIC STARTING +# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -17,9 +17,9 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path_url) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) email=$(ynh_user_get_info --username=$admin --key=mail) port=$(ynh_app_setting_get --app=$app --key=port) porti=$(ynh_app_setting_get --app=$app --key=porti) @@ -27,9 +27,34 @@ porti=$(ynh_app_setting_get --app=$app --key=porti) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + ynh_clean_check_starting + # Restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# STANDARD UPGRADE STEPS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." --weight=1 + +ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -48,29 +73,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 - -ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" - #================================================= # CREATE DEDICATED USER #================================================= @@ -104,19 +106,12 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - ynh_add_nginx_config #================================================= -# INSTALL NODEJS +# UPGRADE DEPENDENCIES #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=6 -# Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# CONFIGURE CONFIG.JS -#================================================= - -#ynh_add_config --template="../conf/config.js" --destination="$final_path/config/config.js" - #================================================= # INSTALL CRYPTPAD #================================================= @@ -138,6 +133,8 @@ env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config +#================================================= +# GENERIC FINALIZATION #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -150,7 +147,7 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="server available" +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="server available" #================================================= # RELOAD NGINX From bf61be6611cd62fa165d15a929cf19bb43df9c03 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 27 May 2022 23:30:00 +0000 Subject: [PATCH 25/35] Auto-update README --- README.md | 19 ++++++++++--------- README_fr.md | 25 +++++++++++++++---------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 9a1c4dd..b0b62a0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # CryptPad for YunoHost -[![Integration level](https://dash.yunohost.org/integration/cryptpad.svg)](https://dash.yunohost.org/appci/app/cryptpad) ![](https://ci-apps.yunohost.org/ci/badges/cryptpad.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cryptpad.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/cryptpad.svg)](https://dash.yunohost.org/appci/app/cryptpad) ![Working status](https://ci-apps.yunohost.org/ci/badges/cryptpad.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/cryptpad.maintain.svg) [![Install CryptPad with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cryptpad) *[Lire ce readme en français.](./README_fr.md)* @@ -23,7 +23,7 @@ CryptPad is a collaboration suite that is end-to-end-encrypted and open-source. ## Screenshots -![](./doc/screenshots/screenshot.png) +![Screenshot of CryptPad](./doc/screenshots/screenshot.png) ## Disclaimers / important information @@ -43,21 +43,22 @@ adminKeys: [ ## Documentation and resources -* Official app website: https://cryptpad.fr/ -* Official admin documentation: https://docs.cryptpad.fr/en/ -* Upstream app code repository: https://github.com/xwiki-labs/cryptpad -* YunoHost documentation for this app: https://yunohost.org/app_cryptpad -* Report a bug: https://github.com/YunoHost-Apps/cryptpad_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing --debug or sudo yunohost app upgrade cryptpad -u https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 6d1ee40..6a81193 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # CryptPad pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/cryptpad.svg)](https://dash.yunohost.org/appci/app/cryptpad) ![](https://ci-apps.yunohost.org/ci/badges/cryptpad.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cryptpad.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/cryptpad.svg)](https://dash.yunohost.org/appci/app/cryptpad) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/cryptpad.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/cryptpad.maintain.svg) [![Installer CryptPad avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cryptpad) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer CryptPad 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.* @@ -19,7 +23,7 @@ CryptPad est une suite de collaboration chiffrée de bout en bout et open source ## Captures d'écran -![](./doc/screenshots/screenshot.png) +![Capture d'écran de CryptPad](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -39,21 +43,22 @@ adminKeys: [ ## Documentations et ressources -* Site officiel de l'app : https://cryptpad.fr/ -* Documentation officielle de l'admin : https://docs.cryptpad.fr/en/ -* Dépôt de code officiel de l'app : https://github.com/xwiki-labs/cryptpad -* Documentation YunoHost pour cette app : https://yunohost.org/app_cryptpad -* Signaler un bug : https://github.com/YunoHost-Apps/cryptpad_ynh/issues +* Site officiel de l'app : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing --debug ou sudo yunohost app upgrade cryptpad -u https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 454416b1ab3a2a606d3f847f13e6ff97fb77ec11 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 31 May 2022 06:21:30 +0000 Subject: [PATCH 26/35] Upgrade to v4.14.1 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index dc4451c..052e0b8 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Zero Knowledge realtime collaborative editor", "fr": "Éditeur chiffré collaboratif en temps réel" }, - "version": "4.12.0~ynh1", + "version": "4.14.1~ynh1", "url": "https://cryptpad.fr/", "upstream": { "license": "AGPL-3.0-only", From 6688ab0133c1e385c1fd48c7b1faf94ce3bf43d2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 31 May 2022 06:21:33 +0000 Subject: [PATCH 27/35] Auto-update README --- README.md | 21 +++++++++++---------- README_fr.md | 27 ++++++++++++++++----------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 06842b6..6ae57e8 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # CryptPad for YunoHost -[![Integration level](https://dash.yunohost.org/integration/cryptpad.svg)](https://dash.yunohost.org/appci/app/cryptpad) ![](https://ci-apps.yunohost.org/ci/badges/cryptpad.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cryptpad.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/cryptpad.svg)](https://dash.yunohost.org/appci/app/cryptpad) ![Working status](https://ci-apps.yunohost.org/ci/badges/cryptpad.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/cryptpad.maintain.svg) [![Install CryptPad with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cryptpad) *[Lire ce readme en français.](./README_fr.md)* @@ -17,13 +17,13 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in CryptPad is a collaboration suite that is end-to-end-encrypted and open-source. It is built to enable collaboration, synchronizing changes to documents in real time. Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored. -**Shipped version:** 4.12.0~ynh1 +**Shipped version:** 4.14.1~ynh1 **Demo:** https://cryptpad.fr/ ## Screenshots -![](./doc/screenshots/screenshot.png) +![Screenshot of CryptPad](./doc/screenshots/screenshot.png) ## Disclaimers / important information @@ -41,21 +41,22 @@ adminKeys: [ ## Documentation and resources -* Official app website: https://cryptpad.fr/ -* Official admin documentation: https://docs.cryptpad.fr/en/ -* Upstream app code repository: https://github.com/xwiki-labs/cryptpad -* YunoHost documentation for this app: https://yunohost.org/app_cryptpad -* Report a bug: https://github.com/YunoHost-Apps/cryptpad_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing --debug or sudo yunohost app upgrade cryptpad -u https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 28272bc..0f12571 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # CryptPad pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/cryptpad.svg)](https://dash.yunohost.org/appci/app/cryptpad) ![](https://ci-apps.yunohost.org/ci/badges/cryptpad.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cryptpad.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/cryptpad.svg)](https://dash.yunohost.org/appci/app/cryptpad) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/cryptpad.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/cryptpad.maintain.svg) [![Installer CryptPad avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cryptpad) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer CryptPad 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.* @@ -13,13 +17,13 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour CryptPad est une suite de collaboration chiffrée de bout en bout et open source. Il est conçu pour permettre la collaboration, en synchronisant les modifications apportées aux documents en temps réel. Étant donné que toutes les données sont chiffrées, le service et ses administrateurs n'ont aucun moyen de voir le contenu modifié et stocké. -**Version incluse :** 4.12.0~ynh1 +**Version incluse :** 4.14.1~ynh1 **Démo :** https://cryptpad.fr/ ## Captures d'écran -![](./doc/screenshots/screenshot.png) +![Capture d'écran de CryptPad](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -37,21 +41,22 @@ adminKeys: [ ## Documentations et ressources -* Site officiel de l'app : https://cryptpad.fr/ -* Documentation officielle de l'admin : https://docs.cryptpad.fr/en/ -* Dépôt de code officiel de l'app : https://github.com/xwiki-labs/cryptpad -* Documentation YunoHost pour cette app : https://yunohost.org/app_cryptpad -* Signaler un bug : https://github.com/YunoHost-Apps/cryptpad_ynh/issues +* Site officiel de l'app : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing --debug ou sudo yunohost app upgrade cryptpad -u https://github.com/YunoHost-Apps/cryptpad_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From cbcf1f83d3d68214a8601c36179f22164a724581 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 3 Jun 2022 09:51:36 +0200 Subject: [PATCH 28/35] Remove logrotate --- scripts/backup | 6 ------ scripts/restore | 7 ------- 2 files changed, 13 deletions(-) diff --git a/scripts/backup b/scripts/backup index 6d6d631..c6c42c3 100644 --- a/scripts/backup +++ b/scripts/backup @@ -45,12 +45,6 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP LOGROTATE -#================================================= - -ynh_backup --src_path="/etc/logrotate.d/$app" - #================================================= # SPECIFIC BACKUP #================================================= diff --git a/scripts/restore b/scripts/restore index 25fabf5..6953f35 100644 --- a/scripts/restore +++ b/scripts/restore @@ -84,13 +84,6 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= From c332e8fcc38b1bde782510f831f285a910778d44 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 3 Jun 2022 09:52:52 +0200 Subject: [PATCH 29/35] Update config.js --- conf/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.js b/conf/config.js index 9e79c87..e3dd5ad 100644 --- a/conf/config.js +++ b/conf/config.js @@ -72,7 +72,7 @@ module.exports = { * * CUSTOMIZE AND UNCOMMENT THIS FOR PRODUCTION INSTALLATIONS. */ - //httpSafeOrigin: "https://_SANDBOX_DOMAIN_", + // httpSafeOrigin: "https://some-other-domain.xyz", /* httpAddress specifies the address on which the nodejs server * should be accessible. By default it will listen on 127.0.0.1 From 061ae447effb4d3b88812722ab5bae7d80f9793a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 3 Jun 2022 10:15:10 +0200 Subject: [PATCH 30/35] Upgrade to 4.14.1 --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index c013e89..ab58101 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/4.14.0.tar.gz -SOURCE_SUM=c49cb335b473ecf6b4e9904a8e702eb66a27fe23badc8f7cea144baedda96b27 +SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/4.14.1.tar.gz +SOURCE_SUM=5694af14600f4ba4128ad5cf727e575c34010849342955a73a432b1c66c84eef SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true From f5526dc0ce7f888161ffffa7b62725b4515f16a5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 4 Jun 2022 08:08:16 +0200 Subject: [PATCH 31/35] Revert to master version --- conf/app.src | 7 +++---- manifest.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/app.src b/conf/app.src index ab58101..b4fdbbf 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,7 +1,6 @@ -SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/4.14.1.tar.gz -SOURCE_SUM=5694af14600f4ba4128ad5cf727e575c34010849342955a73a432b1c66c84eef +SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/4.11.0.tar.gz +SOURCE_SUM=e529b484c297f73227f991971189c51f64da1ab53fc78334d1fb08e320d4385e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=cryptpad.tar.gz -SOURCE_EXTRACT=true +SOURCE_FILENAME=cryptpad.tar.gz \ No newline at end of file diff --git a/manifest.json b/manifest.json index 5b9e795..975fbb6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Zero Knowledge realtime collaborative editor", "fr": "Éditeur chiffré collaboratif en temps réel" }, - "version": "4.14.1~ynh1", + "version": "4.12.0~ynh1", "url": "https://cryptpad.fr/", "upstream": { "license": "AGPL-3.0-only", From d422368c246dfc92e90d4d9a4ba475fea481fb45 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 4 Jun 2022 06:08:23 +0000 Subject: [PATCH 32/35] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65de288..dff014b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in CryptPad is a collaboration suite that is end-to-end-encrypted and open-source. It is built to enable collaboration, synchronizing changes to documents in real time. Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored. -**Shipped version:** 4.14.1~ynh1 +**Shipped version:** 4.12.0~ynh1 **Demo:** https://cryptpad.fr/ diff --git a/README_fr.md b/README_fr.md index 92cc487..d1211a1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour CryptPad est une suite de collaboration chiffrée de bout en bout et open source. Il est conçu pour permettre la collaboration, en synchronisant les modifications apportées aux documents en temps réel. Étant donné que toutes les données sont chiffrées, le service et ses administrateurs n'ont aucun moyen de voir le contenu modifié et stocké. -**Version incluse :** 4.14.1~ynh1 +**Version incluse :** 4.12.0~ynh1 **Démo :** https://cryptpad.fr/ From 54789aa5a8773b16b1125231e50a43b2dd689a10 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 4 Jun 2022 08:13:07 +0200 Subject: [PATCH 33/35] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index abe565d..f9d06de 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version="16" +nodejs_version="14" #================================================= # PERSONAL HELPERS From 64b8894d0217f8702ab48a6d16fa55d144dd9abc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 4 Jun 2022 08:14:23 +0200 Subject: [PATCH 34/35] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 975fbb6..c89aa0a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Zero Knowledge realtime collaborative editor", "fr": "Éditeur chiffré collaboratif en temps réel" }, - "version": "4.12.0~ynh1", + "version": "4.12.0~ynh2", "url": "https://cryptpad.fr/", "upstream": { "license": "AGPL-3.0-only", From 781b03bf0db6d645fbdb0d1a02f4c5c36d6e6dc2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 4 Jun 2022 06:14:30 +0000 Subject: [PATCH 35/35] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dff014b..9a5dcea 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in CryptPad is a collaboration suite that is end-to-end-encrypted and open-source. It is built to enable collaboration, synchronizing changes to documents in real time. Because all data is encrypted, the service and its administrators have no way of seeing the content being edited and stored. -**Shipped version:** 4.12.0~ynh1 +**Shipped version:** 4.12.0~ynh2 **Demo:** https://cryptpad.fr/ diff --git a/README_fr.md b/README_fr.md index d1211a1..f7532c0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour CryptPad est une suite de collaboration chiffrée de bout en bout et open source. Il est conçu pour permettre la collaboration, en synchronisant les modifications apportées aux documents en temps réel. Étant donné que toutes les données sont chiffrées, le service et ses administrateurs n'ont aucun moyen de voir le contenu modifié et stocké. -**Version incluse :** 4.12.0~ynh1 +**Version incluse :** 4.12.0~ynh2 **Démo :** https://cryptpad.fr/