about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2019-06-24 Fix 'error 9 while decompressing xz file'Eelco Dolstra5-125/+122
Once we've started writing data to a Sink, we can't restart a download request, because then we end up writing duplicate data to the Sink. Therefore we shouldn't handle retries in Downloader but at a higher level (in particular, in copyStorePath()). Fixes #2952. (cherry picked from commit a67cf5a3585c41dd9f219a2c7aa9cf67fa69520b)
2019-06-24 Downloader: Propagate exceptions from decompressionSink->finish()Eelco Dolstra1-2/+7
(cherry picked from commit 15fa70cd1b853f5e62662b99ccb9ef3da6cfadff)
2019-06-24 CachedDownloadResult: Include store pathEelco Dolstra2-0/+5
Also, make fetchGit and fetchMercurial update allowedPaths properly. (Maybe the evaluator, rather than the caller of the evaluator, should apply toRealPath(), but that's a bigger change.) (cherry picked from commit 5c34d665386f4053d666b0899ecca0639e500fbd)
2019-06-24 downloadCached: Return ETagEelco Dolstra2-6/+23
(cherry picked from commit 529add316c5356a8060c35f987643b7bf5c796dc)
2019-06-17 Another attempt at getting pseudoterminals to work on macOSEelco Dolstra1-0/+3
2019-06-16 Hopefully fix macOS testsEelco Dolstra1-4/+6
2019-06-16 Set $TERMEelco Dolstra1-0/+3
2019-06-16 Run builds in a pseudo-terminalEelco Dolstra1-8/+46
This allows many programs (e.g. gcc, clang, cmake) to print colorized log output (assuming $TERM is set to a value like "xterm"). There are other ways to get colors, in particular setting CLICOLOR_FORCE, but they're less widely supported and can break programs that parse tool output.
2019-06-01 Fix segfault in builtin fetchurl with hashed mirrors + SRI hashesEelco Dolstra1-1/+2
2019-05-13 Merge pull request #2802 from LnL7/fix-needs-hashrewriteEelco Dolstra1-12/+16
build: move needsHashRewrite initialization to startBuilder
2019-05-12 build: make needsHashRewrite a methodDaiderd Jordan1-12/+16
2019-05-12 handleDiffHook: stop passing allowVforkGraham Christensen1-3/+1
2019-05-12 runProgram: support gid, uid, chdirGraham Christensen1-20/+16
2019-05-12 chdir, setgroupsGraham Christensen1-0/+4
2019-05-12 diff hook: execute as the build user, and pass the temp dirGraham Christensen1-12/+29
2019-05-12 build: run diff-hook under --check and document diff-hookGraham Christensen1-12/+18
2019-05-12 build: move needsHashRewrite initialization to startBuilderDaiderd Jordan1-7/+7
The value of useChroot is not set yet in the constructor, resulting in hash rewriting being enabled in certain cases where it should not be. Fixes #2801
2019-05-08 Merge pull request #2790 from samueldr/fix/minor-comment-NIX_ROOT_FINDEREelco Dolstra1-4/+3
findRootsNoTemp: fixes comment about findRuntimeRoots
2019-05-03 Fix "Bad system call" running i686-linux binaries on x86_64-linuxEelco Dolstra1-4/+4
To determine which seccomp filters to install, we were incorrectly using settings.thisSystem, which doesn't denote the actual system when --system is used. Fixes #2791.
2019-04-30 findRootsNoTemp: fixes comment about findRuntimeRootsSamuel Dionne-Riel1-4/+3
The NIX_ROOT_FINDER environment variable was removed in 3c46fe62b833a4e66845665edc99555022d3d98c when porting from perl to C.
2019-04-17 build: only skip hash rewriting for sandboxing on linuxDaiderd Jordan1-2/+18
The sandbox on darwin, and possibly other future platforms, doesn't have enough isolation to redirect outputs without hash rewriting.
2019-04-01 primeCache(): Barf if builds are needed but not allowedEelco Dolstra1-0/+6
Fixes #2753.
2019-04-01 getMachines(): Cache resultEelco Dolstra1-4/+5
2019-03-25 store-api.hh: add missing include for unordered_mapWill Dietz1-0/+1
2019-03-15 Add a 5 seconds of timeouts to connect to S3.Chaker Benhamed1-0/+1
The default is 1000ms, but we can hit it a lot of we don't have direct link to AWS (e.g. using VPN).
2019-03-14 pkg-config files: Use c++17Eelco Dolstra1-1/+1
2019-03-14 experimental/optional -> optionalEelco Dolstra4-12/+12
2019-03-14 findRoots(): Add 'censor' parameterEelco Dolstra5-20/+28
This is less brittle than filtering paths after the fact in nix-daemon.
2019-03-14 findRuntimeRoots: Simplify/fix handling of /proc filesEelco Dolstra2-15/+14
Scanning of /proc/<pid>/{exe,cwd} was broken because '{memory:' was prepended twice. Also, get rid of the whole '{memory:...}' thing because it's unnecessary, we can just list the file in /proc directly.
2019-03-10 Unify internal findRootsXxx() apiGuillaume Maudoux2-24/+15
2019-03-10 Make roots a map of store paths to pinning linksGuillaume Maudoux3-23/+20
This new structure makes more sense as there may be many sources rooting the same store path. Many profiles can reference the same path but this is even more true with /proc/<pid>/maps where distinct pids can and often do map the same store path. This implementation is also more efficient as the `Roots` map contains only one entry per rooted store path.
2019-03-10 Obfuscate memory roots for non-root usersGuillaume Maudoux1-7/+7
2019-03-10 detail memory rootsGuillaume Maudoux2-31/+32
2019-02-26 fix indentationDzmitry Zaitsau1-2/+2
2019-02-25 Apply param values on S3Helper initializationDzmitry Zaitsau1-1/+8
2019-02-25 Extend S3 URL parsing with parameters extractionDzmitry Zaitsau1-5/+17
2019-02-25 Extract and expose splitUriAndParams functionDzmitry Zaitsau2-4/+16
which splits a URL into localtor and parameter parts
2019-02-05 Revert "Restore parent mount namespace before executing a child process"Eelco Dolstra3-7/+0
This reverts commit a0ef21262f4d5652bfb65cfacaec01d89c475a93. This doesn't work in 'nix run' and nix-shell because setns() fails in multithreaded programs, and Boehm GC mark threads are uncancellable. Fixes #2646.
2019-01-18 unsupported(): Show the name of the unsupported operationEelco Dolstra4-76/+31
2019-01-05 Remove mentions of `libformat`, it no longer existsJohn Ericson1-1/+1
2018-12-12 libstore: improve hash mismatch error messageszimbatm3-6/+6
Use the same output ordering and format everywhere. This is such a common issue that we trade the single-line error message for more readability. Old message: ``` fixed-output derivation produced path '/nix/store/d4nw9x2sy9q3r32f3g5l5h1k833c01vq-example.com' with sha256 hash '08y4734bm2zahw75b16bcmcg587vvyvh0n11gwiyir70divwp1rm' instead of the expected hash '1xzwnipjd54wl8g93vpw6hxnpmdabq0wqywriiwmh7x8k0lvpq5m' ``` New message: ``` hash mismatch in fixed-output derivation '/nix/store/d4nw9x2sy9q3r32f3g5l5h1k833c01vq-example.com': wanted: sha256:1xzwnipjd54wl8g93vpw6hxnpmdabq0wqywriiwmh7x8k0lvpq5m got: sha256:08y4734bm2zahw75b16bcmcg587vvyvh0n11gwiyir70divwp1rm ```
2018-12-12 Fix assertion failure in NarInfoDiskCacheEelco Dolstra1-15/+15
https://hydra.nixos.org/build/85827920
2018-12-12 nar-info-disk-cache: include ca in the cache entriesDaiderd Jordan1-2/+5
Without this information the content addressable state and hashes are lost after the first request, this causes signatures to be required for everything even tho the path could be verified without signing.
2018-12-07 s3: make scheme configurableDaiderd Jordan3-7/+11
This enables using for http for S3 request for debugging or implementations that don't have https configured. This is not a problem for binary caches since they should not contain sensitive information. Both package signatures and AWS auth already protect against tampering.
2018-11-20 Merge pull request #2216 from dtzWill/fix/curl-760-timeoutEelco Dolstra1-1/+2
download: if there are active requests, never sleep for 10s
2018-11-15 Fix 'Read-only file system' when building a derivationEelco Dolstra1-0/+2
2018-11-13 Restore parent mount namespace before executing a child processEelco Dolstra2-0/+5
This ensures that they can't write to /nix/store. Fixes #2535.
2018-11-07 Enable sandboxing by defaultEelco Dolstra1-1/+7
Closes #179.
2018-11-01 Disable the S3 content-encoding patchEelco Dolstra1-1/+4
Since we're not using multi-part uploads at the moment, we can drop this patch.
2018-10-31 Merge pull request #2501 from mayflower/xdg_config_dirsEelco Dolstra1-1/+5
config: use all of XDG_CONFIG_DIRS