Project

General

Profile

Bug #12680

Persistent Thunderbird blocks future 0000tails.js prefs changes

Added by anonym about 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Elevated
Assignee:
-
Category:
Persistence
Target version:
Start date:
06/10/2017
Due date:
% Done:

100%

Feature Branch:
feature/12639-thunderbird-52
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Email Client

Description

Let's move config/chroot_local-includes/etc/skel/.thunderbird/profile.default/preferences/0000tails.js to /etc/thunderbird/profile/preferences/0000tails.js and make the former a symlink to the latter so any changes to this file will apply to persistent Thunderbird profiles.


Related issues

Related to Tails - Feature #12639: Upgrade Thunderbird to 52.x Resolved 06/05/2017
Related to Tails - Bug #15746: Don't display the Enigmail setup wizard by default when starting Thunderbird Resolved 07/22/2018
Blocks Tails - Feature #13234: Core work 2017Q3: Foundations Team Resolved 06/29/2017

Associated revisions

Revision 74f1aed4 (diff)
Added by anonym almost 2 years ago

Make our Thunderbird override prefs defeat persistence.

... as in, let's make our future changes propagate into existing
persistent Thunderbird profiles.

Will-fix: #12680

Revision 9fb685ea (diff)
Added by anonym almost 2 years ago

Deprecate Thunderbird's preferences/0000tails.js.

We've so far only used it to set Enigmail's configuredVersion
value. We couldn't use /etc/thunderbird/pref/thunderbird.js becaue
configuredVersion must be set via a user_pref to take affect, and that
file cannot set such prefs. However, we can use the extension
override, and completely automate this.

Note: in the thunderbird wrapper we still use 0000tails.js, but in
this instance it is ok, since it's only used for a value that we'll
set each time the wrapper is run.

Will-fix: #12680

Revision 0b20917d (diff)
Added by anonym almost 2 years ago

Remove any persistent preferences/0000tails.js in the Thunderbird profile.

Refs: #12680

Revision c485d465 (diff)
Added by intrigeri almost 2 years ago

Make indentation consistent (refs: #12680).

Revision a94cdaea (diff)
Added by anonym almost 2 years ago

Also remove Enigmail's configuredVersion from prefs.js.

For any Thunderbird profile that was ever used, that pref will be
present there as well.

Will-fix: #12680

Revision ddccd730 (diff)
Added by intrigeri almost 2 years ago

Make regexp match only what it should (refs: #12680).

"." is a regexp special char. We mean "." literally so it ought to be escaped.

Wrong:

$ echo 'user_pref("extensionsXenigmailYconfiguredVersion",' \
  | sed --regexp-extended \
'/^(user_)?pref\("extensions.enigmail.configuredVersion",/d'

Right:

$ echo 'user_pref("extensionsXenigmailYconfiguredVersion",' \
  | sed --regexp-extended \
'/^(user_)?pref\("extensions\.enigmail\.configuredVersion",/d'
user_pref("extensionsXenigmailYconfiguredVersion",

Revision 03c5e9f8
Added by intrigeri almost 2 years ago

Merge branch 'feature/12639-thunderbird-52' into devel (Fix-committed: #12680).

History

#1 Updated by intrigeri about 2 years ago

#2 Updated by intrigeri almost 2 years ago

That file currently has only one line:

user_pref("extensions.enigmail.configuredVersion", "1.9.7");

I think we will have to change that line in Tails 3.2, including changing it automatically in pre-existing persistent profiles, because #12639 will force us to upgrade enigmail. So we'll have to mangle user's data anyway in live-persist, and while we're at it we can as well replace the file with a symlink, so the change proposed on this ticket also applies to existing persistent profiles and we're future-proof :)

So 3.2 + #12639 seems the ideal time to work on this ticket.

#3 Updated by intrigeri almost 2 years ago

#4 Updated by intrigeri almost 2 years ago

  • Priority changed from Normal to Elevated

(If we ignore this problem in 3.2, #12639 might break existing profiles somewhat…)

Next step is perhaps to check if that extensions.enigmail.configuredVersion pref is actually useful: it was added in a seemingly unrelated commit (432ba8efefce14057bac9a30afb113f297bc9472) without any explanation. Perhaps we could actually get rid of 0000tails.js entirely and be done with it?

#5 Updated by anonym almost 2 years ago

  • Feature Branch set to feature/12639-thunderbird-52

#6 Updated by anonym almost 2 years ago

  • Status changed from Confirmed to In Progress

#7 Updated by intrigeri almost 2 years ago

  • Assignee changed from anonym to intrigeri
  • % Done changed from 0 to 50
  • QA Check set to Ready for QA

I'll assume this is ready for QA too.

#8 Updated by anonym almost 2 years ago

  • Affected tool set to Email Client

I manually tested this, and it works fine!

#9 Updated by anonym almost 2 years ago

intrigeri wrote:

I'll assume this is ready for QA too.

Yes; my comment #8 was blocked by Jenkins having made comment #6 while I was writing it...

#10 Updated by intrigeri almost 2 years ago

  • Assignee changed from intrigeri to anonym
  • QA Check changed from Ready for QA to Dev Needed

I've upgraded some Tails with Thunderbird persistence to an ISO built from this branch. The migration code works as intended (profile.default/preferences/0000tails.js does not contain extensions.enigmail.configuredVersion), but it isn't sufficient to achieve the desired effect: while /etc/xul-ext/enigmail.js says 1.9.8.1 (as expected), about:config still says that extensions.enigmail.configuredVersion == 1.9.7, marked as modified by the user, which I think was we wanted to avoid with the added migration code ("too old versions might trigger work-around code to run unnecessarily").

I see that: profile.default/prefs.js:user_pref("extensions.enigmail.configuredVersion", "1.9.7"); and if I remove it and restart Thunderbird, then everything is fine again! :)

Did this work better for you, or did you only look at the config files you could think of, instead of looking at the resulting config actually used by Thunderbird?

I guess we need another command in live-persist to remove the unwanted pref from prefs.js.

#11 Updated by anonym almost 2 years ago

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Dev Needed to Ready for QA

I was only considering preferences/0000tails.js, so I only verified that the file was removed. It didn't occur to me that the pref also would appear in prefs.js in a profile that was actually used previously.

On it!

#12 Updated by intrigeri almost 2 years ago

  • Assignee changed from intrigeri to anonym
  • QA Check changed from Ready for QA to Dev Needed

(Assuming this metadata change was a mistake.)

I see. Lesson learnt: always zoom out and check the expected outcome on the big picture rather than just checking that the code does what we believe should be enough :)

#13 Updated by anonym almost 2 years ago

  • Assignee changed from anonym to intrigeri
  • % Done changed from 50 to 70
  • QA Check changed from Dev Needed to Ready for QA

intrigeri wrote:

(Assuming this metadata change was a mistake.)

Ever since the Redmine upgrade (I think) my browser is confused and seems to pick up past field values as soon as I click "Edit" (i.e. the values I get in the fields do not reflect current actual state). I will now try to forcefully clean my browser history.

So, I've pushed a fix. I've so far only tested it in an environment where I set up the same directory structure + mounts. I'm not 100% confident in this, but if you want me to test it properly I'm afraid it will take ~1 hour, because my libvirt/qemu/kvm/something is really misbehaving. If so, please assign it back to me!

#14 Updated by intrigeri almost 2 years ago

  • Assignee changed from intrigeri to anonym
  • QA Check changed from Ready for QA to Dev Needed

anonym wrote:

intrigeri wrote:

(Assuming this metadata change was a mistake.)

Ever since the Redmine upgrade (I think) my browser is confused and seems to pick up past field values as soon as I click "Edit" (i.e. the values I get in the fields do not reflect current actual state).

That's been the case on Redmine ever since I can remember when one edits an issue that someone else has modified in the meantime, without fully reloading the page first.

So, I've pushed a fix. I've so far only tested it in an environment where I set up the same directory structure + mounts. I'm not 100% confident in this, but if you want me to test it properly I'm afraid it will take ~1 hour, because my libvirt/qemu/kvm/something is really misbehaving. If so, please assign it back to me!

Please test it properly (spare laptop?) or give me an automated test case (that we can drop immediately once tested, of course).

I'll look at this first thing tomorrow morning.

#15 Updated by anonym almost 2 years ago

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Dev Needed to Ready for QA

Manual test (without any shortcuts) successful!

#16 Updated by intrigeri almost 2 years ago

Manual test (without any shortcuts) successful!

:)

Code review passes once I've fixed the regexp (ddccd730ff4922c3fa55a9a32f0932f0dad7f894).
I'll now build & test.

#17 Updated by intrigeri almost 2 years ago

  • Status changed from In Progress to Fix committed
  • % Done changed from 70 to 100

#18 Updated by intrigeri almost 2 years ago

  • Assignee deleted (intrigeri)
  • QA Check changed from Ready for QA to Pass

Merged! Please review the aforementioned fix I've added.

#19 Updated by anonym almost 2 years ago

  • Status changed from Fix committed to Resolved

#20 Updated by intrigeri 11 months ago

  • Related to Bug #15746: Don't display the Enigmail setup wizard by default when starting Thunderbird added

Also available in: Atom PDF