Software Update:GeneratingSnippetsAndPartialsForReleases: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
For releases of Firefox and Thunderbird, the Build & Release team at Mozilla Corp uses a program called | For releases of Firefox and Thunderbird, the Build & Release team at Mozilla Corp uses a program called patcher2. This document describes the basics of how to use it. | ||
=Overview= | =Overview= | ||
==Parts of the update system== | |||
To provide updates for releases, you need the following | |||
* for each platform and locale: | |||
** a partial mar between the current release and the new release, this basically an archive of binary diff's | |||
** a complete mar for the new release, which is a copy of every file, to be used if the partial doesn't work or the installed build is more than one release behind | |||
* a collection of update information (called snippets) that describe the update paths | |||
The tinderbox produces the complete mars when it creates the installer/archiver. The partial mar and snippets are created by a perl script called [http://mxr.mozilla.org/seamonkey/source/tools/patcher/ patcher2]. | |||
==How Firefox/Thunderbird updates are tested== | ==How Firefox/Thunderbird updates are tested== | ||
Line 10: | Line 20: | ||
Then there are | Then there are | ||
* betatest - | * betatest - for testing updates, pointing to the ftp server, to check that they apply properly, the UI works etc etc | ||
* releasetest - | * releasetest - testing of staging files on ftp server, pointing to download.m.o (bouncer), to make sure everything is available to end users when the release is imminent | ||
To make this possible two groups of update snippets are generated, and pushed live at different times. A correctly setup patcher config will make both sets in one run, as well as creating the partial mars. | |||
You can modify the channel using the [http://www.oxymoronical.com/web/firefox/updatechannel Update Channel Changer] extension, or edit <tt><firefox_install_dir>/default/pref/channel-prefs.js</tt> to change the <tt>app.update.channel</tt> preference. Using <tt>about:config</tt> doesn't work. | |||
=Creating updates= | |||
=Define variables= | ==Define variables== | ||
PRODUCT=firefox | PRODUCT=firefox | ||
VERSION=2.0.0.7 | VERSION=2.0.0.7 | ||
=Getting the code= | ==Getting the code== | ||
# create a working dir | # create a working dir | ||
Line 33: | Line 47: | ||
cvs co -d MozBuild mozilla/tools/release/MozBuild | cvs co -d MozBuild mozilla/tools/release/MozBuild | ||
=Create/update config= | ==Create/update config== | ||
= | ==Run patcher2== | ||
# build tools | # build tools | ||
Line 47: | Line 61: | ||
--config=../config/moz180-branch-patcher2.cfg 2>&1 | tee ${PRODUCT}-create-patches.log | --config=../config/moz180-branch-patcher2.cfg 2>&1 | tee ${PRODUCT}-create-patches.log | ||
=Publish updates= | ==Publish updates== |
Revision as of 20:39, 9 October 2007
For releases of Firefox and Thunderbird, the Build & Release team at Mozilla Corp uses a program called patcher2. This document describes the basics of how to use it.
Overview
Parts of the update system
To provide updates for releases, you need the following
- for each platform and locale:
- a partial mar between the current release and the new release, this basically an archive of binary diff's
- a complete mar for the new release, which is a copy of every file, to be used if the partial doesn't work or the installed build is more than one release behind
- a collection of update information (called snippets) that describe the update paths
The tinderbox produces the complete mars when it creates the installer/archiver. The partial mar and snippets are created by a perl script called patcher2.
How Firefox/Thunderbird updates are tested
We use four update channels for Firefox & Thunderbird releases. The two channels that end users see are
- beta - default channel for the releases 2.0a1, 2.0b1, and up to the last 2.0 beta
- release - default channel for the first release candidate for 2.0. The vast majority of people are on this channel.
Then there are
- betatest - for testing updates, pointing to the ftp server, to check that they apply properly, the UI works etc etc
- releasetest - testing of staging files on ftp server, pointing to download.m.o (bouncer), to make sure everything is available to end users when the release is imminent
To make this possible two groups of update snippets are generated, and pushed live at different times. A correctly setup patcher config will make both sets in one run, as well as creating the partial mars.
You can modify the channel using the Update Channel Changer extension, or edit <firefox_install_dir>/default/pref/channel-prefs.js to change the app.update.channel preference. Using about:config doesn't work.
Creating updates
Define variables
PRODUCT=firefox VERSION=2.0.0.7
Getting the code
# create a working dir mkdir $PRODUCT-$VERSION-updates/ cd $PRODUCT-$VERSION-updates/ export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org # pull patcher2 and the MozBuild support library cvs co -d patcher mozilla/tools/patcher cd patcher cvs co -d MozBuild mozilla/tools/release/MozBuild
Create/update config
Run patcher2
# build tools ./patcher2.pl --build-tools --app=${PRODUCT} \ --config=../config/moz180-branch-patcher2.cfg 2>&1 | tee ${PRODUCT}_build-tools.log # download complete MARs ./patcher2.pl --download --app=${PRODUCT} \ --config=../config/moz180-branch-patcher2.cfg 2>&1 | tee ${PRODUCT}-download.log # Create partial patches and snippets ./patcher2.pl --create-patches --app=${PRODUCT} \ --config=../config/moz180-branch-patcher2.cfg 2>&1 | tee ${PRODUCT}-create-patches.log