about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2017-04-06 nix-daemon: Disable path info cacheEelco Dolstra2-1/+7
This is useless because the client also caches path info, and can cause problems for long-running clients like hydra-queue-runner (i.e. it may return cached info about paths that have been garbage-collected).
2017-04-04 Allow default sandbox paths to be overridenEelco Dolstra1-1/+1
E.g. you can now redirect /etc/resolv.conf to a different file.
2017-04-04 Make /var/run/nscd/socket optionalEelco Dolstra1-1/+2
Not every distribution uses nscd.
2017-03-31 Sandbox: Fix /dev/ptmx on recent kernelsEelco Dolstra1-8/+1
This fixes "No such file or directory" when opening /dev/ptmx (e.g. http://hydra.nixos.org/build/51094249). The reason appears to be some changes to /dev/ptmx / /dev/pts handling between Linux 4.4 and 4.9. See https://patchwork.kernel.org/patch/7832531/. The fix is to go back to mounting a proper /dev/pts instance inside the sandbox. Happily, this now works inside user namespaces, even for unprivileged users. So NIX_REMOTE=local?root=/tmp/nix nix-build \ '<nixpkgs/nixos/tests/misc.nix>' -A test works for non-root users. The downside is that the fix breaks sandbox builds on older kernels (probably pre-4.6), since mounting a devpts fails inside user namespaces for some reason I've never been able to figure out. Builds on those systems will fail with error: while setting up the build environment: mounting /dev/pts: Invalid argument Ah well.
2017-03-31 Merge branch 'builtins.exec'Shea Levy2-4/+4
2017-03-31 Retry curl error 16Eelco Dolstra1-0/+1
2017-03-30 Add exec primop behind allow-unsafe-native-code-during-evaluation.Shea Levy2-4/+4
Execute a given program with the (optional) given arguments as the user running the evaluation, parsing stdout as an expression to be evaluated. There are many use cases for nix that would benefit from being able to run arbitrary code during evaluation, including but not limited to: * Automatic git fetching to get a sha256 from a git revision * git rev-parse HEAD * Automatic extraction of information from build specifications from other tools, particularly language-specific package managers like cabal or npm * Secrets decryption (e.g. with nixops) * Private repository fetching Ideally, we would add this functionality in a more principled way to nix, but in the mean time 'builtins.exec' can be used to get these tasks done. The primop is only available when the 'allow-unsafe-native-code-during-evaluation' nix option is true. That flag also enables the 'importNative' primop, which is strictly more powerful but less convenient (since it requires compiling a plugin against the running version of nix).
2017-03-28 Ignore broken "Deriver: unknown-deriver" fields in .narinfoEelco Dolstra1-3/+5
These were generated by a legacy tool.
2017-03-21 LocalFSStore::getBuildLog(): Handle corrupted logsEelco Dolstra1-2/+7
2017-03-21 Only use cache.nixos.org when the store is /nix/storeEelco Dolstra1-1/+5
This is consistent with the behaviour of the old download-from-binary-cache substituter.
2017-03-21 Require signatures by defaultEelco Dolstra1-1/+1
This corresponds to the NixOS default.
2017-03-21 Restore cache.nixos.org as the default substituterEelco Dolstra2-5/+4
Fixes #1283.
2017-03-21 Move istringstream_nocopy to a separate fileEelco Dolstra2-1/+2
2017-03-21 Honor $NIX_SSHOPTS againEelco Dolstra2-9/+14
NixOps needs this.
2017-03-20 Merge branch 'darwin-s3-binary-cache-store' of https://github.com/shlevy/nixEelco Dolstra2-14/+1
2017-03-16 ssh:// -> ssh-ng://, legacy-ssh:// -> ssh://Eelco Dolstra2-2/+2
2017-03-16 copyPaths(): Use queryValidPaths() to reduce SSH latencyEelco Dolstra7-30/+34
2017-03-16 copyPaths(): Don't query path info for a path the target already hasEelco Dolstra1-0/+1
For example, this cuts "nix-copy-closure --from" on a NixOS system closure from 15.9s to 0.5s.
2017-03-16 LegacySSHStore: Provide a faster implementation of computeFSClosure()Eelco Dolstra2-1/+23
This avoids the latency of the standard implementation, which can make a huge difference (e.g. 16.5s -> 0.5s on a NixOS system closure).
2017-03-16 Fix nix-copy-closure --toEelco Dolstra1-1/+1
2017-03-16 Remove "killing process <pid>" messagesEelco Dolstra1-2/+2
They convey no useful information.
2017-03-15 More precise compression settingsEelco Dolstra1-5/+8
2017-03-15 runProgram(): Distinguish between empty input and no inputEelco Dolstra1-1/+1
For example, if we call brotli with an empty input, it shouldn't read from the caller's stdin.
2017-03-15 Compress NAR listings using the "text-compression" methodEelco Dolstra2-3/+3
So if "text-compression=br", the .ls file in S3 will get a Content-Encoding of "br". Brotli appears to compress better than xz for this kind of file and is natively supported by browsers.
2017-03-15 S3BinaryCacheStore: Set Content-TypeEelco Dolstra5-13/+25
This is necessary for serving log files to browsers.
2017-03-15 S3BinaryCacheStore: Support compression of narinfo and log filesEelco Dolstra4-8/+40
You can now set the store parameter "text-compression=br" to compress textual files in the binary cache (i.e. narinfo and logs) using Brotli. This sets the Content-Encoding header; the extension of compressed files is unchanged. You can separately specify the compression of log files using "log-compression=br". This is useful when you don't want to compress narinfo files for backward compatibility.
2017-03-15 Add support for brotli compressionEelco Dolstra1-2/+19
Build logs on cache.nixos.org are compressed using Brotli (since this allows them to be decompressed automatically by Chrome and Firefox), so it's handy if "nix log" can decompress them.
2017-03-15 BinaryCacheStore: Implement getBuildLog()Eelco Dolstra3-1/+31
We assume that build logs are stored under log/<drv>, e.g. /nix/store/q7ab198v13p0f8x8wgnd75dva7d5mip6-friday-devil-0.1.1.1.drv maps to https://cache.nixos.org/log/q7ab198v13p0f8x8wgnd75dva7d5mip6-friday-devil-0.1.1.1.drv
2017-03-15 Store: Add a method for getting build logsEelco Dolstra6-11/+44
This allows various Store implementations to provide different ways to get build logs. For example, BinaryCacheStore can get the build logs from the binary cache. Also, remove the log-servers option since we can use substituters for this.
2017-03-12 Merge branch 'configurable-aws-region'Shea Levy3-7/+11
2017-03-08 Add option to disable import-from-derivation completely, even if the drv is ↵Shea Levy2-0/+5
already realized
2017-03-06 Properly set the caFile for aws-sdk-cpp s3Shea Levy4-2/+6
2017-03-06 istringstream_nocopy: Implement in a standards-compliant way.Shea Levy2-14/+1
Fixes the problem mentioned in e6a61b8da788efbbbb0eb690c49434b6b5fc9741 See #1135
2017-03-03 Add aws-region param to S3 store URLsShea Levy3-7/+11
2017-03-03 Cache connection failuresEelco Dolstra2-1/+18
2017-03-03 SSHMaster: Make thread-safeEelco Dolstra2-17/+29
2017-03-03 build-remote: Don't use a SSH masterEelco Dolstra2-0/+6
This is unnecessary because we make only one connection.
2017-03-03 Improve SSH handlingEelco Dolstra6-112/+179
* Unify SSH code in SSHStore and LegacySSHStore. * Fix a race starting the SSH master. We now wait synchronously for the SSH master to finish starting. This prevents the SSH clients from starting their own connections. * Don't use a master if max-connections == 1. * Add a "max-connections" store parameter. * Add a "compress" store parameter.
2017-03-03 Fix fatal "broken pipe" error when $NIX_BUILD_HOOK is missingEelco Dolstra1-27/+39
2017-03-01 TeeSink: Pre-reserve string spaceEelco Dolstra1-6/+5
When receiving a very large file, this can prevent the string from having tobe copied, which temporarily doubles memory consumption.
2017-03-01 RemoteStore::addToStore(): Send NAR rather than string containing NAREelco Dolstra3-26/+6
This allows the NAR to be streamed in the future (though we're not doing that yet).
2017-03-01 Tweak messageEelco Dolstra1-1/+1
2017-03-01 Handle importing NARs containing files greater than 4 GiBEelco Dolstra3-18/+16
Also templatize readInt() to work for various integer types.
2017-02-28 Fix building against older curl versionsEelco Dolstra1-1/+4
http://hydra.nixos.org/build/49490928
2017-02-28 Improve SQLite busy handlingEelco Dolstra2-30/+42
2017-02-28 NarInfoDiskCache: Handle SQLite busy errorsEelco Dolstra1-104/+115
2017-02-28 In SQLite errors, include the database pathEelco Dolstra1-4/+8
This is necessary because we have multiple SQLite databases (e.g. the binary cache cache).
2017-02-28 Support auto-configuration of build-max-jobsEelco Dolstra1-1/+8
"build-max-jobs" and the "-j" option can now be set to "auto" to use the number of CPUs in the system. (Unlike build-cores, it doesn't use 0 to imply auto-configuration, because a) magic values are a bad idea in general; b) 0 is a legitimate value used to disable local building.) Fixes #1198.
2017-02-27 _SC_NPROCESSORS_ONLN -> std::thread::hardware_concurrency()Eelco Dolstra1-7/+3
2017-02-27 Retry downloads on HTTP/2 stream errorsEelco Dolstra1-1/+3
Issue #1254.