about summary refs log tree commit diff
path: root/src/libstore/worker-protocol.hh
AgeCommit message (Collapse)AuthorFilesLines
2016-06-01 Make the store directory a member variable of StoreEelco Dolstra1-2/+2
2016-05-04 Add a Store::addToStore() variant that accepts a NAREelco Dolstra1-2/+2
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-04-20 RemoteStore: Propagate InvalidPath exceptions from the daemonEelco Dolstra1-1/+1
2016-04-19 Move path info caching from BinaryCacheStore to StoreEelco Dolstra1-3/+3
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-05 Add "nix copy-sigs" commandEelco Dolstra1-0/+1
This imports signatures from one store into another. E.g. $ nix copy-sigs -r /run/current-system -s https://cache.nixos.org/ imported 595 signatures
2016-03-30 LocalStore: Keep track of ultimately trusted pathsEelco Dolstra1-1/+1
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.
2015-12-02 daemon: Add 'buildMode' parameter to 'buildPaths' RPCLudovic Courtès1-1/+1
2015-09-03 Implement buildDerivation() via the daemonEelco Dolstra1-1/+2
2015-06-02 Add a ‘verifyStore’ RPCLudovic Courtès1-1/+2
Hello! The patch below adds a ‘verifyStore’ RPC with the same signature as the current LocalStore::verifyStore method. Thanks, Ludo’. >From aef46c03ca77eb6344f4892672eb6d9d06432041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org> Date: Mon, 1 Jun 2015 23:17:10 +0200 Subject: [PATCH] Add a 'verifyStore' remote procedure call.
2014-09-01 Add an 'optimiseStore' remote procedure call.Ludovic Courtès1-0/+1
2014-07-24 Remove some dead codeEelco Dolstra1-1/+0
2013-08-07 Run the daemon worker on the same CPU as the clientEelco Dolstra1-1/+1
On a system with multiple CPUs, running Nix operations through the daemon is significantly slower than "direct" mode: $ NIX_REMOTE= nix-instantiate '<nixos>' -A system real 0m0.974s user 0m0.875s sys 0m0.088s $ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system real 0m2.118s user 0m1.463s sys 0m0.218s The main reason seems to be that the client and the worker get moved to a different CPU after every call to the worker. This patch adds a hack to lock them to the same CPU. With this, the overhead of going through the daemon is very small: $ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system real 0m1.074s user 0m0.809s sys 0m0.098s
2013-03-08 Revert "Prevent config.h from being clobbered"Eelco Dolstra1-8/+0
This reverts commit 28bba8c44f484eae38e8a15dcec73cfa999156f6.
2013-03-07 Prevent config.h from being clobberedEelco Dolstra1-0/+8
2013-02-19 Add `Settings::nixDaemonSocketFile'.Ludovic Courtès1-8/+0
2012-12-20 nix-store -q --roots: Respect the gc-keep-outputs/gc-keep-derivations settingsEelco Dolstra1-1/+2
So if a path is not garbage solely because it's reachable from a root due to the gc-keep-outputs or gc-keep-derivations settings, ‘nix-store -q --roots’ now shows that root.
2012-07-30 WhitespaceEelco Dolstra1-1/+1
2012-07-26 Merge branch 'master' into no-manifestsEelco Dolstra1-6/+1
2012-07-18 Use "#pragma once" to prevent repeated header file inclusionEelco Dolstra1-6/+1
2012-07-18 Merge branch 'master' into no-manifestsEelco Dolstra1-3/+4
2012-07-17 Add function queryPathFromHashPart()Eelco Dolstra1-0/+1
To implement binary caches efficiently, Hydra needs to be able to map the hash part of a store path (e.g. "gbg...zr7") to the full store path (e.g. "/nix/store/gbg...kzr7-subversion-1.7.5"). (The binary cache mechanism uses hash parts as a key for looking up store paths to ensure privacy.) However, doing a search in the Nix store for /nix/store/<hash>* is expensive since it requires reading the entire directory. queryPathFromHashPart() prevents this by doing a cheap database lookup.
2012-07-11 Replace hasSubstitutes() with querySubstitutablePaths()Eelco Dolstra1-0/+1
querySubstitutablePaths() takes a set of paths, so this greatly reduces daemon <-> client latency.
2012-07-11 Add a function queryValidPaths()Eelco Dolstra1-0/+1
queryValidPaths() combines multiple calls to isValidPath() in one. This matters when using the Nix daemon because it reduces latency. For instance, on "nix-env -qas \*" it reduces execution time from 5.7s to 4.7s (which is indistinguishable from the non-daemon case).
2012-07-11 Rename queryValidPaths() to queryAllValidPaths()Eelco Dolstra1-1/+1
2012-07-11 Implement querySubstitutablePathInfos() in the daemonEelco Dolstra1-1/+2
Also removed querySubstitutablePathInfo().
2012-06-27 nix-store -r: do substitutions in parallelEelco Dolstra1-1/+1
I.e. when multiple non-derivation arguments are passed to ‘nix-store -r’ to be substituted, do them in parallel.
2012-05-29 Reserve some disk space for the garbage collectorEelco Dolstra1-1/+1
We can't open a SQLite database if the disk is full. Since this prevents the garbage collector from running when it's most needed, we reserve some dummy space that we can free just before doing a garbage collection. This actually revives some old code from the Berkeley DB days. Fixes #27.
2012-04-30 * Add an option ‘build-use-substitutes’, which can be set to ‘false’Eelco Dolstra1-1/+1
to disable use of substitutes; i.e., force building from source. Fixes Nix/221.
2011-12-16 * Sync with the trunk.Eelco Dolstra1-4/+4
2011-12-16 * importPath() -> importPaths(). Because of buffering of the inputEelco Dolstra1-2/+2
stream it's now necessary for the daemon to process the entire sequence of exported paths, rather than letting the client do it.
2011-12-16 * Make the import operation through the daemon much more efficientEelco Dolstra1-1/+1
(way fewer roundtrips) by allowing the client to send data in bigger chunks. * Some refactoring.
2011-11-06 Include all outputs of derivations in the closure of explicitly-passed ↵Shea Levy1-0/+1
derivation paths This required adding a queryOutputDerivationNames function in the store API
2010-12-17 * Propagate the "100" exit status for failed builds through the NixEelco Dolstra1-1/+1
daemon.
2010-11-17 * Before a build, show the disk space that the downloaded store pathsEelco Dolstra1-1/+1
will approximately require.
2010-11-17 * Implement RemoteStore::queryPathInfo().Eelco Dolstra1-0/+1
2010-08-24 * Sync with the trunk.Eelco Dolstra1-1/+1
2010-08-12 * Make --cores work when building through the Nix daemon.Eelco Dolstra1-1/+1
2010-05-04 * Allow unprivileged users to do `nix-store --clear-failed-paths' andEelco Dolstra1-0/+2
`nix-store --query-failed-paths'.
2010-02-26 * Implement RemoteStore::queryValidPaths().Eelco Dolstra1-0/+1
2010-02-25 * Implement RemoteStore::queryDerivationOutputs().Eelco Dolstra1-0/+1
2008-12-16 * Pass --use-atime / --max-atime to the daemon.Eelco Dolstra1-1/+1
2008-11-11 * Pass the --no-build-output flag to the daemon.Eelco Dolstra1-1/+1
2008-08-14 * Backward compatibility check to prevent nixos-rebuild from barfingEelco Dolstra1-1/+1
when upgrading Nix.
2008-08-04 * querySubstitutablePathInfo: work properly when run via the daemon.Eelco Dolstra1-0/+1
* --dry-run: print the paths that we don't know how to build/substitute.
2008-06-18 * Some refactoring: put the GC options / results in separate structs.Eelco Dolstra1-17/+17
* The garbage collector now also prints the number of blocks freed.
2007-11-16 * Flag `--no-build-hook' to disable distributed builds.Eelco Dolstra1-1/+2
* queryDeriver in daemon mode: don't barf if the other side returns an empty string (which means there is no deriver).
2007-09-18 * Pass various options to the worker so that flags like -K or -j workEelco Dolstra1-2/+6
in multi-user Nix (NIX-72). * Client/worker: exchange a protocol version number for future compatibility.
2007-08-30 * Create the Nix daemon socket in a separate directoryEelco Dolstra1-3/+6
(/nix/var/nix/daemon-socket). This allows access to the Nix daemon to be restricted by setting the mode/ownership on that directory as desired, e.g. $ chmod 770 /nix/var/nix/daemon-socket $ chown root.wheel /nix/var/nix/daemon-socket to allow only users in the wheel group to use Nix. Setting the ownership on a socket is much trickier, since the socket must be deleted and recreated every time the daemon is started (which would require additional Nix configuration file directives to specify the mode/ownership, and wouldn't support arbitrary ACLs), some BSD variants appear to ignore permissions on sockets, and it's not clear whether the umask is respected on every platform when creating sockets.
2007-08-13 * Backwards compatibility.Eelco Dolstra1-2/+2
2007-08-12 * Get rid of the substitutes database table (NIX-47). Instead, if weEelco Dolstra1-1/+0
need any info on substitutable paths, we just call the substituters (such as download-using-manifests.pl) directly. This means that it's no longer necessary for nix-pull to register substitutes or for nix-channel to clear them, which makes those operations much faster (NIX-95). Also, we don't have to worry about keeping nix-pull manifests (in /nix/var/nix/manifests) and the database in sync with each other. The downside is that there is some overhead in calling an external program to get the substitutes info. For instance, "nix-env -qas" takes a bit longer. Abolishing the substitutes table also makes the logic in local-store.cc simpler, as we don't need to store info for invalid paths. On the downside, you cannot do things like "nix-store -qR" on a substitutable but invalid path (but nobody did that anyway). * Never catch interrupts (the Interrupted exception).