From fbfcf5fd987bda5d0cfd7fed2925d6ea95b78738 Mon Sep 17 00:00:00 2001 From: Harrison Ravazzolo <38767391+harrisonravazzolo@users.noreply.github.com> Date: Fri, 29 May 2026 14:57:11 -0700 Subject: [PATCH] Windows FMA - Mattermost (#46479) ## Summary by CodeRabbit * **New Features** * Added Windows platform support for Mattermost v6.0.4, including MSI installer with automated deployment and uninstall capabilities, integrity verification, and upgrade management. [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/fleetdm/fleet/pull/46479?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) --- .../inputs/winget/mattermost.json | 10 ++++++++ ee/maintained-apps/outputs/apps.json | 7 ++++++ .../outputs/mattermost/windows.json | 23 +++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 ee/maintained-apps/inputs/winget/mattermost.json create mode 100644 ee/maintained-apps/outputs/mattermost/windows.json diff --git a/ee/maintained-apps/inputs/winget/mattermost.json b/ee/maintained-apps/inputs/winget/mattermost.json new file mode 100644 index 0000000000..3dda56de56 --- /dev/null +++ b/ee/maintained-apps/inputs/winget/mattermost.json @@ -0,0 +1,10 @@ +{ + "name": "Mattermost", + "slug": "mattermost/windows", + "package_identifier": "Mattermost.MattermostDesktop", + "unique_identifier": "Mattermost", + "installer_arch": "x64", + "installer_type": "msi", + "installer_scope": "machine", + "default_categories": ["Communication"] +} diff --git a/ee/maintained-apps/outputs/apps.json b/ee/maintained-apps/outputs/apps.json index 592be23db9..cbf027e8dd 100644 --- a/ee/maintained-apps/outputs/apps.json +++ b/ee/maintained-apps/outputs/apps.json @@ -1408,6 +1408,13 @@ "unique_identifier": "Mattermost.Desktop", "description": "Mattermost is an open-source, self-hosted Slack-alternative." }, + { + "name": "Mattermost", + "slug": "mattermost/windows", + "platform": "windows", + "unique_identifier": "Mattermost", + "description": "Mattermost is an open-source, self-hosted Slack-alternative." + }, { "name": "Messenger", "slug": "messenger/darwin", diff --git a/ee/maintained-apps/outputs/mattermost/windows.json b/ee/maintained-apps/outputs/mattermost/windows.json new file mode 100644 index 0000000000..b7bb0f515f --- /dev/null +++ b/ee/maintained-apps/outputs/mattermost/windows.json @@ -0,0 +1,23 @@ +{ + "versions": [ + { + "version": "6.0.4", + "queries": { + "exists": "SELECT 1 FROM programs WHERE name = 'Mattermost' AND publisher = 'Mattermost, Inc.';", + "patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'Mattermost' AND publisher = 'Mattermost, Inc.' AND version_compare(version, '6.0.4') < 0);" + }, + "installer_url": "https://releases.mattermost.com/desktop/6.0.4/mattermost-desktop-6.0.4-win-x64.msi", + "install_script_ref": "8959087b", + "uninstall_script_ref": "3e27a190", + "sha256": "7855edeeb712420422d0b208f4b16cbd35e6eff79823f717d4e8e0afd0ca0e14", + "default_categories": [ + "Communication" + ], + "upgrade_code": "{8523DAF0-699D-4CC7-9A65-C5E696A9DE6D}" + } + ], + "refs": { + "3e27a190": "# Fleet uninstalls app by finding all related product codes for the specified upgrade code\n$inst = New-Object -ComObject \"WindowsInstaller.Installer\"\n$timeoutSeconds = 300 # 5 minute timeout per product\n\nforeach ($product_code in $inst.RelatedProducts('{8523DAF0-699D-4CC7-9A65-C5E696A9DE6D}')) {\n $process = Start-Process msiexec -ArgumentList @(\"/quiet\", \"/x\", $product_code, \"/norestart\") -PassThru\n \n # Wait for process with timeout\n $completed = $process.WaitForExit($timeoutSeconds * 1000)\n \n if (-not $completed) {\n Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue\n Exit 1603 # ERROR_UNINSTALL_FAILURE\n }\n \n # If the uninstall failed, bail\n if ($process.ExitCode -ne 0) {\n Write-Output \"Uninstall for $($product_code) exited $($process.ExitCode)\"\n Exit $process.ExitCode\n }\n}\n\n# All uninstalls succeeded; exit success\nExit 0\n", + "8959087b": "$logFile = \"${env:TEMP}/fleet-install-software.log\"\n\ntry {\n\n$installProcess = Start-Process msiexec.exe `\n -ArgumentList \"/quiet /norestart /lv ${logFile} /i `\"${env:INSTALLER_PATH}`\"\" `\n -PassThru -Verb RunAs -Wait\n\nGet-Content $logFile -Tail 500\n\nExit $installProcess.ExitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n" + } +}