Software Update

From MozillaWiki
Revision as of 02:52, 20 April 2005 by Darin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Software Update

This page describes a plan for improving software update for Firefox, Thunderbird and other applications.

Requirements

  • Support for silent or explicit downloading
  • Support for binary patching or full upgrade
  • Support for cryptographic signatures
  • Minimize impact on backend build and distribution processes
  • Allow users to easily view and control the process

The Plan

Add a module to Firefox to support the downloading of an update XPI. Provide a silent mode that will be used for security updates. Do this only if the user has agreed (via some UI during installation perhaps) and only if the user has write permission to the installation directory. We don't want this update system to get in the way of RPM or MSI based solutions, etc.

Use XPIs to deliver the update. The update itself will be an executable that will be run by Firefox when it detects that a XPI has been fully downloaded. This may happen once the download is complete, at app shutdown, or the next time Firefox is launched. That behavior is a policy decision yet to be decided upon. Using XPIs to deliver the update executable allows us to leverage the existing support for signed XPIs. Moreover, we have the option of packaging an entire install executable in the XPI if that is deemed appropriate.

The Windows filesystem does not allow files to be unlinked from their parent directory while they are in use. This means that we have to shutdown Firefox before updating it. The update executable will wait for Firefox to shutdown before it begins updating Firefox. It may either replace individual files or leverage binary patching (see bsdiff) to update Firefox. Once the update executable completes, it will launch Firefox passing it a command line flag to instruct Firefox that it has just been updated. This will allow Firefox to perform any post upgrade steps (e.g., modifying registry keys, etc.).

Users will have the option to view silent upgrade progress, and choose to cancel, suspend, or "complete it now." They will also be provided with simple controls to alter the upgrade policy (notifications, silent or not, etc.).

Downloading Details