about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2018-03-29 Process --option use-case-hack properlyEelco Dolstra1-1/+1
Fixes https://github.com/NixOS/nix/issues/2009.
2018-03-29 ValidPathInfo::isContentAddressed(): Ensure there are no referencesEelco Dolstra1-1/+2
2018-03-22 download: improve error for hash mismatch ("store mismatch")Will Dietz1-2/+7
Fixes #1905
2018-03-22 download.cc: fix path for cached filesWill Dietz1-1/+1
2018-03-22 Merge branch 'fix/avoid-large-stack-buffers' of https://github.com/dtzWill/nixEelco Dolstra1-3/+3
2018-03-21 Also make the backwards compatible case of RemoteStore::addToStore run in ↵Eelco Dolstra1-15/+15
constant memory Just because we can.
2018-03-21 Make 'nix copy --to daemon' run in constant memoryEelco Dolstra2-5/+4
2018-03-21 Make 'nix copy --to ssh://...' run in constant memoryEelco Dolstra1-2/+2
2018-03-21 Make 'nix copy --from ssh://...' run in constant memoryEelco Dolstra2-24/+2
For instance, this reduced the memory consumption of $ nix copy --from ssh://localhost --to ~/my-nix /nix/store/1n7x0yv8vq6zi90hfmian84vdhd04bgp-blender-2.79a from 632 MiB to 16 MiB.
2018-03-21 LegacySSHStore: Allow overriding the path to nix-storeEelco Dolstra1-1/+2
2018-03-20 Make <nix/buildenv.nix> a builtin builderEelco Dolstra3-0/+197
This avoids sandbox annoyances.
2018-03-20 Move builtinFetchurl to its own fileEelco Dolstra2-1/+1
2018-03-20 Slight simplificationEelco Dolstra1-5/+2
2018-03-20 SSHMaster: Optionally pass -v to sshEelco Dolstra1-0/+4
2018-03-20 Hack to get SSH error messages from build-remoteEelco Dolstra1-0/+5
E.g. cannot build on 'ssh://mac1': cannot connect to 'mac1': bash: nix-store: command not found cannot build on 'ssh://mac2': cannot connect to 'mac2': Host key verification failed. cannot build on 'ssh://mac3': cannot connect to 'mac3': Received disconnect from 213... port 6001:2: Too many authentication failures Authentication failed.
2018-03-16 Reduce substitution memory consumptionEelco Dolstra4-35/+57
copyStorePath() now pipes the output of srcStore->narFromPath() directly into dstStore->addToStore(). The sink used by the former is converted into a source usable by the latter using boost::coroutine2. This is based on [1]. This reduces the maximum resident size of $ nix build --store ~/my-nix/ /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1 --substituters file:///tmp/binary-cache-xz/ --no-require-sigs from 418592 KiB to 53416 KiB. (The previous commit also reduced the runtime from ~4.2s to ~3.4s, not sure why.) A further improvement will be to download files into a Sink. [1] https://github.com/NixOS/nix/compare/master...Mathnerd314:dump-fix-coroutine#diff-dcbcac55a634031f9cc73707da6e4b18 Issue #1969.
2018-03-16 decompress(): Use a Source and SinkEelco Dolstra1-12/+8
This allows decompression to happen in O(1) memory.
2018-03-16 Don't retry on CURLE_SSL_CACERT_BADFILEEelco Dolstra1-0/+1
The certificates won't get any better if we retry.
2018-03-15 Merge pull request #1965 from masaeedu/masterEelco Dolstra1-1/+1
Wrap thread local in function for Cygwin
2018-03-14 Catch more possible instances of passing NULL to memcpy.Shea Levy1-0/+1
Actually fixes #1976.
2018-03-14 Use boost::format from the boost packageEelco Dolstra3-6/+6
Note that this only requires headers from boost so it doesn't add a runtime dependency. Also, use Nixpkgs 18.03.
2018-03-13 TypoEelco Dolstra1-1/+1
2018-03-12 Wrap thread local in function for CygwinAsad Saeeduddin1-1/+1
Fixes #1826. See #1352 for a previous instance of a similar change.
2018-03-07 Fix #1957Eelco Dolstra1-1/+1
2018-03-06 rand() -> random(), since we use srandom().Will Dietz3-3/+3
rand() requires we call srand() instead, but might as well use random().
2018-03-05 ssh-ng: Don't forward options to the daemon.Shea Levy2-1/+12
This can be iterated on and currently leaves out settings we know we want to forward, but it fixes #1713 and fixes #1935 and isn't fundamentally broken like the status quo. Future changes are suggested in a comment.
2018-03-02 hoist vector out of loop just in caseWill Dietz1-1/+1
2018-03-02 don't allocate large buffers on the stackWill Dietz1-3/+3
2018-02-23 Fix downloadCached() with a chroot storeEelco Dolstra1-2/+2
E.g. nix run --store ~/my-nix -f channel:nixos-17.03 hello -c hello This problem was mentioned in #1897.
2018-02-22 Revert "Enable sandbox builds on Linux by default"Eelco Dolstra1-7/+1
This reverts commit ddc58e789636e1b94149c342575d92583251fbf6. https://hydra.nixos.org/eval/1435322
2018-02-22 Enable sandbox builds on Linux by defaultEelco Dolstra1-1/+7
The overhead of sandbox builds is a problem on NixOS (since building a NixOS configuration involves a lot of small derivations) but not for typical non-NixOS use cases. So outside of NixOS we can enable it. Issue #179.
2018-02-19 Fix incorrect (and unnecessary) format stringEelco Dolstra1-3/+3
https://hydra.nixos.org/eval/1434547#tabs-now-fail
2018-02-19 Don't silently succeed seccomp setup when !HAVE_SECCOMP.Shea Levy1-2/+7
Running Nix with build users without seccomp on Linux is dangerous, and administrators should very explicitly opt-in to it.
2018-02-19 Merge branch 'register-settings' of https://github.com/shlevy/nixEelco Dolstra3-1/+24
2018-02-18 configure: Add a flag to disable seccomp.Shea Levy2-2/+4
This is needed for new arches where libseccomp support doesn't exist yet. Fixes #1878.
2018-02-15 Set backup MANPATH in case man path isn’t set correctly.Matthew Bauer3-0/+5
Previously, this would fail at startup for non-NixOS installs: nix-env --help The fix for this is to just use "nixManDir" as the value for MANPATH when spawning "man". To test this, I’m using the following: $ nix-build release.nix -A build $ MANPATH= ./result/bin/nix-env --help Fixes #1627
2018-02-13 Allow plugins to define new settings.Shea Levy3-1/+24
2018-02-13 Enable specifying directories in plugin-files.Shea Levy1-6/+18
2018-02-13 Merge branch 'plugins' of https://github.com/shlevy/nixEelco Dolstra3-0/+25
2018-02-12 Fix hang in build-remoteEelco Dolstra2-1/+3
2018-02-12 Fix 'deadlock: trying to re-acquire self-held lock'Eelco Dolstra4-22/+24
This was caused by derivations with 'allowSubstitutes = false'. Such derivations will be built locally. However, if there is another SubstitionGoal that has the output of the first derivation in its closure, then the path will be simultaneously built and substituted. There was a check to catch this situation (via pathIsLockedByMe()), but it no longer worked reliably because substitutions are now done in another thread. (Thus the comment 'It can't happen between here and the lockPaths() call below because we're not allowing multi-threading' was no longer valid.) The fix is to handle the path already being locked in both SubstitutionGoal and DerivationGoal.
2018-02-09 nix: Ensure that the user sees errors from substitutersEelco Dolstra1-3/+3
2018-02-09 getDefaultSubstituters(): Skip broken substitutersEelco Dolstra1-1/+5
Fixes #1340.
2018-02-08 Add plugins to make Nix more extensible.Shea Levy3-0/+25
All plugins in plugin-files will be dlopened, allowing them to statically construct instances of the various Register* types Nix supports.
2018-02-07 move the parallel-compression setting to binary-cache-store, the settingAmineChikhaoui3-4/+3
can be done now from the url e.g s3://nix-cache?parallel-compression=1 instead of nix.conf.
2018-02-07 make multi threaded compression configurable and use single threadedAmineChikhaoui2-1/+4
by default.
2018-02-07 Improve filtering of ANSI escape sequences in build logsEelco Dolstra1-1/+1
All ANSI sequences except color setting are now filtered out. In particular, terminal resets (such as from NixOS VM tests) are filtered out. Also, fix the completely broken tab character handling.
2018-02-07 Merge pull request #1816 from shlevy/add-pathEelco Dolstra2-6/+5
Add path primop.
2018-02-06 Add path primop.Shea Levy2-6/+5
builtins.path allows specifying the name of a path (which makes paths with store-illegal names now addable), allows adding paths with flat instead of recursive hashes, allows specifying a filter (so is a generalization of filterSource), and allows specifying an expected hash (enabling safe path adding in pure mode).
2018-02-05 Allow substituters to be marked as trustedEelco Dolstra2-2/+7
This is needed by nixos-install, which uses the Nix store on the installation CD as a substituter. We don't want to disable signature checking entirely because substitutes from cache.nixos.org should still be checked. So now we can pas "local?trusted=1" to mark only the Nix store in /nix as not requiring signatures. Fixes #1819.