Software Update:Nightly update infrastructure

From MozillaWiki
Revision as of 12:53, 11 May 2006 by NThomas (talk | contribs)
Jump to navigation Jump to search

Overview

Updates are available for nightly builds of Firefox & Thunderbird on multiple branches. This requires the coordination of tinderbox configuration, partial update generation, and the AUS server that provides update information the client applications.

This document describes how that all works, to the extent that publicly available information allows. Hopefully the build crew and Mike Morgan can fill out the details to make this page more complete.

Tinderbox

The tinderbox produces the nightly build & MAR for a complete update, and publishes them to the FTP. It also creates a complete-update snippet, which describes the update, and scp's that to AUS.

mozconfig

The update channel is set to "default" (no updates) unless this line is in the mozconfig:

ac_add_options --enable-update-channel=nightly

For 1.5 the beta releases shipped with a "beta" channel, while the release candidates and final shipped with "release".

To pull the code for complete update generation you need:

mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
ac_add_options --enable-update-packaging

The mar executable is built by default.

Snippet configuration

A handful of variables in tinder-config.pl control the update and snippet generation on the tinderbox. The code is mozilla/tools/post-mozilla-rel.pl::update_create_package and runs after the successful completion of the build and any tests.

Variable Example value Use
$update_package 1? Master switch ?
$update_product "Firefox"
$update_version "trunk"
$update_platform "WINNT_x86-msvc"
$update_hash "md5"
$update_filehost "ftp.mozilla.org"
$update_appv "1.0+"
$update_extv "1.0+"
$update_pushinfo 1

The snippet is scp'ed to

/opt/aus2/incoming/0/$update_product/$update_version/$update_platform/$buildid/$locale

Here is some sample output from a trunk build:

Gathering complete update info...
Got build ID 2006051005.

Not pushing first-gen update info...

Pushing third-gen update info...
ssh -i /home/cltbld/.ssh/aus cltbld@aus-staging.mozilla.org mkdir -p /opt/aus2/build/0/Firefox/2.0/WINNT_x86-msvc/2006051005/en-US
scp -i /home/cltbld/.ssh/aus  /cygdrive/c/builds/tinderbox/Fx-Mozilla1.8/WINNT_5.2_Depend/mozilla/dist/update/update.snippet.1 cltbld@aus-staging.mozilla.org:/opt/aus2/build/0/Firefox/2.0/WINNT_x86-msvc/2006051005/en-US/complete.txt

Completed pushing update info...

Update build completed.

Partial Update Generation

Not much information is available, apart from

  • the work is done on Prometheus, using some sort of cron job
  • it pushes partial updates to the FTP server, and presumably a partial snippet to AUS
  • the code for partial generation lives in mozilla/tools/update-packaging but also uses mbsdiff and mar.
  • Chase Phillips wrote the code; Paul Reed is a current build engineer who knows how to drive it

AUS

This server returns update information to the client, based on the snippets it has from the build systems. It was written in PHP by Mike Morgan.

AUS maps client versions to $update_version. The current mapping is:

something