nixpkgs/pkgs/tools
Joachim Fasting ecd0e1a2c7
torbrowser: reduce risk of stale Nix store references
This patch restructures the expression and wrapper to minimize Nix store
references captured by the user's state directory.

The previous version would write lots of references to the Nix store into
the user's state directory, resulting in synchronization issues between
the Store and the local state directory.  At best, this would cause TBB to
stop working when the version used to instantiate the local state was
garbage collected; at worst, a user would continue to use the old version
even after an upgrade.

To solve the issue, hard-code as much as possible at the Store side and
minimize the amount of stuff being copied into the local state dir.
Currently, only a few files generated at firefox startup and fontconfig
cache files end up capturing store paths; these files are simply removed
upon every startup.  Otherwise, no capture should occur and the user
should always be using the TBB associated with the tor-browser wrapper
script.

To check for stale Store paths, do
   `grep -Ero '/nix/store/[^/]+' ~/.local/share/tor-browser`
This command should *never* return any other store path than the one
associated with the current tor-browser wrapper script, even after an
update (assuming you've run tor-browser at least once after updating).
Deviations from this general rule are considered bugs from now on.

Note that no attempt has been made to support pluggable transports; they
are still broken with this patch (to be fixed in a follow-up patch).

User visible changes:
- Wrapper retains only environment variables required for TBB to work
- pulseaudioSupport can be toggled independently of mediaSupport (the
  latter weakly implies the former).
- Store local state under $TBB_HOME.  Defaults to $XDG_DATA_HOME/tor-browser
- Stop obnoxious first-run stuff (NoScript redirect, in particular)
- Set desktop item GenericName to Web Browser

Some minor enhancements:
- Disable Hydra builds
- Specify system -> source mapping to make it easier to
  extend supported platforms.
2017-03-25 15:59:18 +01:00
..
admin pepper: add 'pierrer' as a maintainer 2017-03-09 10:44:39 +01:00
archivers dar: 2.5.3 -> 2.5.9 2017-03-24 16:06:41 -05:00
audio mpdris2: install locale files to correct location 2017-03-07 12:33:36 +01:00
backup duplicity: 0.7.07.1 -> 0.7.12 2017-03-24 18:08:05 +08:00
bluetooth Remove kde4.bluedevil 2017-02-24 16:48:59 -06:00
bootloaders/refind refind: mark as broken 2017-03-14 15:36:35 +01:00
cd-dvd dvdisaster: fix $out variable expansion (makeFlags) 2017-03-07 12:11:27 +01:00
compression Merge pull request #23311 from cheecheeo/zstdmt 2017-03-18 18:40:22 +01:00
filesystems glusterfs: 3.9.1 -> 3.10.0 2017-03-09 18:47:38 +01:00
graphics fast-neural-doodle: mark as broken 2017-03-20 15:08:10 +01:00
inputmethods ibus: Use dev output 2017-03-20 17:31:14 +01:00
misc Merge pull request #24133 from abbradar/gtk3-qt 2017-03-24 01:49:41 +03:00
networking Merge branch 'staging' 2017-03-24 21:07:55 +01:00
package-management Changed fetchgit to fetchFromGitHub 2017-03-23 18:04:36 -05:00
security torbrowser: reduce risk of stale Nix store references 2017-03-25 15:59:18 +01:00
system augeas: 1.7.0 -> 1.8.0 2017-03-21 20:29:47 -05:00
text Remove bbenoist from maintainers 2017-03-23 03:03:04 +01:00
typesetting htmldoc: use stdenv.lib.optional instead of stdenv.lib.enable 2017-03-19 14:21:29 -07:00
video atomicparsley: fix build with llvm 4 2017-03-21 23:35:54 +01:00
virtualization nixos-container: check for correct path for chattr 2017-03-22 15:15:42 +01:00
X11 wayv: install docs 2017-03-18 12:41:09 +01:00