about summary refs log tree commit diff
path: root/src/libutil
AgeCommit message (Collapse)AuthorFilesLines
2017-04-06 Fix bogus "unexpected Nix daemon error: interrupted by the user"Eelco Dolstra1-2/+2
2017-04-06 nix-daemon: Disable path info cacheEelco Dolstra2-3/+6
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-03-22 Fix xz decompressionEelco Dolstra1-4/+1
Fixes #1285.
2017-03-21 LocalFSStore::getBuildLog(): Handle corrupted logsEelco Dolstra2-12/+14
2017-03-21 Don't hang in decompression if bzip2 data ends prematurelyEelco Dolstra1-0/+6
2017-03-21 Move istringstream_nocopy to a separate fileEelco Dolstra3-89/+93
2017-03-20 Merge branch 'darwin-s3-binary-cache-store' of https://github.com/shlevy/nixEelco Dolstra2-1/+88
2017-03-16 Remove "killing process <pid>" messagesEelco Dolstra2-4/+3
They convey no useful information.
2017-03-15 runProgram(): Distinguish between empty input and no inputEelco Dolstra3-12/+27
For example, if we call brotli with an empty input, it shouldn't read from the caller's stdin.
2017-03-15 S3BinaryCacheStore: Support compression of narinfo and log filesEelco Dolstra1-0/+31
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 Fix assertion failure on SIGINTEelco Dolstra1-2/+0
nix: src/libutil/compression.cc:142: virtual nix::XzSink::~XzSink(): Assertion `finished' failed.
2017-03-15 Fix deadlock in runProgram() when input is larger than the pipe buffer sizeEelco Dolstra1-3/+9
2017-03-15 Add support for brotli compressionEelco Dolstra2-0/+9
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-08 Add missing header <sstream>Adrien Devresse1-0/+1
2017-03-06 istringstream_nocopy: Implement in a standards-compliant way.Shea Levy2-1/+88
Fixes the problem mentioned in e6a61b8da788efbbbb0eb690c49434b6b5fc9741 See #1135
2017-03-06 Revert fa125b9b28bea25a4eeb4d39a71a481563127cb9Eelco Dolstra1-6/+0
This causes quadratic performance.
2017-03-03 Pool: Don't hang if creating a connection failsEelco Dolstra1-0/+1
2017-03-03 Improve SSH handlingEelco Dolstra1-1/+6
* 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-01 TeeSink: Pre-reserve string spaceEelco Dolstra1-0/+13
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 Dolstra1-4/+5
This allows the NAR to be streamed in the future (though we're not doing that yet).
2017-03-01 readString(): Read directly into std::stringEelco Dolstra1-3/+3
When reading a huge string, this halves memory consumption. (Strictly speaking, this appears only valid in C++17, but who cares...)
2017-03-01 Handle importing NARs containing files greater than 4 GiBEelco Dolstra2-44/+53
Also templatize readInt() to work for various integer types.
2017-02-16 Support netrc in <nix/fetchurl.nix>Eelco Dolstra2-3/+3
This allows <nix/fetchurl.nix> to fetch private Git/Mercurial repositories, e.g. import <nix/fetchurl.nix> { url = https://edolstra@bitbucket.org/edolstra/my-private-repo/get/80a14018daed.tar.bz2; sha256 = "1mgqzn7biqkq3hf2697b0jc4wabkqhmzq2srdymjfa6sb9zb6qs7"; } where /etc/nix/netrc contains: machine bitbucket.org login edolstra password blabla... This works even when sandboxing is enabled. To do: add unpacking support (i.e. fetchzip functionality).
2017-02-14 Add support for s3:// URIsEelco Dolstra1-0/+1
This adds support for s3:// URIs in all places where Nix allows URIs, e.g. in builtins.fetchurl, builtins.fetchTarball, <nix/fetchurl.nix> and NIX_PATH. It allows fetching resources from private S3 buckets, using credentials obtained from the standard places (i.e. AWS_* environment variables, ~/.aws/credentials and the EC2 metadata server). This may not be super-useful in general, but since we already depend on aws-sdk-cpp, it's a cheap feature to add.
2017-02-08 Include config.h implicitly with '-include config.h' in CFLAGSTuomas Tynkkynen4-7/+0
Because config.h can #define things like _FILE_OFFSET_BITS=64 and not every compilation unit includes config.h, we currently compile half of Nix with _FILE_OFFSET_BITS=64 and other half with _FILE_OFFSET_BITS unset. This causes major havoc with the Settings class on e.g. 32-bit ARM, where different compilation units disagree with the struct layout. E.g.: diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc @@ -166,6 +166,8 @@ void Settings::update() _get(useSubstitutes, "build-use-substitutes"); + fprintf(stderr, "at Settings::update(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); _get(buildUsersGroup, "build-users-group"); diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -138,6 +138,8 @@ void RemoteStore::initConnection(Connection & conn) void RemoteStore::setOptions(Connection & conn) { + fprintf(stderr, "at RemoteStore::setOptions(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); conn.to << wopSetOptions Gave me: at Settings::update(): &useSubstitutes = 0xb6e5c5cb at RemoteStore::setOptions(): &useSubstitutes = 0xb6e5c5c7 That was not a fun one to debug!
2017-02-07 Move SavingSourceAdapter to serialise.hhEelco Dolstra1-0/+15
2017-02-01 Restore default signal handling in child processesEelco Dolstra2-14/+17
In particular, this fixes Ctrl-C in nix-shell sessions.
2017-01-26 Fix interrupt handlingEelco Dolstra3-14/+33
2017-01-24 Work around a bug in clang and older versions of gccEelco Dolstra1-1/+1
http://hydra.nixos.org/build/46597440 https://llvm.org/bugs/show_bug.cgi?id=28096
2017-01-19 Merge pull request #981 from shlevy/build-remote-c++Eelco Dolstra1-0/+3
build-remote: Implement in C++
2017-01-19 Kill builds when we get EOF on the log FDEelco Dolstra2-28/+16
This closes a long-time bug that allowed builds to hang Nix indefinitely (regardless of timeouts) simply by doing exec > /dev/null 2>&1; while true; do true; done Now, on EOF, we just send SIGKILL to the child to make sure it's really gone.
2017-01-19 CleanupEelco Dolstra1-5/+4
2017-01-17 Handle SIGINT etc. via a sigwait() signal handler threadEelco Dolstra2-5/+82
This allows other threads to install callbacks that run in a regular, non-signal context. In particular, we can use this to signal the downloader thread to quit. Closes #1183.
2017-01-16 AutoCloseDir: Use std::unique_ptrEelco Dolstra2-53/+8
2017-01-16 AutoDeleteArray -> std::unique_ptrEelco Dolstra3-20/+7
Also, switch to C++14 for std::make_unique.
2016-12-13 Merge branch 'base32-overflow' of git://github.com/vcunat/nixShea Levy1-1/+7
2016-12-08 Fix S3BinaryCacheStoreEelco Dolstra2-52/+1
It failed with AWS error uploading ‘6gaxphsyhg66mz0a00qghf9nqf7majs2.ls.xz’: Unable to parse ExceptionName: MissingContentLength Message: You must provide the Content-Length HTTP header. possibly because the istringstream_nocopy introduced in 0d2ebb4373e509521f27a6e8f16bfd39d05b2188 doesn't supply the seek method that the AWS library expects. So bring back the old version, but only for S3BinaryCacheStore.
2016-12-06 Use a steady clock for timeoutsEelco Dolstra1-0/+1
Fixes #1146.
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra10-67/+67
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux10-67/+67
2016-11-17 TypoEelco Dolstra1-1/+1
2016-11-17 Fix binary-cache-store buildShea Levy1-7/+8
2016-11-17 istringstream_nocopy: Implement in a standards-compliant wayShea Levy1-4/+40
Fixes #1135.
2016-11-16 S3BinaryCacheStore:: Eliminate a string copy while uploadingEelco Dolstra2-1/+15
This cuts hydra-queue-runner's peak memory usage by about a third.
2016-11-10 build-remote: Implement in C++Shea Levy1-0/+3
2016-11-07 Add missing #includeEelco Dolstra1-0/+2
2016-11-06 Detect and disallow base32 hash overflowVladimír Čunát1-1/+7
Example (before this commit): $ nix-hash --type sha256 --to-base16 4n0igfxbd3kqvvj2k2xgysrp63l4v2gd110fwkk4apfpm0hvzwh0 \ | xargs nix-hash --type sha256 --to-base32 0n0igfxbd3kqvvj2k2xgysrp63l4v2gd110fwkk4apfpm0hvzwh0 It's a real-life example: https://github.com/NixOS/nixpkgs/pull/20208/files#r86695567
2016-10-19 Merge branch 'regex' of https://github.com/groxxda/nixEelco Dolstra2-79/+0
2016-10-19 Fix Darwin buildEelco Dolstra1-2/+0
Done slightly differently from https://github.com/NixOS/nix/pull/1093.
2016-10-18 replace own regex class with std::regexAlexander Ried2-79/+0