3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/top-level
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
..
aliases.nix libjson-rpc-cpp: 0.6.0 -> 0.7.0, fix build 2017-02-28 17:15:04 +01:00
all-packages.nix torbrowser: reduce risk of stale Nix store references 2017-03-25 15:59:18 +01:00
default.nix top-level: Allow nixpkgs to take localSystem directly 2017-02-08 22:06:57 -05:00
dotnet-packages.nix dafny: fix meta attribute 2017-02-07 11:35:10 +01:00
emacs-packages.nix melpa-packages: init w3m at 20170203.647 2017-02-10 13:11:45 -06:00
emscripten-packages.nix libxml2: supportPython -> pythonSupport 2016-11-08 17:10:05 +01:00
haskell-packages.nix Merge pull request #23610 from ljli/hs-ghcjs-pkgs-inherit 2017-03-24 23:15:41 +01:00
impure.nix Allow directories with a default.nix to be imported as an overlay. Closes #23016. 2017-02-25 02:32:04 +01:00
java-packages.nix Complete hello world with test 2016-11-15 14:18:19 -05:00
lua-packages.nix luaPackages.mpack: enable darwin platform 2017-03-10 11:58:42 +00:00
make-tarball.nix make-tarball.nix: Fix running as root 2016-12-15 13:08:21 +01:00
metrics.nix
node-packages-generated.nix
node-packages.json yarn: init at 0.17.8 (#20635) 2016-12-14 15:46:45 +01:00
node-packages.nix
ocaml-packages.nix ocamlPackages.stdio: init at 0.9.0 2017-03-25 07:06:49 +00:00
perl-packages.nix perlPackages.OpenGL: 0.6703 -> 0.70 2017-03-24 19:15:20 +01:00
php-packages.nix phpPackages.composer: 1.3.2 -> 1.4.1 2017-03-24 22:16:10 +01:00
platforms.nix platforms.nix: Remove unnecessary kernelExtraConfig for ARMv7 2017-02-20 15:22:14 +02:00
pure-packages.nix
python-packages.nix Merge pull request #23251 from juliendehos/hieroglyph 2017-03-25 13:00:34 +01:00
release-cross.nix top-level: no more need to expose splicedPackages 2017-01-25 09:24:55 -05:00
release-lib.nix nixpkgs: add aarch64-linux to release-lib 2017-03-08 17:13:34 +01:00
release-python.nix
release-small.nix portmap: remove 2017-02-01 02:44:56 +03:00
release.nix release.nix: Don't block release on aarch64 failures 2017-03-20 06:37:01 +02:00
rust-packages.nix update rust-packages 2017-03-22 17:25:52 +01:00
splice.nix top-level: no more need to expose splicedPackages 2017-01-25 09:24:55 -05:00
stage.nix top-level: Only splice as needed for performance 2017-01-24 11:37:56 -05:00