Skip to content

Update Webex macOS install script and refs - #47445

Merged
allenhouchins merged 1 commit into
mainfrom
47440-fma-webex-fma-patch-policy-unexpectedly-failing-on-up-to-date-hosts
Jun 11, 2026
Merged

Update Webex macOS install script and refs#47445
allenhouchins merged 1 commit into
mainfrom
47440-fma-webex-fma-patch-policy-unexpectedly-failing-on-up-to-date-hosts

Conversation

@allenhouchins

@allenhouchins allenhouchins commented Jun 11, 2026

Copy link
Copy Markdown
Member

Add a new macOS installer script (ee/maintained-apps/inputs/homebrew/scripts/webex_install.sh) that handles dmg extraction, quitting/relaunching the app, backing up existing /Applications/Webex.app, and removing stale Webex upgrade bundles. Update the homebrew input (webex.json) to reference the new install script path and update the darwin output (ee/maintained-apps/outputs/webex/darwin.json) to point to the new install_script_ref (d105863f) which contains the new script content.

Related issue: Resolves #47440

Summary by CodeRabbit

  • New Features
    • Enhanced Webex installer for macOS with improved app lifecycle management during updates.
    • Automatic cleanup of outdated upgrade files to prevent version-related issues.
    • Proper app restart handling that preserves running state during installation.

Add a new macOS installer script (ee/maintained-apps/inputs/homebrew/scripts/webex_install.sh) that handles dmg extraction, quitting/relaunching the app, backing up existing /Applications/Webex.app, and removing stale Webex upgrade bundles. Update the homebrew input (webex.json) to reference the new install script path and update the darwin output (ee/maintained-apps/outputs/webex/darwin.json) to point to the new install_script_ref (d105863f) which contains the new script content.
@allenhouchins allenhouchins changed the title Add Webex macOS install script and update refs Update Webex macOS install script and refs Jun 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Script Diff Results

ee/maintained-apps/outputs/webex/darwin.json

=== Install // aed481d4 -> d105863f ===

--- /tmp/old.O0LN4R	2026-06-11 18:14:22.110725284 +0000
+++ /tmp/new.5ZKi9Q	2026-06-11 18:14:22.110725284 +0000
@@ -94,6 +94,24 @@
 }
 
 
+remove_stale_upgrade_bundles() {
+  # Webex's own auto-updater stages downloaded updates under
+  # "Cisco Spark/Webexteams_upgrades_*" (one dir per architecture) and leaves
+  # older, fully formed Webex.app bundles behind after applying them. osquery's
+  # apps table indexes those staged bundles by their (old) bundle_short_version
+  # and bundle_identifier ('Cisco-Systems.Spark'), so version-based patch
+  # policies keep reporting the host as out of date even after the app in
+  # /Applications has been updated. Removing them is safe: they are cached,
+  # already-applied updates that Webex re-downloads as needed, and Webex only
+  # ever stages versions at or newer than what is installed.
+  local home
+  for home in /Users/*; do
+    [ -d "$home" ] || continue
+    rm -rf "$home/Library/Application Support/Cisco Spark/Webexteams_upgrades_"*
+  done
+}
+
+
 # extract contents
 MOUNT_POINT=$(mktemp -d /tmp/dmg_mount_XXXXXX)
 yes | hdiutil attach -plist -nobrowse -readonly -mountpoint "$MOUNT_POINT" "$INSTALLER_PATH" || exit 1
@@ -105,4 +123,5 @@
 	sudo mv "$APPDIR/Webex.app" "$TMPDIR/Webex.app.bkp"
 fi
 sudo cp -R "$TMPDIR/Webex.app" "$APPDIR"
+remove_stale_upgrade_bundles
 relaunch_application 'Cisco-Systems.Spark'

=== Uninstall Script (no changes) ===

@allenhouchins
allenhouchins marked this pull request as ready for review June 11, 2026 18:19
Copilot AI review requested due to automatic review settings June 11, 2026 18:19
@allenhouchins
allenhouchins merged commit becf170 into main Jun 11, 2026
15 checks passed
@allenhouchins
allenhouchins deleted the 47440-fma-webex-fma-patch-policy-unexpectedly-failing-on-up-to-date-hosts branch June 11, 2026 18:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Webex macOS Fleet-maintained app (Homebrew) to use a custom install script that removes stale Webex auto-updater “upgrade bundle” directories under user home folders, helping prevent osquery/Fleet patch policies from reading outdated version info after an upgrade.

Changes:

  • Added a custom Webex DMG install script that quits/relaunches Webex, backs up /Applications/Webex.app, and removes stale Webexteams_upgrades_* bundles under /Users/*.
  • Updated the Homebrew input manifest to reference the new install_script_path.
  • Updated the generated Webex macOS output manifest to point to the new install_script_ref.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ee/maintained-apps/outputs/webex/darwin.json Updates install_script_ref and embeds the new install script contents under refs.
ee/maintained-apps/inputs/homebrew/webex.json Points the Webex Homebrew input to the new custom install script via install_script_path.
ee/maintained-apps/inputs/homebrew/scripts/webex_install.sh New custom installer script that mounts/extracts the DMG, installs Webex.app, and removes stale upgrade bundles.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +116 to +120
MOUNT_POINT=$(mktemp -d /tmp/dmg_mount_XXXXXX)
yes | hdiutil attach -plist -nobrowse -readonly -mountpoint "$MOUNT_POINT" "$INSTALLER_PATH" || exit 1
sudo cp -R "$MOUNT_POINT"/* "$TMPDIR"
hdiutil detach "$MOUNT_POINT" || true
# copy to the applications folder
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2c70f8d8-7c44-4a0d-93bf-da64c6d35b91

📥 Commits

Reviewing files that changed from the base of the PR and between d8c2d6c and e9373c2.

📒 Files selected for processing (3)
  • ee/maintained-apps/inputs/homebrew/scripts/webex_install.sh
  • ee/maintained-apps/inputs/homebrew/webex.json
  • ee/maintained-apps/outputs/webex/darwin.json

Walkthrough

This PR adds a macOS Webex installer script that addresses stale cache causing false version-mismatch errors. The script defines three helper functions: quit_and_track_application detects and gracefully quits Webex while recording its prior-running state; relaunch_application conditionally restarts it using the logged-in user's session context; and remove_stale_upgrade_bundles iterates user directories to delete cached Webex upgrade artifacts. The main flow orchestrates DMG mounting, app quitting, filesystem backup and copy operations, cache cleanup, and conditional app relaunch. Configuration files wire the script into the Homebrew installer by path and update the version metadata reference.

Possibly related PRs

  • fleetdm/fleet#46238: Updates ee/maintained-apps/outputs/webex/darwin.json with the new install script reference logic for cleaning Webex stale upgrade bundles before relaunch.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 47440-fma-webex-fma-patch-policy-unexpectedly-failing-on-up-to-date-hosts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FMA: WebEx FMA patch policy unexpectedly failing on up-to-date hosts

3 participants