about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2018-08-06 Fix Brotli decompression in 'nix log'Eelco Dolstra5-56/+65
This didn't work anymore since decompression was only done in the non-coroutine case. Decompressors are now sinks, just like compressors. Also fixed a bug in bzip2 API handling (we have to handle BZ_RUN_OK rather than BZ_OK), which we didn't notice because there was a missing 'throw': if (ret != BZ_OK) CompressionError("error while compressing bzip2 file");
2018-08-06 Fix reporting of HTTP body size when a result callback is usedEelco Dolstra2-1/+5
2018-08-03 Make adding paths via nix-store --serve run in constant memoryEelco Dolstra2-15/+47
It adds a new operation, cmdAddToStoreNar, that does the same thing as the corresponding nix-daemon operation, i.e. call addToStore(). This replaces cmdImportPaths, which has the major issue that it sends the NAR first and the store path second, thus requiring us to store the incoming NAR either in memory or on disk until we decide what to do with it. For example, this reduces the memory usage of $ nix copy --to 'ssh://localhost?remote-store=/tmp/nix' /nix/store/95cwv4q54dc6giaqv6q6p4r02ia2km35-blender-2.79 from 267 MiB to 12 MiB. Probably fixes #1988.
2018-08-03 Support escaping in store URIsEelco Dolstra1-2/+18
2018-08-03 SSHMaster: Bypass SSH when connecting to localhostEelco Dolstra2-7/+16
This is primarily useful for testing since it removes the need to have SSH working.
2018-08-03 LegacySSHStore: Add remote-store optionEelco Dolstra1-1/+4
This is primarily useful for testing, e.g. $ nix copy --to 'ssh://localhost?remote-store=/tmp/nix' ...
2018-08-02 s3 binary cache: support specifying an endpointGraham Christensen3-8/+12
Works for uploading and not downloading.
2018-07-31 Fix race downloading into a sinkEelco Dolstra1-6/+8
This fixes 'error 10 while decompressing xz file'. https://hydra.nixos.org/build/78308551
2018-07-24 copyPathsToStore: honour keep-goingLinus Heckemann1-2/+12
2018-06-18 Detect redirect loopsEelco Dolstra1-0/+2
Fixes #2225.
2018-06-18 Merge pull request #2234 from symphorien/esrch2Eelco Dolstra1-1/+1
libstore/gc.cc: ignore ESRCH when reading symlinks in /proc
2018-06-16 libstore/gc.cc: ignore ESRCH when reading symlinks in /procSymphorien Gibol1-1/+1
readlink is also affected by the problem fixed for regular files in c567afe355df
2018-06-14 Fix optimise-store.cc to skip more paths on macOSMatthew Justin Bauer1-2/+1
I hate to make this such a large check but the lack of documentation means we really have no idea what's allowed. All of them reported so far have been within ".app/Contents" directories. That appears to be a safe starting point. However, I would not be surprised to also find more paths that are disallowed for instance in .framework or .bundle directories. Fixes #2031 Fixes #2229
2018-06-13 hashDerivationModulo(): Handle chroot storesEelco Dolstra1-1/+1
This makes 'nix copy --to /mnt /nix/store/bla.drv' work.
2018-06-13 std::random_shuffle -> std::shuffleEelco Dolstra1-1/+3
The former is removed in C++17.
2018-06-12 Fix #2162: use getaddrinfo instead of curl to preload NSSYorick van Pelt1-4/+8
2018-06-11 libstore/gc.cc: ignore ESRCH when reading /procSymphorien Gibol1-10/+13
If a process disappears between the time /proc/[pid]/maps is opened and the time it is read, the read() syscall will return ESRCH. This should be ignored.
2018-06-08 use debug instead of printTalkative to avoid spamming hydra queueAmineChikhaoui1-1/+1
runner logs.
2018-06-05 Don't require --fallback to recover from disappeared binary cache NARsEelco Dolstra3-12/+27
2018-06-05 Handle HTTP 410 Gone errorsEelco Dolstra1-1/+1
2018-06-05 Improve binary cache fallback testEelco Dolstra1-0/+5
2018-06-05 Further improve upload messagesEelco Dolstra2-8/+11
2018-06-01 download.cc: fix readCallback return type (int -> size_t)Will Dietz1-2/+2
I'm not sure if curl ever asks for enough data at once for truncation to occur but better safe than sorry.
2018-06-01 Improve binary cache upload messagesEelco Dolstra2-5/+15
Don't say "download" when we mean "upload".
2018-05-31 Merge pull request #767 from mogorman/garbage_collect_keep_last_fewPeter Simons2-0/+25
Implement --delete-generations + flag for keeping last N number of gens
2018-05-30 RemoteStore::addToStore(): Ensure capacity is decreased on exceptionsEelco Dolstra1-2/+5
2018-05-30 Fix deadlock in RemoteStore::queryPathInfoUncached()Eelco Dolstra1-25/+28
2018-05-30 Make <nix/fetchurl.nix> run in constant memoryEelco Dolstra1-35/+43
E.g. nix-build --store ~/my-nix/ -E 'import <nix/fetchurl.nix> { url = https://cache.nixos.org/nar/0nwi996rgq4b914qyx0mv2wq4k80hjac7xilikavagw7kxmn2iiv.nar.xz; sha256 = "0nwi996rgq4b914qyx0mv2wq4k80hjac7xilikavagw7kxmn2iiv"; }' now runs in 17 MiB (was 70 MiB), while nix-build --store ~/my-nix/ -E 'import <nix/fetchurl.nix> { url = https://cache.nixos.org/nar/0nwi996rgq4b914qyx0mv2wq4k80hjac7xilikavagw7kxmn2iiv.nar.xz; sha256 = "0d2fxljdih3nc5dqx41hjzic3141ajil94m8kdbpryq569dpsbvb"; unpack = true; }' runs in 17 MiB (was 346 MiB).
2018-05-30 getDownloader(): SimplifyEelco Dolstra1-4/+2
2018-05-30 Make HttpBinaryCacheStore::narFromPath() run in constant memoryEelco Dolstra3-3/+116
This reduces memory consumption of nix copy --from https://cache.nixos.org --to ~/my-nix /nix/store/95cwv4q54dc6giaqv6q6p4r02ia2km35-blender-2.79 from 176 MiB to 82 MiB. (The remaining memory is probably due to xz decompression overhead.) Issue https://github.com/NixOS/nix/issues/1681. Issue https://github.com/NixOS/nix/issues/1969.
2018-05-30 Make LocalBinaryCacheStore::narFromPath() run in constant memoryEelco Dolstra4-30/+55
This reduces memory consumption of nix copy --from file://... --to ~/my-nix /nix/store/95cwv4q54dc6giaqv6q6p4r02ia2km35-blender-2.79 from 514 MiB to 18 MiB for an uncompressed binary cache, and from 192 MiB to 53 MiB for a bzipped binary cache. It may also be faster because fetching can happen concurrently with decompression/writing. Continuation of 48662d151bdf4a38670897beacea9d1bd750376a. Issue https://github.com/NixOS/nix/issues/1681.
2018-05-30 Simplify the callback mechanismEelco Dolstra15-146/+131
2018-05-30 Move evaluator-specific settings out of libstoreEelco Dolstra1-16/+0
2018-05-30 Move some Download-specific settings to download.ccEelco Dolstra2-21/+24
2018-05-30 Modularize config settingsEelco Dolstra5-67/+20
Allow global config settings to be defined in multiple Config classes. For example, this means that libutil can have settings and evaluator settings can be moved out of libstore. The Config classes are registered in a new GlobalConfig class to which config files etc. are applied. Relevant to https://github.com/NixOS/nix/issues/2009 in that it removes the need for ad hoc handling of useCaseHack, which was the underlying cause of that issue.
2018-05-30 Fix assertion failure in storePathToHash()Eelco Dolstra1-0/+2
Fixes https://github.com/NixOS/nix/issues/2015.
2018-05-30 Make 'nix copy --to daemon' run in constant memory (daemon side)Eelco Dolstra2-3/+4
Continuation of 97002b684c902dadcd351a67208f9c2a88ff8f8f. This makes the daemon use constant memory. For example, it reduces the daemon's maximum RSS on $ nix copy --from ~/my-nix --to daemon /nix/store/1n7x0yv8vq6zi90hfmian84vdhd04bgp-blender-2.79a from 264 MiB to 7 MiB. We now use a TunnelSource to prevent the connection from ending up in an undefined state if an exception is thrown while the NAR is being sent. Issue https://github.com/NixOS/nix/issues/1681.
2018-05-30 LocalStore::addToStore: Throw an exception if no hash is givenEelco Dolstra1-1/+2
2018-05-30 Use extended SQLite error codesEelco Dolstra1-1/+2
2018-05-25 libstore/download: remove unused function "getTime()"Will Dietz1-7/+0
2018-05-15 Merge pull request #2145 from serokell/uncached-channelEelco Dolstra2-3/+3
make sure not to use cached channels for nix-channel --update
2018-05-10 Remove mention of default since we already know the defaultEelco Dolstra1-1/+1
2018-05-10 Merge branch 's3-multipart-uploads' of https://github.com/AmineChikhaoui/nixEelco Dolstra2-17/+65
2018-05-09 make sure not to use cached channels for nix-channel --updateYorick van Pelt2-3/+3
fixes #1964
2018-05-07 share the executor between multiple copy threads.AmineChikhaoui1-2/+2
2018-05-07 add a FIXME note to find a way to abort the multipart uploads inAmineChikhaoui1-2/+2
case the nix command is interrupted.
2018-05-07 Support multi-part uploads for large NARs that exceed the size ofAmineChikhaoui2-17/+65
5Gb.
2018-05-03 Don't set a CA assertion for paths with referencesEelco Dolstra1-0/+2
Really fixes #2133.
2018-05-03 LocalStore::addValidPath(): Throw error when the CA assertion is wrongEelco Dolstra1-1/+2
Closes #2133.
2018-05-02 Fix some random -Wconversion warningsEelco Dolstra2-6/+6