From eb9148d75440dd8c9b031704133ec61a8fd9c5a1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 15 Jan 2023 06:17:06 +0000 Subject: [PATCH 01/22] Upgrade to v5.30.0 --- conf/admin.src | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/admin.src b/conf/admin.src index 6f6a23c..87affde 100644 --- a/conf/admin.src +++ b/conf/admin.src @@ -1,4 +1,4 @@ -SOURCE_URL=https://github.com/TryGhost/Admin/archive/refs/tags/v5.26.4.zip +SOURCE_URL=https://github.com/TryGhost/Admin/archive/refs/tags/v5.30.0.zip SOURCE_SUM=d5558cd419c8d46bdc958064cb97f963d1ea793866414c025906ec15033512ed SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip diff --git a/conf/app.src b/conf/app.src index 5f00201..6ec12e9 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://api.github.com/repos/TryGhost/Ghost/zipball/v5.26.4 -SOURCE_SUM=785ba995dbe68d155d509b8faa77bfd2b7c4d0f49be532b7d76cd73ce541a7da +SOURCE_URL=https://api.github.com/repos/TryGhost/Ghost/zipball/v5.30.0 +SOURCE_SUM=5ee16f10d4d62f7f124bc39932be956491919e13bdb2113282a19f4eb41f2175 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 977d4a9..612802b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Publishing, memberships, subscriptions and newsletters platform", "fr": "Plateforme d'édition, d'adhésions, d'abonnements et de newsletters" }, - "version": "5.26.4~ynh1", + "version": "5.30.0~ynh1", "url": "https://ghost.org/", "upstream": { "license": "MIT", From a5ed7fa00ae0f4424114422897522dca6f8a9cc3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 15 Jan 2023 06:17:12 +0000 Subject: [PATCH 02/22] 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 cdadc1b..f60e417 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 Publishing, memberships, subscriptions and newsletters platform -**Shipped version:** 5.26.4~ynh1 +**Shipped version:** 5.30.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index f0747b4..f20a5ad 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 Plateforme d'édition, d'adhésions, d'abonnements et de newsletters -**Version incluse :** 5.26.4~ynh1 +**Version incluse :** 5.30.0~ynh1 ## Captures d'écran From 2023d5b1c80f62280b7335fe4d895207731a7f68 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 27 Jan 2023 21:56:26 +0000 Subject: [PATCH 03/22] Auto-update README --- README.md | 2 +- README_fr.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f60e417..a6d049b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Ghost for YunoHost -[![Integration level](https://dash.yunohost.org/integration/ghost.svg)](https://dash.yunohost.org/appci/app/ghost) ![Working status](https://ci-apps.yunohost.org/ci/badges/ghost.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/ghost.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/ghost.svg)](https://dash.yunohost.org/appci/app/ghost) ![Working status](https://ci-apps.yunohost.org/ci/badges/ghost.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/ghost.maintain.svg) [![Install Ghost with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ghost) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index f20a5ad..4ab2e62 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,23 +5,23 @@ It shall NOT be edited by hand. # Ghost pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/ghost.svg)](https://dash.yunohost.org/appci/app/ghost) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/ghost.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/ghost.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/ghost.svg)](https://dash.yunohost.org/appci/app/ghost) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/ghost.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/ghost.maintain.svg) [![Installer Ghost avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ghost) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Ghost 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.* +> *Ce package vous permet d’installer Ghost rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Plateforme d'édition, d'adhésions, d'abonnements et de newsletters **Version incluse :** 5.30.0~ynh1 -## Captures d'écran +## Captures d’écran -![Capture d'écran de Ghost](./doc/screenshots/screenshot.png) +![Capture d’écran de Ghost](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -52,9 +52,9 @@ Plateforme d'édition, d'adhésions, d'abonnements et de newsletters ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* 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 : @@ -70,4 +70,4 @@ ou sudo yunohost app upgrade ghost -u https://github.com/YunoHost-Apps/ghost_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From 8aadb1f1e4107c8e4d12b39b79e1412e9c646e3e Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 23 Feb 2023 23:05:50 +0100 Subject: [PATCH 04/22] [autopatch] Upgrade auto-updater --- .github/workflows/updater.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index d871809..bf223ed 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run the updater script @@ -33,7 +33,7 @@ jobs: - name: Create Pull Request id: cpr if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update to version ${{ env.VERSION }} From 2cc3aeeefe9741b904248f44157660bb5fed9faf Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 23 Feb 2023 22:05:53 +0000 Subject: [PATCH 05/22] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index a6d049b..102f045 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Ghost for YunoHost [![Integration level](https://dash.yunohost.org/integration/ghost.svg)](https://dash.yunohost.org/appci/app/ghost) ![Working status](https://ci-apps.yunohost.org/ci/badges/ghost.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/ghost.maintain.svg) + [![Install Ghost with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ghost) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 4ab2e62..d3478e1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Ghost pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/ghost.svg)](https://dash.yunohost.org/appci/app/ghost) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/ghost.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/ghost.maintain.svg) + [![Installer Ghost avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ghost) *[Read this readme in english.](./README.md)* From 958d2ed9f1e87192b071221129eb5a1f906a78dc Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 1 Apr 2023 06:16:10 +0000 Subject: [PATCH 06/22] Upgrade to v5.41.0 --- conf/admin.src | 2 +- conf/app.src | 4 ++-- conf/casper.src | 4 ++-- manifest.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/admin.src b/conf/admin.src index 87affde..7c8225a 100644 --- a/conf/admin.src +++ b/conf/admin.src @@ -1,4 +1,4 @@ -SOURCE_URL=https://github.com/TryGhost/Admin/archive/refs/tags/v5.30.0.zip +SOURCE_URL=https://github.com/TryGhost/Admin/archive/refs/tags/v5.41.0.zip SOURCE_SUM=d5558cd419c8d46bdc958064cb97f963d1ea793866414c025906ec15033512ed SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip diff --git a/conf/app.src b/conf/app.src index 6ec12e9..863762b 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://api.github.com/repos/TryGhost/Ghost/zipball/v5.30.0 -SOURCE_SUM=5ee16f10d4d62f7f124bc39932be956491919e13bdb2113282a19f4eb41f2175 +SOURCE_URL=https://api.github.com/repos/TryGhost/Ghost/zipball/v5.41.0 +SOURCE_SUM=32e78c123871049b17527cadfc97cde16574ad1bb7d9186a66ec64d2289f9cb5 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/casper.src b/conf/casper.src index 1534513..e706e07 100644 --- a/conf/casper.src +++ b/conf/casper.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/TryGhost/Casper/archive/refs/tags/v5.4.4.zip -SOURCE_SUM=2d8d7d622944844cee8a9d954cbc5d3123196e5214eedc91d586853bdeeb10ff +SOURCE_URL=https://github.com/TryGhost/Casper/archive/refs/tags/v5.4.8.zip +SOURCE_SUM=1b09ec98c57ea9a4812bd98c3a98834d5b76b711df5a66aee5db831be1080d72 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 612802b..4c2d931 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Publishing, memberships, subscriptions and newsletters platform", "fr": "Plateforme d'édition, d'adhésions, d'abonnements et de newsletters" }, - "version": "5.30.0~ynh1", + "version": "5.41.0~ynh1", "url": "https://ghost.org/", "upstream": { "license": "MIT", From 038c395ec6d79a7b5dfefb630814751105efa757 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 1 Apr 2023 06:16:16 +0000 Subject: [PATCH 07/22] 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 102f045..d9280a1 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Publishing, memberships, subscriptions and newsletters platform -**Shipped version:** 5.30.0~ynh1 +**Shipped version:** 5.41.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index d3478e1..f900315 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Plateforme d'édition, d'adhésions, d'abonnements et de newsletters -**Version incluse :** 5.30.0~ynh1 +**Version incluse :** 5.41.0~ynh1 ## Captures d’écran From c882644aed1749e2d2e611b48144dbd47a41f176 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 8 Apr 2023 06:15:35 +0000 Subject: [PATCH 08/22] Upgrade to v5.42.2 --- conf/admin.src | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/admin.src b/conf/admin.src index 7c8225a..a5bf1a1 100644 --- a/conf/admin.src +++ b/conf/admin.src @@ -1,4 +1,4 @@ -SOURCE_URL=https://github.com/TryGhost/Admin/archive/refs/tags/v5.41.0.zip +SOURCE_URL=https://github.com/TryGhost/Admin/archive/refs/tags/v5.42.2.zip SOURCE_SUM=d5558cd419c8d46bdc958064cb97f963d1ea793866414c025906ec15033512ed SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip diff --git a/conf/app.src b/conf/app.src index 863762b..dc4492c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://api.github.com/repos/TryGhost/Ghost/zipball/v5.41.0 -SOURCE_SUM=32e78c123871049b17527cadfc97cde16574ad1bb7d9186a66ec64d2289f9cb5 +SOURCE_URL=https://api.github.com/repos/TryGhost/Ghost/zipball/v5.42.2 +SOURCE_SUM=71ef51cf4da1fd79889f27b9afce63a8bac93eee5d24edb4bf0d356701055498 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 4c2d931..11e5ce6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Publishing, memberships, subscriptions and newsletters platform", "fr": "Plateforme d'édition, d'adhésions, d'abonnements et de newsletters" }, - "version": "5.41.0~ynh1", + "version": "5.42.2~ynh1", "url": "https://ghost.org/", "upstream": { "license": "MIT", From d5d7aab1f3eaa06d0cf204b42f36ee73c06bb2c8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 8 Apr 2023 06:15:41 +0000 Subject: [PATCH 09/22] 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 d9280a1..4cf85b6 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Publishing, memberships, subscriptions and newsletters platform -**Shipped version:** 5.41.0~ynh1 +**Shipped version:** 5.42.2~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index f900315..421b648 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Plateforme d'édition, d'adhésions, d'abonnements et de newsletters -**Version incluse :** 5.41.0~ynh1 +**Version incluse :** 5.42.2~ynh1 ## Captures d’écran From 16e50c9661600a6a6a7f9b91b3d1b92c5353bb2c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 15 Apr 2023 06:15:59 +0000 Subject: [PATCH 10/22] Upgrade to v5.44.0 --- conf/admin.src | 2 +- conf/app.src | 4 ++-- conf/casper.src | 4 ++-- manifest.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/admin.src b/conf/admin.src index a5bf1a1..f74136d 100644 --- a/conf/admin.src +++ b/conf/admin.src @@ -1,4 +1,4 @@ -SOURCE_URL=https://github.com/TryGhost/Admin/archive/refs/tags/v5.42.2.zip +SOURCE_URL=https://github.com/TryGhost/Admin/archive/refs/tags/v5.44.0.zip SOURCE_SUM=d5558cd419c8d46bdc958064cb97f963d1ea793866414c025906ec15033512ed SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip diff --git a/conf/app.src b/conf/app.src index dc4492c..6d9a4b8 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://api.github.com/repos/TryGhost/Ghost/zipball/v5.42.2 -SOURCE_SUM=71ef51cf4da1fd79889f27b9afce63a8bac93eee5d24edb4bf0d356701055498 +SOURCE_URL=https://api.github.com/repos/TryGhost/Ghost/zipball/v5.44.0 +SOURCE_SUM=496639db3ca7c19a8baa78e282e1753a97eac0d0045b852375178b31895c6b86 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/casper.src b/conf/casper.src index e706e07..0b2d8a3 100644 --- a/conf/casper.src +++ b/conf/casper.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/TryGhost/Casper/archive/refs/tags/v5.4.8.zip -SOURCE_SUM=1b09ec98c57ea9a4812bd98c3a98834d5b76b711df5a66aee5db831be1080d72 +SOURCE_URL=https://github.com/TryGhost/Casper/archive/refs/tags/v5.4.9.zip +SOURCE_SUM=0ff2112375d84a1c80e1cbb80f2b55d91cc1f521cfc07dbcef1f4bec7ac3e2b5 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 11e5ce6..2d8bbe0 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Publishing, memberships, subscriptions and newsletters platform", "fr": "Plateforme d'édition, d'adhésions, d'abonnements et de newsletters" }, - "version": "5.42.2~ynh1", + "version": "5.44.0~ynh1", "url": "https://ghost.org/", "upstream": { "license": "MIT", From 6ac4b9026594cded93f349356a48bebf668d49d0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 15 Apr 2023 06:16:05 +0000 Subject: [PATCH 11/22] 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 4cf85b6..4e72b69 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Publishing, memberships, subscriptions and newsletters platform -**Shipped version:** 5.42.2~ynh1 +**Shipped version:** 5.44.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 421b648..3360d79 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Plateforme d'édition, d'adhésions, d'abonnements et de newsletters -**Version incluse :** 5.42.2~ynh1 +**Version incluse :** 5.44.0~ynh1 ## Captures d’écran From 9689e2415b9e64aa117f95b2abdf5256e12a6ea3 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 20 Apr 2023 00:28:09 +0200 Subject: [PATCH 12/22] Packaging v2 and stop the install from source madness --- conf/admin.src | 5 - conf/app.src | 5 - conf/casper.src | 5 - conf/config.production.json | 29 ------ conf/systemd.service | 9 +- doc/POST_INSTALL.md | 5 + manifest.toml | 59 ++++++++++++ scripts/_common.sh | 62 +------------ scripts/backup | 16 ++-- scripts/change_url | 84 +++++++++-------- scripts/install | 180 +++++------------------------------- scripts/remove | 30 +++--- scripts/restore | 48 +++++----- scripts/upgrade | 112 +++++++++++----------- 14 files changed, 238 insertions(+), 411 deletions(-) delete mode 100644 conf/admin.src delete mode 100644 conf/app.src delete mode 100644 conf/casper.src delete mode 100644 conf/config.production.json create mode 100644 doc/POST_INSTALL.md create mode 100644 manifest.toml diff --git a/conf/admin.src b/conf/admin.src deleted file mode 100644 index f74136d..0000000 --- a/conf/admin.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/TryGhost/Admin/archive/refs/tags/v5.44.0.zip -SOURCE_SUM=d5558cd419c8d46bdc958064cb97f963d1ea793866414c025906ec15033512ed -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip -SOURCE_IN_SUBDIR=true diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index 6d9a4b8..0000000 --- a/conf/app.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://api.github.com/repos/TryGhost/Ghost/zipball/v5.44.0 -SOURCE_SUM=496639db3ca7c19a8baa78e282e1753a97eac0d0045b852375178b31895c6b86 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip -SOURCE_IN_SUBDIR=true diff --git a/conf/casper.src b/conf/casper.src deleted file mode 100644 index 0b2d8a3..0000000 --- a/conf/casper.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/TryGhost/Casper/archive/refs/tags/v5.4.9.zip -SOURCE_SUM=0ff2112375d84a1c80e1cbb80f2b55d91cc1f521cfc07dbcef1f4bec7ac3e2b5 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip -SOURCE_IN_SUBDIR=true diff --git a/conf/config.production.json b/conf/config.production.json deleted file mode 100644 index 21cbd0c..0000000 --- a/conf/config.production.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "url": "https://__DOMAIN____PATH__", - "server": { - "host": "127.0.0.1", - "port": __PORT__ - }, - "database": { - "client": "mysql", - "connection": { - "socketPath" : "/run/mysqld/mysqld.sock", - "user" : "__DB_USER__", - "password" : "__DB_PWD__", - "database" : "__DB_NAME__" - } - }, - "auth": { - "type": "password" - }, - "paths": { - "contentPath": "content/" - }, - "logging": { - "level": "info", - "rotation": { - "enabled": true - }, - "transports": ["file", "stdout"] - } -} diff --git a/conf/systemd.service b/conf/systemd.service index a0e74da..14909aa 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,16 +1,15 @@ [Unit] -Description=__APP__ systemd service -Documentation=https://docs.ghost.org +Description=__APP__ systemd service +Documentation=https://ghost.org/docs/ [Service] Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__ +WorkingDirectory=__INSTALL_DIR__/ghost Environment="__YNH_NODE_LOAD_PATH__" Environment="NODE_ENV=production" -#ExecStart=__YNH_NODE__ core/index.js run -ExecStart=yarn start +ExecStart=__YNH_NODE__ __INSTALL_DIR__/node_modules/ghost-cli/bin/ghost run Restart=always # Sandboxing options to harden security diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md new file mode 100644 index 0000000..6ffca03 --- /dev/null +++ b/doc/POST_INSTALL.md @@ -0,0 +1,5 @@ +Ghost was successfully installed :) + +Now create an admin account at https://__DOMAIN____PATH__/ghost + +Happy Blogging! diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..0dab4c8 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,59 @@ +packaging_format = 2 + +id = "ghost" +name = "Ghost" +description.en = "Publishing, memberships, subscriptions and newsletters platform" +description.fr = "Plateforme d'édition, d'adhésions, d'abonnements et de newsletters" + +version = "5.44.0~ynh1" + +maintainers = ["Julien Malik"] + +[upstream] +license = "MIT" +website = "https://ghost.org/" +admindoc = "https://ghost.org/help/" +code = "https://github.com/TryGhost/Ghost" +cpe = "cpe:2.3:a:ghost:ghost" +fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. + +[integration] +yunohost = ">= 4.3.0" +architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +multi_instance = true +ldap = "false" +sso = "false" +disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... +ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... + +[install] + [install.domain] + type = "domain" + + [install.path] + type = "path" + default = "/blog" + + [install.init_main_permission] + help.en = "If enabled, Ghost will be accessible by people who do not have an account. This can be changed later via the webadmin." + help.fr = "Si cette case est cochée, Ghost sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + type = "group" + default = "visitors" + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" + main.auth_header = false + + [resources.ports] + + [resources.apt] + packages = "mailutils" + + [resources.database] + type = "mysql" diff --git a/scripts/_common.sh b/scripts/_common.sh index 3f477b7..3693f10 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,10 +4,7 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="mailutils" - -NODEJS_VERSION=14 +NODEJS_VERSION=16 #================================================= # PERSONAL HELPERS @@ -20,60 +17,3 @@ NODEJS_VERSION=14 #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Send an email to inform the administrator -# -# usage: ynh_send_readme_to_admin app_message [recipients] -# | arg: app_message - The message to send to the administrator. -# | arg: recipients - The recipients of this email. Use spaces to separate multiples recipients. - default: root -# example: "root admin@domain" -# If you give the name of a YunoHost user, ynh_send_readme_to_admin will find its email adress for you -# example: "root admin@domain user1 user2" -ynh_send_readme_to_admin() { - local app_message="${1:-...No specific information...}" - local recipients="${2:-root}" - - # Retrieve the email of users - find_mails () { - local list_mails="$1" - local mail - local recipients=" " - # Read each mail in argument - for mail in $list_mails - do - # Keep root or a real email address as it is - if [ "$mail" = "root" ] || echo "$mail" | grep --quiet "@" - then - recipients="$recipients $mail" - else - # But replace an user name without a domain after by its email - if mail=$(ynh_user_get_info "$mail" "mail" 2> /dev/null) - then - recipients="$recipients $mail" - fi - fi - done - echo "$recipients" - } - recipients=$(find_mails "$recipients") - - local mail_subject="☁️🆈🅽🅷☁️: \`$app\` has important message for you" - - local mail_message="This is an automated message from your beloved YunoHost server. -Specific information for the application $app. -$app_message ---- -Automatic diagnosis data from YunoHost -$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')" - - # Define binary to use for mail command - if [ -e /usr/bin/bsd-mailx ] - then - local mail_bin=/usr/bin/bsd-mailx - else - local mail_bin=/usr/bin/mail.mailutils - fi - - # Send the email to the recipients - echo "$mail_message" | $mail_bin -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients" -} diff --git a/scripts/backup b/scripts/backup index dceee37..22f0be4 100755 --- a/scripts/backup +++ b/scripts/backup @@ -14,22 +14,22 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ynh_clean_check_starting } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +#REMOVEME? ynh_print_info --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -40,7 +40,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/change_url b/scripts/change_url index d7bfda0..56bd9c3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -13,65 +13,65 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS #================================================= -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH +#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN +#REMOVEME? old_path=$YNH_APP_OLD_PATH -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH +#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN +#REMOVEME? new_path=$YNH_APP_NEW_PATH -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --time --weight=1 -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +#REMOVEME? # Needed for helper "ynh_add_nginx_config" +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) # Add settings here as needed by your application -port=$(ynh_app_setting_get --app=$app --key=port) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? db_user=$db_name +#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1 +#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1 # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # 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" +#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED #================================================= -change_domain=0 -if [ "$old_domain" != "$new_domain" ] +#REMOVEME? change_domain=0 +#REMOVEME? if [ "$old_domain" != "$new_domain" ] then - change_domain=1 - domain=$new_domain + #REMOVEME? change_domain=1 +#REMOVEME? domain=$new_domain else - domain=$old_domain +#REMOVEME? domain=$old_domain fi -change_path=0 -if [ "$old_path" != "$new_path" ] +#REMOVEME? change_path=0 +#REMOVEME? if [ "$old_path" != "$new_path" ] then - change_path=1 - path=$new_path + #REMOVEME? change_path=1 +#REMOVEME? path=$new_path else - path=$old_path +#REMOVEME? path=$old_path fi if [[ $path =~ "\/ghost\/?" ]] @@ -93,28 +93,30 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf +ynh_change_url_nginx_config + +#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf # Change the path in the NGINX config file if [ $change_path -eq 1 ] then # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" +#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path" # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" +#REMOVEME? domain="$old_domain" +#REMOVEME? path="$new_path" # Create a dedicated NGINX config - ynh_add_nginx_config +#REMOVEME? ynh_add_nginx_config fi # Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf +#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path" +#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" +#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi #================================================= @@ -124,9 +126,9 @@ fi #================================================= ynh_script_progression --message="Modifying a config file..." -ynh_add_config --template="../conf/config.production.json" --destination="$final_path/ghost/core/config.production.json" -chmod 400 "$final_path/ghost/core/config.production.json" -chown $app:$app "$final_path/ghost/core/config.production.json" +ynh_add_config --template="../conf/config.production.json" --destination="$install_dir/ghost/core/config.production.json" +chmod 400 "$install_dir/ghost/core/config.production.json" +chown $app:$app "$install_dir/ghost/core/config.production.json" #================================================= # GENERIC FINALISATION @@ -140,9 +142,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 950a52e..d974205 100644 --- a/scripts/install +++ b/scripts/install @@ -9,107 +9,39 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - ynh_clean_setup () { - ynh_clean_check_starting + ### Remove this function if there's nothing to clean before calling the remove script. + read -p "debug me" } -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH -is_public=$YNH_APP_ARG_IS_PUBLIC - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# 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 --message="This path already contains a folder" - -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 - -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -ynh_script_progression --message="Finding an available port..." --weight=1 - -# Find an available port -port=$(ynh_find_port --port=4010) -ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - # Install Nodejs ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +# Upgrade NPM +ynh_npm install --global npm@latest + # Install Yarn -ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" +ynh_npm install --global yarn -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." +# Install Ghost-CLI -# Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +mkdir -p $install_dir/ghost +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:$app "$install_dir" -#================================================= -# CREATE A MYSQL DATABASE -#================================================= -ynh_script_progression --message="Creating a MySQL database..." - -db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name -ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name - -#================================================= -# DOWNLOAD, CHECK AND UNPACK SOURCE -#================================================= -ynh_script_progression --message="Setting up source files..." - -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" - -# Download, check integrity, uncompress and patch the source from casper.src -mkdir -p $final_path/ghost/core/content/themes/casper -ynh_setup_source --dest_dir="$final_path/ghost/core/content/themes/casper" --source_id="casper" - -git init "$final_path" -q -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - -# Patch https://github.com/YunoHost-Apps/ghost_ynh/issues/199 -ynh_replace_string --match_string=".whereRaw('posts.id" --replace_string=".whereRaw('\`posts\`.id" --target_file="$final_path/ghost/core/core/server/models/post.js" +pushd $install_dir + ynh_exec_as $app $ynh_npm install ghost-cli@latest + ynh_exec_as $app $ynh_node_load_PATH ./node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \ + --no-prompt --no-setup-systemd --no-start \ + --dir ghost --no-setup-linux-user \ + --no-setup-nginx --no-setup-ssl --url http://$domain$path --port $port \ + --db mysql --dbhost localhost --dbuser $db_user --dbpass $db_pwd --dbname $db_name \ + --mail SMTP --mailhost localhost --mailport 465 +popd #================================================= # NGINX CONFIGURATION @@ -119,37 +51,6 @@ ynh_script_progression --message="Configuring NGINX web server..." # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# SPECIFIC SETUP -#================================================= -# MODIFY A CONFIG FILE -#================================================= -ynh_script_progression --message="Modifying a config file..." - -ynh_add_config --template="../conf/config.production.json" --destination="$final_path/ghost/core/config.production.json" -chmod 400 "$final_path/ghost/core/config.production.json" -chown $app:$app "$final_path/ghost/core/config.production.json" - -touch "$final_path/.yarnrc.yml" -chmod 400 "$final_path/.yarnrc.yml" -chown $app:$app "$final_path/.yarnrc.yml" - -#============================================== -# BUILD GHOST -#============================================== -ynh_script_progression --message="Building Ghost... (this will take some time and resources!)" - -pushd "$final_path" - ynh_use_nodejs - # Longer network timeouts for slow systems; see https://github.com/yarnpkg/yarn/issues/8242 - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn config set network-timeout 600000 - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn setup # catch-all command provided by Ghost that handles all the setup - pushd "ghost/admin" - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn build --environment/production # well, except for the admin - popd -popd - #================================================= # SETUP SYSTEMD #================================================= @@ -164,14 +65,14 @@ ynh_add_systemd_config ynh_script_progression --message="Configuring log rotation..." # Use logrotate to manage application logfile(s) -ynh_use_logrotate +ynh_use_logrotate --logfile="$install_dir/ghost/content/logs" #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for Ghost" --log="/var/log/$app/$app.log" +yunohost service add $app --description="$app daemon for Ghost" --log="$install_dir/ghost/contents/logs" #================================================= # START SYSTEMD SERVICE @@ -181,44 +82,9 @@ ynh_script_progression --message="Starting a systemd service..." # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --line_match="Ghost booted" --timeout=60 -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." - -if [ $is_public -eq 1 ] -then - ynh_permission_update --permission="main" --add="visitors" -fi - -ynh_permission_create --permission="admin" --url="/ghost" --allowed="visitors" --auth_header="false" --protected="true" - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." - -ynh_systemd_action --service_name=nginx --action=reload - -#================================================= -# SEND A README FOR THE ADMIN -#================================================= -ynh_script_progression --message="Sending a readme for the admin..." --weight=1 - -message="Ghost was successfully installed :) - -Next step: - -Create an admin account at https://$domain$path_url/ghost - -Happy Blogging! - -If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/ghost_ynh/issues" - -ynh_send_readme_to_admin "$message" - #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Installation of $app completed" + diff --git a/scripts/remove b/scripts/remove index 36494ad..93af450 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,15 +12,15 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +#REMOVEME? ynh_script_progression --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -port=$(ynh_app_setting_get --app=$app --key=port) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? db_user=$db_name +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) #================================================= # STANDARD REMOVE @@ -54,28 +54,28 @@ ynh_remove_logrotate #================================================= # REMOVE THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Removing the MySQL database..." +#REMOVEME? ynh_script_progression --message="Removing the MySQL database..." # Remove a database if it exists, along with the associated user -ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name +#REMOVEME? ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." +#REMOVEME? ynh_script_progression --message="Removing dependencies..." # Remove metapackage and its dependencies -ynh_remove_app_dependencies +#REMOVEME? ynh_remove_app_dependencies ynh_remove_nodejs #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." +#REMOVEME? ynh_script_progression --message="Removing app main directory..." # Remove the app directory securely -ynh_secure_remove --file="$final_path" +#REMOVEME? ynh_secure_remove --file="$install_dir" #================================================= # REMOVE NGINX CONFIGURATION @@ -98,10 +98,10 @@ ynh_secure_remove --file="/var/log/$app" #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." +#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." # Delete a system user -ynh_system_user_delete --username=$app +#REMOVEME? ynh_system_user_delete --username=$app #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 82e6b6a..0aea26f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,33 +14,33 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ynh_clean_check_starting } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= ynh_script_progression --message="Loading settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? db_user=$db_name +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." +#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +#REMOVEME? test ! -d $install_dir \ + || ynh_die --message="There is already a directory: $install_dir " #================================================= # STANDARD RESTORATION STEPS @@ -54,45 +54,45 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." +#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." +#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." # Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION # Install Yarn -ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" +#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" #================================================= # RESTORE THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Restoring the MySQL database..." +#REMOVEME? ynh_script_progression --message="Restoring the MySQL database..." -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +#REMOVEME? ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 80d876c..d0f01de 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,17 +12,17 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +#REMOVEME? ynh_script_progression --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -port=$(ynh_app_setting_get --app=$app --key=port) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? db_user=$db_name +#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) #================================================= # CHECK VERSION @@ -33,17 +33,17 @@ 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)..." +#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # restore it if the upgrade fails ynh_clean_check_starting - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -53,12 +53,12 @@ ynh_script_progression --message="Ensuring downward compatibility..." # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) - ynh_app_setting_set --app=$app --key=db_name --value=$db_name +#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi # Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all +#REMOVEME? if ynh_legacy_permissions_exists; then +#REMOVEME? ynh_legacy_permissions_delete_all ynh_app_setting_delete --app=$app --key=is_public fi @@ -75,10 +75,10 @@ ynh_systemd_action --service_name=$app --action=stop #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." +#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -92,51 +92,51 @@ then tmpdir="$(mktemp -d)" # Copy the admin saved settings from final path to tmp directory - if [ -f "$final_path/config.production.json" ] + if [ -f "$install_dir/config.production.json" ] then # Old versions of Ghost store it here - cp -ar "$final_path/config.production.json" "$tmpdir/config.production.json" + cp -ar "$install_dir/config.production.json" "$tmpdir/config.production.json" else # New versions of Ghost store it here - cp -ar "$final_path/ghost/core/config.production.json" "$tmpdir/config.production.json" + cp -ar "$install_dir/ghost/core/config.production.json" "$tmpdir/config.production.json" fi # Backup the content folder to the temp dir - if [ -f "$final_path/config.production.json" ] + if [ -f "$install_dir/config.production.json" ] then # Old versions of Ghost store it here - cp -ar "$final_path/content" "$tmpdir/content" + cp -ar "$install_dir/content" "$tmpdir/content" else # New versions of Ghost store it here - cp -ar "$final_path/ghost/core/content" "$tmpdir/content" + cp -ar "$install_dir/ghost/core/content" "$tmpdir/content" fi # Remove the app directory securely - ynh_secure_remove --file=$final_path +#REMOVEME? ynh_secure_remove --file=$install_dir # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$final_path + ynh_setup_source --dest_dir=$install_dir # Download, check integrity, uncompress and patch the source from casper.src - mkdir -p $final_path/content/themes/casper - ynh_setup_source --dest_dir="$final_path/ghost/core/content/themes/casper" --source_id="casper" + mkdir -p $install_dir/content/themes/casper + ynh_setup_source --dest_dir="$install_dir/ghost/core/content/themes/casper" --source_id="casper" # Copy the admin saved settings from tmp directory to final path - cp -ar "$tmpdir/config.production.json" "$final_path/ghost/core/config.production.json" + cp -ar "$tmpdir/config.production.json" "$install_dir/ghost/core/config.production.json" - # Copy content folder back to the final_path - cp -ar "$tmpdir/content" "${final_path}/ghost/core" + # Copy content folder back to the install_dir + cp -ar "$tmpdir/content" "${install_dir}/ghost/core" # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir" # Patch https://github.com/YunoHost-Apps/ghost_ynh/issues/199 - ynh_replace_string --match_string=".whereRaw('posts.id" --replace_string=".whereRaw('\`posts\`.id" --target_file="$final_path/ghost/core/core/server/models/post.js" + ynh_replace_string --match_string=".whereRaw('posts.id" --replace_string=".whereRaw('\`posts\`.id" --target_file="$install_dir/ghost/core/core/server/models/post.js" fi -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # NGINX CONFIGURATION @@ -149,15 +149,15 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." +#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION # Install Yarn -ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" +#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" #================================================= # SPECIFIC UPGRADE @@ -166,35 +166,35 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st #================================================= ynh_script_progression --message="Modifying a config file..." -ynh_add_config --template="../conf/config.production.json" --destination="$final_path/ghost/core/config.production.json" -chmod 400 "$final_path/ghost/core/config.production.json" -chown $app:$app "$final_path/ghost/core/config.production.json" +ynh_add_config --template="../conf/config.production.json" --destination="$install_dir/ghost/core/config.production.json" +chmod 400 "$install_dir/ghost/core/config.production.json" +chown $app:$app "$install_dir/ghost/core/config.production.json" -touch "$final_path/.yarnrc.yml" -chmod 400 "$final_path/.yarnrc.yml" -chown $app:$app "$final_path/.yarnrc.yml" +touch "$install_dir/.yarnrc.yml" +chmod 400 "$install_dir/.yarnrc.yml" +chown $app:$app "$install_dir/.yarnrc.yml" #============================================== # BUILD GHOST #============================================== -# Make the final_path a git repo if needed -if [ ! -d "$final_path/.git" ]; then - ynh_exec_as $app git init "$final_path" -q +# Make the install_dir a git repo if needed +if [ ! -d "$install_dir/.git" ]; then + ynh_exec_as $app git init "$install_dir" -q fi if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Building Ghost... (this will take some time and resources!)" - pushd "$final_path" + pushd "$install_dir" # Longer network timeouts for slow systems; see https://github.com/yarnpkg/yarn/issues/8242 - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn config set network-timeout 600000 - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn install --non-interactive - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn setup + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn config set network-timeout 600000 + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn install --non-interactive + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn setup pushd "ghost/admin" - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$final_path" yarn build --environment/production + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn build --environment/production popd popd fi @@ -234,9 +234,9 @@ ynh_systemd_action --service_name=$app --action=start --line_match="Ghost booted #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT From a5bde0406bdb5e6cb6b508da08237ca213766ce7 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Apr 2023 15:40:45 +0200 Subject: [PATCH 13/22] Finalize packaging v2 and upgrade to v5.44.0 --- manifest.json | 54 --------------- manifest.toml | 11 ++- scripts/backup | 39 ----------- scripts/change_url | 96 -------------------------- scripts/install | 8 +-- scripts/remove | 80 ++-------------------- scripts/restore | 66 +++--------------- scripts/upgrade | 167 +++++++++------------------------------------ 8 files changed, 53 insertions(+), 468 deletions(-) delete mode 100644 manifest.json diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 2d8bbe0..0000000 --- a/manifest.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "Ghost", - "id": "ghost", - "packaging_format": 1, - "description": { - "en": "Publishing, memberships, subscriptions and newsletters platform", - "fr": "Plateforme d'édition, d'adhésions, d'abonnements et de newsletters" - }, - "version": "5.44.0~ynh1", - "url": "https://ghost.org/", - "upstream": { - "license": "MIT", - "website": "https://ghost.org/", - "admindoc": "https://ghost.org/help/", - "code": "https://github.com/TryGhost/Ghost", - "cpe": "cpe:2.3:a:ghost:ghost" - }, - "license": "MIT", - "maintainer": { - "name": "Julien Malik", - "email": "julien.malik@paraiso.me" - }, - "requirements": { - "yunohost": ">= 4.3.0" - }, - "multi_instance": true, - "services": [ - "nginx", - "mysql" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "path", - "type": "path", - "example": "/blog", - "default": "/blog" - }, - { - "name": "is_public", - "type": "boolean", - "help": { - "en": "If enabled, Ghost will be accessible by people who do not have an account. This can be changed later via the webadmin.", - "fr": "Si cette case est cochée, Ghost sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." - }, - "default": true - } - ] - } -} diff --git a/manifest.toml b/manifest.toml index 0dab4c8..09b24fa 100644 --- a/manifest.toml +++ b/manifest.toml @@ -15,17 +15,16 @@ website = "https://ghost.org/" admindoc = "https://ghost.org/help/" code = "https://github.com/TryGhost/Ghost" cpe = "cpe:2.3:a:ghost:ghost" -fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. [integration] -yunohost = ">= 4.3.0" -architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +yunohost = ">= 11.1.0" +architectures = "all" multi_instance = true ldap = "false" sso = "false" -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +disk = "1G" +ram.build = "2G" +ram.runtime = "2G" [install] [install.domain] diff --git a/scripts/backup b/scripts/backup index 22f0be4..52859db 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,56 +10,17 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_print_info --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= ynh_print_info --message="Declaring files to be backed up..." -#================================================= -# BACKUP THE APP MAIN DIR -#================================================= - ynh_backup --src_path="$install_dir" -#================================================= -# BACKUP THE NGINX CONFIGURATION -#================================================= - 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 -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/change_url b/scripts/change_url index 56bd9c3..6a30d07 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,71 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN -#REMOVEME? old_path=$YNH_APP_OLD_PATH - -#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN -#REMOVEME? new_path=$YNH_APP_NEW_PATH - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --time --weight=1 - -#REMOVEME? # Needed for helper "ynh_add_nginx_config" -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) - -# Add settings here as needed by your application -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? db_user=$db_name -#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1 - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. -#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -#REMOVEME? change_domain=0 -#REMOVEME? if [ "$old_domain" != "$new_domain" ] -then - #REMOVEME? change_domain=1 -#REMOVEME? domain=$new_domain -else -#REMOVEME? domain=$old_domain -fi - -#REMOVEME? change_path=0 -#REMOVEME? if [ "$old_path" != "$new_path" ] -then - #REMOVEME? change_path=1 -#REMOVEME? path=$new_path -else -#REMOVEME? path=$old_path -fi - if [[ $path =~ "\/ghost\/?" ]] then ynh_die --message="Sorry, Ghost does not support being installed on a path ending by /ghost" @@ -95,30 +30,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- ynh_change_url_nginx_config -#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified -#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper -#REMOVEME? domain="$old_domain" -#REMOVEME? path="$new_path" - # Create a dedicated NGINX config -#REMOVEME? ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location -#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path" -#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location -#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi - #================================================= # SPECIFIC MODIFICATIONS #================================================= @@ -139,13 +50,6 @@ ynh_script_progression --message="Starting a systemd service..." --time --weight ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 - -#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index d974205..8e19130 100644 --- a/scripts/install +++ b/scripts/install @@ -9,14 +9,11 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - read -p "debug me" -} - #================================================= # INSTALL DEPENDENCIES #================================================= +ynh_script_progression --message="Installing NodeJS dependencies..." + # Install Nodejs ynh_install_nodejs --nodejs_version=$NODEJS_VERSION @@ -34,6 +31,7 @@ chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" pushd $install_dir + ynh_script_progression --message="Installing and configuring Ghost..." ynh_exec_as $app $ynh_npm install ghost-cli@latest ynh_exec_as $app $ynh_node_load_PATH ./node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \ --no-prompt --no-setup-systemd --no-start \ diff --git a/scripts/remove b/scripts/remove index 93af450..6a670fb 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,99 +10,27 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? db_user=$db_name -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) - -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # 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 integration..." + ynh_script_progression --message="Removing $app service integration..." --weight=1 yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." - -# Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." - -# Remove the app-specific logrotate config -ynh_remove_logrotate - -#================================================= -# REMOVE THE MYSQL DATABASE -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the MySQL database..." - -# Remove a database if it exists, along with the associated user -#REMOVEME? ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name - -#================================================= -# REMOVE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Removing dependencies..." - -# Remove metapackage and its dependencies -#REMOVEME? ynh_remove_app_dependencies - ynh_remove_nodejs -#================================================= -# REMOVE APP MAIN DIR -#================================================= -#REMOVEME? ynh_script_progression --message="Removing app main directory..." - -# Remove the app directory securely -#REMOVEME? ynh_secure_remove --file="$install_dir" - -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." - -# Remove the dedicated nginx config ynh_remove_nginx_config -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing log files..." +ynh_remove_logrotate -# Remove the log files ynh_secure_remove --file="/var/log/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." - -# Delete a system user -#REMOVEME? ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 0aea26f..e00dfd1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,55 +10,8 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? db_user=$db_name -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." - -#REMOVEME? test ! -d $install_dir \ - || ynh_die --message="There is already a directory: $install_dir " - #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." - -# Create the dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -71,28 +24,25 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# SPECIFIC RESTORATION +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX configuration..." + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # REINSTALL DEPENDENCIES #================================================= -#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." - -# Define and install dependencies -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies +ynh_script_progression --message="Reinstalling NodeJS..." # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION -# Install Yarn -#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= -#REMOVEME? ynh_script_progression --message="Restoring the MySQL database..." +ynh_script_progression --message="Restoring the MySQL database..." --weight=1 -#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -#REMOVEME? ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d0f01de..4ce5d32 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,42 +9,10 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? db_user=$db_name -#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) - -#================================================= -# CHECK VERSION -#================================================= - upgrade_type=$(ynh_check_app_version_changed) #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # restore it if the upgrade fails - ynh_clean_check_starting -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - +# STANDARD UPGRADE STEPS #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -53,18 +21,9 @@ ynh_script_progression --message="Ensuring downward compatibility..." # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) -#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name + ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi -# Cleaning legacy permissions -#REMOVEME? if ynh_legacy_permissions_exists; then -#REMOVEME? ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -#================================================= -# STANDARD UPGRADE STEPS #================================================= # STOP SYSTEMD SERVICE #================================================= @@ -73,38 +32,35 @@ ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name=$app --action=stop #================================================= -# CREATE DEDICATED USER +# UPGRADE DEPENDENCIES #================================================= -#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." +# Install Nodejs +ynh_install_nodejs --nodejs_version=$NODEJS_VERSION -# Create a dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" +# Upgrade NPM +ynh_npm install --global npm@latest + +# Install Yarn +ynh_npm install --global yarn #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] +# Up to v5.26.4~ynh1, we were downloading the source code and building the app by ourselves +# that was a mess to maintain, let's move away from that +if ynh_compare_current_package_version --comparison le --version 5.26.4~ynh1 then - ynh_script_progression --message="Upgrading source files..." + + ynh_script_progression --message="Upgrading from older packaging of Ghost..." # Create a temporary directory tmpdir="$(mktemp -d)" - # Copy the admin saved settings from final path to tmp directory - if [ -f "$install_dir/config.production.json" ] - then - # Old versions of Ghost store it here - cp -ar "$install_dir/config.production.json" "$tmpdir/config.production.json" - else - # New versions of Ghost store it here - cp -ar "$install_dir/ghost/core/config.production.json" "$tmpdir/config.production.json" - fi - # Backup the content folder to the temp dir if [ -f "$install_dir/config.production.json" ] then - # Old versions of Ghost store it here + # Old versions of Ghost stored it here cp -ar "$install_dir/content" "$tmpdir/content" else # New versions of Ghost store it here @@ -112,17 +68,24 @@ then fi # Remove the app directory securely -#REMOVEME? ynh_secure_remove --file=$install_dir + ynh_secure_remove --file=$install_dir - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$install_dir + # Recreate it + mkdir -p $install_dir - # Download, check integrity, uncompress and patch the source from casper.src - mkdir -p $install_dir/content/themes/casper - ynh_setup_source --dest_dir="$install_dir/ghost/core/content/themes/casper" --source_id="casper" + chmod 750 "$install_dir" + chmod -R o-rwx "$install_dir" + chown -R $app:www-data "$install_dir" - # Copy the admin saved settings from tmp directory to final path - cp -ar "$tmpdir/config.production.json" "$install_dir/ghost/core/config.production.json" + pushd $install_dir + ynh_exec_as $app $ynh_npm install ghost-cli@latest + ynh_exec_as $app $ynh_node_load_PATH ./node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \ + --no-prompt --no-setup-systemd --no-start \ + --dir ghost --no-setup-linux-user \ + --no-setup-nginx --no-setup-ssl --url http://$domain$path --port $port \ + --db mysql --dbhost localhost --dbuser $db_user --dbpass $db_pwd --dbname $db_name \ + --mail SMTP --mailhost localhost --mailport 465 + popd # Copy content folder back to the install_dir cp -ar "$tmpdir/content" "${install_dir}/ghost/core" @@ -130,14 +93,8 @@ then # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir" - # Patch https://github.com/YunoHost-Apps/ghost_ynh/issues/199 - ynh_replace_string --match_string=".whereRaw('posts.id" --replace_string=".whereRaw('\`posts\`.id" --target_file="$install_dir/ghost/core/core/server/models/post.js" fi -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # NGINX CONFIGURATION #================================================= @@ -146,66 +103,15 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." - -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - -# Install Nodejs -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION - -# Install Yarn -#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" - #================================================= # SPECIFIC UPGRADE -#================================================= -# MODIFY A CONFIG FILE -#================================================= -ynh_script_progression --message="Modifying a config file..." - -ynh_add_config --template="../conf/config.production.json" --destination="$install_dir/ghost/core/config.production.json" -chmod 400 "$install_dir/ghost/core/config.production.json" -chown $app:$app "$install_dir/ghost/core/config.production.json" - -touch "$install_dir/.yarnrc.yml" -chmod 400 "$install_dir/.yarnrc.yml" -chown $app:$app "$install_dir/.yarnrc.yml" - -#============================================== -# BUILD GHOST -#============================================== - -# Make the install_dir a git repo if needed -if [ ! -d "$install_dir/.git" ]; then - ynh_exec_as $app git init "$install_dir" -q -fi - -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Building Ghost... (this will take some time and resources!)" - - pushd "$install_dir" - # Longer network timeouts for slow systems; see https://github.com/yarnpkg/yarn/issues/8242 - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn config set network-timeout 600000 - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn install --non-interactive - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn add knex-migrator ember-cli --dev --ignore-workspace-root-check --non-interactive - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn setup - pushd "ghost/admin" - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH HOME="$install_dir" yarn build --environment/production - popd - popd -fi - #================================================= # SETUP SYSTEMD #================================================= ynh_script_progression --message="Upgrading systemd configuration..." # Create a dedicated systemd config - ynh_add_systemd_config +ynh_add_systemd_config #================================================= # GENERIC FINALIZATION @@ -215,7 +121,7 @@ ynh_script_progression --message="Upgrading systemd configuration..." ynh_script_progression --message="Upgrading logrotate configuration..." # Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate --non-append +ynh_use_logrotate --logfile="$install_dir/ghost/content/logs" --non-append #================================================= # INTEGRATE SERVICE IN YUNOHOST @@ -231,13 +137,6 @@ ynh_script_progression --message="Starting a systemd service..." ynh_systemd_action --service_name=$app --action=start --line_match="Ghost booted" --timeout=60 -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= From 8145c27eb75894b72a0a4097beb983d94172bb23 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Apr 2023 16:11:10 +0200 Subject: [PATCH 14/22] Update auto-updater for v2 --- .github/workflows/updater.sh | 95 ++---------------------------------- 1 file changed, 3 insertions(+), 92 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 8e449f7..3c61f2a 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -16,22 +16,11 @@ # Fetching information # Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) -current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') +current_version=$(tomlq -t -s --indent 4 -r '.version|split("~")[0]' manifest.toml) # CORE -# repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') -repo="TryGhost/Ghost" +repo=$(tomlq -r '.upstream.code|split("https://github.com/")[1]' manifest.toml) version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").zipball_url ] | join(" ") | @sh' | tr -d "'")) - -# ADMIN -admin_repo="TryGhost/Admin" -assets+=("https://github.com/$admin_repo/archive/refs/tags/${version}.zip") - -# THEME -theme_repo="TryGhost/Casper" -theme_version=$(curl --silent "https://api.github.com/repos/$theme_repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets+=("https://github.com/$theme_repo/archive/refs/tags/${theme_version}.zip") # Later down the script, we assume the version has only digits and dots # Sometimes the release name starts with a "v", so let's filter it out. @@ -57,90 +46,12 @@ elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY. exit 0 fi -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - -#================================================= -# UPDATE SOURCE FILES -#================================================= - -# Here we use the $assets variable to get the resources published in the upstream release. - -count=0 - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do - -echo "Handling asset at $asset_url" - -# Assign the asset to a source file in conf/ directory -# 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 - *"/Ghost/"*) - src="app" - ;; - *"/Admin/"*) - src="admin" - ;; - *"/Casper/"*) - src="casper" - ;; - *) - src="" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then - -# Create the temporary directory -tempdir="$(mktemp -d)" - -# Download sources and calculate checksum -filename=${asset_url##*/} -curl --silent -4 -L $asset_url -o "$tempdir/$filename" -checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - -# Delete temporary directory -rm -rf $tempdir - -# Rewrite source file -cat < conf/$src.src -SOURCE_URL=$asset_url -SOURCE_SUM=$checksum -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip -SOURCE_IN_SUBDIR=true -EOT -echo "... conf/$src.src updated" - -count=$((count+1)) - -else -echo "... asset ignored" -fi - -done - -if [ $count -lt 2 ]; then - echo "::warning ::Some assets were not processed." - exit 0 -fi - -#================================================= -# SPECIFIC UPDATE STEPS -#================================================= - -# Any action on the app's source code can be done. -# The GitHub Action workflow takes care of committing all changes after this script ends. - #================================================= # GENERIC FINALIZATION #================================================= # Replace new version in manifest -echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json +echo "$(tomlq -t -r ".version = \"${version}~ynh1\"" manifest.toml)" > manifest.toml # No need to update the README, yunohost-bot takes care of it From d43fc135c942a6720e68e728d9e28d6225dc7aa4 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Apr 2023 19:01:42 +0200 Subject: [PATCH 15/22] Comply with CI demands and fixes --- check_process | 28 ---------------------------- doc/DESCRIPTION.md | 3 +++ doc/DISCLAIMER.md | 21 --------------------- doc/DISCLAIMER_fr.md | 21 --------------------- doc/POST_INSTALL.md | 2 +- manifest.toml | 6 +++--- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 4 ++-- tests.toml | 7 +++++++ 10 files changed, 18 insertions(+), 78 deletions(-) delete mode 100644 check_process create mode 100644 doc/DESCRIPTION.md delete mode 100644 doc/DISCLAIMER.md delete mode 100644 doc/DISCLAIMER_fr.md create mode 100644 tests.toml diff --git a/check_process b/check_process deleted file mode 100644 index 411c699..0000000 --- a/check_process +++ /dev/null @@ -1,28 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - is_public=1 - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - # 4.9.4 - upgrade=1 from_commit=7a150ab29ee969f72dd7846539ae12ac1975165b - # 4.17.1, disabled due to failing in v4.3 - # upgrade=1 from_commit=09f260c04435df35edca042486b6a8eb3160333b - backup_restore=1 - multi_instance=1 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=7a150ab29ee969f72dd7846539ae12ac1975165b - name=4.9.4 - ; commit=09f260c04435df35edca042486b6a8eb3160333b - name=4.17.1 diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..f973f4b --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,3 @@ +Ghost is a powerful app for new-media creators to publish, share, and grow a business around their content. + +It comes with modern tools to build a website, publish content, send newsletters & offer paid subscriptions to members. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index 7ccb1d8..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,21 +0,0 @@ -## Installation - - 1. No LDAP support. - 1. You need more than **1GB** of ram. If you don't have it, please create a **swap memory**. - - dd if=/dev/zero of=/swapfile bs=1024 count=1048576 - mkswap /swapfile - swapon /swapfile - echo "/swapfile swap swap defaults 0 0" >> /etc/fstab - - 1. This app is multi-instance (you can have more than one Ghost blogging websites on a single YunoHost server) - -### Installing the Ghost app - - 0. Note - When making the install public, your Ghost domain link must be accessed WHILE NOT signed into your YunoHost session. It is recommended to use a incognito mode to sign into your Ghost admin account. If you make your install public, and try to login your Ghost admin account while signed into your YunoHost session, you will get a an authorized header error. The reason for this is because Ghost has a feature that allows for a subscription based access for content. This means Ghost allows for the admin user to setup other users (either other staff or paid/unpaid subscribers) to have the abilility to login outside of YunoHost. - - 1. **App can be installed by YunoHost admin interface or by the following command:** - - `sudo yunohost app install https://github.com/YunoHost-Apps/ghost_ynh` - - 2. After installation create an **admin account** by visiting `https://domain.tld/ghost/ghost`. If you choose to name your Ghost instance "blog" during YunoHost setup process, then it would be `https://domain.tld/blog/ghost`. This will allow you to continue to setup your admin account and configure your settings. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md deleted file mode 100644 index a79973b..0000000 --- a/doc/DISCLAIMER_fr.md +++ /dev/null @@ -1,21 +0,0 @@ -## Installation - - 1. Pas de prise en charge LDAP. - 1. Vous avez besoin de plus de **1 Go** de RAM. Si vous ne l'avez pas, veuillez créer une **mémoire d'échange**. - - dd if=/dev/zero of=/swapfile bs=1024 count=1048576 - mkswap /fichier d'échange - swapon / fichier d'échange - echo "/swapfile swap swap defaults 0 0" >> /etc/fstab - - 1. Cette application est multi-instance (vous pouvez avoir plusieurs sites Web de blogs Ghost sur un seul serveur YunoHost) - -### Installation de l'application Ghost - - 0. Remarque - Lorsque vous rendez l'installation publique, vous devez accéder à votre lien de domaine Ghost SANS vous connecter à votre session YunoHost. Il est recommandé d'utiliser un mode incognito pour vous connecter à votre compte administrateur Ghost. Si vous rendez votre installation publique et essayez de vous connecter à votre compte administrateur Ghost tout en étant connecté à votre session YunoHost, vous obtiendrez une erreur d'en-tête autorisée. La raison en est que Ghost a une fonctionnalité qui permet un accès au contenu basé sur un abonnement. Cela signifie que Ghost permet à l'utilisateur administrateur de configurer d'autres utilisateurs (soit d'autres membres du personnel, soit des abonnés payés/non payés) pour avoir la possibilité de se connecter en dehors de YunoHost. - - 1. ** L'application peut être installée par l'interface d'administration YunoHost ou par la commande suivante : ** - - `sudo yunohost installer l'application https://github.com/YunoHost-Apps/ghost_ynh` - - 2. Après l'installation, créez un **compte administrateur** en visitant `https://domain.tld/ghost/ghost`. Si vous choisissez de nommer votre instance Ghost "blog" pendant le processus d'installation de YunoHost, alors ce sera "https://domain.tld/blog/ghost". Cela vous permettra de continuer à configurer votre compte administrateur et à configurer vos paramètres. \ No newline at end of file diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 6ffca03..13f1c58 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,4 +1,4 @@ -Ghost was successfully installed :) +Ghost was successfully installed! Now create an admin account at https://__DOMAIN____PATH__/ghost diff --git a/manifest.toml b/manifest.toml index 09b24fa..d980621 100644 --- a/manifest.toml +++ b/manifest.toml @@ -20,8 +20,8 @@ cpe = "cpe:2.3:a:ghost:ghost" yunohost = ">= 11.1.0" architectures = "all" multi_instance = true -ldap = "false" -sso = "false" +ldap = false +sso = false disk = "1G" ram.build = "2G" ram.runtime = "2G" @@ -52,7 +52,7 @@ ram.runtime = "2G" [resources.ports] [resources.apt] - packages = "mailutils" + packages = "mailutils mariadb-server" [resources.database] type = "mysql" diff --git a/scripts/install b/scripts/install index 8e19130..d66615a 100644 --- a/scripts/install +++ b/scripts/install @@ -32,7 +32,7 @@ chown -R $app:$app "$install_dir" pushd $install_dir ynh_script_progression --message="Installing and configuring Ghost..." - ynh_exec_as $app $ynh_npm install ghost-cli@latest + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest ynh_exec_as $app $ynh_node_load_PATH ./node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \ --no-prompt --no-setup-systemd --no-start \ --dir ghost --no-setup-linux-user \ diff --git a/scripts/restore b/scripts/restore index e00dfd1..c958b5c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -65,7 +65,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for Ghost" --log="/var/log/$app/$app.log" +yunohost service add $app --description="$app daemon for Ghost" --log="$install_dir/ghost/contents/logs" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 4ce5d32..f5d59ad 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -78,7 +78,7 @@ then chown -R $app:www-data "$install_dir" pushd $install_dir - ynh_exec_as $app $ynh_npm install ghost-cli@latest + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest ynh_exec_as $app $ynh_node_load_PATH ./node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \ --no-prompt --no-setup-systemd --no-start \ --dir ghost --no-setup-linux-user \ @@ -128,7 +128,7 @@ ynh_use_logrotate --logfile="$install_dir/ghost/content/logs" --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for Ghost" --log="/var/log/$app/$app.log" +yunohost service add $app --description="$app daemon for Ghost" --log="$install_dir/ghost/contents/logs" #================================================= # START SYSTEMD SERVICE diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..a3aba95 --- /dev/null +++ b/tests.toml @@ -0,0 +1,7 @@ +test_format = 1.0 + +[default] + + exclude = ["install.nourl"] + + test_upgrade_from.7a150ab29ee969f72dd7846539ae12ac1975165b.name = "Upgrade from 4.9.4" From 7ca66b89e85d1b65464011165daba3b69f2a3c19 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 22 Apr 2023 17:02:05 +0000 Subject: [PATCH 16/22] Auto-update README --- README.md | 29 ++++------------------------- README_fr.md | 28 ++++------------------------ 2 files changed, 8 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 4e72b69..fb9d952 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,10 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Publishing, memberships, subscriptions and newsletters platform +Ghost is a powerful app for new-media creators to publish, share, and grow a business around their content. + +It comes with modern tools to build a website, publish content, send newsletters & offer paid subscriptions to members. + **Shipped version:** 5.44.0~ynh1 @@ -24,30 +27,6 @@ Publishing, memberships, subscriptions and newsletters platform ![Screenshot of Ghost](./doc/screenshots/screenshot.png) -## Disclaimers / important information - -## Installation - - 1. No LDAP support. - 1. You need more than **1GB** of ram. If you don't have it, please create a **swap memory**. - - dd if=/dev/zero of=/swapfile bs=1024 count=1048576 - mkswap /swapfile - swapon /swapfile - echo "/swapfile swap swap defaults 0 0" >> /etc/fstab - - 1. This app is multi-instance (you can have more than one Ghost blogging websites on a single YunoHost server) - -### Installing the Ghost app - - 0. Note - When making the install public, your Ghost domain link must be accessed WHILE NOT signed into your YunoHost session. It is recommended to use a incognito mode to sign into your Ghost admin account. If you make your install public, and try to login your Ghost admin account while signed into your YunoHost session, you will get a an authorized header error. The reason for this is because Ghost has a feature that allows for a subscription based access for content. This means Ghost allows for the admin user to setup other users (either other staff or paid/unpaid subscribers) to have the abilility to login outside of YunoHost. - - 1. **App can be installed by YunoHost admin interface or by the following command:** - - `sudo yunohost app install https://github.com/YunoHost-Apps/ghost_ynh` - - 2. After installation create an **admin account** by visiting `https://domain.tld/ghost/ghost`. If you choose to name your Ghost instance "blog" during YunoHost setup process, then it would be `https://domain.tld/blog/ghost`. This will allow you to continue to setup your admin account and configure your settings. - ## :red_circle: Antifeatures - **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. diff --git a/README_fr.md b/README_fr.md index 3360d79..0dbcbb4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,7 +16,10 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Plateforme d'édition, d'adhésions, d'abonnements et de newsletters +Ghost is a powerful app for new-media creators to publish, share, and grow a business around their content. + +It comes with modern tools to build a website, publish content, send newsletters & offer paid subscriptions to members. + **Version incluse :** 5.44.0~ynh1 @@ -24,29 +27,6 @@ Plateforme d'édition, d'adhésions, d'abonnements et de newsletters ![Capture d’écran de Ghost](./doc/screenshots/screenshot.png) -## Avertissements / informations importantes - -## Installation - - 1. Pas de prise en charge LDAP. - 1. Vous avez besoin de plus de **1 Go** de RAM. Si vous ne l'avez pas, veuillez créer une **mémoire d'échange**. - - dd if=/dev/zero of=/swapfile bs=1024 count=1048576 - mkswap /fichier d'échange - swapon / fichier d'échange - echo "/swapfile swap swap defaults 0 0" >> /etc/fstab - - 1. Cette application est multi-instance (vous pouvez avoir plusieurs sites Web de blogs Ghost sur un seul serveur YunoHost) - -### Installation de l'application Ghost - - 0. Remarque - Lorsque vous rendez l'installation publique, vous devez accéder à votre lien de domaine Ghost SANS vous connecter à votre session YunoHost. Il est recommandé d'utiliser un mode incognito pour vous connecter à votre compte administrateur Ghost. Si vous rendez votre installation publique et essayez de vous connecter à votre compte administrateur Ghost tout en étant connecté à votre session YunoHost, vous obtiendrez une erreur d'en-tête autorisée. La raison en est que Ghost a une fonctionnalité qui permet un accès au contenu basé sur un abonnement. Cela signifie que Ghost permet à l'utilisateur administrateur de configurer d'autres utilisateurs (soit d'autres membres du personnel, soit des abonnés payés/non payés) pour avoir la possibilité de se connecter en dehors de YunoHost. - - 1. ** L'application peut être installée par l'interface d'administration YunoHost ou par la commande suivante : ** - - `sudo yunohost installer l'application https://github.com/YunoHost-Apps/ghost_ynh` - - 2. Après l'installation, créez un **compte administrateur** en visitant `https://domain.tld/ghost/ghost`. Si vous choisissez de nommer votre instance Ghost "blog" pendant le processus d'installation de YunoHost, alors ce sera "https://domain.tld/blog/ghost". Cela vous permettra de continuer à configurer votre compte administrateur et à configurer vos paramètres. ## :red_circle: Fonctions indésirables - **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README. From 6dff889d0c9a53638d9bc789698edfe1ca45ae26 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 23 Apr 2023 15:58:28 +0200 Subject: [PATCH 17/22] Fix change_url after v2 --- scripts/change_url | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 6a30d07..291aea2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -37,9 +37,7 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Modifying a config file..." -ynh_add_config --template="../conf/config.production.json" --destination="$install_dir/ghost/core/config.production.json" -chmod 400 "$install_dir/ghost/core/config.production.json" -chown $app:$app "$install_dir/ghost/core/config.production.json" +echo "$(jq -r --arg YNH_APP_NEW_DOMAIN $YNH_APP_NEW_DOMAIN --arg YNH_APP_NEW_PATH $YNH_APP_NEW_PATH ".url = \"http://$YNH_APP_NEW_DOMAIN$YNH_APP_NEW_PATH\"" $install_dir/ghost/config.production.json)" > $install_dir/ghost/config.production.json #================================================= # GENERIC FINALISATION From aef5cf98f234d0e9d4b3ad6e935691876915529e Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 24 Apr 2023 22:01:25 +0200 Subject: [PATCH 18/22] Cleanup Yarn cache --- scripts/install | 4 +++- scripts/upgrade | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index d66615a..462868a 100644 --- a/scripts/install +++ b/scripts/install @@ -39,6 +39,9 @@ pushd $install_dir --no-setup-nginx --no-setup-ssl --url http://$domain$path --port $port \ --db mysql --dbhost localhost --dbuser $db_user --dbpass $db_pwd --dbname $db_name \ --mail SMTP --mailhost localhost --mailport 465 + + # Cleanup cache + ynh_secure_remove --file=".cache/yarn" popd #================================================= @@ -85,4 +88,3 @@ ynh_systemd_action --service_name=$app --action="start" --line_match="Ghost boot #================================================= ynh_script_progression --message="Installation of $app completed" - diff --git a/scripts/upgrade b/scripts/upgrade index f5d59ad..72886ff 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -44,7 +44,7 @@ ynh_npm install --global npm@latest ynh_npm install --global yarn #================================================= -# DOWNLOAD, CHECK AND UNPACK SOURCE +# UPGRADE #================================================= # Up to v5.26.4~ynh1, we were downloading the source code and building the app by ourselves @@ -95,6 +95,10 @@ then fi + +# Cleanup cache +ynh_secure_remove --file="$install_dir/.cache/yarn" + #================================================= # NGINX CONFIGURATION #================================================= From ddaf67ebd55b35f8a0abd87e441e5f31e31ef206 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 24 Apr 2023 22:05:33 +0200 Subject: [PATCH 19/22] Handle future upgrades --- scripts/upgrade | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 72886ff..187d33c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,6 +93,15 @@ then # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir" +else + + # Upgrade Ghost CLI and Ghost itself + pushd $install_dir + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest + ynh_exec_as $app $ynh_node_load_PATH ./node_modules/ghost-cli/bin/ghost update $(ynh_app_upstream_version) \ + --no-prompt --no-auto-rollback --no-restart + popd + fi From e7e12e0e68bffea044cffdf161a2304de9280c4e Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 30 Apr 2023 16:33:15 +0200 Subject: [PATCH 20/22] Update resource usage in manifest --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index d980621..d508d46 100644 --- a/manifest.toml +++ b/manifest.toml @@ -22,9 +22,9 @@ architectures = "all" multi_instance = true ldap = false sso = false -disk = "1G" -ram.build = "2G" -ram.runtime = "2G" +disk = "500M" +ram.build = "1G" +ram.runtime = "1G" [install] [install.domain] From 6cc6d083885eeb65db68dca06d73aaafaa2e0832 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 30 Apr 2023 17:01:00 +0200 Subject: [PATCH 21/22] Ensure proper upgrade --- scripts/install | 8 +++++++- scripts/upgrade | 21 +++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 462868a..cfdf894 100644 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ chown -R $app:$app "$install_dir" pushd $install_dir ynh_script_progression --message="Installing and configuring Ghost..." ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest - ynh_exec_as $app $ynh_node_load_PATH ./node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \ + ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \ --no-prompt --no-setup-systemd --no-start \ --dir ghost --no-setup-linux-user \ --no-setup-nginx --no-setup-ssl --url http://$domain$path --port $port \ @@ -44,6 +44,12 @@ pushd $install_dir ynh_secure_remove --file=".cache/yarn" popd +# Make sure the configuration is correct +pushd $install_dir/ghost + ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost config \ + --port $port --process local +popd + #================================================= # NGINX CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 187d33c..d1f1c3d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,7 +79,7 @@ then pushd $install_dir ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest - ynh_exec_as $app $ynh_node_load_PATH ./node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \ + ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost install $(ynh_app_upstream_version) \ --no-prompt --no-setup-systemd --no-start \ --dir ghost --no-setup-linux-user \ --no-setup-nginx --no-setup-ssl --url http://$domain$path --port $port \ @@ -95,15 +95,24 @@ then else - # Upgrade Ghost CLI and Ghost itself - pushd $install_dir - ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest - ynh_exec_as $app $ynh_node_load_PATH ./node_modules/ghost-cli/bin/ghost update $(ynh_app_upstream_version) \ + # Upgrade Ghost CLI + pushd $install_dir + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest + popd + + # Upgrade Ghost itself + pushd $install_dir/ghost + ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost update $(ynh_app_upstream_version) \ --no-prompt --no-auto-rollback --no-restart - popd + popd fi +# Make sure the configuration is correct +pushd $install_dir/ghost + ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost config \ + --port $port --process local +popd # Cleanup cache ynh_secure_remove --file="$install_dir/.cache/yarn" From fb237c951a2e19c576b8adeca7e4c10299d9cd14 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 1 May 2023 17:16:21 +0200 Subject: [PATCH 22/22] Add PRE_UPGRADE warning --- doc/PRE_UPGRADE.d/5.44.0~ynh1.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/PRE_UPGRADE.d/5.44.0~ynh1.md diff --git a/doc/PRE_UPGRADE.d/5.44.0~ynh1.md b/doc/PRE_UPGRADE.d/5.44.0~ynh1.md new file mode 100644 index 0000000..bfe7ddf --- /dev/null +++ b/doc/PRE_UPGRADE.d/5.44.0~ynh1.md @@ -0,0 +1,6 @@ +Starting v5.44.0~ynh1, the package relies on Ghost CLI to manage the installation of the app. + +The migration has been tested, though please report any issue you might encounter. +Remember that a backup is performed before any app upgrade by your YunoHost server. + +Enjoy!