summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorgrizzlyuser <grizzlyuser@protonmail.com>2021-04-04 23:25:20 +0300
committerbill-auger <mr.j.spam.me@gmail.com>2021-04-08 11:12:58 -0400
commit88a6d06409b93d4aa4a82cf95486a3fc9d68995c (patch)
tree59019afa99671a36f7a7dfa5fd07783383398331 /libre
parent9f45f935ac5c57381ee9580d84f40189c2ba8994 (diff)
downloadabslibre-88a6d06409b93d4aa4a82cf95486a3fc9d68995c.tar.gz
abslibre-88a6d06409b93d4aa4a82cf95486a3fc9d68995c.tar.bz2
abslibre-88a6d06409b93d4aa4a82cf95486a3fc9d68995c.zip
libre/iceweasel: refactor some prefs overrides
Preference overrides from vendor.js are not connected to the code, so they tend to bit rot quite quickly. Also, they only hide the problem, because the source code still contains references to nonfree stuff. Patching has a downside too. If upstream adds an override for some patched preference in a new place, it's likely to take precedence over the patch. Solution for this problem is TBD. But there are ways to override our vendor.js too, so either approach is prone to this. For now, go on with the patching approach. Also drop the override for ui.key.menuAccessKeyFocuses as I don't see how this is related to freedom issues. Let's stick as close to upstream as possible. geo.wifi.uri was probably removed upstream as I wasn't able to find it anywhere in the source tree.
Diffstat (limited to 'libre')
-rw-r--r--libre/iceweasel/9002-preference-defaults.patch117
-rw-r--r--libre/iceweasel/9003-misc-libre.patch (renamed from libre/iceweasel/9002-misc-libre.patch)42
-rw-r--r--libre/iceweasel/PKGBUILD15
-rw-r--r--libre/iceweasel/vendor.js.in13
4 files changed, 127 insertions, 60 deletions
diff --git a/libre/iceweasel/9002-preference-defaults.patch b/libre/iceweasel/9002-preference-defaults.patch
new file mode 100644
index 000000000..29fde8276
--- /dev/null
+++ b/libre/iceweasel/9002-preference-defaults.patch
@@ -0,0 +1,117 @@
+From 0143513a7ec9760176d83bbab29369026e75d9b3 Mon Sep 17 00:00:00 2001
+From: grizzlyuser <grizzlyuser@protonmail.com>
+Date: Sun, 4 Apr 2021 13:09:05 +0300
+Subject: [PATCH 1/2] geolocation: Disable API and remove Google API URLs
+
+The idea for Iceweasel is to reference only services which can be
+self-hosted using 100% free software stack.
+
+At the moment, upstream uses Google Geolocation API by default for
+release builds. There's also a special configuration for Nightly and
+early Beta builds to use Mozilla Location Services.
+
+Since I couldn't find the source code of Google Geolocation API, let's
+assume it's nonfree. So removed the URLs.
+
+Mozilla Location Services need further evaluation. But as we don't ship
+Nightly or Beta builds and strive to stick as close to upstream as
+possible while keeping the SW stack 100% free, release builds don't have
+any valid geolocation provider, so let's disable geolocation API by
+default for now.
+---
+ modules/libpref/init/StaticPrefList.yaml | 2 +-
+ modules/libpref/init/all.js | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
+index f9befc42b4..2d8f509a1a 100644
+--- a/modules/libpref/init/StaticPrefList.yaml
++++ b/modules/libpref/init/StaticPrefList.yaml
+@@ -4112,7 +4112,7 @@
+ # Is support for Navigator.geolocation enabled?
+ - name: geo.enabled
+ type: bool
+- value: true
++ value: false
+ mirror: always
+
+ # Time, in milliseconds, to wait for the location provider to spin up.
+diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
+index c7cde8917c..26b724350f 100644
+--- a/modules/libpref/init/all.js
++++ b/modules/libpref/init/all.js
+@@ -3791,13 +3791,13 @@ pref("network.psl.onUpdate_notify", false);
+ // All the Geolocation preferences are here.
+ //
+ #ifndef EARLY_BETA_OR_EARLIER
+- pref("geo.provider.network.url", "https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_LOCATION_SERVICE_API_KEY%");
++ pref("geo.provider.network.url", "");
+ #else
+ // Use MLS on Nightly and early Beta.
+ pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
+ // On Nightly and early Beta, make duplicate location services requests
+ // to google so we can compare results.
+- pref("geo.provider.network.compare.url", "https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_LOCATION_SERVICE_API_KEY%");
++ pref("geo.provider.network.compare.url", "");
+ #endif
+
+ // Timeout to wait before sending the location request.
+--
+2.31.1
+
+
+From 3442b524f614edad5461ceaa44a5c8640815765a Mon Sep 17 00:00:00 2001
+From: grizzlyuser <grizzlyuser@protonmail.com>
+Date: Sun, 4 Apr 2021 13:49:05 +0300
+Subject: [PATCH 2/2] Disable banners and remove URLs for mobile apps on
+ about:protections page
+
+---
+ browser/app/profile/firefox.js | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
+index ef44a16daa..2feabdc67f 100644
+--- a/browser/app/profile/firefox.js
++++ b/browser/app/profile/firefox.js
+@@ -1756,15 +1756,15 @@ pref("browser.contentblocking.report.monitor.enabled", true);
+ pref("browser.contentblocking.report.proxy.enabled", false);
+
+ // Disable the mobile promotion by default.
+-pref("browser.contentblocking.report.show_mobile_app", true);
++pref("browser.contentblocking.report.show_mobile_app", false);
+
+ // Enable the vpn card by default.
+-pref("browser.contentblocking.report.vpn.enabled", true);
++pref("browser.contentblocking.report.vpn.enabled", false);
+ // Only show vpn card to certain regions. Comma separated string of two letter ISO 3166-1 country codes.
+ pref("browser.contentblocking.report.vpn_regions", "us,ca,nz,sg,my,gb");
+ // Comma separated string of mozilla vpn supported platforms.
+ pref("browser.contentblocking.report.vpn_platforms", "win");
+-pref("browser.contentblocking.report.hide_vpn_banner", false);
++pref("browser.contentblocking.report.hide_vpn_banner", true);
+ pref("browser.contentblocking.report.vpn_sub_id", "sub_HrfCZF7VPHzZkA");
+
+ pref("browser.contentblocking.report.monitor.url", "https://monitor.firefox.com/?entrypoint=protection_report_monitor&utm_source=about-protections");
+@@ -1775,12 +1775,12 @@ pref("browser.contentblocking.report.monitor.home_page_url", "https://monitor.fi
+ pref("browser.contentblocking.report.manage_devices.url", "https://accounts.firefox.com/settings/clients");
+ pref("browser.contentblocking.report.endpoint_url", "https://monitor.firefox.com/user/breach-stats?includeResolved=true");
+ pref("browser.contentblocking.report.proxy_extension.url", "https://fpn.firefox.com/browser?utm_source=firefox-desktop&utm_medium=referral&utm_campaign=about-protections&utm_content=about-protections");
+-pref("browser.contentblocking.report.mobile-ios.url", "https://apps.apple.com/app/firefox-private-safe-browser/id989804926");
+-pref("browser.contentblocking.report.mobile-android.url", "https://play.google.com/store/apps/details?id=org.mozilla.firefox&referrer=utm_source%3Dprotection_report%26utm_content%3Dmobile_promotion");
+-pref("browser.contentblocking.report.vpn.url", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=about-protections-card");
+-pref("browser.contentblocking.report.vpn-promo.url", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=about-protections-top-promo");
+-pref("browser.contentblocking.report.vpn-android.url", "https://play.google.com/store/apps/details?id=org.mozilla.firefox.vpn&referrer=utm_source%3Dfirefox-browser%26utm_medium%3Dfirefox-browser%26utm_campaign%3Dabout-protections-mobile-vpn%26anid%3D--");
+-pref("browser.contentblocking.report.vpn-ios.url", "https://apps.apple.com/us/app/firefox-private-network-vpn/id1489407738");
++pref("browser.contentblocking.report.mobile-ios.url", "");
++pref("browser.contentblocking.report.mobile-android.url", "");
++pref("browser.contentblocking.report.vpn.url", "");
++pref("browser.contentblocking.report.vpn-promo.url", "");
++pref("browser.contentblocking.report.vpn-android.url", "");
++pref("browser.contentblocking.report.vpn-ios.url", "");
+
+ // Protection Report's SUMO urls
+ pref("browser.contentblocking.report.lockwise.how_it_works.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/password-manager-report");
+--
+2.31.1
+
diff --git a/libre/iceweasel/9002-misc-libre.patch b/libre/iceweasel/9003-misc-libre.patch
index 2ace07266..a60c35f0f 100644
--- a/libre/iceweasel/9002-misc-libre.patch
+++ b/libre/iceweasel/9003-misc-libre.patch
@@ -268,48 +268,6 @@ index 4c4ea76..e0f2880 100644
-# The default set of protocol handlers for ircs:
-gecko.handlerService.schemes.ircs.0.name=Mibbit
-gecko.handlerService.schemes.ircs.0.uriTemplate=https://www.mibbit.com/?url=%s
-diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
-index 2588a53cf2..e818b254d2 100644
---- a/browser/app/profile/firefox.js
-+++ b/browser/app/profile/firefox.js
-@@ -1726,15 +1726,15 @@ pref("browser.contentblocking.report.monitor.enabled", true);
- pref("browser.contentblocking.report.proxy.enabled", false);
-
- // Disable the mobile promotion by default.
--pref("browser.contentblocking.report.show_mobile_app", true);
-+pref("browser.contentblocking.report.show_mobile_app", false);
-
- // Enable the vpn card by default.
--pref("browser.contentblocking.report.vpn.enabled", true);
-+pref("browser.contentblocking.report.vpn.enabled", false);
- // Only show vpn card to certain regions. Comma separated string of two letter ISO 3166-1 country codes.
- pref("browser.contentblocking.report.vpn_regions", "us,ca,nz,sg,my,gb");
- // Comma separated string of mozilla vpn supported platforms.
- pref("browser.contentblocking.report.vpn_platforms", "win");
--pref("browser.contentblocking.report.hide_vpn_banner", false);
-+pref("browser.contentblocking.report.hide_vpn_banner", true);
- pref("browser.contentblocking.report.vpn_sub_id", "sub_HrfCZF7VPHzZkA");
-
- pref("browser.contentblocking.report.monitor.url", "https://monitor.firefox.com/?entrypoint=protection_report_monitor&utm_source=about-protections");
-@@ -1745,12 +1745,12 @@ pref("browser.contentblocking.report.monitor.home_page_url", "https://monitor.fi
- pref("browser.contentblocking.report.manage_devices.url", "https://accounts.firefox.com/settings/clients");
- pref("browser.contentblocking.report.endpoint_url", "https://monitor.firefox.com/user/breach-stats?includeResolved=true");
- pref("browser.contentblocking.report.proxy_extension.url", "https://fpn.firefox.com/browser?utm_source=firefox-desktop&utm_medium=referral&utm_campaign=about-protections&utm_content=about-protections");
--pref("browser.contentblocking.report.mobile-ios.url", "https://apps.apple.com/app/firefox-private-safe-browser/id989804926");
--pref("browser.contentblocking.report.mobile-android.url", "https://play.google.com/store/apps/details?id=org.mozilla.firefox&referrer=utm_source%3Dprotection_report%26utm_content%3Dmobile_promotion");
--pref("browser.contentblocking.report.vpn.url", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=about-protections-card");
--pref("browser.contentblocking.report.vpn-promo.url", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=about-protections-top-promo");
--pref("browser.contentblocking.report.vpn-android.url", "https://play.google.com/store/apps/details?id=org.mozilla.firefox.vpn&referrer=utm_source%3Dfirefox-browser%26utm_medium%3Dfirefox-browser%26utm_campaign%3Dabout-protections-mobile-vpn%26anid%3D--");
--pref("browser.contentblocking.report.vpn-ios.url", "https://apps.apple.com/us/app/firefox-private-network-vpn/id1489407738");
-+pref("browser.contentblocking.report.mobile-ios.url", "");
-+pref("browser.contentblocking.report.mobile-android.url", "");
-+pref("browser.contentblocking.report.vpn.url", "");
-+pref("browser.contentblocking.report.vpn-promo.url", "");
-+pref("browser.contentblocking.report.vpn-android.url", "");
-+pref("browser.contentblocking.report.vpn-ios.url", "");
-
- // Protection Report's SUMO urls
- pref("browser.contentblocking.report.lockwise.how_it_works.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/password-manager-report");
diff --git a/browser/components/protections/content/protections.ftl b/browser/components/protections/content/protections.ftl
index 5ac8a7b08c..fec81698e3 100644
--- a/browser/components/protections/content/protections.ftl
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD
index 1927046a3..ac96aca2a 100644
--- a/libre/iceweasel/PKGBUILD
+++ b/libre/iceweasel/PKGBUILD
@@ -74,7 +74,8 @@ source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-
$pkgname.desktop)
source+=(https://repo.parabola.nu/other/iceweasel/${pkgname}_${_brandingver}.branding.tar.xz{,.sig}
9001-always-sync-remote-settings-with-local-dump.patch
- 9002-misc-libre.patch
+ 9002-preference-defaults.patch
+ 9003-misc-libre.patch
process-json-files.py
vendor.js.in)
source_armv7h=(arm.patch
@@ -92,9 +93,10 @@ sha256sums_armv7h=('bc00516032330760444939c516a60c78f868631e1b37f075f0fe71a53737
sha256sums+=('79c957263eb8eb99cdb5cbadf689883b04d4ad197ab956a1dbd1576bfbdce9ae'
'SKIP'
'46171d428125c524c03588f1c5fbb7778e68ef558b5faa54be84f4df5e546427'
- 'a6afaac11aa0b8ff6d32470681df54a2acfe8f8b62afe0c19dc168b1424ba098'
+ '219648efd053ffff3411dfd85935e1e9aabfcaf5bbbf65caad3d4f7300452859'
+ '49850224333848f3076564e8159aa80c1a30474a37ebb924bc205b9000cd5ff4'
'c38c5f5937bcedcd5645d63bf5787e0336d0b006b29f64c45414bc3a6e83c3be'
- '714998c5fc379f54a66ff80a845b7880169cd5b4094b77b719a99d33b65c0940')
+ '8feda46c5f3eaf4cb8b75049a1d546d7cb364a0d84bad44d397d3de19025b198')
validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases <release@mozilla.com>
validpgpkeys+=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin
validpgpkeys+=('3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40') # bill-auger
@@ -362,9 +364,12 @@ END
python ../process-json-files.py "${srcdir}"/firefox-${pkgver} "${brandingsrcdir}"
+ echo "applying 9002-preference-defaults.patch"
+ patch -Np1 --no-backup-if-mismatch -i "${srcdir}"/9002-preference-defaults.patch
+
# Remove remaining non-free bits
- echo "applying 9002-misc-libre.patch"
- patch -Np1 --no-backup-if-mismatch -i "${srcdir}"/9002-misc-libre.patch
+ echo "applying 9003-misc-libre.patch"
+ patch -Np1 --no-backup-if-mismatch -i "${srcdir}"/9003-misc-libre.patch
}
build() {
diff --git a/libre/iceweasel/vendor.js.in b/libre/iceweasel/vendor.js.in
index d67ae2fb0..3b3cb3686 100644
--- a/libre/iceweasel/vendor.js.in
+++ b/libre/iceweasel/vendor.js.in
@@ -12,15 +12,6 @@
|*| However, they don't seem to be causing any of the critical issues.
\*/
-// Disable "alt" as a shortcut key to open full menu bar. Conflicts with "alt" as a modifier
-pref("ui.key.menuAccessKeyFocuses", false);
-
-// Disable the GeoLocation API for content
-pref("geo.enabled", false);
-
-// Make sure that the request URL of the GeoLocation backend is empty
-pref("geo.wifi.uri", "");
-
// Google Widevine DRM
// https://blog.mozilla.org/futurereleases/2016/04/08/mozilla-to-test-widevine-cdm-in-firefox-nightly/
// https://wiki.mozilla.org/QA/Widevine_CDM
@@ -226,10 +217,6 @@ pref("app.faqURL", "http://libreplanet.org/wiki/Group:IceCat/FAQ");
pref("pfs.datasource.url", "http://gnuzilla.gnu.org/plugins/PluginFinderService.php?mimetype=%PLUGIN_MIMETYPE%");
pref("pfs.filehint.url", "http://gnuzilla.gnu.org/plugins/PluginFinderService.php?mimetype=%PLUGIN_MIMETYPE%");
-// Geolocation depends on third party services
-pref("geo.enabled", false);
-pref("geo.wifi.uri", "");
-
// Disable heartbeat
pref("browser.selfsupport.url", "");