Software Update:Nightly update infrastructure: Difference between revisions
(AUS info) |
No edit summary |
||
Line 78: | Line 78: | ||
==Application update request== | ==Application update request== | ||
The application makes a request | The application makes a request to the url specified by the preference app.update.url (or to app.update.url.override if it is defined), which is: | ||
https://aus2.mozilla.org/update/1/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/update.xml | https://aus2.mozilla.org/update/1/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/update.xml | ||
This is preprocessed to make the required substitutions. Continuing the example above of a Firefox Mozilla1.8 branch nightly, this would be: | |||
https://aus2.mozilla.org/update/1/Firefox/2.0a2/2006050905/WINNT_x86-msvc/en-US/nightly/update.xml | https://aus2.mozilla.org/update/1/Firefox/2.0a2/2006050905/WINNT_x86-msvc/en-US/nightly/update.xml | ||
which returns | which returns | ||
Line 93: | Line 93: | ||
</update> | </update> | ||
</updates> | </updates> | ||
Other %BUILD_TARGET%/$update_platform combinations are | |||
* Linux: Linux_x86-gcc3 | |||
* Mac Universal: Darwin_Universal-gcc3 | |||
* Mac PPC: Darwin_ppc-gcc3 | |||
==AUS itself== | ==AUS itself== | ||
To | To provide this content, AUS maps the client version (%VERSION%) from the request to $update_version of snippet store. The current mapping is: | ||
something messy | something messy | ||
There is a many to one relationship between versions from a particular code branch to an AUS disk location. Eg: The Mozilla1.8 branch is being used for developement for v2 and will have versions 2.0a1, a2, b1,b2, RC1, ... and finally 2.0. The situation with the Mozilla1.8.0 needs fixing up ([https://bugzilla.mozilla.org/show_bug.cgi?id=328497 Bug 328497] made a bit of a mess) | There is a many to one relationship between versions from a particular code branch to an AUS disk location. Eg: The Mozilla1.8 branch is being used for developement for v2 and will have versions 2.0a1, a2, b1,b2, RC1, ... and finally 2.0. The situation with the Mozilla1.8.0 needs fixing up ([https://bugzilla.mozilla.org/show_bug.cgi?id=328497 Bug 328497] made a bit of a mess) |
Revision as of 16:36, 11 May 2006
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 | Whether to create a complete update |
$update_pushinfo | 1 | Whether to push the update snippet to AUS |
$update_product | "Firefox" | Product identifier for AUS |
$update_version | "trunk" | "Branch" identifier for AUS |
$update_platform | "WINNT_x86-msvc" | Platform ABI for AUS |
$update_hash | "SHA1" | Hash function for download verfication |
$update_filehost | "mozilla.osuosl.org" | The server that provides the mar files |
$update_appv | "1.0+" | Version that appears in the update notification dialog |
$update_extv | "1.0+" | Version used to check extension compatibility (this seems to not work properly all the time) |
The snippet is scp'ed to
aus-staging.mozilla.org:/opt/aus2/incoming/0/$update_product/... $update_version/$update_platform/$buildid/$locale/complete.txt
Here is some sample output from a Firefox build from the Mozilla1.8 branch:
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.
Application update request
The application makes a request to the url specified by the preference app.update.url (or to app.update.url.override if it is defined), which is:
https://aus2.mozilla.org/update/1/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/update.xml
This is preprocessed to make the required substitutions. Continuing the example above of a Firefox Mozilla1.8 branch nightly, this would be:
https://aus2.mozilla.org/update/1/Firefox/2.0a2/2006050905/WINNT_x86-msvc/en-US/nightly/update.xml
which returns
<updates> <update type="minor" version="2.0a2" extensionVersion="2.0a2" buildID="2006051002"> <patch type="complete" URL="http://mozilla.osuosl.org/pub/mozilla.org/firefox/nightly/2006-05-10-02-mozilla1.8/firefox-2.0a2.en-US.win32.mar" hashFunction="SHA1" hashValue="202f8c4a5c6af9bd00569ed087e245dec87d67fb" size="6925417"/> <patch type="partial" URL="http://mozilla.osuosl.org/pub/mozilla.org/firefox/nightly/2006-05-09-05-mozilla1.8/firefox-2.0a2.en-US.win32.partial.2006050905-2006051002.mar" hashFunction="SHA1" hashValue="6e277c58c232f021b034d595ce72fc240f011dab" size="525151"/> </update> </updates>
Other %BUILD_TARGET%/$update_platform combinations are
- Linux: Linux_x86-gcc3
- Mac Universal: Darwin_Universal-gcc3
- Mac PPC: Darwin_ppc-gcc3
AUS itself
To provide this content, AUS maps the client version (%VERSION%) from the request to $update_version of snippet store. The current mapping is:
something messy
There is a many to one relationship between versions from a particular code branch to an AUS disk location. Eg: The Mozilla1.8 branch is being used for developement for v2 and will have versions 2.0a1, a2, b1,b2, RC1, ... and finally 2.0. The situation with the Mozilla1.8.0 needs fixing up (Bug 328497 made a bit of a mess)