aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
AgeCommit message (Collapse)Author
2018-06-18Detect redirect loopsEelco Dolstra
Fixes #2225.
2018-06-18Merge pull request #2234 from symphorien/esrch2Eelco Dolstra
libstore/gc.cc: ignore ESRCH when reading symlinks in /proc
2018-06-16libstore/gc.cc: ignore ESRCH when reading symlinks in /procSymphorien Gibol
readlink is also affected by the problem fixed for regular files in c567afe355df
2018-06-14Fix optimise-store.cc to skip more paths on macOSMatthew Justin Bauer
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-13hashDerivationModulo(): Handle chroot storesEelco Dolstra
This makes 'nix copy --to /mnt /nix/store/bla.drv' work.
2018-06-13std::random_shuffle -> std::shuffleEelco Dolstra
The former is removed in C++17.
2018-06-12Fix #2162: use getaddrinfo instead of curl to preload NSSYorick van Pelt
2018-06-11libstore/gc.cc: ignore ESRCH when reading /procSymphorien Gibol
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-08use debug instead of printTalkative to avoid spamming hydra queueAmineChikhaoui
runner logs.
2018-06-05Don't require --fallback to recover from disappeared binary cache NARsEelco Dolstra
2018-06-05Handle HTTP 410 Gone errorsEelco Dolstra
2018-06-05Improve binary cache fallback testEelco Dolstra
2018-06-05Further improve upload messagesEelco Dolstra
2018-06-01download.cc: fix readCallback return type (int -> size_t)Will Dietz
I'm not sure if curl ever asks for enough data at once for truncation to occur but better safe than sorry.
2018-06-01Improve binary cache upload messagesEelco Dolstra
Don't say "download" when we mean "upload".
2018-05-31Merge pull request #767 from mogorman/garbage_collect_keep_last_fewPeter Simons
Implement --delete-generations + flag for keeping last N number of gens
2018-05-30RemoteStore::addToStore(): Ensure capacity is decreased on exceptionsEelco Dolstra
2018-05-30Fix deadlock in RemoteStore::queryPathInfoUncached()Eelco Dolstra
2018-05-30Make <nix/fetchurl.nix> run in constant memoryEelco Dolstra
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-30getDownloader(): SimplifyEelco Dolstra
2018-05-30Make HttpBinaryCacheStore::narFromPath() run in constant memoryEelco Dolstra
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-30Make LocalBinaryCacheStore::narFromPath() run in constant memoryEelco Dolstra
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-30Simplify the callback mechanismEelco Dolstra
2018-05-30Move evaluator-specific settings out of libstoreEelco Dolstra
2018-05-30Move some Download-specific settings to download.ccEelco Dolstra
2018-05-30Modularize config settingsEelco Dolstra
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-30Fix assertion failure in storePathToHash()Eelco Dolstra
Fixes https://github.com/NixOS/nix/issues/2015.
2018-05-30Make 'nix copy --to daemon' run in constant memory (daemon side)Eelco Dolstra
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-30LocalStore::addToStore: Throw an exception if no hash is givenEelco Dolstra
2018-05-30Use extended SQLite error codesEelco Dolstra
2018-05-25libstore/download: remove unused function "getTime()"Will Dietz
2018-05-15Merge pull request #2145 from serokell/uncached-channelEelco Dolstra
make sure not to use cached channels for nix-channel --update
2018-05-10Remove mention of default since we already know the defaultEelco Dolstra
2018-05-10Merge branch 's3-multipart-uploads' of https://github.com/AmineChikhaoui/nixEelco Dolstra
2018-05-09make sure not to use cached channels for nix-channel --updateYorick van Pelt
fixes #1964
2018-05-07share the executor between multiple copy threads.AmineChikhaoui
2018-05-07add a FIXME note to find a way to abort the multipart uploads inAmineChikhaoui
case the nix command is interrupted.
2018-05-07Support multi-part uploads for large NARs that exceed the size ofAmineChikhaoui
5Gb.
2018-05-03Don't set a CA assertion for paths with referencesEelco Dolstra
Really fixes #2133.
2018-05-03LocalStore::addValidPath(): Throw error when the CA assertion is wrongEelco Dolstra
Closes #2133.
2018-05-02Fix some random -Wconversion warningsEelco Dolstra
2018-04-23globals.hh: don't use '==' to compare string literalsWill Dietz
Saw this in logs, also reported here: https://github.com/NixOS/nix/commit/8e6108ff71caae180d764ab9e9bff5593724655c#r28707288
2018-04-23Merge branch 'aarch64-armv7' of git://github.com/lheckemann/nixShea Levy
Support extra compatible architectures (#1916)
2018-04-23Merge branch 'hash-mismatch' of git://github.com/LnL7/nixShea Levy
2018-04-21Merge pull request #1707 from dtzWill/fix/issue-1692Peter Simons
ignore "interrupted" exception in progress callback
2018-04-20download: make hash mismatch error consistent with fetchurlDaiderd Jordan
2018-04-20build.cc: fix bind-mount of /dev/{pts,ptmx} fallbackWill Dietz
Don't bind-mount these to themselves, mount them into the chroot directory. Fixes pty issues when using sandbox on CentOS 7.4. (build of perlPackages.IOTty fails before this change)
2018-04-17exportReferences: Check whether the path is in the input closureEelco Dolstra
Fixes #2082.
2018-04-13Fix #1921Eelco Dolstra
2018-04-11initPlugins: Fix dlopen error message.Shea Levy