Add-ons/Hotfix: Difference between revisions

Jump to navigation Jump to search
Merging MDN docs
m (Jorge.villalobos moved page Firefox/Hotfix to Add-ons/Hotfix: Moving to a better place before merging with MDN.)
(Merging MDN docs)
Line 3: Line 3:
Hotfix updates are automatically pushed to all Firefox users (starting from version 11).
Hotfix updates are automatically pushed to all Firefox users (starting from version 11).


This page contains the current procedure for deploying a hot fix. For technical details of coding a hot fix, please see [https://developer.mozilla.org/en-US/Add-ons/Hotfix].
==How to develop a new hotfix==
 
The code for the hotfixes is at https://hg.mozilla.org/releases/firefox-hotfixes/.
 
A new hotfix will live in a top-level dir following the convention vYYYYMMDD.XX. You can start by copying one of the existing ones into a new folder. The version must be greater than the version of the previously released one. Don't forget to update the [http://hg.mozilla.org/releases/firefox-hotfixes/file/tip/README README] file (in the root srcdir) to include the bug number where the hotfix was developed and a description of what it does.
 
Package the hotfix by running <code>HOTFIX=vYYYYMMDD.XX make package</code> in the root srcdir. This instruction can also be found in the [http://hg.mozilla.org/releases/firefox-hotfixes/file/tip/README README] file.
 
== Testing the hotfix locally ==
 
To test the hotfix locally, get the .xpi file and drag&drop it into Firefox's window.
 
Things to look out for:
 
* Test that the hotfix does what it is expected to do, obviously.
* Test that the hotfix uninstalls itself after completing its task. Most of the hotfixes we've shipped so far performs an immediate task and uninstalls itself right afterwards, but there were some exceptions where it needs to remain installed until certain conditions are met.
* Test the extension with the oldest Firefox version that it supports (minVersion), to make sure the code in the hotfix does not use any API or JS syntax that was introduced only on later versions.
* Test on all target OSes.
* Disable the strict compatibility checking and install the hotfix on an unsupported version to test that it does not perform its task, as expected. (The hotfix has code to check that it only runs on its target versions even with strictCompatiblity off).
 
== Testing the hotfix on the staging server ==
 
To test the hotfix on the staging server, get it signed and uploaded to addons-dev.allizom.org. After that is done, do the following steps in a clean Firefox profile:
 
If testing on a Firefox version earlier than 24, make sure you have the right signature fingerprint configured. See the Signatures section for more details.
 
* Check if <code>extensions.hotfix.id</code> is set to firefox-hotfix@mozilla.org (it should be the default).
* Set <code>extensions.logging.enabled</code> to true. This will log messages from the Add-ons Manager to the Console, and to stdout if in a debug build.
* Set <code>extensions.update.interval</code> to 10.
* In the pref <code>extensions.update.background.url</code> (<code>extensions.update.url</code> for Firefox < 13), change the ''versioncheck.addons.mozilla.org'' part from the string with ''versioncheck-dev.allizom.org''.
* Restart Firefox and open the Add-ons Manager and the Console. Wait a while for the Add-ons Manager to check for updates (messages about it should show in the Console).
**  Note that there might be other pending update checks that will run before, for example an update check for the "default theme" add-on, with id={972ce4c6-7e08-4474-a285-3208198ce6fd}.
** If the hotfix is not being downloaded, get the URL from the logs and check that the RDF returned at that URL contains information about the hotfix. To make this easier, see the update check section.
** After a successful update check is performed, the hotfix should be downloaded and installed.
* Check that the hotfix performed its action correctly.
* Check that the pref <code>extensions.hotfix.lastVersion</code> was set to the correct version name of the hotfix being tested.
* Check that the hotfix was not downloaded and installed to incompatible Firefox versions.
* Check that it uninstalled itself after completing its task. If you have the Add-ons Manager tab open, you might need to close and re-open it for the hotfix to disappear.
 
=== Signatures===
 
The hotfix extension is signed and the Add-ons Manager will only install it if it matches a pinned signature, stored in the <code>extensions.hotfix.certs.1.sha1Fingerprint<code> pref.
 
The signature has changed over time (in Firefox 16.0.2 and Firefox 24), and users with current installations were updated to the newer signatures through a hotfix itself ([https://bugzilla.mozilla.org/show_bug.cgi?id=803596 bug 803596] and [https://bugzilla.mozilla.org/show_bug.cgi?id=874513 bug 874513]).
 
This means that a clean profile from Firefox 10 - 23 won't have the right signature from start, and it needs to be updated to proceed with the testing. The current correct value for the pref is <code>91:53:98:0C:C1:86:DF:47:8F:35:22:9E:11:C9:A7:31:04:49:A1:AA</code>
===Triggering the update check===
 
To not wait on the update interval and manually trigger the update check, you can run the following code snippet. Please only do this when debugging things or when there's plenty of evidence that the timer update trigger is working properly.
 
<code>var obj = {};
Cu.import("resource://gre/modules/AddonManager.jsm", obj);
obj.AddonManagerPrivate.backgroundUpdateCheck();</code>
 
Run this in a privileged script context, such as the Browser Console or Scratchpad set to the Browser environment.


== Deployment ==
== Deployment ==
canmove, Confirmed users
1,448

edits

Navigation menu