Project

General

Profile

Bug #16021

Don't override Debian's system-wide Thunderbird configuration

Added by anonym over 1 year ago. Updated 14 days ago.

Status:
Needs Validation
Priority:
Normal
Category:
-
Target version:
-
Start date:
10/02/2018
Due date:
% Done:

30%

Feature Branch:
https://gitlab.com/johanbluecreek/tails.git:bugfix/16021-avoid-overwriting-debian-thunderbird-config
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Email Client

Description

Due to config/chroot_local-includes/etc/thunderbird/pref/thunderbird.js we overwrite any pref changes made for the Debian package. I noticed this when working on #15942 and #15959 -- the needed setting for intl.locale.requested was overwritten by us. While I've fixed that one there's at least one more interesting setting:

// This setting is a workaround for some crashes inside the JS engine.
// By this Thunderbird will use more memory and acting slower as the sharing
// memory between interacting JS files is disabled.
pref ("javascript.options.baselinejit", false);

We should sync our config, and possibly consider using a patch instead so upstream changes are not silently lost like this.


Related issues

Blocks Tails - Feature #16209: Core work: Foundations Team Confirmed

Associated revisions

Revision 6db35b53 (diff)
Added by johanbluecreek 2 months ago

Moving local included thunderbird config to not overwrite debian default (Will-fix: #16021)

History

#1 Updated by anonym over 1 year ago

#2 Updated by intrigeri over 1 year ago

  • Subject changed from Sync with Debian's system-wide Thunderbird configuration to Don't override Debian's system-wide Thunderbird configuration
  • Assignee set to CyrilBrulebois
  • Target version set to Tails_3.12

I think a patch is the way to go, or even better, iff. the second definition overrides the first one when a pref is set twice in the same file, I would maintain a config/chroot_local-includes/usr/share/tails/thunderbird.js file and append it to the one installed by the Debian package at ISO build time.

IMO this can wait until December and 3.12 so no hurry, please focus on your 3.10 and Oct-Dec FT tasks first.

#3 Updated by CyrilBrulebois over 1 year ago

#4 Updated by CyrilBrulebois over 1 year ago

#5 Updated by CyrilBrulebois over 1 year ago

  • Related to deleted (Feature #15507: Core work 2019Q1: Foundations Team)

#6 Updated by CyrilBrulebois over 1 year ago

#7 Updated by intrigeri about 1 year ago

  • Target version changed from Tails_3.12 to Tails_3.13

#8 Updated by hefee about 1 year ago

Can't we have a /etc/thunderbird/pref/zz_tails.js or aa_tails.js, for not neet need to have patches for the thunderbird.js?

The comment inside /etc/thunderbird/pref/thunderbird.js are pointing that this should be possible:

// This is the Debian specific preferences file for Mozilla Thunderbird
// You can make any change in here, it is the purpose of this file.
// You can, with this file and all files present in the directory
//
//      /etc/thunderbird/pref directory
//
// override any preference that is present in the directory
//
//      /usr/lib/thunderbird/defaults/pref
//
// While your changes will be kept on upgrade if you modify files in
// /etc/thunderbird/pref, please note that they won't be kept if you
// do them in /usr/lib/thunderbird/defaults/pref.

For extensions you need to place those configuration in f.ex:
/etc/xul-ext/torbirdy.js
otherwise you can't overwrite configs from /usr/share/xul-ext/torbirdy/defaults/preferences/prefs.js

This at least looks for me the cleanest way to do, as we don't need to apply patches and Debian/Tails part is clearly separated etc.

#9 Updated by CyrilBrulebois about 1 year ago

AFAICT and IIRC: Having file snippets used to work, but support for that was broken/removed a few releases ago.

See fdcfa34e7d62df85329179b26ffcfdbad95098d7 and d6e440b0f44126f3c9371df155e72c4e5a2bddc3 for Torbirdy.

#10 Updated by CyrilBrulebois about 1 year ago

  • Assignee changed from CyrilBrulebois to intrigeri

Hey @intrigeri, this bug was punted already and I don't want to rush anything here; I'd rather concentrate on testing 60.5.1 instead. Any objections to postponing this ticket to 3.14? Sorry for the late notice; wasn't expecting to be so busy with Thunderbird itself. :/

#11 Updated by CyrilBrulebois about 1 year ago

FTAOD, current layout looks like this:

$ dpkg --contents thunderbird_60.5.1-1~deb9u1.0tails1_amd64.deb | grep pref
drwxr-xr-x root/root         0 2019-03-17 15:05 ./etc/thunderbird/pref/
-rw-r--r-- root/root      1759 2018-10-11 03:29 ./etc/thunderbird/pref/thunderbird.js
drwxr-xr-x root/root         0 2019-03-17 15:05 ./usr/share/thunderbird/defaults/pref/
-rw-r--r-- root/root       245 2019-03-17 15:05 ./usr/share/thunderbird/defaults/pref/channel-prefs.js
-rw-r--r-- root/root        73 2018-08-16 17:03 ./usr/share/thunderbird/defaults/pref/vendor.js
lrwxrwxrwx root/root         0 2019-03-17 15:05 ./usr/share/thunderbird/defaults/syspref -> /etc/thunderbird/pref

#12 Updated by intrigeri about 1 year ago

  • Target version changed from Tails_3.13 to Tails_3.14

I'd rather concentrate on testing 60.5.1 instead. Any objections to postponing this ticket to 3.14?

ACK: first things first.

#13 Updated by intrigeri about 1 year ago

#14 Updated by intrigeri about 1 year ago

#15 Updated by intrigeri about 1 year ago

  • Assignee changed from intrigeri to CyrilBrulebois

#16 Updated by CyrilBrulebois 10 months ago

  • Target version changed from Tails_3.14 to Tails_3.15

#17 Updated by intrigeri 10 months ago

  • Assignee deleted (CyrilBrulebois)
  • Target version deleted (Tails_3.15)

(As per our newly documented workflow, dropping target version and making this ticket up for grabs.)

#18 Updated by johanbluecreek 2 months ago

  • Assignee set to johanbluecreek

I'll take a look at this.

#19 Updated by johanbluecreek 2 months ago

  • Status changed from Confirmed to In Progress
  • Feature Branch set to https://gitlab.com/johanbluecreek/tails.git:bugfix/16021-avoid-overwriting-debian-thunderbird-config

This branch contains a fix where, as suggested by @hefee, the thunderbird.js is renamed aa_tails.js, which will be parsed by thunderbird after Debian's thunderbird.js. I have made sure this works by building the branch, verifying that aa_tails.js is present and all preferences set in that file are set to their correct value in about:config in thunderbird (verified by-eye).

The option mentioned by @anonym, javascript.options.baselinejit, has also been verified to now be the same as in Debian's thunderbird.js (false), and not thunderbird's default (true).

I also noticed that there were some preferences in (the file now called) aa_tails.js that were repeated, and those repetitions has been removed. I have verified that those preferences (mail.shell.checkDefaultMail and toolkit.telemetry.enabled) are still set to their desired values (both false) in about:config after the removal of the repeating lines.

The branch builds locally for me.

#20 Updated by anonym 2 months ago

  • % Done changed from 0 to 30
  • Feature Branch changed from https://gitlab.com/johanbluecreek/tails.git:bugfix/16021-avoid-overwriting-debian-thunderbird-config to bugfix/16021-avoid-overwriting-debian-thunderbird-config

Cheers! I pushed your branch to our infra so it will be tested.

#21 Updated by anonym 2 months ago

  • Status changed from In Progress to Needs Validation
  • Assignee deleted (johanbluecreek)

Jenkins is happy (only unrelated failures). Haven't manually tested the expected changes, however.

#22 Updated by hefee about 2 months ago

  • Assignee set to hefee

#23 Updated by hefee about 2 months ago

  • Status changed from Needs Validation to In Progress
  • Assignee changed from hefee to segfault

Thanks for all the testing of this approach.

Some things need to be done in oder to merge it:

  • Replace the header of the aa_tails.js, that tells that this is a Tails specific config file and not a Debian one.
  • Remove paragraph around `pref("intl.locale.requested", "");` as this is Debian default and Tails won't to intercept here
  • Remove `pref("network.protocol-handler.app.http", "x-www-browser");` and `pref("network.protocol-handler.app.https", "x-www-browser");` both are Debian defaults too
  • Add an explanaiation for `pref("extensions.update.enabled", false);` as Tails don't what to extensions to be updated, as this would introduce a source for manipulation.

I'm unsure, if we should also remove
```
// Disable default mail checking (gnome).
pref("mail.shell.checkDefaultMail", false);

// Disable default mail client check
pref("mail.shell.checkDefaultClient", false);
```

as those are default on Debian, too and I'm not sure, if Tails needs those to be set explicitly.
@segfault: what do you thunk, should remove these to from our tails settings file?

#24 Updated by segfault about 2 months ago

  • Assignee changed from segfault to johanbluecreek

@johanbluecreek: Thanks for working on this!

hefee wrote:

I'm unsure, if we should also remove
```
// Disable default mail checking (gnome).
pref("mail.shell.checkDefaultMail", false);

// Disable default mail client check
pref("mail.shell.checkDefaultClient", false);
```

as those are default on Debian, too and I'm not sure, if Tails needs those to be set explicitly.
@segfault: what do you thunk, should remove these to from our tails settings file?

I don't have a strong opinion, but I'm leaning towards keeping it, because IMO we don't want those checks even in the unlikely case that Debian will change its default behavior.

Not sure who I should assign this to. @johanbluecreek, do you want to address hefee's other remarks?

#25 Updated by johanbluecreek about 2 months ago

segfault wrote:

Not sure who I should assign this to. @johanbluecreek, do you want to address hefee's other remarks?

Sure, I'll take a shot at @hefee's comments.

#26 Updated by johanbluecreek 14 days ago

  • Status changed from In Progress to Needs Validation
  • Feature Branch changed from bugfix/16021-avoid-overwriting-debian-thunderbird-config to https://gitlab.com/johanbluecreek/tails.git:bugfix/16021-avoid-overwriting-debian-thunderbird-config

hefee wrote:

Some things need to be done in oder to merge it:

  • Replace the header of the aa_tails.js, that tells that this is a Tails specific config file and not a Debian one.

aa_tails.js now has a header indicating it contains Tails' preferences

  • Remove paragraph around `pref("intl.locale.requested", "");` as this is Debian default and Tails won't to intercept here

Removed

  • Remove `pref("network.protocol-handler.app.http", "x-www-browser");` and `pref("network.protocol-handler.app.https", "x-www-browser");` both are Debian defaults too

Removed as well

  • Add an explanaiation for `pref("extensions.update.enabled", false);` as Tails don't what to extensions to be updated, as this would introduce a source for manipulation.

Added an explanation here.

I also built the branch locally (after a rebase) and verified again that the appropriate preferences were set.

Also available in: Atom PDF