Bug #16021
Don't override Debian's system-wide Thunderbird configuration
30%
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 Bug #15942 and Bug #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.
Subtasks
History
#1 Updated by anonym 2018-10-02 15:54:22
- blocks
Feature #15506: Core work 2018Q4: Foundations Team added
#2 Updated by intrigeri 2018-10-04 20:33:36
- 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 2018-12-30 14:59:06
- blocked by deleted (
)Feature #15506: Core work 2018Q4: Foundations Team
#4 Updated by CyrilBrulebois 2018-12-30 14:59:21
- related to
Feature #15507: Core work 2019Q1: Foundations Team added
#5 Updated by CyrilBrulebois 2018-12-30 15:03:53
- related to deleted (
)Feature #15507: Core work 2019Q1: Foundations Team
#6 Updated by CyrilBrulebois 2018-12-30 15:03:57
- blocks
Feature #15507: Core work 2019Q1: Foundations Team added
#7 Updated by intrigeri 2019-01-04 15:12:19
- Target version changed from Tails_3.12 to Tails_3.13
#8 Updated by hefee 2019-02-08 15:12:52
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:
<code class="js">
// 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.
</code>
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 2019-03-17 15:06:54
AFAICT and IIRC: Having file snippets used to work, but support for that was broken/removed a few releases ago.
See commit:fdcfa34e7d62df85329179b26ffcfdbad95098d7 and commit:d6e440b0f44126f3c9371df155e72c4e5a2bddc3 for Torbirdy.
#10 Updated by CyrilBrulebois 2019-03-17 15:26:39
- 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 2019-03-17 15:39:45
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 2019-03-17 15:45:51
- 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 2019-03-20 14:45:34
- blocks Feature #16209: Core work: Foundations Team added
#14 Updated by intrigeri 2019-03-20 14:45:53
- blocked by deleted (
)Feature #15507: Core work 2019Q1: Foundations Team
#15 Updated by intrigeri 2019-03-24 05:50:13
- Assignee changed from intrigeri to CyrilBrulebois
#16 Updated by CyrilBrulebois 2019-05-23 21:23:28
- Target version changed from Tails_3.14 to Tails_3.15
#17 Updated by intrigeri 2019-05-24 07:10:34
- 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 2020-01-21 10:30:24
- Assignee set to johanbluecreek
I’ll take a look at this.
#19 Updated by johanbluecreek 2020-01-27 13:27:04
- 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 2020-01-29 09:22:33
- % 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 2020-01-30 09:39:47
- 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 2020-02-03 14:02:05
- Assignee set to hefee
#23 Updated by hefee 2020-02-03 14:25:43
- 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 2020-02-09 18:55:46
- 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 2020-02-11 20:38:03
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 2020-03-18 09:47:47
- 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.