From 863923e6ac06eb3cf8cc5d3df5e009d2b761be7a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 16 Sep 2022 06:40:44 +0000 Subject: [PATCH 01/11] Upgrade to v7.3.0 --- conf/amd64.src | 4 ++-- conf/arm64.src | 4 ++-- conf/armhf.src | 4 ++-- conf/enterprise.src | 4 ++-- manifest.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/conf/amd64.src b/conf/amd64.src index 13f8284..8672689 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://releases.mattermost.com/7.2.0/mattermost-team-7.2.0-linux-amd64.tar.gz -SOURCE_SUM=185eecbcee8bdfc10f9c99f04a294912269701da86a6217eb48cc761207fca80 +SOURCE_URL=https://releases.mattermost.com/7.3.0/mattermost-team-7.3.0-linux-amd64.tar.gz +SOURCE_SUM=47602e67b457a4871fd459f32a67f44e3353e4152989157eced2ad3bff5f634b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/arm64.src b/conf/arm64.src index 01c41cf..6231155 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.2.0/mattermost-v7.2.0-linux-arm64.tar.gz -SOURCE_SUM=d5ff399f4e025a77c8d009ed0c64d029ecba3a3d5ab8271fca6d5aabf25d97d8 +SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.3.0/mattermost-v7.3.0-linux-arm64.tar.gz +SOURCE_SUM=9ea92cee34bf8209ce8e9a1fb186541a4784dd6ee63c93f6d9d0e3af078cd2aa SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/armhf.src b/conf/armhf.src index 1655c18..46fd52b 100644 --- a/conf/armhf.src +++ b/conf/armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.2.0/mattermost-v7.2.0-linux-arm.tar.gz -SOURCE_SUM=f5a1697242c6064276107085dabc80db442365244bc9ddc8f19010b4522591dd +SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.3.0/mattermost-v7.3.0-linux-arm.tar.gz +SOURCE_SUM=742314c0e9cb2f26d444c658c72794bd506a00c79066f7d908e9058ed48cdaa4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/enterprise.src b/conf/enterprise.src index 2d2f7ed..9f8f355 100644 --- a/conf/enterprise.src +++ b/conf/enterprise.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://releases.mattermost.com/7.2.0/mattermost-enterprise-7.2.0-linux-amd64.tar.gz -SOURCE_SUM=1404ed3bac456bf6cac32c3284a105660ae57b440f29923c0506eb0372253d18 +SOURCE_URL=https://releases.mattermost.com/7.3.0/mattermost-enterprise-7.3.0-linux-amd64.tar.gz +SOURCE_SUM=7c88dab1a68010c3cb6b1a3ce8c7c04aa4e9ff45b3cd30ca24008a5ae59bcbf0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 69b305c..cc04a78 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source collaboration platform built for developers", "fr": "Plateforme de collaboration open source conçue pour les développeurs" }, - "version": "7.2.0~ynh1", + "version": "7.3.0~ynh1", "url": "http://www.mattermost.org/", "upstream": { "license": "GPL-3.0-only", @@ -104,4 +104,4 @@ } ] } -} \ No newline at end of file +} From 96200bc17f2640d39a827100f7eb47ea8322114e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 16 Sep 2022 06:40:51 +0000 Subject: [PATCH 02/11] 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 62bf308..0923ae5 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ To explore the benefits of Mattermost’s enterprise features, you can replace t - Multiple languages including U.S. English, Australian English, Bulgarian, Chinese (Simplified and Traditional), Dutch, French, German, Hungarian, Italian, Japanese, Korean, Polish, Brazilian Portuguese, Romanian, Russian, Turkish, Spanish, Swedish, and Ukrainian -**Shipped version:** 7.2.0~ynh1 +**Shipped version:** 7.3.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 9cc74b3..b2964d2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -37,7 +37,7 @@ Pour explorer les avantages des fonctionnalités d'entreprise de Mattermost, vou - Plusieurs langues dont l'anglais américain, l'anglais australien, le bulgare, le chinois (simplifié et traditionnel), le néerlandais, le français, l'allemand, le hongrois, l'italien, le japonais, le coréen, le polonais, le portugais brésilien, le roumain, le russe, le turc, l'espagnol, le suédois et l'ukrainien -**Version incluse :** 7.2.0~ynh1 +**Version incluse :** 7.3.0~ynh1 ## Captures d'écran From beebce0e7698155bdfcb303b76dfdc2df2fdf3de Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 24 Sep 2022 16:07:25 +0200 Subject: [PATCH 03/11] Update config.json --- conf/config.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/config.json b/conf/config.json index d36406e..690c9ea 100644 --- a/conf/config.json +++ b/conf/config.json @@ -210,7 +210,8 @@ "AmazonS3SSL": true, "AmazonS3SignV2": false, "AmazonS3SSE": false, - "AmazonS3Trace": false + "AmazonS3Trace": false, + "AmazonS3RequestTimeoutMilliseconds": 30000 }, "EmailSettings": { "EnableSignUpWithEmail": true, @@ -601,10 +602,9 @@ "GraphQL": false, "InsightsEnabled": true, "CommandPalette": false, - "PostForwarding": true, "AdvancedTextEditor": true, "BoardsProduct": false, - "PlanUpgradeButtonText": "Upgrade" + "PlanUpgradeButtonText": "upgrade" }, "ImportSettings": { "Directory": "./import", From 4d3df957f6c1ec1ce6bd6371f482fba7961af4bd Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Mon, 6 Mar 2023 16:23:04 +0100 Subject: [PATCH 04/11] Upgrade auto-updater (#407) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean --- .github/workflows/updater.yml | 4 ++-- README.md | 4 ++-- README_fr.md | 24 ++++++++++++------------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index fd6ed60..609c284 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 }} diff --git a/README.md b/README.md index 0923ae5..a415d65 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # Mattermost for YunoHost -[![Integration level](https://dash.yunohost.org/integration/mattermost.svg)](https://dash.yunohost.org/appci/app/mattermost) ![Working status](https://ci-apps.yunohost.org/ci/badges/mattermost.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mattermost.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/mattermost.svg)](https://dash.yunohost.org/appci/app/mattermost) ![Working status](https://ci-apps.yunohost.org/ci/badges/mattermost.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mattermost.maintain.svg) + [![Install Mattermost with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mattermost) *[Lire ce readme en français.](./README_fr.md)* @@ -39,7 +40,6 @@ To explore the benefits of Mattermost’s enterprise features, you can replace t **Shipped version:** 7.3.0~ynh1 - ## Screenshots ![Screenshot of Mattermost](./doc/screenshots/screenshot.png) diff --git a/README_fr.md b/README_fr.md index b2964d2..19f5dbb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,16 @@ It shall NOT be edited by hand. # Mattermost pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/mattermost.svg)](https://dash.yunohost.org/appci/app/mattermost) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mattermost.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mattermost.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/mattermost.svg)](https://dash.yunohost.org/appci/app/mattermost) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mattermost.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mattermost.maintain.svg) + [![Installer Mattermost avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mattermost) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Mattermost 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 Mattermost 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 ## Mattermost Team Edition Une alternative gratuite, open source et auto-hébergée à la messagerie SaaS propriétaire. Team Edition est votre « bureau virtuel » open source, offrant tous les principaux avantages de productivité des solutions SaaS concurrentes. @@ -37,12 +38,11 @@ Pour explorer les avantages des fonctionnalités d'entreprise de Mattermost, vou - Plusieurs langues dont l'anglais américain, l'anglais australien, le bulgare, le chinois (simplifié et traditionnel), le néerlandais, le français, l'allemand, le hongrois, l'italien, le japonais, le coréen, le polonais, le portugais brésilien, le roumain, le russe, le turc, l'espagnol, le suédois et l'ukrainien -**Version incluse :** 7.3.0~ynh1 +**Version incluse :** 7.3.0~ynh1 +## Captures d’écran -## Captures d'écran - -![Capture d'écran de Mattermost](./doc/screenshots/screenshot.png) +![Capture d’écran de Mattermost](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -65,10 +65,10 @@ Ce paquet peut être installé sur les architectures `ARM`, `ARM64` et `x86-64` ## Documentations et ressources -* Site officiel de l'app : +* Site officiel de l’app : * Documentation officielle utilisateur : -* Documentation officielle de l'admin : -* Dépôt de code 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 : @@ -84,4 +84,4 @@ ou sudo yunohost app upgrade mattermost -u https://github.com/YunoHost-Apps/mattermost_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 ec8fa5570a1c535b4adc51c81784ab5c681b36d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 6 Mar 2023 22:26:35 +0100 Subject: [PATCH 05/11] Transition to PostgreSQL (#377) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * Fix typo * Auto-update README * Update upgrade * Update scripts/upgrade Co-authored-by: Pierre de La Morinerie * [enh] Indentation * Apply suggestions from code review Co-authored-by: Pierre de La Morinerie * [enh] COmments * Increase timeout for table creation Co-authored-by: Pierre de La Morinerie * test upgrade from 7.2.0 * Auto-update README * fix db_name in case of multi_instance * Fix 7.3.0 migration * delete only the problematic value in db_migrations * Added explanation for migration management from 7.3.0 * mariadb-to-pg: drop stray columns These should have been removed in a previous migration, but weren't. See https://github.com/mattermost/mattermost-server/issues/18351#issuecomment-1325648058 * mariadb-to-pg: increase mattermost timeout On a small VPS the 2 mn timeout is almost reached. Increase it to 3 mn. --------- Co-authored-by: biva Co-authored-by: yunohost-bot Co-authored-by: yunohost-bot Co-authored-by: ljf Co-authored-by: ljf (zamentur) Co-authored-by: Pierre de La Morinerie Co-authored-by: Kay0u --- README.md | 6 ++-- README_fr.md | 4 +-- check_process | 16 ++++++--- conf/amd64.src | 4 +-- conf/arm64.src | 4 +-- conf/armhf.src | 4 +-- conf/config.json | 15 +++++--- conf/enterprise.src | 4 +-- conf/systemd.service | 7 ++-- doc/DESCRIPTION.md | 2 -- doc/DESCRIPTION_fr.md | 2 -- doc/DISCLAIMER.md | 2 +- manifest.json | 6 ++-- scripts/_common.sh | 79 +++++++++++++++++++++++++++++++++++++++++++ scripts/backup | 4 +-- scripts/install | 15 ++++++-- scripts/remove | 33 ++++++++++++------ scripts/restore | 20 ++++++++--- scripts/upgrade | 57 +++++++++++++++++++++++++++---- 19 files changed, 220 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index a415d65..3f2c7ca 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ To explore the benefits of Mattermost’s enterprise features, you can replace t ## Features include: - One-to-one and group messaging, file sharing, and unlimited search history -- Native apps for iOS, Android, Windows, Mac, Linux - Threaded messaging, emoji, and custom emoji - Tools for custom branding - Continuous archiving @@ -35,10 +34,9 @@ To explore the benefits of Mattermost’s enterprise features, you can replace t - Easily scalable to dozens of users per team - Runtime profiling data and system monitoring reports - New features and improvements released regularly -- Multiple languages including U.S. English, Australian English, Bulgarian, Chinese (Simplified and Traditional), Dutch, French, German, Hungarian, Italian, Japanese, Korean, Polish, Brazilian Portuguese, Romanian, Russian, Turkish, Spanish, Swedish, and Ukrainian -**Shipped version:** 7.3.0~ynh1 +**Shipped version:** 7.5.2~ynh1 ## Screenshots @@ -49,7 +47,7 @@ To explore the benefits of Mattermost’s enterprise features, you can replace t ## Configuration * How to configure this app: From an admin panel, a plain file with SSH. -* How to change from edition version to another (Team<->Enterprise) : Modify the `settings.yml` in the apps directory `/etc/yunohost/apps/mattermost_instance/settings.yml` and replace the version to wich you whant : Team or Enterprise. Update your apps and verify the *About* on your mattermost +* How to change from edition version to another (Team<->Enterprise): Modify the `settings.yml` in the apps directory `/etc/yunohost/apps/mattermost_instance/settings.yml` and replace the version to wich you whant: Team or Enterprise. Update your apps and verify the *About* on your Mattermost ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 19f5dbb..4e1944f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,6 @@ Pour explorer les avantages des fonctionnalités d'entreprise de Mattermost, vou ## Les fonctionnalités incluent: - Messagerie individuelle et de groupe, partage de fichiers et historique de recherche illimité -- Applications natives pour iOS, Android, Windows, Mac, Linux - Messagerie, emoji et emoji personnalisés - Outils pour une image de marque personnalisée - Archivage continu @@ -35,10 +34,9 @@ Pour explorer les avantages des fonctionnalités d'entreprise de Mattermost, vou - Facilement évolutif à des dizaines d'utilisateurs par équipe - Données de profilage d'exécution et rapports de surveillance du système - Nouvelles fonctionnalités et améliorations publiées régulièrement -- Plusieurs langues dont l'anglais américain, l'anglais australien, le bulgare, le chinois (simplifié et traditionnel), le néerlandais, le français, l'allemand, le hongrois, l'italien, le japonais, le coréen, le polonais, le portugais brésilien, le roumain, le russe, le turc, l'espagnol, le suédois et l'ukrainien -**Version incluse :** 7.3.0~ynh1 +**Version incluse :** 7.5.2~ynh1 ## Captures d’écran diff --git a/check_process b/check_process index de67898..d98d3a0 100644 --- a/check_process +++ b/check_process @@ -19,7 +19,10 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=4fa3ee4ad82a6154f2eb858a3da285a35afecef8 + # 7.2.0 + upgrade=1 from_commit=738ba505f581ddd72889c889dcb34406250fea35 + # 7.3.0 + upgrade=1 from_commit=1677cb9fa9d95ab788a6acd5b310b09c7d2ab7df backup_restore=1 multi_instance=1 port_already_use=0 @@ -43,11 +46,16 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=4fa3ee4ad82a6154f2eb858a3da285a35afecef8 + # 7.2.0 + upgrade=1 from_commit=738ba505f581ddd72889c889dcb34406250fea35 + # 7.3.0 + upgrade=1 from_commit=1677cb9fa9d95ab788a6acd5b310b09c7d2ab7df ;;; Options Email=kemenaran@gmail.com Notification=none ;;; Upgrade options - ; commit=4fa3ee4ad82a6154f2eb858a3da285a35afecef8 - name= Merge pull request #268 from YunoHost-Apps/testing + ; commit=738ba505f581ddd72889c889dcb34406250fea35 + name=7.2.0 + ; commit=1677cb9fa9d95ab788a6acd5b310b09c7d2ab7df + name=7.3.0 \ No newline at end of file diff --git a/conf/amd64.src b/conf/amd64.src index 8672689..581650b 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://releases.mattermost.com/7.3.0/mattermost-team-7.3.0-linux-amd64.tar.gz -SOURCE_SUM=47602e67b457a4871fd459f32a67f44e3353e4152989157eced2ad3bff5f634b +SOURCE_URL=https://releases.mattermost.com/7.5.2/mattermost-team-7.5.2-linux-amd64.tar.gz +SOURCE_SUM=b2162bc12b0b8763809f0795f429bc59018c712b14461db63158b453710fa885 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/arm64.src b/conf/arm64.src index 6231155..c8c4ece 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.3.0/mattermost-v7.3.0-linux-arm64.tar.gz -SOURCE_SUM=9ea92cee34bf8209ce8e9a1fb186541a4784dd6ee63c93f6d9d0e3af078cd2aa +SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.5.2/mattermost-v7.5.2-linux-arm64.tar.gz +SOURCE_SUM=85fac79f33d83b7f95b2532a055bbebecb28c60d6c1d955d9613de698d69b29e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/armhf.src b/conf/armhf.src index 46fd52b..1caa889 100644 --- a/conf/armhf.src +++ b/conf/armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.3.0/mattermost-v7.3.0-linux-arm.tar.gz -SOURCE_SUM=742314c0e9cb2f26d444c658c72794bd506a00c79066f7d908e9058ed48cdaa4 +SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.5.2/mattermost-v7.5.2-linux-arm.tar.gz +SOURCE_SUM=b26a4b676ee92ac848fa2993aa67559238ba7d8c1d0e6f7ffdd79ad8fb4942f3 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/config.json b/conf/config.json index 690c9ea..98b910e 100644 --- a/conf/config.json +++ b/conf/config.json @@ -79,6 +79,7 @@ "ExperimentalEnableDefaultChannelLeaveJoinMessages": true, "ExperimentalGroupUnreadChannels": "disabled", "EnableAPITeamDeletion": false, + "EnableAPITriggerAdminNotifications": false, "EnableAPIUserDeletion": false, "ExperimentalEnableHardenedMode": false, "ExperimentalStrictCSRFEnforcement": false, @@ -88,6 +89,7 @@ "EnableSVGs": false, "EnableLatex": false, "EnableInlineLatex": true, + "PostPriority": false, "EnableAPIChannelDeletion": false, "EnableLocalMode": true, "LocalModeSocketLocation": "/var/run/__APP__/mattermost_local.socket", @@ -112,6 +114,7 @@ "CustomBrandText": "", "CustomDescriptionText": "", "RestrictDirectMessage": "any", + "EnableLastActiveTime": true, "UserStatusAwayTimeout": 300, "MaxChannelsPerTeam": 2000, "MaxNotificationsPerChannel": 1000, @@ -130,8 +133,8 @@ "IosMinVersion": "" }, "SqlSettings": { - "DriverName": "mysql", - "DataSource": "__DB_USER__:__DB_PWD__@tcp(localhost:3306)/__DB_NAME__?charset=utf8mb4,utf8", + "DriverName": "postgres", + "DataSource": "postgres://__DB_USER__:__DB_PWD__@127.0.0.1:5432/__DB_NAME__?sslmode=disable&connect_timeout=10", "DataSourceReplicas": [], "DataSourceSearchReplicas": [], "MaxIdleConns": 20, @@ -456,7 +459,6 @@ "LinkMetadataTimeoutMilliseconds": 5000, "RestrictSystemAdmin": false, "UseNewSAMLLibrary": false, - "CloudBilling": false, "EnableSharedChannels": false, "EnableRemoteClusterService": false, "EnableAppBar": false @@ -525,6 +527,9 @@ "CleanupJobsThresholdDays": -1, "CleanupConfigThresholdDays": -1 }, + "ProductSettings": { + "EnablePublicSharedBoards": false + }, "PluginSettings": { "Enable": true, "EnableUploads": false, @@ -602,9 +607,9 @@ "GraphQL": false, "InsightsEnabled": true, "CommandPalette": false, - "AdvancedTextEditor": true, "BoardsProduct": false, - "PlanUpgradeButtonText": "upgrade" + "SendWelcomePost": true, + "PostPriority": false }, "ImportSettings": { "Directory": "./import", diff --git a/conf/enterprise.src b/conf/enterprise.src index 9f8f355..e96d292 100644 --- a/conf/enterprise.src +++ b/conf/enterprise.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://releases.mattermost.com/7.3.0/mattermost-enterprise-7.3.0-linux-amd64.tar.gz -SOURCE_SUM=7c88dab1a68010c3cb6b1a3ce8c7c04aa4e9ff45b3cd30ca24008a5ae59bcbf0 +SOURCE_URL=https://releases.mattermost.com/7.5.2/mattermost-enterprise-7.5.2-linux-amd64.tar.gz +SOURCE_SUM=66fce67ba3a0fcb2ec4f85f2143010b1c3603be8c2c30cc30f2b583a8e2a3345 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/systemd.service b/conf/systemd.service index 53b1f6a..1215b5d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,19 +1,18 @@ [Unit] Description=Mattermost After=network.target -After=mysql.service -Requires=mysql.service +Requires=postgresql.service [Service] Type=notify +User=__APP__ +Group=__APP__ ExecStart=__FINALPATH__/bin/mattermost TimeoutStartSec=3600 Restart=always RestartSec=10 WorkingDirectory=__FINALPATH__ RuntimeDirectory=__APP__ -User=__APP__ -Group=__APP__ LimitNOFILE=49152 # Sandboxing options to harden security diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 38c93a3..db6e3ae 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -7,7 +7,6 @@ To explore the benefits of Mattermost’s enterprise features, you can replace t ## Features include: - One-to-one and group messaging, file sharing, and unlimited search history -- Native apps for iOS, Android, Windows, Mac, Linux - Threaded messaging, emoji, and custom emoji - Tools for custom branding - Continuous archiving @@ -17,4 +16,3 @@ To explore the benefits of Mattermost’s enterprise features, you can replace t - Easily scalable to dozens of users per team - Runtime profiling data and system monitoring reports - New features and improvements released regularly -- Multiple languages including U.S. English, Australian English, Bulgarian, Chinese (Simplified and Traditional), Dutch, French, German, Hungarian, Italian, Japanese, Korean, Polish, Brazilian Portuguese, Romanian, Russian, Turkish, Spanish, Swedish, and Ukrainian diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index c876146..3dd7b3d 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -7,7 +7,6 @@ Pour explorer les avantages des fonctionnalités d'entreprise de Mattermost, vou ## Les fonctionnalités incluent: - Messagerie individuelle et de groupe, partage de fichiers et historique de recherche illimité -- Applications natives pour iOS, Android, Windows, Mac, Linux - Messagerie, emoji et emoji personnalisés - Outils pour une image de marque personnalisée - Archivage continu @@ -17,4 +16,3 @@ Pour explorer les avantages des fonctionnalités d'entreprise de Mattermost, vou - Facilement évolutif à des dizaines d'utilisateurs par équipe - Données de profilage d'exécution et rapports de surveillance du système - Nouvelles fonctionnalités et améliorations publiées régulièrement -- Plusieurs langues dont l'anglais américain, l'anglais australien, le bulgare, le chinois (simplifié et traditionnel), le néerlandais, le français, l'allemand, le hongrois, l'italien, le japonais, le coréen, le polonais, le portugais brésilien, le roumain, le russe, le turc, l'espagnol, le suédois et l'ukrainien diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 61d3931..6ad5870 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,7 +1,7 @@ ## Configuration * How to configure this app: From an admin panel, a plain file with SSH. -* How to change from edition version to another (Team<->Enterprise) : Modify the `settings.yml` in the apps directory `/etc/yunohost/apps/mattermost_instance/settings.yml` and replace the version to wich you whant : Team or Enterprise. Update your apps and verify the *About* on your mattermost +* How to change from edition version to another (Team<->Enterprise): Modify the `settings.yml` in the apps directory `/etc/yunohost/apps/mattermost_instance/settings.yml` and replace the version to wich you whant: Team or Enterprise. Update your apps and verify the *About* on your Mattermost ## YunoHost specific features diff --git a/manifest.json b/manifest.json index cc04a78..7c79493 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source collaboration platform built for developers", "fr": "Plateforme de collaboration open source conçue pour les développeurs" }, - "version": "7.3.0~ynh1", + "version": "7.5.2~ynh1", "url": "http://www.mattermost.org/", "upstream": { "license": "GPL-3.0-only", @@ -27,7 +27,7 @@ "mysql" ], "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.1.6" }, "arguments": { "install": [ @@ -39,7 +39,7 @@ "name": "path", "type": "path", "example": "/mattermost", - "default": "/chat" + "default": "/mattermost" }, { "name": "is_public", diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..c73b8c3 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,10 +4,89 @@ # COMMON VARIABLES #================================================= +# dependencies used by the app +pkg_dependencies="postgresql postgresql-contrib pgloader" + #================================================= # PERSONAL HELPERS #================================================= +mariadb-to-pg() { + + ynh_print_info --message="Migrating to PostgreSQL database..." + + mysqlpwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) + + # In old instance db_user is `mmuser` + mysql_db_user="$db_user" + if ynh_mysql_connect_as --user="mmuser" --password="$mysqlpwd" 2> /dev/null <<< ";"; then + mysql_db_user="mmuser" + fi + + # Initialize PostgreSQL database + ynh_psql_test_if_first_run + ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$mysqlpwd + psqlpwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) + + # Configure the new database and run Mattermost in order to create tables + ynh_write_var_in_file --file="$final_path/config/config.json" --key="DriverName" --value="postgres" --after="SqlSettings" + ynh_write_var_in_file --file="$final_path/config/config.json" --key="DataSource" --value="postgres://$db_user:$psqlpwd@localhost:5432/$db_name?sslmode=disable&connect_timeout=10" --after="SqlSettings" + cat "$final_path/config/config.json" + pushd $final_path + ynh_systemd_action --service_name="$app" --action="stop" + set +e + sudo -u mattermost timeout --preserve-status 180 "./bin/mattermost" + if [ "$?" != "0" ] && [ "$?" != "143" ] ; then + ynh_die --message="Failed to run Mattermost to create PostgreSQL database tables" --ret_code=1 + fi + set -e + popd + + # Some fixes to let the MariaDB -> PostgreSQL conversion working + ynh_psql_execute_as_root --sql='DROP INDEX public.idx_fileinfo_content_txt;' --database=$db_name + ynh_psql_execute_as_root --sql='DROP INDEX public.idx_posts_message_txt;' --database=$db_name + ynh_mysql_execute_as_root --sql="ALTER TABLE mattermost.Users DROP COLUMN IF EXISTS acceptedtermsofserviceid;" --database=$db_name + ynh_mysql_execute_as_root --sql="ALTER TABLE mattermost.SharedChannelRemotes DROP COLUMN IF EXISTS description;" --database=$db_name + ynh_mysql_execute_as_root --sql="ALTER TABLE mattermost.SharedChannelRemotes DROP COLUMN IF EXISTS nextsyncat;" --database=$db_name + + # Use pgloader to migrate database content from MariaDB to PostgreSQL + tmpdir="$(mktemp -d)" + + cat < $tmpdir/commands.load +LOAD DATABASE + FROM mysql://$mysql_db_user:$mysqlpwd@127.0.0.1:3306/$db_name + INTO postgresql://$db_user:$psqlpwd@127.0.0.1:5432/$db_name + +WITH include no drop, truncate, create no tables, + create no indexes, preserve index names, no foreign keys, + data only, workers = 16, concurrency = 1 + +SET MySQL PARAMETERS +net_read_timeout = '90', +net_write_timeout = '180' + +ALTER SCHEMA '$db_name' RENAME TO 'public' + +; +EOT + pgloader $tmpdir/commands.load + + # Rebuild INDEX + ynh_psql_execute_as_root --sql='CREATE INDEX idx_fileinfo_content_txt ON public.fileinfo USING gin (to_tsvector('\''english'\''::regconfig, content))' --database=$db_name + ynh_psql_execute_as_root --sql='CREATE INDEX idx_posts_message_txt ON public.posts USING gin (to_tsvector('\''english'\''::regconfig, (message)::text));' --database=$db_name + + + if ynh_compare_current_package_version --comparison eq --version 7.3.0~ynh1 + then + # There is a problem with version 7.3.0 and the database migration. + # More information here: https://forum.mattermost.com/t/migrating-from-mariadb-to-postgresql-db/14194/6 + ynh_psql_execute_as_root --sql="DELETE FROM db_migrations WHERE version=92;" --database=$db_name + fi + # Remove the MariaDB database + ynh_mysql_remove_db --db_user=$mysql_db_user --db_name=$db_name + +} + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index fd92d5e..7aa0fef 100755 --- a/scripts/backup +++ b/scripts/backup @@ -66,9 +66,9 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= # BACKUP THE DATABASE #================================================= -ynh_print_info --message="Backing up the MySQL database..." +ynh_print_info --message="Backing up the database..." -ynh_mysql_dump_db --database="$db_name" > db.sql +ynh_psql_dump_db --database="$db_name" > db.sql #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index c59cbb0..cfb1a3c 100644 --- a/scripts/install +++ b/scripts/install @@ -68,6 +68,13 @@ ynh_script_progression --message="Finding an available port..." --weight=3 port=$(ynh_find_port --port=8065) ynh_app_setting_set --app=$app --key=port --value=$port +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=10 + +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #================================================= @@ -77,14 +84,15 @@ ynh_script_progression --message="Configuring system user..." --weight=3 ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= -# CREATE A MYSQL DATABASE +# CREATE A DATABASE #================================================= -ynh_script_progression --message="Creating a MySQL database..." --weight=10 +ynh_script_progression --message="Creating a database..." --weight=10 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 +ynh_psql_test_if_first_run +ynh_psql_setup_db --db_user=$db_user --db_name=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -141,6 +149,7 @@ ynh_script_progression --message="Modifying a config file..." --weight=3 smtp_user_pwd=$(ynh_string_random --length=24) url=https://$domain$path_url +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) ynh_add_config --template="../conf/config.json" --destination="$final_path/config/config.json" diff --git a/scripts/remove b/scripts/remove index 4aaf73b..aa3f444 100755 --- a/scripts/remove +++ b/scripts/remove @@ -44,12 +44,28 @@ ynh_script_progression --message="Stopping and removing the systemd service..." ynh_remove_systemd_config #================================================= -# REMOVE THE MySQL DATABASE +# REMOVE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Removing the MySQL database..." --weight=2 +ynh_script_progression --message="Removing logrotate configuration..." --weight=1 + +# Remove the app-specific logrotate config +ynh_remove_logrotate + +#================================================= +# REMOVE THE DATABASE +#================================================= +ynh_script_progression --message="Removing the database..." --weight=2 # Remove a database if it exists, along with the associated user -ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name +ynh_psql_remove_db --db_user=$db_user --db_name=$db_name + +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=3 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR @@ -79,16 +95,11 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- ynh_remove_nginx_config #================================================= -# REMOVE LOGROTATE CONFIGURATION +# SPECIFIC REMOVE #================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 - -# Remove the app-specific logrotate config -ynh_remove_logrotate - -#================================================= -# REMOVE LOG FILE +# REMOVE VARIOUS FILES #================================================= +ynh_script_progression --message="Removing various files..." --weight=1 ynh_secure_remove --file="/var/log/$app" diff --git a/scripts/restore b/scripts/restore index a5d42d6..87ea3d5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -47,6 +47,7 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -83,13 +84,22 @@ chmod -R o-rwx "$data_path" chown -R $app:www-data "$data_path" #================================================= -# RESTORE THE MYSQL DATABASE +# REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=6 +ynh_script_progression --message="Reinstalling dependencies..." --weight=10 -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 -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +# Define and install dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# RESTORE THE DATABASE +#================================================= +ynh_script_progression --message="Restoring the database..." --weight=6 + +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) +ynh_psql_test_if_first_run +ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= # RESTORE USER RIGHTS diff --git a/scripts/upgrade b/scripts/upgrade index 1b5bdd2..60e9cd8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -31,9 +31,14 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) port=$(ynh_app_setting_get --app=$app --key=port) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) version=$(ynh_app_setting_get --app=$app --key=version) data_path=$(ynh_app_setting_get --app=$app --key=data_path) +team_display_name=$(ynh_app_setting_get --app=$app --key=team_display_name) +admin=$(ynh_app_setting_get --app=$app --key=admin) +password=$(ynh_app_setting_get --app=$app --key=password) +email=$(ynh_user_get_info --username=$admin --key=mail) +db_name=$(ynh_sanitize_dbid --db_name=$app) +db_user=$db_name #================================================= # CHECK VERSION @@ -97,6 +102,25 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=10 + +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# MIGRATING DATABASE +#================================================= + +# Check if using MariaDB +# This migration should be done before the upgrade +if mysqlshow | grep -q "^| $db_name "; then + # Mattermost only support MySQL and PostgreSQL (not MariaDB...) + # Migrate the database from MariaDB to PostgreSQL + mariadb-to-pg +fi + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -166,6 +190,31 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=2 # Create a dedicated systemd config ynh_add_systemd_config +#================================================= +# Fix old migrations +#================================================= +# Crazy fix for old unupgraded version +# IMPORTANT: THIS fix should be done after setup new sources and running mattermost +if ynh_compare_current_package_version --comparison lt --version 5.37.1~ynh1 +then + read -r -d '' fix_old_version_sql << EOM +ALTER TABLE ChannelMembers ALTER COLUMN mentioncountroot SET DEFAULT '0'::bigint; +UPDATE ChannelMembers SET mentioncountroot=0 WHERE mentioncountroot IS NULL; +ALTER TABLE ChannelMembers ALTER COLUMN msgcountroot SET DEFAULT '0'::bigint; +UPDATE ChannelMembers SET msgcountroot=0 WHERE msgcountroot IS NULL; +ALTER TABLE Channels ALTER COLUMN totalmsgcountroot SET DEFAULT '0'::bigint; +UPDATE Channels SET totalmsgcountroot=0 WHERE totalmsgcountroot IS NULL; +UPDATE SidebarCategories SET collapsed=False where collapsed IS NULL; +UPDATE SidebarCategories SET muted=False where muted IS NULL; +UPDATE SidebarCategories set sorting = 'manual' where sorting=''; +UPDATE SidebarCategories set sorting = 'manual' where sorting IS NULL; +EOM + ynh_psql_execute_as_root --sql="$fix_old_version_sql" --database=$db_name + + # Note: it's possible that some instances need other fixes + # If nothing is displayed in the sidebar it may be needed to change the Id of SidebarCategories... +fi + #================================================= # SETUP LOGROTATE #================================================= @@ -186,12 +235,6 @@ yunohost service add $app --description="Collaboration platform built for develo #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=2 -# A lengthy database migration runs when upgrading from a version < 6.0. -if dpkg --compare-versions "$previous_upstream_version" lt "6.0.0" -then - ynh_print_warn --message="Lengthy database migrations will now run. This may take a while..." -fi - # Start a systemd service ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Started Mattermost" From 386cdb633de91aaef934d989535a45bc6ce61633 Mon Sep 17 00:00:00 2001 From: Kayou Date: Tue, 7 Mar 2023 08:46:42 +0100 Subject: [PATCH 06/11] Change arm64 source (#409) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add entreprise for arm64, use the official build for arm64 * Auto-update README * update auto-updater script --------- Co-authored-by: yunohost-bot Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> --- .github/workflows/updater.sh | 21 +++++++++------ README.md | 2 +- README_fr.md | 2 +- bump-mattermost.rb | 26 ++++++++++++------- conf/arm64.src | 6 ----- conf/{enterprise.src => enterprise_amd64.src} | 0 conf/enterprise_arm64.src | 6 +++++ conf/{amd64.src => team_amd64.src} | 0 conf/team_arm64.src | 6 +++++ conf/{armhf.src => team_armhf.src} | 0 doc/DISCLAIMER.md | 2 +- doc/DISCLAIMER_fr.md | 2 +- scripts/install | 4 +-- scripts/upgrade | 4 +-- 14 files changed, 50 insertions(+), 31 deletions(-) delete mode 100644 conf/arm64.src rename conf/{enterprise.src => enterprise_amd64.src} (100%) create mode 100644 conf/enterprise_arm64.src rename conf/{amd64.src => team_amd64.src} (100%) create mode 100644 conf/team_arm64.src rename conf/{armhf.src => team_armhf.src} (100%) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 91bc692..8a84226 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -26,10 +26,12 @@ if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then version=${version:1} fi -# x86-64 and enterprise assets are hosted on Mattermost's servers. +# x86-64 team, x86-64 enterprise, ARM64 team and ARM64 enterprise assets are hosted on Mattermost's servers. assets=() assets+=("https://releases.mattermost.com/$version/mattermost-team-$version-linux-amd64.tar.gz") assets+=("https://releases.mattermost.com/$version/mattermost-enterprise-$version-linux-amd64.tar.gz") +assets+=("https://releases.mattermost.com/$version/mattermost-team-$version-linux-arm64.tar.gz") +assets+=("https://releases.mattermost.com/$version/mattermost-enterprise-$version-linux-arm64.tar.gz") # ARM and ARM64 are published in another repository (with a leading "v" for version tags) other_repo="SmartHoneybee/ubiquitous-memory" @@ -79,16 +81,19 @@ echo "Handling asset at $asset_url" # Leave $src empty to ignore the asset case $asset_url in *"mattermost-"*"-linux-arm.tar.gz") - src="armhf" + src="team_armhf" ;; - *"mattermost-"*"-linux-arm64.tar.gz") - src="arm64" - ;; - *"mattermost-team-"*"-linux-amd64.tar.gz") - src="amd64" + *"mattermost-team-"*"-linux-arm64.tar.gz") + src="team_arm64" ;; *"mattermost-enterprise-"*"-linux-amd64.tar.gz") - src="enterprise" + src="enterprise_amd64" + ;; + *"mattermost-team-"*"-linux-amd64.tar.gz") + src="team_amd64" + ;; + *"mattermost-enterprise-"*"-linux-amd64.tar.gz") + src="enterprise_amd64" ;; *) src="" diff --git a/README.md b/README.md index 3f2c7ca..08dc734 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Mattermost Mobile and Desktop Apps are available [here](https://mattermost.com/d ## Additional information -* This package can by installed on `ARM`, `ARM64` and `x86-64` architecture (only `x86-64` if you choose to install the *Entreprise Edition*). +* This package can by installed on `ARM`, `ARM64` and `x86-64` architecture (only `x86-64` and `ARM64` if you choose to install the *Entreprise Edition*). ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 4e1944f..341ed50 100644 --- a/README_fr.md +++ b/README_fr.md @@ -59,7 +59,7 @@ Ce paquet peut installer la version [*Entreprise Edition*](https://docs.mattermo ## Informations additionnelles -Ce paquet peut être installé sur les architectures `ARM`, `ARM64` et `x86-64` (mais uniquement `x86-64` si vous choisissez d'installer la version *Enterprise Edition*). +Ce paquet peut être installé sur les architectures `ARM`, `ARM64` et `x86-64` (mais uniquement `x86-64` et `ARM64` si vous choisissez d'installer la version *Enterprise Edition*). ## Documentations et ressources diff --git a/bump-mattermost.rb b/bump-mattermost.rb index 34f8f13..b5d5f05 100755 --- a/bump-mattermost.rb +++ b/bump-mattermost.rb @@ -36,9 +36,9 @@ module Mattermost def retrieve_release_data case @variant - when :amd64, :enterprise + when :team_amd64, :team_arm64, :enterprise_amd64, :enterprise_arm64 retrieve_first_party_release_data - when :armhf, :arm64 + when :team_armhf retrieve_smart_honeybee_release_data else raise "Unsupported variant '{#release_desc.variant}'" @@ -47,21 +47,29 @@ module Mattermost def retrieve_first_party_release_data edition = { - amd64: 'team', - enterprise: 'enterprise' + team_amd64: 'team', + team_arm64: 'team', + enterprise_amd64: 'enterprise', + enterprise_arm64: 'enterprise' }.fetch(variant) - @url = "https://releases.mattermost.com/#{version}/mattermost-#{edition}-#{version}-linux-amd64.tar.gz" + arch = { + team_amd64: 'amd64', + team_arm64: 'arm64', + enterprise_amd64: 'amd64', + enterprise_arm64: 'arm64' + }.fetch(variant) - puts "Downloading release #{version}-#{variant} for computing checksum…" + @url = "https://releases.mattermost.com/#{version}/mattermost-#{edition}-#{version}-linux-#{arch}.tar.gz" + + puts "Downloading release #{version}-#{edition}-#{arch} for computing checksum…" release_file = URI.parse(@url).read @sum = Digest::SHA256.hexdigest(release_file) end def retrieve_smart_honeybee_release_data arch = { - armhf: 'arm', - arm64: 'arm64' + team_armhf: 'arm', }.fetch(variant) @url = "https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v#{version}/mattermost-v#{version}-linux-#{arch}.tar.gz" @@ -127,7 +135,7 @@ if version.nil? abort("ERROR: The Mattermost release version must be provided.\nExample: ./bump-mattermost.sh 5.33.1") end -VARIANTS = %i[amd64 enterprise armhf arm64] +VARIANTS = %i[team_amd64 enterprise_amd64 enterprise_arm64 team_arm64 team_armhf] # Compute releases URLs and sums releases = VARIANTS diff --git a/conf/arm64.src b/conf/arm64.src deleted file mode 100644 index c8c4ece..0000000 --- a/conf/arm64.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.5.2/mattermost-v7.5.2-linux-arm64.tar.gz -SOURCE_SUM=85fac79f33d83b7f95b2532a055bbebecb28c60d6c1d955d9613de698d69b29e -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=mattermost.tar.gz diff --git a/conf/enterprise.src b/conf/enterprise_amd64.src similarity index 100% rename from conf/enterprise.src rename to conf/enterprise_amd64.src diff --git a/conf/enterprise_arm64.src b/conf/enterprise_arm64.src new file mode 100644 index 0000000..9937231 --- /dev/null +++ b/conf/enterprise_arm64.src @@ -0,0 +1,6 @@ +SOURCE_URL=https://releases.mattermost.com/7.5.2/mattermost-enterprise-7.5.2-linux-arm64.tar.gz +SOURCE_SUM=2aa9aaf3d599a38682dbb9a2c76b277c85976dd0d331f2d563b51dd58ac141aa +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.gz +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME=mattermost.tar.gz diff --git a/conf/amd64.src b/conf/team_amd64.src similarity index 100% rename from conf/amd64.src rename to conf/team_amd64.src diff --git a/conf/team_arm64.src b/conf/team_arm64.src new file mode 100644 index 0000000..dd10985 --- /dev/null +++ b/conf/team_arm64.src @@ -0,0 +1,6 @@ +SOURCE_URL=https://releases.mattermost.com/7.5.2/mattermost-team-7.5.2-linux-arm64.tar.gz +SOURCE_SUM=39281870a69eccd7876f3c25c69ffae2b87a6920519b74a8eed25c553e06e80c +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.gz +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME=mattermost.tar.gz \ No newline at end of file diff --git a/conf/armhf.src b/conf/team_armhf.src similarity index 100% rename from conf/armhf.src rename to conf/team_armhf.src diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 6ad5870..e0fa03b 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -15,4 +15,4 @@ Mattermost Mobile and Desktop Apps are available [here](https://mattermost.com/d ## Additional information -* This package can by installed on `ARM`, `ARM64` and `x86-64` architecture (only `x86-64` if you choose to install the *Entreprise Edition*). +* This package can by installed on `ARM`, `ARM64` and `x86-64` architecture (only `x86-64` and `ARM64` if you choose to install the *Entreprise Edition*). diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 385d4bb..cd3857e 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -13,4 +13,4 @@ Ce paquet peut installer la version [*Entreprise Edition*](https://docs.mattermo ## Informations additionnelles -Ce paquet peut être installé sur les architectures `ARM`, `ARM64` et `x86-64` (mais uniquement `x86-64` si vous choisissez d'installer la version *Enterprise Edition*). +Ce paquet peut être installé sur les architectures `ARM`, `ARM64` et `x86-64` (mais uniquement `x86-64` et `ARM64` si vous choisissez d'installer la version *Enterprise Edition*). diff --git a/scripts/install b/scripts/install index cfb1a3c..2416b9c 100644 --- a/scripts/install +++ b/scripts/install @@ -104,10 +104,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path if [ "$version" = "Enterprise" ]; then # Get Enterprise binary path - ynh_setup_source --dest_dir="$final_path" --source_id="enterprise" + ynh_setup_source --dest_dir="$final_path" --source_id="enterprise_$YNH_ARCH" elif [ "$version" = "Team" ]; then # Get Team binary path - ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH" + ynh_setup_source --dest_dir="$final_path" --source_id="team_$YNH_ARCH" fi chmod 750 "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index 60e9cd8..da97e36 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -157,9 +157,9 @@ then ynh_secure_remove --file="$final_path" if [ "$version" = "Enterprise" ]; then - ynh_setup_source --dest_dir="$final_path" --source_id="enterprise" + ynh_setup_source --dest_dir="$final_path" --source_id="enterprise_$YNH_ARCH" elif [ "$version" = "Team" ]; then - ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH" + ynh_setup_source --dest_dir="$final_path" --source_id="team_$YNH_ARCH" fi # Copy the admin saved settings and plugins from tmp directory to final path From b4fcf41f417252e8af81b01bbf023427354fc83d Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 7 Mar 2023 09:52:10 +0100 Subject: [PATCH 07/11] delete the psql db if the migration fails --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index da97e36..aeb0f14 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,6 +56,10 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + # Remove the PostgreSQL db in case of error during the migration. + if [ -n "$remove_psql_in_case_of_error" ]; then + ynh_psql_remove_db --db_user=$db_user --db_name=$db_name + fi # Restore it if the upgrade fails ynh_restore_upgradebackup } @@ -118,6 +122,7 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies if mysqlshow | grep -q "^| $db_name "; then # Mattermost only support MySQL and PostgreSQL (not MariaDB...) # Migrate the database from MariaDB to PostgreSQL + remove_psql_in_case_of_error=1 mariadb-to-pg fi From 8596ecce7b28e083d53717a4d101b3bfe465b561 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 7 Mar 2023 11:42:53 +0100 Subject: [PATCH 08/11] Drop all Focalbard tables if mattermost is in 7.3.0 --- scripts/_common.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index c73b8c3..1412e11 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -48,6 +48,15 @@ mariadb-to-pg() { ynh_mysql_execute_as_root --sql="ALTER TABLE mattermost.Users DROP COLUMN IF EXISTS acceptedtermsofserviceid;" --database=$db_name ynh_mysql_execute_as_root --sql="ALTER TABLE mattermost.SharedChannelRemotes DROP COLUMN IF EXISTS description;" --database=$db_name ynh_mysql_execute_as_root --sql="ALTER TABLE mattermost.SharedChannelRemotes DROP COLUMN IF EXISTS nextsyncat;" --database=$db_name + + # Focalboard is broken in Mattermost 7.3.0 + if ynh_compare_current_package_version --comparison eq --version 7.3.0~ynh1 + then + # Remove Focalboard tables + # Command from https://stackoverflow.com/a/1589324 + cmd=$(ynh_mysql_execute_as_root --sql="SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) AS statement FROM information_schema.tables WHERE table_schema = '$db_name' AND table_name LIKE 'focalboard_%';" --database=$db_name | tail -n 1) + ynh_mysql_execute_as_root --sql="$cmd" --database=$db_name + fi # Use pgloader to migrate database content from MariaDB to PostgreSQL tmpdir="$(mktemp -d)" From 7a1b46122290d3e06e96cfba36d97a9a2944d0ec Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Fri, 17 Mar 2023 22:46:56 +0100 Subject: [PATCH 09/11] fix migration from 7.3.0 (#413) Co-authored-by: Kay0u --- scripts/_common.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1412e11..e762d7b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -52,10 +52,9 @@ mariadb-to-pg() { # Focalboard is broken in Mattermost 7.3.0 if ynh_compare_current_package_version --comparison eq --version 7.3.0~ynh1 then - # Remove Focalboard tables - # Command from https://stackoverflow.com/a/1589324 - cmd=$(ynh_mysql_execute_as_root --sql="SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) AS statement FROM information_schema.tables WHERE table_schema = '$db_name' AND table_name LIKE 'focalboard_%';" --database=$db_name | tail -n 1) - ynh_mysql_execute_as_root --sql="$cmd" --database=$db_name + remove_focalboard_if_7_3_0="EXCLUDING TABLE NAMES MATCHING ~/^focalboard_/" + else + remove_focalboard_if_7_3_0="" fi # Use pgloader to migrate database content from MariaDB to PostgreSQL @@ -74,6 +73,8 @@ SET MySQL PARAMETERS net_read_timeout = '90', net_write_timeout = '180' +$remove_focalboard_if_7_3_0 + ALTER SCHEMA '$db_name' RENAME TO 'public' ; From cac6adb186056e00ae5f70d4d4cd1f66b3f8b986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Mar 2023 22:47:44 +0100 Subject: [PATCH 10/11] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7c79493..2fb79dc 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source collaboration platform built for developers", "fr": "Plateforme de collaboration open source conçue pour les développeurs" }, - "version": "7.5.2~ynh1", + "version": "7.5.2~ynh2", "url": "http://www.mattermost.org/", "upstream": { "license": "GPL-3.0-only", From 8173f39da2cfd6cce0e7935e858f0ca9041713fe Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 17 Mar 2023 21:47:49 +0000 Subject: [PATCH 11/11] 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 08dc734..aa27901 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ To explore the benefits of Mattermost’s enterprise features, you can replace t - New features and improvements released regularly -**Shipped version:** 7.5.2~ynh1 +**Shipped version:** 7.5.2~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 341ed50..7cf32b2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -36,7 +36,7 @@ Pour explorer les avantages des fonctionnalités d'entreprise de Mattermost, vou - Nouvelles fonctionnalités et améliorations publiées régulièrement -**Version incluse :** 7.5.2~ynh1 +**Version incluse :** 7.5.2~ynh2 ## Captures d’écran