Changes

Jump to: navigation, search

UpdateGeneration

2,315 bytes added, 18:29, 21 May 2010
What the Makefiles do, or How to make your own updates
This script used to generate a complete MAR file is [http://hg.mozilla.org/mozilla-central/file/default/tools/update-packaging/make_full_update.sh make_full_update.sh].
Here's a example of how you might use the full complete update script:
BZIP2=/usr/bin/bzip2 \
=== Creating a partial MAR ===
This script used to generate a partial MAR file is [http://hg.mozilla.org/mozilla-central/file/default/tools/update-packaging/make_incremental_update.sh make_incremental_update.sh].
 
You'll need two complete MAR files in order to generate a partial MAR file that contains the delta between the two. The delta is computed using the binary patch generator, mbsdiff.
 
Once you have your two complete MAR files, you can unpack them each into their own directory by using the [http://hg.mozilla.org/mozilla-central/file/default/tools/update-packaging/unwrap_full_update.sh unwrap_full_update.sh] script as follows:
 
# Given two MAR files, current.complete.mar and previous.complete.mar
export BZIP2=/usr/bin/bzip2
export MAR=~/bin/mar
mkdir current
pushd current
../tools/update-packaging/unwrap_full_update.sh current.complete.mar
popd
mkdir previous
pushd previous
../tools/update-packaging/unwrap_full_update.sh previous.complete.mar
popd
 
'''NOTE''': you *MAY* need to modify the source of the <code>make_incremental_update.sh</code> script before you attempt to generate a the partial MAR. Specifically, the script contains a variable, [http://hg.mozilla.org/mozilla-central/file/05c4d3361afc/tools/update-packaging/make_incremental_update.sh#l51 requested_forced_updates]. Mozilla uses this variable to which control files that we want to *always* update.
 
If you have files in your MARs that should always be updated via a partial update (due to checksum changes, timestamps, whatever), you can either change the value of the variable in the script or simply pass the filenames via the -f flag to the <code>make_incremental_update.sh</code> script.
 
Here's a example of how you might use the partial update script:
 
BZIP2=/usr/bin/bzip2 \
MAR=~/bin/mar \
MBSDIFF=~/bin/mbsdiff \
tools/update-packaging/make_incremental_update.sh \
firefox-3.7a5pre.en-US.linux-i686.partial.previous-current.mar \
./previous \
./current
 
* As for the complete MAR file, you need to provide the path to your MAR and BZIP2 executables as environment variables, but also must provide the path to MBSDIFF.
* The <code>make_incremental_update.sh</code> will then compare the contents of the previous/ and current/ directories and generate a manifest and a binary diff of the files in those directory.
* That manifest will then be added to the output file specified, in this case firefox-3.7a5pre.en-US.linux-i686.partial.previous-current.mar, along with the binary diff of the changed files.
= Staging environment for nightly updates =
Canmove, confirm
2,850
edits

Navigation menu