Skip to content

MB 200: Changes for the system installer

Merge Info

Related Issues

Backporting

Timeline

  • Immediate: patchset needed as soon as possible
  • Next Minor Stable Release: patchset that needs to be verified in nightly before backport
  • Eventually: patchset that needs to be verified in alpha before backport
  • No Backport (preferred): patchset for the next major stable

(Optional) Justification

  • Emergency security update: patchset fixes CVEs, 0-days, etc
  • Critical bug-fix: patchset fixes a bug in core-functionality
  • Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc
  • Sponsor required: patchset required for sponsor
  • Localization: typos and other localization changes that should be also in the release branch
  • Other: please explain

Merging

  • Merge to mullvad-browser - !fixups to mullvad-browser-specific commits, new features, security backports
  • Merge to base-browser -!fixups to base-browser-specific commits, new features to be shared with tor-browser
    • NOTE: if your changeset includes patches to both base-browser and mullvad-browser please clearly label in the change description which commits should be cherry-picked to base-browser after merging

Issue Tracking

Review

Request Reviewer

  • Request review from an applications developer depending on modified system:
    • NOTE: if the MR modifies multiple areas, please /cc all the relevant reviewers (since gitlab only allows 1 reviewer)
    • accessibility : henry
    • android : clairehurst, dan
    • build system : boklm
    • extensions : ma1
    • firefox internals (XUL/JS/XPCOM) : ma1
    • fonts : pierov
    • frontend (implementation) : henry
    • frontend (review) : donuts, richard
    • localization : henry, pierov
    • macos : clairehurst, dan
    • nightly builds : boklm
    • rebases/release-prep : dan, ma1, pierov, richard
    • security : ma1
    • signing : boklm, richard
    • updater : pierov
    • misc/other : pierov, richard

Change Description

This MR does three four things:

  1. re-enables calling a post-update executable (it does so also in Tor Browser! And it will fail, but it isn't a big deal, as the only bad consequence is writing on stderr! But we can also add a Tor Browser commit to re-disable it in case)
  2. customize the path to the postupdate binary (I changed it to emphasize it isn't the same as Firefox)
  3. expose whether the installation is portable or not to JS (not strictly needed for this, but it'll be probably needed for the default browser)
  4. updates the update root directory when not running in portable mode (to avoid writing an UpdateInfo directory in %appData)

How Tested

For the postupdate:

  1. built two nightlies with custom updater URL to check the updater
  2. checked that the version in the control panel entry is updated after the update
  3. checked that running postupdate.exe in a portable install doesn't update the registry
  4. checked that running postupdate.exe can delete the tobedeleted directory (it doesn't always work because of Windows locks, but it works when you call postupdate.exe separately)

For the portable mode I ran this in the JS console and checked I got the expected output:

const xreDirProvider = Cc["@mozilla.org/xre/directory-provider;1"].getService(Ci.nsIXREDirProvider);
xreDirProvider.isPortableMode

For the update directory, you can get it with:

Services.dirsvc.get("UpdRootD", Ci.nsIFile).path

Link to the build: https://tb-build-03.torproject.org/~pierov/mullvadbrowser/nightly/tbb-nightly.2024.01.10/mullvad-browser-windows-x86_64-install-tbb-nightly.2024.01.10.exe

Edited by Pier Angelo Vendrame

Merge request reports