about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
AgeCommit message (Collapse)AuthorFilesLines
2017-03-16 LegacySSHStore: Provide a faster implementation of computeFSClosure()Eelco Dolstra1-1/+1
This avoids the latency of the standard implementation, which can make a huge difference (e.g. 16.5s -> 0.5s on a NixOS system closure).
2017-03-15 Store: Add a method for getting build logsEelco Dolstra1-0/+8
This allows various Store implementations to provide different ways to get build logs. For example, BinaryCacheStore can get the build logs from the binary cache. Also, remove the log-servers option since we can use substituters for this.
2017-03-03 build-remote: Don't use a SSH masterEelco Dolstra1-0/+2
This is unnecessary because we make only one connection.
2017-02-22 RemoteStore::addToStore(): Pass content-addressability assertionEelco Dolstra1-1/+6
... and use this in Downloader::downloadCached(). This fixes $ nix-build https://nixos.org/channels/nixos-16.09-small/nixexprs.tar.xz -A hello error: cannot import path ‘/nix/store/csfbp1s60dkgmk9f8g0zk0mwb7hzgabd-nixexprs.tar.xz’ because it lacks a valid signature
2017-02-07 Merge branch 'nix-copy-closure-c++' of https://github.com/shlevy/nixEelco Dolstra1-1/+1
2017-02-07 copyStorePath(): Don't require signatures for "trusted" storesEelco Dolstra1-0/+4
For example, SSH stores could be trusted.
2017-02-07 Provide default implementations for a couple of Store methodsEelco Dolstra1-7/+7
2017-01-26 exportReferencesGraph: Export more complete info in JSON formatEelco Dolstra1-0/+14
This writes info about every path in the closure in the same format as ‘nix path-info --json’. Thus it also includes NAR hashes and sizes. Example: [ { "path": "/nix/store/10h6li26i7g6z3mdpvra09yyf10mmzdr-hello-2.10", "narHash": "sha256:0ckdc4z20kkmpqdilx0wl6cricxv90lh85xpv2qljppcmz6vzcxl", "narSize": 197648, "references": [ "/nix/store/10h6li26i7g6z3mdpvra09yyf10mmzdr-hello-2.10", "/nix/store/27binbdy296qvjycdgr1535v8872vz3z-glibc-2.24" ], "closureSize": 20939776 }, { "path": "/nix/store/27binbdy296qvjycdgr1535v8872vz3z-glibc-2.24", "narHash": "sha256:1nfn3m3p98y1c0kd0brp80dn9n5mycwgrk183j17rajya0h7gax3", "narSize": 20742128, "references": [ "/nix/store/27binbdy296qvjycdgr1535v8872vz3z-glibc-2.24" ], "closureSize": 20742128 } ] Fixes #1134.
2017-01-20 nix-copy-closure: Implement in C++.Shea Levy1-1/+1
Tests fail currently because the database is not given proper hashes in the VM
2017-01-19 Merge pull request #981 from shlevy/build-remote-c++Eelco Dolstra1-0/+2
build-remote: Implement in C++
2016-12-07 Keep track of the exact build start/stop timesEelco Dolstra1-1/+3
2016-12-07 Add an option to make non-determinism non-fatalEelco Dolstra1-0/+11
That is, when build-repeat > 0, and the output of two rounds differ, then print a warning rather than fail the build. This is primarily to let Hydra check reproducibility of all packages.
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-19/+19
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-19/+19
2016-11-10 Store::computeFSClosure(): Support a set of pathsEelco Dolstra1-3/+7
This way, callers can exploits the parallelism of computeFSClosure() when they have multiple paths that they need the (combined) closure of.
2016-11-10 build-remote: Implement in C++Shea Levy1-0/+2
2016-11-09 copyClosure() / copyStorePath(): Expose dontCheckSigsEelco Dolstra1-2/+2
Needed by Hydra.
2016-11-09 Merge branch 'ssh-store' of https://github.com/shlevy/nixEelco Dolstra1-4/+10
2016-10-26 Restore the CachedFailure status codeEelco Dolstra1-0/+4
The removal of CachedFailure caused the value of TimedOut to change, which broke timed-out handling in Hydra (so timed-out builds would show up as "aborted" and would be retried, e.g. at http://hydra.nixos.org/build/42537427).
2016-10-21 Remove addPathToAccessorEelco Dolstra1-12/+2
2016-10-21 BinaryCacheStore: Optionally write a NAR listingEelco Dolstra1-1/+1
The store parameter "write-nar-listing=1" will cause BinaryCacheStore to write a file ‘<store-hash>.ls.xz’ for each ‘<store-hash>.narinfo’ added to the binary cache. This file contains an XZ-compressed JSON file describing the contents of the NAR, excluding the contents of regular files. E.g. { "version": 1, "root": { "type": "directory", "entries": { "lib": { "type": "directory", "entries": { "Mcrt1.o": { "type": "regular", "size": 1288 }, "Scrt1.o": { "type": "regular", "size": 3920 }, } } } ... } } (The actual file has no indentation.) This is intended to speed up the NixOS channels programs index generator [1], since fetching gazillions of large NARs from cache.nixos.org is currently a bottleneck for updating the regular (non-small) channel. [1] https://github.com/NixOS/nixos-channel-scripts/blob/master/generate-programs-index.cc
2016-10-07 Implement generic Store::queryValidPaths()Eelco Dolstra1-1/+1
2016-10-07 Add copyClosure utility function for HydraEelco Dolstra1-0/+5
2016-10-07 importPaths(): Fix accessor support for HydraEelco Dolstra1-0/+11
2016-09-16 Make computeFSClosure() single-threaded againEelco Dolstra1-1/+8
The fact that queryPathInfo() is synchronous meant that we needed a thread for every concurrent binary cache lookup, even though they end up being handled by the same download thread. Requiring hundreds of threads is not a good idea. So now there is an asynchronous version of queryPathInfo() that takes a callback function to process the result. Similarly, enqueueDownload() now takes a callback rather than returning a future. Thus, a command like nix path-info --store https://cache.nixos.org/ -r /nix/store/slljrzwmpygy1daay14kjszsr9xix063-nixos-16.09beta231.dccf8c5 that returns 4941 paths now takes 1.87s using only 2 threads (the main thread and the downloader thread). (This is with a prewarmed CloudFront.)
2016-09-02 Factor out the unix domain socket-specific code from RemoteStoreShea Levy1-1/+1
2016-09-02 Factor a function to get the store type from a URI out of the main ↵Shea Levy1-0/+10
RegisterStoreImplementation
2016-09-02 Merge openStore and openStoreAt with default argumentsShea Levy1-5/+1
2016-08-10 Mark content-addressed paths in the Nix database and in .narinfoEelco Dolstra1-18/+55
This allows such paths to be imported without signatures.
2016-08-10 Add a "root" parameter to local storesEelco Dolstra1-0/+2
This makes it easier to create a diverted store, i.e. NIX_REMOTE="local?root=/tmp/root" instead of NIX_REMOTE="local?real=/tmp/root/nix/store&state=/tmp/root/nix/var/nix" NIX_LOG_DIR=/tmp/root/nix/var/log
2016-07-26 makeFixedOutputPath(): Drop superfluous HashType argumentEelco Dolstra1-1/+1
2016-06-03 Support sandbox builds by non-root usersEelco Dolstra1-0/+5
This allows an unprivileged user to perform builds on a diverted store (i.e. where the physical store location differs from the logical location). Example: $ NIX_LOG_DIR=/tmp/log NIX_REMOTE="local?real=/tmp/store&state=/tmp/var" nix-build -E \ 'with import <nixpkgs> {}; runCommand "foo" { buildInputs = [procps nettools]; } "id; ps; ifconfig; echo $out > $out"' will do a build in the Nix store physically in /tmp/store but logically in /nix/store (and thus using substituters for the latter).
2016-06-02 Make derivationFromPath work on diverted storesEelco Dolstra1-0/+2
2016-06-02 Allow setting the state directory as a store parameterEelco Dolstra1-6/+8
E.g. "local?store=/tmp/store&state=/tmp/var".
2016-06-01 Make the store directory a member variable of StoreEelco Dolstra1-62/+71
2016-05-31 nix-copy-closure / build-remote.pl: Disable signature checkingEelco Dolstra1-3/+3
This restores the Nix 1.11 behaviour.
2016-05-30 Re-implement the WantMassQuery property of binary cachesEelco Dolstra1-0/+2
2016-05-30 Fix repair during substitutionEelco Dolstra1-1/+1
2016-05-04 Add a Store::addToStore() variant that accepts a NAREelco Dolstra1-16/+18
As a side effect, this ensures that signatures are propagated when copying paths between stores. Also refactored import/export to make use of this.
2016-05-04 Remove OpenSSL-based signingEelco Dolstra1-7/+4
2016-05-04 Add a copyStorePath() utility functionEelco Dolstra1-0/+5
2016-04-29 BinaryCacheStore: Make the signing key a parameterEelco Dolstra1-4/+0
2016-04-29 Allow parameters in store URIsEelco Dolstra1-2/+5
This is to allow store-specific configuration, e.g. s3://my-cache?compression=bzip2&secret-key=/path/to/key.
2016-04-29 Eliminate the substituter mechanismEelco Dolstra1-0/+6
Substitution is now simply a Store -> Store copy operation, most typically from BinaryCacheStore to LocalStore.
2016-04-21 Implement S3BinaryCacheStore::queryAllValidPaths()Eelco Dolstra1-3/+8
This allows commands like "nix verify --all" or "nix path-info --all" to work on S3 caches. Unfortunately, this requires some ugly hackery: when querying the contents of the bucket, we don't want to have to read every .narinfo file. But the S3 bucket keys only include the hash part of each store path, not the name part. So as a special exception queryAllValidPaths() can now return store paths *without* the name part, and queryPathInfo() accepts such store paths (returning a ValidPathInfo object containing the full name).
2016-04-20 Cache path info lookups in SQLiteEelco Dolstra1-0/+7
This re-implements the binary cache database in C++, allowing it to be used by other Store backends, in particular the S3 backend.
2016-04-19 Move path info caching from BinaryCacheStore to StoreEelco Dolstra1-12/+50
Caching path info is generally useful. For instance, it speeds up "nix path-info -rS /run/current-system" (i.e. showing the closure sizes of all paths in the closure of the current system) from 5.6s to 0.15s. This also eliminates some APIs like Store::queryDeriver() and Store::queryReferences().
2016-04-15 BinaryCacheStore::readFile(): Return a shared_ptr to a stringEelco Dolstra1-0/+1
This allows readFile() to indicate that a file doesn't exist, and might eliminate some large string copying.
2016-04-08 Remove failed build cachingEelco Dolstra1-8/+0
This feature was implemented for Hydra, but Hydra no longer uses it.
2016-04-07 nix verify-paths: Add ‘--sigs-needed <N>’ flagEelco Dolstra1-0/+3
This specifies the number of distinct signatures required to consider each path "trusted". Also renamed ‘--no-sigs’ to ‘--no-trust’ for the flag that disables verifying whether a path is trusted (since a path can also be trusted if it has no signatures, but was built locally).