[tbb-commits] [tor-browser/tor-browser-81.0b2-10.0-1] fixup! Bug 4234: Use the Firefox Update Process for Tor Browser.
gk at torproject.org
gk at torproject.org
Wed Sep 9 09:59:13 UTC 2020
commit 9c3779909ba3aa4301341bdcb2ad535ee613c47d
Author: Alex Catarineu <acat at torproject.org>
Date: Fri Sep 4 17:53:04 2020 +0200
fixup! Bug 4234: Use the Firefox Update Process for Tor Browser.
---
tools/update-packaging/make_full_update.sh | 13 ----
tools/update-packaging/make_incremental_update.sh | 74 +----------------------
2 files changed, 2 insertions(+), 85 deletions(-)
diff --git a/tools/update-packaging/make_full_update.sh b/tools/update-packaging/make_full_update.sh
index cc75a21dd51a..603988997405 100755
--- a/tools/update-packaging/make_full_update.sh
+++ b/tools/update-packaging/make_full_update.sh
@@ -73,19 +73,6 @@ fi
list_files files
list_symlinks symlinks symlink_targets
-# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
-# we should remove the following lines (which remove entire directories
-# which, if present, contain old, unpacked copies of HTTPS Everywhere):
-# Make sure we delete the pre 5.1.0 HTTPS Everywhere as well in case it
-# exists. The extension ID got changed with the version bump to 5.1.0.
-ext_path='TorBrowser/Data/Browser/profile.default/extensions'
-if [ -d "$ext_dir" ]; then
- directories_to_remove="$ext_path/https-everywhere at eff.org $ext_path/https-everywhere-eff at eff.org"
-else
- directories_to_remove=""
-fi
-# END TOR_BROWSER_DATA_OUTSIDE_APP_DIR removal
-
popd
# Add the type of update to the beginning of the update manifests.
diff --git a/tools/update-packaging/make_incremental_update.sh b/tools/update-packaging/make_incremental_update.sh
index 2dd1e3077823..1adfef8fd96e 100755
--- a/tools/update-packaging/make_incremental_update.sh
+++ b/tools/update-packaging/make_incremental_update.sh
@@ -68,21 +68,6 @@ check_for_forced_update() {
## "true" *giggle*
return 0;
fi
-
-# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
-# we should remove the following lines:
- # If the file in the skip list ends with /*, do a prefix match.
- # This allows TorBrowser/Data/Browser/profile.default/extensions/https-everywhere-eff at eff.org/*
- # to be used to force all HTTPS Everywhere files to be updated.
- f_suffix=${f##*/}
- if [[ $f_suffix = "*" ]]; then
- f_prefix="${f%\/\*}";
- if [[ $forced_file_chk == $f_prefix* ]]; then
- ## 0 means "true"
- return 0;
- fi
- fi
-# END TOR_BROWSER_DATA_OUTSIDE_APP_DIR removal
done
## 'false'... because this is bash. Oh yay!
return 1;
@@ -135,12 +120,10 @@ archivefiles="updatev3.manifest"
# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
# we should remove the following lines:
-# If the NoScript or HTTPS Everywhere extensions have changed between
-# releases, add them to the "force updates" list.
+# If the NoScript extension has changed between
+# releases, add it to the "force updates" list.
ext_path='TorBrowser/Data/Browser/profile.default/extensions'
if [ -d "$newdir/$ext_path" ]; then
- https_everywhere_dir='https-everywhere-eff at eff.org'
- https_everywhere_xpi='https-everywhere-eff at eff.org.xpi'
noscript='{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi'
# NoScript is a packed extension, so we simply compare the old and the new
@@ -154,59 +137,6 @@ if [ -d "$newdir/$ext_path" ]; then
elif [ $rc -eq 1 ]; then
requested_forced_updates="$requested_forced_updates $noscript_path"
fi
-
- # As of HTTPS Everywhere 5.1.0, the extension ID gained "-eff".
- # As of HTTPS Everywhere 5.2.2, the extension is packed (i.e., it remains
- # an .xpi after it is installed in the browser profile).
- force_https_update=0
- remove_unpacked_https_e_dirs=0
- unpacked_https_e_install_rdf="$ext_path/$https_everywhere_dir/install.rdf"
- packed_https_e_path="$ext_path/$https_everywhere_xpi"
- if [ -d "$newdir/$ext_path/$https_everywhere_dir" ]; then
- # The new HTTPS-E extension is unpacked, and presumably the old one is
- # too. We need to determine if any of the unpacked files have changed.
- # Since that is messy, we simply compare the old install.rdf file to the
- # new one.
- diff "$olddir/$unpacked_https_e_install_rdf" \
- "$newdir/$unpacked_https_e_install_rdf" > /dev/null
- rc=$?
- if [ $rc -gt 1 -a -e "$olddir/$unpacked_https_e_install_rdf" ]; then
- notice "Unexpected exit $rc from $unpacked_https_e_install_rdf diff command"
- exit 2
- elif [ $rc -ge 1 ]; then
- force_https_update=1
- remove_unpacked_https_e_dirs=1
- # In case we still ship an unpacked HTTPS-E extension but the user has
- # updated to a packed one, arrange for the packed one to be removed.
- extra_files_to_remove="$extra_files_to_remove $packed_https_e_path"
- fi
- elif [ -d "$olddir/$ext_path/$https_everywhere_dir" ]; then
- # The old HTTPS-E extension is unpacked but the new one is packed.
- force_https_update=1
- remove_unpacked_https_e_dirs=1
- else
- # Both the old and new HTTPS-E extensions are packed. In this case we can
- # simply compare the .xpi files to determine if the extension has changed.
- diff -a "$olddir/$packed_https_e_path" "$newdir/$packed_https_e_path" > /dev/null
- rc=$?
- if [ $rc -gt 1 ]; then
- notice "Unexpected exit $rc from $packed_https_e_path diff command"
- exit 2
- elif [ $rc -eq 1 ]; then
- force_https_update=1
- fi
- fi
-
- if [ $force_https_update -ne 0 ]; then
- requested_forced_updates="$requested_forced_updates $ext_path/$https_everywhere_dir/* $packed_https_e_path"
- if [ "$remove_unpacked_https_e_dirs" -ne 0 ]; then
- # The old version was unpacked, so remove the entire directory to ensure
- # that the replace is "clean." Also, make sure we delete the pre 5.1.0
- # HTTPS Everywhere as well in case it exists (the extension ID got
- # changed with the version bump to 5.1.0).
- directories_to_remove="$directories_to_remove $ext_path/https-everywhere at eff.org $ext_path/$https_everywhere_dir"
- fi
- fi
fi
# END TOR_BROWSER_DATA_OUTSIDE_APP_DIR removal
More information about the tbb-commits
mailing list