Changes

Jump to: navigation, search

UpdateGeneration

2,191 bytes removed, 04:48, 5 July 2012
no edit summary
== Current processes ==
Currently we use two different sets of processes and tools to generate updates for nightly updates and releases.
=== Nightly updates during code development ===
We make updates available for official nightly builds for all current code branches. This helps ensure that our nightly testers are always running the most recent code with the least possible effort. These updates are offered on the 'nightly' update channelchannels, or derivates like 'nightly-ux', and for 'aurora'.
Both complete and partial updates are offered. If the user is running the most recent previous nightly build, the partial update is served. Otherwise, the complete update is always served. This greatly simplifies/expedites the update generation matrix.
Steps for nightly update generation (3.5 branch and earlier):* nightly builders builder generate complete [[Software_Update:MAR|MAR]] using Makefile* upload complete MAR to staging along with build* upload complete snippet to AUS2 server* prometheus-vm runs cron script every 5 minutes (patch-packager-cron.sh) that calls patch-packager.pl. In the simplest terms, this script does the following[http:*# Read in all of the available builds.*# Compute all of the patches we could offer.*# Read in all of the offered patches//hg.*# Compute which patches we aren't offering which we couldmozilla.*# Create all of the patches we could offer.*# Upload them. As of Firefox 3.6, we've stopped funneling all partial updates through prometheusorg/mozilla-vm in favor of generating the partial updates directly on the builders. This gives us much quicker turnaround on central/file/default/tools/update generation-packaging/MakefileSteps for nightly update generation (3.6 branch, project branches, and later):* nightly builder generate complete MAR using in Makefile]* nightly builder downloads the previous complete MAR from the latest dir on the staging server([http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/ eg])
* nightly builder generates partial MAR containing the differences between the two complete MARS using Makefile
* nightly builder generates snippets for both the complete and partial updates
For more information about how the update MAR files are actually created, please see the section below entitled [[#What_the_Makefiles_do.2C_or_How_to_make_your_own_updates|How to make your own updates]].
=== Updates for security releases end users ===
We create both partial and complete updates for security releases (aka as the 'release' and 'dotbeta' releases, e.g. 3.5.x). These updates are only ever served to users on the same product branchchannel too.
Legitimate partial updates, i.e. binary diffs, are generated for migrating users from the previous security release to the new security release, e.g. 313.5.10->313.50.21. Complete mars are served to those users on older security releases, e.g. 3.5->3.5.2. Because the updater checks for partial updates before complete updates, the update system serves the complete update for a security release as a partial update to all users on previous security releases12. This avoids presenting the user with a failed check for a partial update that, while harmless, might be confusing0.
Steps for security release end-user update generation:* similar to the nightly case, the build slave generates both a complete and a partial MARs and AUS configuration data update* snippets are generated using the patcher2 tool: http://mxr.mozilla.org/mozilla/source/tools/patcher/* a release engineer puts the appropriate URLs, version numbers, and build IDs into the patcher configuration file: http://mxr.mozilla.org/mozilla/source/tools/patcher-configs/* patcher downloads the complete MARs, creates partial diffs (using mbsdiff), and generates partial MAR files as well as AUS configuration files ("snippet" files). * patcher generates both production ("'release"'/'beta') and testing ("'releasetest"'/'betatest') snippets, release snippets point for QA to bouncer while releasetest snippets point to stage.* partial MAR files are copied to the candidates directory, and the releasetest snippets are loaded into AUS.verify
=== Updates between major branches (aka major update) ===
 === Which machines do what === {| cellpadding="Prior to Firefox 4.0, there were long lived branches that produced 3.5" border="1"|-| '''Machine Name''' | '''Function'''|-| any build slave | build generation<br/>complete patch(MAR) generation<br/>partial patch(MAR) generation (.x and 3.6.x releases. An update that converted users from 3.5.x to 3.6+)<br/>XML snippet generation (.x, or from 3.6+.x to the latest release was known as a major update. They were characterised by displaying a dialog offering the user the new branch (ie new features)|and asking them to accept the update. In the post-| prometheus-vm | partial patch(MAR) generation (34.0 world these are not used as everyone gets a background update to the latest release, modulo OS compatibility.5)<br/>XML snippet generation The only exceptions have been attempts to get people on older releases to update (3eg Fx10 is current, offer to 6.50 and older)|-| aus2-staging.mozilla.com | store/serve snippets|}
== What the Makefiles do, or How to make your own updates ==
* [http://ftp.mozilla.org/pub/mozilla.org/xulrunner/mar-generation-tools/mar-generation-tools-macosx.zip mar-generation-tools-macosx.zip]
* [http://ftp.mozilla.org/pub/mozilla.org/xulrunner/mar-generation-tools/mar-generation-tools-win32.zip mar-generation-tools-win32.zip]
XXX: These need updating for the maintenance service changes
=== Creating a complete MAR ===
mkdir current
pushd current
../tools/update-packaging/unwrap_full_update.sh /path/to/current.complete.mar
popd
mkdir previous
pushd previous
../tools/update-packaging/unwrap_full_update.sh /path/to/previous.complete.mar
popd
We then upload these snippets to the Mozilla [[AUS|AUS2]] server. The AUS2 server has internal logic to determine the most recent complete and partial updates available for a given product/branch/version, so that when the client updater requests an update from the server, it's able to redirect to the correct MAR file.
 
= Staging environment for nightly updates =
 
The staging environment for nightly updates consists of two machines:
* staging-nightly-updates: this machine mirrors prometheus-vm in production, running the patch-packager scripts to generate partial mars based on update snippets published to...
* staging-stage: used like stage.m.o in production to house builds and mars, but also holds the aus2 snippets used in update generation and publishing
 
== Common problems and resolutions with updates in the staging environment ==
 
=== Downloaded MAR file doesn't match the hash in the snippet ===
 
This can happen when two successful "nightly" builds start in the same hour (this shouldn't ever happen in production FWIW). The result is two different snippet files for two different mars, but only one mar in the corresponding build dir on staging-stage (these dirnames are only accurate down to the hour).
 
Removing the orphaned snippet should fix things up.
Confirm
4,293
edits

Navigation menu