about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
AgeCommit message (Collapse)AuthorFilesLines
2016-03-30 LocalStore: Keep track of ultimately trusted pathsEelco Dolstra1-8/+28
These are content-addressed paths or outputs of locally performed builds. They are trusted even if they don't have signatures, so "nix verify-paths" won't complain about them.
2016-03-30 Improve the SQLite wrapper APIEelco Dolstra1-171/+64
In particular, this eliminates a bunch of boilerplate code.
2016-03-30 Factour out SQLite handlingEelco Dolstra1-171/+0
2016-03-30 Turn retrying SQLite transactions into a higher-order functionEelco Dolstra1-33/+42
2016-03-22 Don't overload dumpPath()Eelco Dolstra1-1/+1
2016-03-21 Add Store::dumpPath() methodEelco Dolstra1-1/+1
This allows applying nix-store --verify-path to binary cache stores: NIX_REMOTE=https://cache.nixos.org nix-store --verify-path /nix/store/s5c7...
2016-03-21 Drop support for upgrading from Nix <= 0.12Eelco Dolstra1-84/+7
2016-03-04 Eliminate some large string copyingEelco Dolstra1-4/+4
2016-02-26 importPaths(): Optionally add NARs to binary cache accessorEelco Dolstra1-1/+2
This enables an optimisation in hydra-queue-runner, preventing a download of a NAR it just uploaded to the cache when reading files like hydra-build-products.
2016-02-24 deletePath(): Succeed if path doesn't existEelco Dolstra1-3/+3
Also makes it robust against concurrent deletions.
2016-02-24 Eliminate reserveSpace flagEelco Dolstra1-17/+13
2016-02-24 LocalStore::addTextToStore(): Don't read the path we just wroteEelco Dolstra1-3/+5
This eliminates some unnecessary (presumably cached) I/O.
2016-02-17 Fix build without sodiumEelco Dolstra1-4/+1
http://hydra.nixos.org/build/32085949
2016-02-16 Rename ValidPathInfo::hash -> narHash for consistencyEelco Dolstra1-16/+16
2016-02-15 Expose the export magic value and move LocalStore::queryReferences to StoreEelco Dolstra1-14/+3
2016-02-15 Add function to extract hash part of a store pathEelco Dolstra1-1/+1
2016-02-04 Eliminate the "store" global variableEelco Dolstra1-2/+2
Also, move a few free-standing functions into StoreAPI and Derivation. Also, introduce a non-nullable smart pointer, ref<T>, which is just a wrapper around std::shared_ptr ensuring that the pointer is never null. (For reference-counted values, this is better than passing a "T&", because the latter doesn't maintain the refcount. Usually, the caller will have a shared_ptr keeping the value alive, but that's not always the case, e.g., when passing a reference to a std::thread via std::bind.)
2016-01-31 Use the daemon when we don't have write access to the Nix databaseEelco Dolstra1-1/+7
2016-01-12 Canonicalize gids to 0Eelco Dolstra1-2/+2
Previously files in the Nix store were owned by root or by nixbld, depending on whether they were created by a substituter or by a builder. This doesn't matter much, but causes spurious diffoscope differences. So use root everywhere.
2015-12-10 Build sandbox support etc. unconditionally on LinuxEelco Dolstra1-7/+2
Also, use "#if __APPLE__" instead of "#if SANDBOX_ENABLED" to prevent ambiguity.
2015-07-20 nix-copy-closure: Add -v flagEelco Dolstra1-1/+3
And make exportPath() less spammy by default.
2015-07-20 More cleanupEelco Dolstra1-11/+3
2015-07-17 OCD: foreach -> C++11 ranged forEelco Dolstra1-73/+73
2015-06-22 Use posix_fallocate to create /nix/var/nix/db/reservedEelco Dolstra1-1/+11
2015-05-13 cygwin: explicitly include required c headersRok Garbas1-0/+1
2015-04-07 Revert /nix/store permission back to 01775Eelco Dolstra1-1/+1
This broke NixOS VM tests. Mostly reverts 27b7b94923d2f207781b438bb7a57669bddf7d2b, 5ce50cd99e740d0d0f18c30327ae687be9356553, afa433e58c3fe6029660a43fdc2073c9d15b4210.
2015-03-25 addToStore(): Take explicit name argumentEelco Dolstra1-2/+2
2015-01-08 Doh^2Eelco Dolstra1-1/+1
2015-01-08 DohEelco Dolstra1-3/+3
2015-01-08 Set /nix/store permission to 1737Eelco Dolstra1-4/+6
I.e., not readable to the nixbld group. This improves purity a bit for non-chroot builds, because it prevents a builder from enumerating store paths (i.e. it can only access paths it knows about).
2014-12-29 LocalStore initialization: Don't die if build-users-group doesn't existShea Levy1-11/+12
See NixOS/nixpkgs@9245516
2014-12-12 Shut up a Valgrind warningEelco Dolstra1-1/+1
2014-12-10 Don't wait for PID -1Eelco Dolstra1-1/+2
The pid field can be -1 if forking the substituter process failed.
2014-11-19 Clean up temp roots in a more C++ wayEelco Dolstra1-0/+9
2014-10-14 Improved error message when encountering unsupported file typesEelco Dolstra1-3/+3
Fixes #269.
2014-08-20 Use proper quotes everywhereEelco Dolstra1-64/+64
2014-08-05 Remove unnecessary call to addTempRoot()Eelco Dolstra1-1/+0
2014-08-01 Make readDirectory() return inode / file typeEelco Dolstra1-11/+9
2014-07-10 Replace message "importing path <...>" with "exporting path <...>"Eelco Dolstra1-2/+2
This causes nix-copy-closure to show what it's doing before rather than after.
2014-07-10 Refactoring: Move all fork handling into a higher-order functionEelco Dolstra1-25/+10
C++11 lambdas ftw.
2014-07-10 Remove maybeVforkEelco Dolstra1-1/+1
2014-05-02 Set up directories and permissions for multi-user install automaticallyEelco Dolstra1-1/+28
This automatically creates /nix/var/nix/profiles/per-user and sets the permissions/ownership on /nix/store to 1775 and root:nixbld.
2014-04-08 If a .drv cannot be parsed, show its pathEelco Dolstra1-2/+2
Otherwise you just get ‘expected string `Derive(['’ which isn't very helpful.
2014-02-27 Set up a minimal /dev in chrootsEelco Dolstra1-2/+1
Not bind-mounting the /dev from the host also solves the problem with /dev/shm being a symlink to something not in the chroot.
2014-02-17 Heuristically detect if a build may have failed due to a full diskEelco Dolstra1-2/+2
This will allow Hydra to detect that a build should not be marked as "permanently failed", allowing it to be retried later.
2014-02-03 Fix assertion failure in ‘nix-store --load-db’Eelco Dolstra1-1/+12
Namely: nix-store: derivations.cc:242: nix::Hash nix::hashDerivationModulo(nix::StoreAPI&, nix::Derivation): Assertion `store.isValidPath(i->first)' failed. This happened because of the derivation output correctness check being applied before the references of a derivation are valid.
2014-02-01 Give a friendly error message if the DB directory is not writableEelco Dolstra1-2/+6
Previously we would say "error: setting synchronous mode: unable to open database file" which isn't very helpful.
2013-11-22 Include <cstring> for memsetEelco Dolstra1-0/+1
This should fix building on Illumos.
2013-11-14 Remove nix-setuid-helperEelco Dolstra1-3/+3
AFAIK, nobody uses it, it's not maintained, and it has no tests.
2013-10-16 Retry all SQLite operationsEelco Dolstra1-128/+165
To deal with SQLITE_PROTOCOL, we also need to retry read-only operations.