Confirmed users, Bureaucrats and Sysops emeriti
1,217
edits
No edit summary |
|||
Line 18: | Line 18: | ||
=The Plan= | =The Plan= | ||
Revise the existing toolkit code which downloads XPI updates. 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 | Use signed JAR files to deliver the update. The update itself will contain a manifest of files which need updating/removal, and may also run executable programs. The update 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. | ||
The application must not be running while the update is being installed. Our systems, including the JAR cache, are not designed to deal with changes to their underlying files. In addition, the Windows filesystem does not allow files to be unlinked from their parent directory while they are in use. The Firefox executable will run a separate update binary (using execv or another method). This executable will process the update manifest and will leverage the binary patching technology of [http://www.daemonology.net/bsdiff/ bsdiff] (with modifications for reliability). Once the update executable completes, it will re-launch the Firefoxs executable. This will allow Firefox to perform any post-upgrade operations (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.). | 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.). | ||
Line 45: | Line 30: | ||
Firefox will periodically check the Mozilla.org update servers for available updates. The update server will return a manifest file (which is currently an RDF file) that will point Firefox at the right XPI to download. | Firefox will periodically check the Mozilla.org update servers for available updates. The update server will return a manifest file (which is currently an RDF file) that will point Firefox at the right XPI to download. | ||
In silent download mode, Firefox will use byte-range requests (supported by HTTP and FTP) to download the XPI in small pieces. Each time Firefox starts up it will check to see if it should resume downloading the XPI. It will not try to download the XPI while Firefox is not running. This simplifies the implementation of the downloading system because it enables us to make use of the Firefox networking stack. Firefox will try to minimally impact the user's network bandwidth in the process. Note: We need to test the byte-range request support of Mozilla's mirror network. | |||
In silent download mode, Firefox will use byte-range requests (supported by HTTP and FTP) to download the XPI in small pieces. Each time Firefox starts up it will check to see if it should resume downloading the XPI. It will not try to download the XPI while Firefox is not running. This simplifies the implementation of the downloading system because it enables us to make use of the Firefox networking stack. Firefox will try to minimally impact the user's network bandwidth in the process. | |||
Once the XPI has been completely downloaded, it's signature will be verified. If the signature checks out, then assuming that Firefox has permission from the user, it will unpack the JAR and signal Firefox to start the upgrade process. | |||
Note from bsmedberg: We should think carefully about how we handle these signatures. I presume we want mozilla updates to be signed *by mozilla.org*, not just signed in general. How do we identify which cert/certchains are appropriate? | |||
==Processing the Update== | ==Processing the Update== | ||
At startup, Firefox will look for an update | At startup, Firefox will look for an update manifest in a fixed location. If it finds the manifest, then assuming it has permission from the user it will launch the update executable to process that manifest. | ||
Before making any changes to the existing Firefox installation, the update executable will scan all files to be modified and verify that they are the expected version. If it finds that any files are not in sync with what it expects to find, then it will not apply the update. Otherwise, it will proceed to either: add, remove, replace, or patch existing files. | Before making any changes to the existing Firefox installation, the update executable will scan all files to be modified and verify that they are the expected version. If it finds that any files are not in sync with what it expects to find, then it will not apply the update. Otherwise, it will proceed to either: add, remove, replace, or patch existing files. |