Dear Maintainers,

The current bookworm version 1:102.15.1-1~deb12u1 of Thunderbird
still has opt-*out*, not opt-in, for telemetry. While we don't
seem to have a formal Debian policy on this, it would be within
the spirit of Debian to set this to opt-in, not opt-out.

We do have some warnings at https://wiki.debian.org/PrivacyIssues,
but better that telemetry options are patched to be opt-in, not
opt-out. This is what people would expect from Debian.

The opt-out telemetry that I could find is this:

./python/mozbuild/mozbuild/test/test_telemetry_settings.py-135-
./python/mozbuild/mozbuild/test/test_telemetry_settings.py-136-def 
test_initialize_noop_when_telemetry_disabled_env(monkeypatch):
./python/mozbuild/mozbuild/test/test_telemetry_settings.py:137:    
monkeypatch.setenv("DISABLE_TELEMETRY", "1")
./python/mozbuild/mozbuild/test/test_telemetry_settings.py-138-    with 
mock.patch("mach.telemetry.record_telemetry_settings") as record_mock:
./python/mozbuild/mozbuild/test/test_telemetry_settings.py-139-        
did_prompt = _initialize_telemetry(None, False)
--
./python/mach/mach/telemetry.py-100-
./python/mach/mach/telemetry.py-101-def is_telemetry_enabled(settings):
./python/mach/mach/telemetry.py:102:    if os.environ.get("DISABLE_TELEMETRY") == 
"1":
./python/mach/mach/telemetry.py-103-        return False
./python/mach/mach/telemetry.py-104-
--
./python/mach/mach/telemetry.py-289-        state_dir = Path(state_dir)
./python/mach/mach/telemetry.py-290-
./python/mach/mach/telemetry.py:291:    if os.environ.get("DISABLE_TELEMETRY") == 
"1":
./python/mach/mach/telemetry.py-292-        return
./python/mach/mach/telemetry.py-293-


So I propose the following patch:

================================================================================
--- python/mach/mach/telemetry.py.orig  2023-10-21 00:34:41.135764889 +0200
+++ python/mach/mach/telemetry.py       2023-10-21 01:05:01.073107778 +0200


 def is_telemetry_enabled(settings):
-    if os.environ.get("DISABLE_TELEMETRY") == "1":
+    if os.environ.get("DISABLE_TELEMETRY") == "0":
+        return True
+    else:
         return False

     return settings.mach_telemetry.is_enabled
================================================================================

to switch from opt-out to opt-in. *Unless* the user has set DISABLE_TELEMETRY 
to 0,
the value of settings.mach_telemetry.is_enabled will be 'False'. (Python experts
might wish to leave the 'else' part blank, but making the alternative explicit
is safer and more readable.)

I haven't tested this, though 
./python/mozbuild/mozbuild/test/test_telemetry_settings.py
is presumably used for testing it, and the test might have to be toggled in
order to pass with the ethically correct value: opt-in.

Cheers
Boud

Reply via email to