From e6052327b605f5d0a5e4e984f4a4649eadf7246b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 10 Nov 2021 17:46:28 +0100 Subject: [PATCH 1/5] 4.12.1 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 70ad03b..5e2b9e2 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.12.1.tar.gz +SOURCE_SUM=5caf45e9c1f11e6b6a1d9bd201d53b6be690a03f651ca61d056f09be7d48c26c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index dc4451c..ff69a25 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.1~ynh1", "url": "https://cryptpad.fr/", "upstream": { "license": "AGPL-3.0-only", From 90d54e027632587f2b5311c1856573170f224bf2 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Wed, 10 Nov 2021 16:46:33 +0000 Subject: [PATCH 2/5] 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..3679f34 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.1~ynh1 **Demo:** https://cryptpad.fr/ diff --git a/README_fr.md b/README_fr.md index 28272bc..3a83ccb 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.12.1~ynh1 **Démo :** https://cryptpad.fr/ From 4044c4c64d8320ae37bffb2a986553bdf8d30c5f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 11 Nov 2021 09:28:45 +0100 Subject: [PATCH 3/5] Update updater.sh --- .github/workflows/updater.sh | 5 +---- 1 file changed, 1 insertion(+), 4 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 From 1df0fd3370f99d56eb4d187d1fa65ffa39352e59 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Nov 2021 14:56:02 +0100 Subject: [PATCH 4/5] Add logrotate --- manifest.json | 2 +- scripts/backup | 6 +++++- scripts/install | 8 ++++++++ scripts/restore | 7 +++++++ scripts/upgrade | 8 ++++++++ 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index ff69a25..92d1d7b 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "url": "https://frju365.yunohost.support" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.2" }, "multi_instance": false, "services": [ diff --git a/scripts/backup b/scripts/backup index c6c42c3..940d3b5 100644 --- a/scripts/backup +++ b/scripts/backup @@ -46,7 +46,11 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= -# SPECIFIC BACKUP +# BACKUP LOGROTATE +#================================================= + +ynh_backup --src_path="/etc/logrotate.d/$app" + #================================================= # BACKUP SYSTEMD #================================================= diff --git a/scripts/install b/scripts/install index 23c4c4d..4f764f7 100644 --- a/scripts/install +++ b/scripts/install @@ -131,6 +131,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 #================================================= diff --git a/scripts/restore b/scripts/restore index ad1593c..fa4e5c4 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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0cafe05..02f695c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,6 +139,14 @@ ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --targ # 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 c648f49e561035569aa65b07c69acda0b2f55090 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 17 Nov 2021 15:37:27 +0100 Subject: [PATCH 5/5] Update nginx.conf --- conf/nginx.conf | 5 ----- 1 file changed, 5 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;