Skip to content

Bug 41363: Make separate update_responses commit for each platform

boklm requested to merge boklm/tor-browser-build:bug_41363 into main

Merge Info

Issues

Resolves

Related

  • tor-browser-build#xxxxx
  • tor-browser#xxxxx
  • mullvad-browser#xxxxx

Merging

Target Branches

  • main: esr128-14.5
  • maint-14.0: esr128-14.0
  • maint-13.5: esr115-13.5

Backporting

Timeline

  • No Backport (preferred): patchset for the next major stable
  • 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

(Optional) Justification

  • Emergency security update: patchset fixes CVEs, 0-days, etc
  • Censorship event: patchset enables censorship circumvention
  • 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
  • Other: please explain

Issue Tracking

Uplifting

  • Patchset is a candidate for uplift to upstream projects (e.g. mingw, clang, etc)

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) : jwilde, ma1
    • fonts : pierov
    • frontend (implementation) : henry
    • frontend (review) : donuts, morgan
    • localization : henry, pierov
    • macOS : clairehurst, dan
    • nightly builds : boklm
    • rebases/release-prep : boklm, dan, ma1, morgan, pierov
    • security : jwilde, ma1
    • signing : boklm, morgan
    • updater : pierov
    • windows : jwilde, morgan
    • misc/other : morgan, pierov

Change Description

Based on !1147 (merged).

This changes how we generate the update-response files. Instead of having all xml files in the same directory with a single .htaccess file, we create a sub-directory containing the xml files and an .htaccess for each platform.

After this we change the script upload-update_responses-to-staticiforme to create separate commits for each platform.

How Tested

I generated update-responses for 14.5a3 and 14.0.6:

Then deployed them at the following URLs:

Using the following two scripts I checked that various update URLs return the same result as what we get from what is currently deployed on aus1.tpo:

#!/bin/bash
set -e

baseurl1=https://aus1.torproject.org/torbrowser/update_3
baseurl2=https://people.torproject.org/~boklm/tmp/test-update-responses/14.5a3

function check_url() {
  path="$1"
  echo "Checking $path URLs"
  tmp1=$(mktemp)
  tmp2=$(mktemp)
  wget -O "$tmp1" -q "$baseurl1/$path"
  wget -O "$tmp2" -q  "$baseurl2/$path"
  if diff -u "$tmp1" "$tmp2"; then
    echo "OK: $path"
  else
    echo "$path did not match"
    is_failed=1
  fi
  rm "$tmp1" "$tmp2"
}

check_url alpha/Darwin_x86_64-gcc3/14.5a1/ALL
check_url alpha/Darwin_x86_64-gcc3/14.5a2/ALL
check_url alpha/Darwin_x86_64-gcc3/14.5a99/ALL
check_url alpha/Darwin_x86_64-gcc3/14.0a9/ALL
check_url alpha/Darwin_x86_64-gcc3/10.0a5/ALL
check_url alpha/Darwin_x86_64-gcc3/13.5a3/ALL
check_url alpha/Darwin_aarch64-gcc3/14.5a1/ALL
check_url alpha/Darwin_aarch64-gcc3/14.5a2/ALL
check_url alpha/Darwin_aarch64-gcc3/14.5a99/ALL
check_url alpha/Linux_x86-gcc3/14.5a2/ALL
check_url alpha/Linux_x86_64-gcc3/14.5a1/ALL
check_url alpha/Linux_x86_64-gcc3/14.5a99/ALL
check_url alpha/Linux_x86_64-gcc3/14.0a9/ALL
check_url alpha/WINNT_x86-gcc3-x86/14.5a1/ALL
check_url alpha/WINNT_x86-gcc3-x86/14.5a99/ALL
check_url alpha/WINNT_x86-gcc3-x86/14.0a9/ALL
check_url alpha/WINNT_x86-gcc3-x64/14.5a1/ALL
check_url alpha/WINNT_x86-gcc3-x64/14.5a99/ALL
check_url alpha/WINNT_x86-gcc3-x64/14.0a9/ALL
check_url alpha/WINNT_x86-gcc3/14.5a1/ALL
check_url alpha/WINNT_x86-gcc3/14.5a99/ALL
check_url alpha/WINNT_x86-gcc3/14.0a9/ALL
check_url alpha/WINNT_x86_64-gcc3-x64/14.0a9/ALL


test -z "$is_failed" && echo "Everything OK"
#!/bin/bash
set -e

baseurl1=https://aus1.torproject.org/torbrowser/update_3
baseurl2=https://people.torproject.org/~boklm/tmp/test-update-responses/14.0.6

function check_url() {
  path="$1"
  echo "Checking $path URLs"
  tmp1=$(mktemp)
  tmp2=$(mktemp)
  wget -O "$tmp1" -q "$baseurl1/$path"
  wget -O "$tmp2" -q "$baseurl2/$path"
  if diff -u "$tmp1" "$tmp2"; then
    echo "OK: $path"
  else
    echo "$path did not match"
    is_failed=1
  fi
  rm "$tmp1" "$tmp2"
}

check_url release/Darwin_x86_64-gcc3/14.0.4/ALL
check_url release/Darwin_x86_64-gcc3/14.0.5/ALL
check_url release/Darwin_x86_64-gcc3/14.0.2/ALL
check_url release/Darwin_x86_64-gcc3/13.5.11/ALL
check_url release/Darwin_x86_64-gcc3/13.0.5/ALL
check_url release/Darwin_x86_64-gcc3/13.0.5/ALL
check_url release/Darwin_x86_64-gcc3/12.0.5/ALL
check_url release/Darwin_x86_64-gcc3/13.5.10/ALL
check_url release/Darwin_aarch64-gcc3/14.0.4/ALL
check_url release/Darwin_aarch64-gcc3/14.0.5/ALL
check_url release/Darwin_aarch64-gcc3/14.0.2/ALL
check_url release/Linux_x86-gcc3/14.0.5/ALL
check_url release/Linux_x86_64-gcc3/14.0.4/ALL
check_url release/Linux_x86_64-gcc3/14.0.2/ALL
check_url release/Linux_x86_64-gcc3/13.5.11/ALL
check_url release/WINNT_x86-gcc3-x86/14.0.4/ALL
check_url release/WINNT_x86-gcc3-x86/14.0.2/ALL
check_url release/WINNT_x86-gcc3-x86/13.5.11/ALL
check_url release/WINNT_x86-gcc3-x64/14.0.4/ALL
check_url release/WINNT_x86-gcc3-x64/14.0.2/ALL
check_url release/WINNT_x86-gcc3-x64/13.5.11/ALL
check_url release/WINNT_x86-gcc3/14.0.4/ALL
check_url release/WINNT_x86-gcc3/14.0.2/ALL
check_url release/WINNT_x86-gcc3/13.5.11/ALL
check_url release/WINNT_x86_64-gcc3-x64/13.5.11/ALL


test -z "$is_failed" && echo "Everything OK"

To test the upload-update_responses-to-staticiforme changes, I edited the script to exit before doing the git push, and did an update to 14.5a2 and then 14.5a3. I pushed the resulting commits to this branch: https://gitlab.torproject.org/boklm/tor-browser-update-responses/-/commits/test_TBB41363

Edited by boklm

Merge request reports

Loading