Mozilla-created products

This topic introduces installers features or tools that can be used to deploy Mozilla-created products (Firefox, Thunderbird) and centrally manages its configuration in small organisations. It also describes the mechanism used to notify users and distribute updates (security patches, full version…) and what lapptrack uses to track updates.

Deployment Tips

Mozilla installer covers the two first issues of a deployment plan. The command line option for a silent install is -ms and additional installation options may be tuned in a configuration file specified with /INI. See Installer Options for an overview of the installer command line options.

All configuration parameters are stored in configuration files and Mozilla products offer a mechanism, using text files, to tuned the configuration at application startup (with or without the overwriting of user’s modification).

Mozilla product offers a background service named Mozilla Maintenance Service which allows application updates to occur in the background without any user intervention. In a centrally managed environment this service is not required, so its installation may be skipped by setting the MaintenanceService key to false in the configuration installation file or unsinstall the Maintenance Service as a post install action.

Uninstall the Mozilla Maintenance Service

"%ProgramFiles(x86)%\Mozilla Maintenance Service\uninstall.exe" /S

In a deployment plan for Mozilla products, the extensions deployment should be taken into account as a part of the plan. There is several scenarios to achieve this goal. The simplest method is to rename the .xpi file or the folder with the extension ID 8 and to drop it into the extensions folder.

Warning

The location of the extensions folder differs according to the mozilla product.

Firefox

program directory\browser\extensions

Thunderbird

program directory\extensions

Installer Options

The installer is based on a Mozilla framework and delivered as a single executable.

Mozilla installers accepts a few options on the command line. These options give the user a bit more control over the installation process, mainly doing a silent install. The Command Line Arguments page details these options and the end of the section focuses on the silent running mode.

-ms

make a silent install.

/INI=<PATHNAME>

specifies the full path name of the configuration file. When a configuration is specifying, the installer make a silent install.

Example

setup.exe -ms
setup.exe /INI="C:\Installers\Firefox\silent.ini"

Update Mechanism

Mozilla has its own software update system to distribute updates of security patches and bug fixes for Firefox and Thunderbird. The Mozilla wiki contains an overview of the software update system.

The update system has two components: an agent working either in the application core or as a background service named Mozilla Maintenance Service, and a server component named Balrog (formerly Application Update Service).

The agent sends an update request over HTTPS specifying the installed application version to the Mozilla update servers. The server component will return a manifest file (which is a simple XML file) specifying the right update package to download. However, this latter is a Mozilla archive aimed at the application updating 5 (i.e. not a first installation), and Mozilla recommends 6 to use a download request to retrieve a release.

Consequently, the update mechanism comprises the following two steps:

  1. determination of the latest release for the branch with an update request

  2. making the download request with the attributes of the update element from the received manifest file, provided that a complete patch element is present

Note

At the date of writing this section, the Balrog 2.22 documentation doesn’t describe the request and the manifest file content, so the following topics are the result of an analysis work of documentation from the Mozilla wiki (see Software Update and AUS wiki pages), the Balrog repository and testing. So, the specifications may be changed in the future.

Update Request

The update request URL is defined in the app.update.url option (see about:config) and matches the following syntax:

https://aus5.mozilla.org/update/6/product/version/buildID/buildTarget/locale/channel/osVersion/systemCapabilities/distribution/distVersion/update.xml?force=1/

Part

Description

Value

6

The schema version. It exist 6 versions and they differ according to the number of parameters. 1

product

The name of the application requesting an update

Firefox, Thunderbird

version

The version of the application requesting an update. This value is present in the manifest file (see appVersion attribute) and in the platform.ini file (see Milestone key) located in the installation directory of the application.

42.0

buildID

The build ID of the application requesting an update. It’s the building date of the application (see Build section). It is used to compare the latest available update with what the application currently is, and offers the update only if the available update is newer. This part may be empty (i.e. space charaters). This value is present in the manifest file (see buildID attribute) and in the platform.ini file (see BuildID key) located in the installation directory of the application.

20151029151421

buildTarget

The “build target” of the application requesting an update. This is usually related to the target platform 2 the application was built for.

WINNT_x86-msvc
WINNT_x86_64-msvc
Linux_x86_64-gcc3
Linux_x86-gcc3
Darwin_x86_64-gcc3

locale

The locale 7 of the application requesting an update.

en-US, fr

channel

The update channel of the application request an update. It is used to separate releases from others applications updates. The app.update.channel option defines the update channel for the requesting application (see about:config).

release

osVersion

The OS Version of the application requesting an update. It is used to point desupported operating systems to their last supported build. For the Windows System family, it consist of “Windows_NT <major>. <minor>.<service pack number>” (“Windows_NT 6.1.1” = Microsoft Windows 7 version 6.1.7601 Service Pack 1 for example). This part may be empty (i.e. consist of space characters)

Windows_NT 6.1.1

systemCapabilities

The supported hardware features of the application requesting an update. It is used to point desupported hardware (hardware which don’t support SSE2). This part may be empty (i.e. consist of space characters)

SSE3

distribution

The partner distribution name of the application requesting an update or “default” if the application is not a partner build.

default

distVersion

The version of the partner distribution of the application requesting an update or “default” if the application is not a partner build.

default

Tip

The agent (only windows version) stores the update request and the associated response in the file %LOCALAPPDATA%/Mozilla/updates/E7CF176E110C211B/active-update.xml.

Tip

At the date of writing this section, the Mozilla update server is hosted on aus5.mozilla.org. The Client Domains page details older domains.

Example

The below URL is an update request from Mozilla Firefox 50.1.0 (x64 fr) running on Microsoft Windows 10 (10.0.14393):

https://aus5.mozilla.org/update/6/Firefox/50.1.0/20161208153507/WINNT_x86_64-msvc-x64/fr/release/Windows_NT%2010.0.0.0%20(x64)(noBug1296630v1)/SSE3/default/default/update.xml

Manifest File

On an update request, the server returned a XML file specifying the right update package to download. The XML schema isn’t formally described in the Balrog documentation, and the Mozilla wiki contains an older specification (last updated on october 2015).

A typical manifest file look like the following snippet.

<?xml version="1.0"?>
<updates>
    <update type="minor"
            appVersion="..."
            buildID="..."
            detailsURL="http://download.example.com/releasenotes/..."/>
        <patch type="complete"
               URL="http://download.example.com/..."/>
        <patch type="partial"
               URL="http://download.example.com/..."/>
    </update>
</updates>

Every manifest file contains one updates element as root without any attributes.

An updates element may have update child elements, each of them specifying an update to an application version.

update element attributes

Attribute

Description

Value

type

The update type. This attribute was used to describe a major revision, or a minor revision (security releases or incremental updates). Nowadays, it’s very rare to used anything than minor 3.

minor
major

displayVersion

The application version to display. Generally, the agent client will show this in the UI.

43.0.1

appVersion

The version of the application.

43.0.1

platformVersion

The version of the platform (usually Gecko) that the application represented is built from. This attribute is deprecated 4 since Gecko 51.0 and above (i.e. Firefox/Thunderbird 51.0 and above).

43.0.1

buildID

The build ID of the application.

20151216175450

detailsURL

The location of the release note of the application update.

https://www.mozilla.org/fr/firefox/43.0.1/releasenotes/

An update element has at least one and no more than two patch child elements specifying a patch file to apply to the application to update it to that version. A patch file describes either binary differences between versions of the application (partial patches), or complete updates that replace and remove files as necessary (i.e. a full installer).

patch element attributes

Attribute

Description

Value

type

The type of the patch file.

complete
partial

URL

The location of the patch file.

http://download.mozilla.org/?product=firefox-43.0.1-complete&amp;os=win64&amp;lang=fr

hashFunction

The name of the hash algorithm used to calculate the hashValue attribute.

sha512

hashValue

The hash value of the patch file, calculated using the hash algorithm defined in the hashFunction attribute.

020c01ba..c7f2

size

The file size of the patch file expressed in bytes.

56171708

Example

The manifest file below is the response to the following update request from Mozilla Firefox 42.0 (x64 fr) running on Microsoft Windows 7 Entreprise (6.1.7601 Service Pack 1 Build 7601):

https://aus5.mozilla.org/update/3/Firefox/42.0/20151029151421/WINNT_x86_64-msvc-x64/fr/release/Windows_NT%206.1.1.0%20(x64)/default/default/update.xml
<?xml version="1.0"?>
<updates>
   <update type="minor"
           displayVersion="43.0.1"
           appVersion="43.0.1"
           platformVersion="43.0.1"
           buildID="20151216175450"
           detailsURL="https://www.mozilla.org/fr/firefox/43.0.1/releasenotes/">
       <patch type="complete"
              URL="http://download.mozilla.org/?product=firefox-43.0.1-complete&amp;os=win64&amp;lang=fr"
              hashFunction="sha512"
              hashValue="020c01badf94867feb4a91b5a85b9f4ef55a9a22154f0012f89820366b300c2ed3799b0a150760775be1352fe2fee68ffb340583909bba08407086bd2927c7f2"
              size="56171708"/>
       <patch type="partial"
              URL="http://download.mozilla.org/?product=firefox-43.0.1-partial-42.0&amp;os=win64&amp;lang=fr"
              hashFunction="sha512"
              hashValue="7ad8b74561b378b50248010a9946f8abce18d0a69b8392f4f0cd64438f7cbd34343321fb835c0a53d30605ccb2f8c9f0b3bed5dd210f5c9bf6a682998c450740"
              size="22914817"/>
   </update>
</updates>

Warning

The manifest file for a Thunderbird update request don’t contain patch child elements.

The manifest file below is the response to the following update request from Thunderbird 52.0.1 (x86 fr) running on Microsoft Windows 7 Entreprise (6.1.7601 Service Pack 1 Build 7601):

https://aus5.mozilla.org/update/6/thunderbird/52.0.1/20170413214957/WINNT_x86-msvc/fr/release/Windows_NT%206.1/%20/default/default/update.xml
<?xml version="1.0"?>
<updates>
    <update type="minor"
            displayVersion="52.1.1"
            appVersion="52.1.1"
            platformVersion="52.1.1"
            buildID="20170509142926"
            detailsURL="https://www.mozilla.org/fr/thunderbird/52.1.1/releasenotes/">
    </update>
</updates>

Download Request

The download request URL 6 matches the following syntax:

https://download.mozilla.org/?product=product-version&os=target&lang=locale

Part

Description

Value

product

The name of the application to retrieve

firefox, thunderbird

version

The version of the application to retrieve. This part may be either a version identifier as described in the Toolkit version format topic or latest to retrieve the latest version

42.0

target

The “build target” of the application to retrieve. This part must contain one of the following values:

  • win: Windows 32 bits

  • win64: Windows 64 bits

  • osx: MacOS X

  • linux64: Linux x86 64 bits

  • linux: Linux i686

win
win64
osx
linux64
linux

locale

The locale 7 of the the application to retrieve

en-US
fr

Example

The below URL is an download request from Mozilla Firefox 50.1.0 (x64 fr) running on Windows 64 bits:

https://download.mozilla.org/?product=firefox-50.1.0&os=win64&lang=fr

Version Format

Mozilla defined its own version scheme, and it is used by the Extension Manager and Software Update. The version format reference details the format and the comparing algorithm.

A version string consists of one or more version parts, separated with dots. Each version part is itself parsed as a sequence of four parts: <number-a><string-b><number-c><string-d>. Each of the parts is optional. Numbers are integers base 10 (may be negative), strings are non-numeric ASCII characters.

References

1

The expected schema are defined in the base python module in the Balrog auslib.web Package

2

The expected values are defined in the mozharness package.

3

What’s in a rule?

4

apprelease module in the Balrog repository

5

Manually Installing a MAR file

6(1,2)

README

7(1,2)

The Locale Codes wiki page describes the scheme - based on RFC 5646 - used by Mozilla.

Footnotes

8

the extension ID is available under “extensions” section in ‘about:support’.