www-client/firefox-bin: disable Normandy service by default
authorThomas Deutschmann <whissi@gentoo.org>
Fri, 27 Mar 2020 22:43:21 +0000 (23:43 +0100)
committerThomas Deutschmann <whissi@gentoo.org>
Mon, 30 Mar 2020 11:45:08 +0000 (13:45 +0200)
Closes: https://bugs.gentoo.org/713782
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
www-client/firefox-bin/files/all-gentoo-3.js
www-client/firefox-bin/firefox-bin-68.6.0-r1.ebuild [moved from www-client/firefox-bin/firefox-bin-68.6.0.ebuild with 83% similarity]
www-client/firefox-bin/firefox-bin-74.0-r1.ebuild [moved from www-client/firefox-bin/firefox-bin-74.0.ebuild with 88% similarity]

index ddc782fde36cb436b699d7c96765d05e6a4c5890..867bf5e59a463294be1f7a123d3e2f8ff0c85030 100644 (file)
@@ -13,3 +13,10 @@ pref("browser.EULA.override", true);
 
 // We believe in user choice - disable DNS-over-HTTPS by default
 defaultPref("network.trr.mode", 5);
+
+// Normandy web service allows upstream to push changes
+// like changed default preferences or even add-ons to users
+// without the need to re-release a new version. Because this
+// happens without any user prompt we believe this should be
+// disabled by default.
+defaultPref("app.normandy.enabled", false);
similarity index 83%
rename from www-client/firefox-bin/firefox-bin-68.6.0.ebuild
rename to www-client/firefox-bin/firefox-bin-68.6.0-r1.ebuild
index d95d92d07396e11f2c6b3536f91d8cce5754724f..ebcea91ab14ee45ae0e2a3b28c17400d571bf4f2 100644 (file)
@@ -23,7 +23,7 @@ MOZ_P="${MOZ_PN}-${MOZ_PV}"
 
 MOZ_HTTP_URI="https://archive.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/"
 
-inherit mozlinguas-v2 nsplugins pax-utils xdg-utils
+inherit mozlinguas-v2 nsplugins pax-utils xdg-utils eapi7-ver
 
 DESCRIPTION="Firefox Web Browser"
 SRC_URI="${SRC_URI}
@@ -169,6 +169,10 @@ src_install() {
 }
 
 pkg_postinst() {
+       # Update mimedb for the new .desktop file
+       xdg_desktop_database_update
+       xdg_icon_cache_update
+
        if ! has_version 'gnome-base/gconf' || ! has_version 'gnome-base/orbit' \
                || ! has_version 'net-misc/curl'; then
                einfo
@@ -187,9 +191,38 @@ pkg_postinst() {
                ewarn "USE=-pulseaudio & USE=-alsa : For audio please either set USE=pulseaudio or USE=alsa!"
        fi
 
-       # Update mimedb for the new .desktop file
-       xdg_desktop_database_update
-       xdg_icon_cache_update
+       local show_normandy_information
+
+       if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+               # New install
+               show_normandy_information=yes
+       else
+               local replacing_version
+               for replacing_version in ${REPLACING_VERSIONS} ; do
+                       if ver_test "${replacing_version}" -lt 68.6.0-r1 ; then
+                               # Tell user only once about our Normandy default
+                               show_normandy_information=yes
+                               break
+                       fi
+               done
+       fi
+
+       # bug 713782
+       if [[ -n "${show_normandy_information}" ]] ; then
+               elog
+               elog "Upstream operates a service named Normandy which allows Mozilla to"
+               elog "push changes for default settings or even install new add-ons remotely."
+               elog "While this can be useful to address problems like 'Armagadd-on 2.0' or"
+               elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security"
+               elog "concerns prevail, which is why we have switched off the use of this"
+               elog "service by default."
+               elog
+               elog "To re-enable this service set"
+               elog
+               elog "    app.normandy.enabled=true"
+               elog
+               elog "in about:config."
+       fi
 }
 
 pkg_postrm() {
similarity index 88%
rename from www-client/firefox-bin/firefox-bin-74.0.ebuild
rename to www-client/firefox-bin/firefox-bin-74.0-r1.ebuild
index 8ec338ce7b01ba4ae2e82e5797e9f0a77c968b14..cb0124280426936585625c4a9abb999dd30928c7 100644 (file)
@@ -192,18 +192,23 @@ pkg_postinst() {
                ewarn "USE=-pulseaudio & USE=-alsa : For audio please either set USE=pulseaudio or USE=alsa!"
        fi
 
-       local show_doh_information
+       local show_doh_information show_normandy_information
 
        if [[ -z "${REPLACING_VERSIONS}" ]] ; then
                # New install; Tell user that DoH is disabled by default
                show_doh_information=yes
+               show_normandy_information=yes
        else
                local replacing_version
                for replacing_version in ${REPLACING_VERSIONS} ; do
                        if ver_test "${replacing_version}" -lt 70 ; then
                                # Tell user only once about our DoH default
                                show_doh_information=yes
-                               break
+                       fi
+
+                       if ver_test "${replacing_version}" -lt 74.0-r1 ; then
+                               # Tell user only once about our Normandy default
+                               show_normandy_information=yes
                        fi
                done
        fi
@@ -217,6 +222,23 @@ pkg_postinst() {
                elog "(\"Off by choice\") by default."
                elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences."
        fi
+
+       # bug 713782
+       if [[ -n "${show_normandy_information}" ]] ; then
+               elog
+               elog "Upstream operates a service named Normandy which allows Mozilla to"
+               elog "push changes for default settings or even install new add-ons remotely."
+               elog "While this can be useful to address problems like 'Armagadd-on 2.0' or"
+               elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security"
+               elog "concerns prevail, which is why we have switched off the use of this"
+               elog "service by default."
+               elog
+               elog "To re-enable this service set"
+               elog
+               elog "    app.normandy.enabled=true"
+               elog
+               elog "in about:config."
+       fi
 }
 
 pkg_postrm() {