about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2019-07-02 Merge pull request #2974 from grahamc/invalid-nameEelco Dolstra1-3/+10
checkStoreName: give more precise/verbose error information
2019-07-02 checkStoreName: give more precise/verbose error informationGraham Christensen1-3/+10
$ sudo ./inst/bin/nix-instantiate -E '"${./.git}"' error: The path name '.git' is invalid: it is illegal to start the name with a period. Path names are alphanumeric and can include the symbols +-._?= and must not begin with a period. Note: If '.git' is a source file and you cannot rename it on disk, builtins.path { name = ... } can be used to give it an alternative name.
2019-06-28 Fix `http2 = false` having no effect. Fixes #2971.Aniket Deshpande1-0/+2
Setting `http2 = false` in nix config (e.g. /etc/nix/nix.conf) had no effect, and `nix-env -vvvvv -i hello` still downloaded .nar packages using HTTP/2. In `src/libstore/download.cc`, the `CURL_HTTP_VERSION_2TLS` option was being explicitly set when `downloadSettings.enableHttp2` was `true`, but, `CURL_HTTP_VERSION_1_1` option was not being explicitly set when `downloadSettings.enableHttp2` was `false`. This may be because `https://curl.haxx.se/libcurl/c/libcurl-env.html` states: "You have to set this option if you want to use libcurl's HTTP/2 support." but, also, in the changelog, states: "DEFAULT Since curl 7.62.0: CURL_HTTP_VERSION_2TLS Before that: CURL_HTTP_VERSION_1_1" So, the default setting for `libcurl` is HTTP/2 for version >= 7.62.0. In this commit, option `CURLOPT_HTTP_VERSION` is explicitly set to `CURL_HTTP_VERSION_1_1` when `downloadSettings.enableHttp2` nix config setting is `false`. This can be tested by running `nix-env -vvvvv -i hello | grep HTTP`
2019-06-25 nix-channel: Don't fetch binary-cache-urlEelco Dolstra1-2/+1
This has been ignored since the Perl->C++ rewrite.
2019-06-24 Fix 32-bit overflow with --no-netEelco Dolstra1-1/+1
--no-net causes tarballTtl to be set to the largest 32-bit integer, which causes comparison like 'time + tarballTtl < other_time' to fail on 32-bit systems. So cast them to 64-bit first. https://hydra.nixos.org/build/95076624 (cherry picked from commit 29ccb2e9697ee2184012dd13854e487928ae4441)
2019-06-24 Refactor downloadCached() interfaceEelco Dolstra2-27/+37
(cherry picked from commit df3f5a78d5ab0a1f2dc9d288b271b38a9b8b33b5)
2019-06-24 Add '--no-net' convenience flagEelco Dolstra4-20/+24
This flag * Disables substituters. * Sets the tarball-ttl to infinity (ensuring e.g. that the flake registry and any downloaded flakes are considered current). * Disables retrying downloads and sets the connection timeout to the minimum. (So it doesn't completely disable downloads at the moment.) (cherry picked from commit 8ea842260b4fd93315d35c5ba94b1ff99ab391d8)
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.