diff options
author | Mark H Weaver <mhw@netris.org> | 2023-09-25 17:47:50 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2023-09-26 07:41:43 -0400 |
commit | 497cdf100f405204a22f5de96f142b9d040697e8 (patch) | |
tree | a13447dc86d8e7b7c809aab95bfbbf2403792ee4 | |
parent | 400fbfdbc0c1ac9c68c9f52fd2ab6899bc8e8bd0 (diff) |
Update to 115.3.0.
Thanks to Chippy <chippy@classictetris.net> for providing preliminary
patches upon which these changes are based.
* makeicecat (FFMAJOR, FFMINOR, SOURCEBALL_CHECKSUM): Update to 115.3.0.
(fail, skip_thru_matching_endif, remove_if_block)
(remove_if_block_in_file, sort_inner_list)
(sort_inner_list_in_file): New shell functions.
(configure, configure_search, apply_branding)
(apply_batch_branding): Adapt to upstream changes.
* data/patches/about-addons.patch: Adapt as needed.
* data/patches/fix-data-reporting-check.patch,
data/patches/reproducible-langpacks.patch: Remove obsolete patches.
* data/settings.js: Block undesirable functionality.
Use <https://gnuzilla.gnu.org/mozzarella> in place
of <https://gnuzilla.gnu.org/extensions>.
-rw-r--r-- | data/patches/about-addons.patch | 29 | ||||
-rw-r--r-- | data/patches/fix-data-reporting-check.patch | 22 | ||||
-rw-r--r-- | data/patches/reproducible-langpacks.patch | 45 | ||||
-rw-r--r-- | data/settings.js | 33 | ||||
-rwxr-xr-x | makeicecat | 121 |
5 files changed, 146 insertions, 104 deletions
diff --git a/data/patches/about-addons.patch b/data/patches/about-addons.patch index dae5a0d..4427c46 100644 --- a/data/patches/about-addons.patch +++ b/data/patches/about-addons.patch @@ -1,22 +1,25 @@ --- a/toolkit/mozapps/extensions/content/aboutaddons.html +++ b/toolkit/mozapps/extensions/content/aboutaddons.html -@@ -65,8 +65,8 @@ +@@ -174,12 +174,12 @@ <template name="addon-page-header"> <div class="sticky-container"> <div class="main-search"> -- <label for="search-addons" class="search-label" data-l10n-id="default-heading-search-label"></label> -- <search-addons data-l10n-id="search-header-shortcut" data-l10n-attrs="key"></search-addons> -+ <label hidden="true" for="search-addons" class="search-label" data-l10n-id="default-heading-search-label"></label> -+ <search-addons hidden="true" data-l10n-id="search-header-shortcut" data-l10n-attrs="key"></search-addons> +- <label ++ <label hidden="true" + for="search-addons" + class="search-label" + data-l10n-id="default-heading-search-label" + ></label> +- <search-addons></search-addons> ++ <search-addons hidden="true"></search-addons> </div> <div class="main-heading"> - <button class="back-button" action="go-back" data-l10n-id="header-back-button" hidden></button> -@@ -306,7 +306,7 @@ - <button class="primary" action="open-amo" data-l10n-id="find-more-addons"></button> + <button +@@ -660,6 +660,7 @@ </div> <div class="view-footer-item"> -- <a class="privacy-policy-link" data-l10n-id="privacy-policy" target="_blank"></a> -+ <a hidden="true" class="privacy-policy-link" data-l10n-id="privacy-policy" target="_blank"></a> - </div> - </template> - + <a ++ hidden="true" + class="privacy-policy-link" + data-l10n-id="privacy-policy" + target="_blank" diff --git a/data/patches/fix-data-reporting-check.patch b/data/patches/fix-data-reporting-check.patch deleted file mode 100644 index 99aac2a..0000000 --- a/data/patches/fix-data-reporting-check.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/old-configure.in -+++ b/old-configure.in -@@ -2783,7 +2783,7 @@ - dnl If we have any service that uploads data (and requires data submission - dnl policy alert), set MOZ_DATA_REPORTING. - dnl We need SUBST for build system and DEFINE for xul preprocessor. --if test -n "$MOZ_TELEMETRY_REPORTING" || test -n "$MOZ_SERVICES_HEALTHREPORT" || test -n "$MOZ_CRASHREPORTER" || test -n "$MOZ_NORMANDY"; then -+if test "$MOZ_TELEMETRY_REPORTING" = 1 || test "$MOZ_SERVICES_HEALTHREPORT" = 1 || test "$MOZ_CRASHREPORTER" = 1 || test "$MOZ_NORMANDY" = 1; then - MOZ_DATA_REPORTING=1 - AC_DEFINE(MOZ_DATA_REPORTING) - AC_SUBST(MOZ_DATA_REPORTING) ---- a/old-configure -+++ b/old-configure -@@ -10359,7 +10359,7 @@ - - - --if test -n "$MOZ_TELEMETRY_REPORTING" || test -n "$MOZ_SERVICES_HEALTHREPORT" || test -n "$MOZ_CRASHREPORTER" || test -n "$MOZ_NORMANDY"; then -+if test "$MOZ_TELEMETRY_REPORTING" = 1 || test "$MOZ_SERVICES_HEALTHREPORT" = 1 || test "$MOZ_CRASHREPORTER" = 1 || test "$MOZ_NORMANDY" = 1; then - MOZ_DATA_REPORTING=1 - cat >> confdefs.pytmp <<\EOF - (''' MOZ_DATA_REPORTING ''', ' 1 ') diff --git a/data/patches/reproducible-langpacks.patch b/data/patches/reproducible-langpacks.patch deleted file mode 100644 index b36a770..0000000 --- a/data/patches/reproducible-langpacks.patch +++ /dev/null @@ -1,45 +0,0 @@ -Prevent the extension manifests from embedding the current date. - -This is inspired by the Debian -"Use-build-id-as-langpack-version-for-reproducibility.patch" maintained for -their Firefox package as well as reproducible-builds.org guidelines from -https://reproducible-builds.org/docs/source-date-epoch/. - -Upstream status: https://phabricator.services.mozilla.com/D169979 - ---- ./python/mozbuild/mozbuild/action/langpack_manifest.py.old 2023-02-13 11:01:21.051537347 -0500 -+++ ./python/mozbuild/mozbuild/action/langpack_manifest.py 2023-02-13 11:04:33.141817330 -0500 -@@ -36,6 +36,15 @@ - pushlog_api_url = "{0}/json-rev/{1}" - - -+import os -+import time -+import datetime -+ -+def get_build_date(): -+ """Honor SOURCE_DATE_EPOCH for reproducibility.""" -+ return datetime.datetime.utcfromtimestamp( -+ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) -+ - ### - # Retrievers a UTC datetime of the push for the current commit - # from a mercurial clone directory. -@@ -54,7 +63,7 @@ - with mozversioncontrol.get_repository_object(path=path) as repo: - phase = repo._run("log", "-r", ".", "-T" "{phase}") - if phase.strip() != "public": -- return datetime.datetime.utcnow() -+ return get_build_date() - repo_url = repo._run("paths", "default") - repo_url = repo_url.strip().replace("ssh://", "https://") - repo_url = repo_url.replace("hg://", "https://") -@@ -105,7 +114,7 @@ - dt = get_dt_from_hg(path) - - if dt is None: -- dt = datetime.datetime.utcnow() -+ dt = get_build_date() - - dt = dt.replace(microsecond=0) - return dt.strftime("%Y%m%d%H%M%S") diff --git a/data/settings.js b/data/settings.js index 1c13b80..2beefb3 100644 --- a/data/settings.js +++ b/data/settings.js @@ -146,6 +146,8 @@ pref("camera.control.autofocus_moving_callback.enabled", false); pref("network.http.speculative-parallel-limit", 0); // No search suggestions pref("browser.urlbar.userMadeSearchSuggestionsChoice", true); +pref("browser.urlbar.groupLabels.enabled", false); +pref("browser.urlbar.merino.enabled", false); pref("browser.search.suggest.enabled", false); // Always ask before restoring the browsing session pref("browser.sessionstore.max_resumed_crashes", 0); @@ -158,6 +160,9 @@ pref("extensions.shield-recipe-client.enabled", false); pref("browser.newtabpage.directory.source", ""); pref("browser.newtabpage.directory.ping", ""); pref("browser.newtabpage.introShown", true); +pref("browser.topsites.contile.enabled", false); +pref("browser.topsites.contile.endpoint", ""); +pref("browser.topsites.contile.sov.enabled", false); // Always ask before restoring the browsing session pref("browser.sessionstore.max_resumed_crashes", 0); // Disable tracking protection by default, as it makes automated connections to fetch lists (not doing this until the newtab privacy block is reimplemented) @@ -202,6 +207,7 @@ pref("gecko.handlerService.schemes.webcal.0.name", ""); pref("gecko.handlerService.schemes.webcal.0.uriTemplate", ""); pref("gecko.handlerService.schemes.irc.0.name", ""); pref("gecko.handlerService.schemes.irc.0.uriTemplate", ""); +pref("browser.partnerlink.attributionURL", ""); // Disable channel updates pref("app.update.enabled", false); @@ -246,19 +252,19 @@ pref("extensions.blocklist.enabled", false); pref("font.default.x-western", "sans-serif"); // Preferences for the Get Add-ons panel -pref ("extensions.webservice.discoverURL", "https://gnuzilla.gnu.org/extensions"); -pref ("extensions.getAddons.search.url", "https://gnuzilla.gnu.org/extensions"); -pref ("extensions.getAddons.search.browseURL", "https://gnuzilla.gnu.org/extensions"); -pref ("extensions.getAddons.get.url", "https://gnuzilla.gnu.org/extensions"); -pref ("extensions.getAddons.link.url", "https://gnuzilla.gnu.org/extensions"); -pref ("extensions.getAddons.discovery.api_url", "https://gnuzilla.gnu.org/extensions"); +pref ("extensions.webservice.discoverURL", "https://gnuzilla.gnu.org/mozzarella"); +pref ("extensions.getAddons.search.url", "https://gnuzilla.gnu.org/mozzarella"); +pref ("extensions.getAddons.search.browseURL", "https://gnuzilla.gnu.org/mozzarella"); +pref ("extensions.getAddons.get.url", "https://gnuzilla.gnu.org/mozzarella"); +pref ("extensions.getAddons.link.url", "https://gnuzilla.gnu.org/mozzarella"); +pref ("extensions.getAddons.discovery.api_url", "https://gnuzilla.gnu.org/mozzarella"); pref ("extensions.systemAddon.update.url", ""); pref ("extensions.systemAddon.update.enabled", false); // FIXME: find better URLs for these: -pref ("extensions.getAddons.langpacks.url", "https://gnuzilla.gnu.org/extensions"); -pref ("lightweightThemes.getMoreURL", "https://gnuzilla.gnu.org/extensions"); +pref ("extensions.getAddons.langpacks.url", "https://gnuzilla.gnu.org/mozzarella"); +pref ("lightweightThemes.getMoreURL", "https://gnuzilla.gnu.org/mozzarella"); pref ("browser.geolocation.warning.infoURL", ""); pref ("browser.xr.warning.infoURL", ""); pref ("app.feedback.baseURL", ""); @@ -368,6 +374,9 @@ pref("browser.onboarding.newtour", "performance,private,addons,customize,default pref("browser.onboarding.updatetour", "performance,library,singlesearch,customize"); pref("browser.onboarding.enabled", false); +// Disable firefox-view (renamed to icecat-view by the batch renaming) +pref("browser.tabs.icecat-view", false); + // New tab settings pref("browser.newtabpage.activity-stream.default.sites", "https://www.gnu.org/,https://www.fsf.org/,https://directory.fsf.org/,https://libreplanet.org/,https://trisquel.info/,https://www.wikipedia.org/,https://www.wikinews.org/"); pref("browser.newtabpage.activity-stream.showTopSites",true); @@ -385,7 +394,9 @@ pref("dom.webnotifications.serviceworker.enabled",false); pref("dom.push.enabled",false); // Disable recommended extensions -pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr", false); +pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false); +pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false); +pref("browser.newtabpage.activity-stream.asrouter.providers.snippets", ""); pref("extensions.htmlaboutaddons.discover.enabled", false); pref("extensions.htmlaboutaddons.recommendations.enabled", false); @@ -407,3 +418,7 @@ pref("browser.contentblocking.report.vpn-promo.url", ""); pref("browser.contentblocking.report.vpn-android.url", ""); pref("browser.contentblocking.report.vpn-ios.url", ""); pref("browser.privatebrowsing.promoEnabled", false); +pref("browser.privatebrowsing.vpnpromourl", ""); +pref("browser.vpn_promo.enabled", false); +pref("browser.promo.focus.enabled", false); +pref("browser.promo.pin.enabled", false); @@ -21,11 +21,11 @@ # metadata -readonly FFMAJOR=102 -readonly FFMINOR=15 +readonly FFMAJOR=115 +readonly FFMINOR=3 readonly FFSUB=0 readonly GNUVERSION=1 -readonly SOURCEBALL_CHECKSUM='81fa590408f5a3af8f004d839ac47fb4121e05fe717334445cec9ca55d8746af' +readonly SOURCEBALL_CHECKSUM='8a1dc50b3d81df3b8ee8ef191551a355c9b139f09688a3fb61234b2f6d7670ca' readonly SOURCEBALL_SIGNINGKEY='14F26682D0916CDD81E37B6D61B7B526D98F0353' readonly FFVERSION=${FFMAJOR}.${FFMINOR}.${FFSUB} readonly SOURCEBALL=firefox-${FFVERSION}esr.source.tar.xz @@ -110,6 +110,82 @@ rename_files() done ) +fail() +{ + echo "ERROR:" "$@" 1>&2 + exit 1 +} + +skip_thru_matching_endif() +{ + [ $# -eq 0 ] || fail "skip_thru_matching_endif: expected 0 arguments, got $#" + local IFS='' + while true; do + read -r line || fail "skip_thru_matching_endif: matching endif not found" + case "$line" in + \#if*) skip_thru_matching_endif;; + \#endif*) break;; + esac + done +} + +remove_if_block() +{ + [ $# -eq 1 ] || fail "remove_if_block: expected 1 argument, got $#" + local start_line="$1" + local IFS='' + while true; do + read -r line || fail "remove_if_block: start line not found" + [ "$line" != "$start_line" ] || break + echo -E "$line" + done + skip_thru_matching_endif + while read -r line; do + echo -E "$line" + done +} + +remove_if_block_in_file() +{ + [ $# -eq 2 ] || fail "remove_if_block_in_file: expected 2 arguments, got $#" + local start_line="$1" + local file="$2" + remove_if_block "$start_line" < "$file" > "$file.tmp" && mv -- "$file.tmp" "$file" +} + +sort_inner_list() +{ + [ $# -eq 2 ] || fail "sort_inner_list: expected 2 arguments, got $#" + local start_line="$1" + local end_line="$2" + local IFS='' + + while true; do + read -r line || fail "sort_inner_list: start line not found" + echo -E "$line" + [ "$line" != "$start_line" ] || break + done + + while true; do + read -r line || fail "sort_inner_list: end line not found" + [ "$line" != "$end_line" ] || break + echo -E "$line" + done | sort + + echo -E "$end_line" + while read -r line; do + echo -E "$line" + done +} + +sort_inner_list_in_file() +{ + [ $# -eq 3 ] || fail "sort_inner_list_in_file: expected 3 arguments, got $#" + local start_line="$1" + local end_line="$2" + local file="$3" + sort_inner_list "$start_line" "$end_line" < "$file" > "$file.tmp" && mv -- "$file.tmp" "$file" +} ############################################################################### # main functions @@ -314,7 +390,7 @@ configure() # These are not condensed into a single sed script so that it # fails on individual commands that didn't change the source local activity_stream=browser/components/newtab/lib/ActivityStream.jsm - sed '/^const DEFAULT_SITES/,/^])\;/c const DEFAULT_SITES = new Map\([[""]]\);' -i browser/components/newtab/lib/DefaultSites.jsm + sed '/^const DEFAULT_SITES/,/^])\;/c const DEFAULT_SITES = new Map\([[""]]\);' -i browser/components/newtab/lib/DefaultSites.sys.mjs sed '/"showSponsored"/,/value/s/value: true/value: false/' -i $activity_stream sed '/ "telemetry"/,/value/s/value: true/value: false/' -i $activity_stream sed '/"section\.highlights\.includePocket"/,/value/s/value: true/value: false/' -i $activity_stream @@ -326,7 +402,7 @@ configure() sed '/layout_endpoint:/,/http/s/"http.*/"",/' -i $activity_stream sed '/name: "telemetry"/,/value/s/value: true/value: false/' -i $activity_stream sed '/name: "system\.topstories"/,/},/s/.*!!locales.*/false/' -i $activity_stream - sed 's/.Ubuntu., //' -i browser/components/newtab/css/activity-stream*.css + sed 's/Ubuntu, //' -i browser/components/newtab/css/activity-stream*.css sed '/^]$/d' -i browser/components/newtab/data/content/tippytop/top_sites.json sed 's/}$/},/' -i browser/components/newtab/data/content/tippytop/top_sites.json @@ -433,7 +509,7 @@ EOF /bin/sed '/appmenuitem-settings/,+1s/\(.*.label = \)\(.*\)/\1\2\nappmenuitem-icecat-settings =\n\1IceCat \2/' -i ./l10n/*/browser/browser/appmenu.ftl ./browser/locales/en-US/browser/appmenu.ftl # Disable remote settings server - sed '/REMOTE_SETTINGS_SERVER_URL/,/^$/s/http.*"/"/' -i toolkit/modules/AppConstants.jsm + sed '/REMOTE_SETTINGS_SERVER_URL/,/^$/s/http.*"/"/' -i toolkit/modules/AppConstants.sys.mjs # Build on trisquel sed '/^DEBIAN_DISTROS/s/$/\n "trisquel",/' -i ./python/mozboot/mozboot/bootstrap.py @@ -441,9 +517,6 @@ EOF configure_search() { - # Leak less info to DuckDuckGo. - sed '/"params"/,/],/d' -i browser/components/search/extensions/ddg/manifest.json - # Default DDG to HTML search. cp -a browser/components/search/extensions/ddg browser/components/search/extensions/ddg-js sed 's|/duckduckgo.com/|/html.duckduckgo.com/html/|' -i browser/components/search/extensions/ddg/manifest.json @@ -455,7 +528,7 @@ configure_search() # Process various JSON pre-configuration dumps. - python3 ../../tools/process-json-files.py . browser/components/extensions/schemas/ + python3 "${DATADIR}"/../tools/process-json-files.py . browser/components/extensions/schemas/ } configure_mobile() @@ -526,10 +599,9 @@ apply_branding() rm -rf ./browser/metro ./addon-sdk/source/doc/static-files/media ./b2g # Custom bookmarks - sed '/ifndef/,/endif/d' -i browser/base/content/default-bookmarks.html + remove_if_block_in_file "#ifndef NIGHTLY_BUILD" browser/base/content/default-bookmarks.html # Custom legal about pages - find l10n -wholename '*/brand.dtd' | xargs /bin/sed 's/trademarkInfo.part1.*/trademarkInfo.part1 "The IceCat logo is Copyright 2008-2015 Free Software Foundation, released under the terms of the GNU Lesser General Public License, version 3 or any later version.">/' -i find l10n -wholename '*/brand.ftl' | xargs /bin/sed 's/^trademarkInfo = .*/trademarkInfo = The IceCat logo is Copyright 2008-2015 Free Software Foundation, released under the terms of the GNU Lesser General Public License, version 3 or any later version./' -i local string for string in rights-intro-point-2 rights-intro-point-3 rights-intro-point-4 rights-intro-point-5 rights-intro-point-6 rights-webservices rights-safebrowsing @@ -553,6 +625,22 @@ apply_branding() # Hide extra links in about box sed '/releaseNotes.link/d' -i ./browser/base/content/aboutDialog.xhtml sed '/description.*helpus/,/description/d' -i ./browser/base/content/aboutDialog.xhtml + + # Remove tab-pickup elements from firefoxview + local sed_script=' +:top +/<script.*tab-pickup-/,/<\/script>/d +/<details.*tab-pickup-/,/<\/details>/d +# The following arranges to append an additional line into +# the pattern space and jump back to the top of the script +# whenever "<" is present but ">" is not. +/</{s/>/>/ +t +N +b top +} +' + sed -i "${sed_script}" browser/components/firefoxview/firefoxview.html } apply_batch_branding() @@ -623,7 +711,7 @@ s/OpenSource/Free Software/g; find . -depth | grep run-mozilla | rename_files -e s/mozilla/icecat/g # do not alter useragent/platform/oscpu/etc with fingerprinting countermeasure, it makes things worse - sed '/ShouldResistFingerprinting/,/}/s/^/\/\//' -i ./netwerk/protocol/http/nsHttpHandler.cpp + sed '/if (aShouldResistFingerprinting/,/}/s/^/\/\//' -i ./netwerk/protocol/http/nsHttpHandler.cpp sed '/If fingerprinting resistance is on/,/}/s/^/\/\//' -i ./dom/base/Navigator.cpp # Leave user agent as Firefox @@ -633,8 +721,11 @@ s/OpenSource/Free Software/g; find . -name region.properties | xargs -i /bin/sed 's_https://www\.mibbit.*__' -i {} # Set migrator scripts - cp browser/components/migration/IceCatProfileMigrator.jsm browser/components/migration/FirefoxProfileMigrator.jsm - sed 's/IceCat/Firefox/g; s/icecat/firefox/g' -i browser/components/migration/FirefoxProfileMigrator.jsm + cp browser/components/migration/IceCatProfileMigrator.sys.mjs browser/components/migration/FirefoxProfileMigrator.sys.mjs + sed 's/IceCat/Firefox/g; s/icecat/firefox/g' -i browser/components/migration/FirefoxProfileMigrator.sys.mjs + + # Sort the list of DevToolsModules, which becomes unsorted by our rebranding + sort_inner_list_in_file "DevToolsModules(" ")" devtools/client/netmonitor/src/connector/moz.build # Copy js settings cat "${DATADIR}"/settings.js >> browser/app/profile/icecat.js |