diff options
author | grizzlyuser <grizzlyuser@protonmail.com> | 2020-07-05 18:27:37 +0300 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2020-07-10 11:28:50 +0200 |
commit | e5bef2898d4f4c8bbc4a7ca745a1ea40651963f0 (patch) | |
tree | 4586c7acf493040973d16bb1b8addfd6ba5476b3 /libre | |
parent | 37699250ec779951c3b984be6308a3b3b00ebdc8 (diff) | |
download | abslibre-e5bef2898d4f4c8bbc4a7ca745a1ea40651963f0.tar.gz abslibre-e5bef2898d4f4c8bbc4a7ca745a1ea40651963f0.tar.bz2 abslibre-e5bef2898d4f4c8bbc4a7ca745a1ea40651963f0.zip |
libre/iceweasel: Disable data reporting in build config
MOZ_SERVICES_HEALTHREPORT and MOZ_NORMANDY are two missing bits to
undefine MOZ_DATA_REPORTING, which is defined if any one of
healthreporting, crashreporting, telemetry reporting, or Normandy are
set. Crashreporting and telemetry reporting have been already disabled.
Some data reporting related preferences and code are enabled when
MOZ_DATA_REPORTING is defined, for example.
These "features" are for Mozilla users only, they don't make much sense
for Iceweasel users. Probably even harmful for them and Mozilla too,
because I don't think Mozilla is interested in data reporting spam from
non-Firefox users.
I'm not sure if these features can be classified as back doors or
spyware in GNU FSDG terms, but that's another thing to consider.
Also added a check that fails the build if some of those features are
not disabled in configuration.
Signed-off-by: Andreas Grapentin <andreas@grapentin.org>
Diffstat (limited to 'libre')
-rw-r--r-- | libre/iceweasel/PKGBUILD | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD index 3f0661f0f..6ed720ee9 100644 --- a/libre/iceweasel/PKGBUILD +++ b/libre/iceweasel/PKGBUILD @@ -59,7 +59,7 @@ makedepends=(unzip zip diffutils yasm mesa imake inetutils xorg-server-xvfb autoconf2.13 rust clang llvm jack gtk2 nodejs cbindgen nasm python-setuptools python-psutil) # FIXME: 'mozilla-serarchplugins' package needs re-working (see note in prepare()) -makedepends+=(quilt libxslt imagemagick) +makedepends+=(quilt libxslt imagemagick git jq) optdepends=('networkmanager: Location detection via available WiFi networks' 'libnotify: Notification integration' 'pulseaudio: Audio support' @@ -252,6 +252,7 @@ END # Disable various components at the source level sed -i 's/;1/;0/' toolkit/components/telemetry/components.conf + sed -Ei 's/((MOZ_SERVICES_HEALTHREPORT|MOZ_NORMANDY).+)True/\1False/' browser/moz.configure #sed -i 's/;1/;0/' browser/experiments/Experiments.manifest #sed -i '/pocket/d' browser/extensions/moz.build #sed -i '/activity-stream/d' browser/extensions/moz.build @@ -294,6 +295,26 @@ END git init && git clean -dfX -e \!ipc/chromium/src/third_party/libevent/evconfig-private.h } +_check_build_config() { + echo "Checking build configuration..." + + # Configure produces mozinfo.json that reflects current configuration. + # See build/docs/mozinfo.rst + ./mach configure + + # In this test, jq collects values of the following keys of mozinfo.json into array, + # and checks if any of them are not equal to false, in which case it returns "true". + # E.g. if the value of any key is true or null (in case the key is missing from mozinfo.json), + # that means the build configuration has to be reworked. + local object_directory=$(./mach environment | sed -En '/object directory:/{n;s/^\s+//;p;}') + local features_not_disabled=$(cat "$object_directory/mozinfo.json" \ + | jq -e '[.crashreporter, .datareporting, .healthreport, .normandy, .telemetry, .updater] | any(. != false)') + if $features_not_disabled; then + echo 'Some features are not disabled correctly in build configuration files, aborting.' + return 1 + fi +} + build() { cd firefox-$pkgver @@ -371,6 +392,7 @@ build() { cat >.mozconfig ../mozconfig - <<END ac_add_options --enable-profile-generate=cross END + _check_build_config ./mach build echo "Profiling instrumented browser..." @@ -411,6 +433,7 @@ END # each of the [ARCH-SPECIFIC BUILD CONFIG] branches above should have created .mozconfig [[ ! -f .mozconfig ]] && echo ".mozconfig file not found in source root" && return 1 + _check_build_config echo "Building optimized browser..." ./mach build |