nixpkgs/pkgs
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
..
applications torbrowser: reduce risk of stale Nix store references 2017-03-25 15:59:18 +01:00
build-support Merge pull request #24275 from spacekitteh/fetchFromGitRepo 2017-03-25 09:45:11 +01:00
common-updater maintainers: Add script to patch version/sha256 in .nix files 2017-02-19 16:51:17 +02:00
data Merge branch 'master' into staging 2017-03-23 13:31:28 +01:00
desktops zenity: fix for non-GNOME 3 2017-03-25 14:40:17 +03:00
development Merge pull request #24139 from periklis/topic_qt58_darwin_compatibility 2017-03-25 08:50:00 -05:00
games atanks: remove unnecessary patch phase 2017-03-23 21:52:09 +01:00
misc Merge branch 'staging' 2017-03-24 21:07:55 +01:00
os-specific Merge branch 'staging' 2017-03-24 21:07:55 +01:00
servers mpd: fix i686-linux build 2017-03-23 23:09:41 +01:00
shells bash: 4.4p5 -> 4.4p12 2017-03-20 16:47:13 +01:00
stdenv stdenv: aarch64: Update bootstrap tarballs 2017-03-15 19:17:52 +02:00
test
tools torbrowser: reduce risk of stale Nix store references 2017-03-25 15:59:18 +01:00
top-level torbrowser: reduce risk of stale Nix store references 2017-03-25 15:59:18 +01:00