about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2016-03-15 Fix Darwin buildEelco Dolstra4-4/+6
http://hydra.nixos.org/build/33279996
2016-03-14 Fix another mismatched tagEelco Dolstra1-1/+1
http://hydra.nixos.org/build/33279570
2016-03-14 BinaryCacheStore::isValidPath(): Use .narinfo cacheEelco Dolstra1-0/+9
If a path is in the .narinfo cache, obviously it's valid.
2016-03-04 Add option binary-cache-secret-key-file for signing binary cachesEelco Dolstra2-2/+4
2016-03-04 BinaryCacheStore: Remove publicKeyFile argumentEelco Dolstra7-25/+39
The public key can be derived from the secret key, so there's no need for the user to supply it separately.
2016-03-04 Eliminate some large string copyingEelco Dolstra3-20/+20
2016-03-04 Merge branch 'new-cli'Eelco Dolstra3-3/+92
2016-03-03 Add file missing from 201b48de60751979835037a4b4f78128ba3fb7b3Eelco Dolstra1-0/+76
2016-03-03 build.cc: fs.h doesn't appear to be necessary anymoreNathan Zadoks1-1/+0
2016-03-02 Provide function required by HydraEelco Dolstra2-3/+16
2016-03-02 Add an HTTP binary cache storeEelco Dolstra3-55/+96
Allowing stuff like NIX_REMOTE=https://cache.nixos.org nix-store -qR /nix/store/x1p1gl3a4kkz5ci0nfbayjqlqmczp1kq-geeqie-1.1 or NIX_REMOTE=https://cache.nixos.org nix-store --export /nix/store/x1p1gl3a4kkz5ci0nfbayjqlqmczp1kq-geeqie-1.1 | nix-store --import
2016-03-02 Eliminate local-binary-cache-store.hhEelco Dolstra2-32/+25
2016-03-02 Make store implementations pluggableEelco Dolstra3-19/+50
This for instance allows hydra-queue-runner to add the S3 backend at runtime.
2016-03-02 Remove bad assertionEelco Dolstra1-1/+0
2016-03-02 importPaths(): Optionally add NARs to binary cache accessorEelco Dolstra7-38/+52
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-29 Add an HTTP binary cache storeEelco Dolstra3-55/+96
Allowing stuff like NIX_REMOTE=https://cache.nixos.org nix-store -qR /nix/store/x1p1gl3a4kkz5ci0nfbayjqlqmczp1kq-geeqie-1.1 or NIX_REMOTE=https://cache.nixos.org nix-store --export /nix/store/x1p1gl3a4kkz5ci0nfbayjqlqmczp1kq-geeqie-1.1 | nix-store --import
2016-02-29 Eliminate local-binary-cache-store.hhEelco Dolstra2-32/+25
2016-02-29 Make store implementations pluggableEelco Dolstra3-19/+50
This for instance allows hydra-queue-runner to add the S3 backend at runtime.
2016-02-26 Remove bad assertionEelco Dolstra1-1/+0
2016-02-26 importPaths(): Optionally add NARs to binary cache accessorEelco Dolstra7-38/+52
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-25 Add NAR / Store accessor abstractionEelco Dolstra10-13/+351
This is primary to allow hydra-queue-runner to extract files like "nix-support/hydra-build-products" from NARs in binary caches.
2016-02-24 deletePath(): Succeed if path doesn't existEelco Dolstra3-17/+13
Also makes it robust against concurrent deletions.
2016-02-24 Eliminate reserveSpace flagEelco Dolstra7-32/+29
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-24 BinaryCacheStore: Implement addToStore()Eelco Dolstra2-8/+58
So now you can do $ NIX_REMOTE=file:///tmp/binary-cache nix-instantiate '<nixpkgs>' -A hello and lots of other operations.
2016-02-24 openStoreAt(): Initialise the binary cacheEelco Dolstra1-1/+3
2016-02-24 Show a proper error message for unimplemented binary cache operationsEelco Dolstra2-17/+24
2016-02-24 Move BinaryCacheStore / LocalBinaryCacheStore from HydraEelco Dolstra6-5/+574
So you can now do: $ NIX_REMOTE=file:///tmp/binary-cache nix-store -qR /nix/store/...
2016-02-24 Remove bad daemon connections from the poolEelco Dolstra1-1/+5
This is necessary for long-running processes like hydra-queue-runner: if a nix-daemon worker is killed, we need to stop reusing that connection.
2016-02-23 Pool<T>: Allow a maximum pool sizeEelco Dolstra2-18/+19
2016-02-23 RemoteStore: Make thread-safeEelco Dolstra2-235/+234
This allows a RemoteStore object to be used safely from multiple threads concurrently. It will make multiple daemon connections if necessary. Note: pool.hh and sync.hh have been copied from the Hydra source tree.
2016-02-22 curl: Set CURLOPT_NOSIGNALEelco Dolstra1-0/+2
Otherwise using curl is not safe in multi-threaded applications because it installs a SIGALRM handler.
2016-02-17 Fix build without sodiumEelco Dolstra2-5/+11
http://hydra.nixos.org/build/32085949
2016-02-16 Add C++ functions for .narinfo processing / signingEelco Dolstra5-1/+297
This is currently only used by the Hydra queue runner rework, but like eff5021eaa6dc69f65ea1a8abe8f3ab11ef5eb0a it presumably will be useful for the C++ rewrite of nix-push and download-from-binary-cache. (@shlevy)
2016-02-16 Rename ValidPathInfo::hash -> narHash for consistencyEelco Dolstra5-24/+24
2016-02-15 Expose the export magic value and move LocalStore::queryReferences to StoreEelco Dolstra4-22/+19
2016-02-15 Add function to extract hash part of a store pathEelco Dolstra3-2/+15
2016-02-11 Move addPermRoot into StoreEelco Dolstra3-10/+9
2016-02-11 ref<T>: Add cast operatorEelco Dolstra1-2/+2
2016-02-04 StoreAPI -> StoreEelco Dolstra12-27/+27
Calling a class an API is a bit redundant...
2016-02-04 Eliminate the "store" global variableEelco Dolstra14-251/+238
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 Add build mode to compute fixed-output derivation hashesEelco Dolstra2-7/+33
For example, $ nix-build --hash -A nix-repl.src will build the fixed-output derivation nix-repl.src (a fetchFromGitHub call), but instead of *verifying* the hash given in the Nix expression, it prints out the resulting hash, and then moves the result to its content-addressed location in the Nix store. E.g build produced path ‘/nix/store/504a4k6zi69dq0yjc0bm12pa65bccxam-nix-repl-8a2f5f0607540ffe56b56d52db544373e1efb980-src’ with sha256 hash ‘0cjablz01i0g9smnavhf86imwx1f9mnh5flax75i615ml71gsr88’ The goal of this is to make all nix-prefetch-* scripts unnecessary: we can just let Nix run the real thing (i.e., the corresponding fetch* derivation). Another example: $ nix-build --hash -E 'with import <nixpkgs> {}; fetchgit { url = "https://github.com/NixOS/nix.git"; sha256 = "ffffffffffffffffffffffffffffffffffffffffffffffffffff"; }' ... git revision is 9e7c1a4bbdbe6129dd9dc385776612c307d3d1bb ... build produced path ‘/nix/store/gmsnh9i7x4mb7pyd2ns7n3c9l90jfsi1-nix’ with sha256 hash ‘1188xb621diw89n25rifqg9lxnzpz7nj5bfh4i1y3dnis0dmc0zp’ (Having to specify a fake sha256 hash is a bit annoying...)
2016-01-31 Use the daemon when we don't have write access to the Nix databaseEelco Dolstra4-13/+31
2016-01-12 --option build-repeat: Keep the differing output if -K is givenEelco Dolstra1-7/+38
Similar to 00903fa79961d7eb0fadeb9ed2d7cda7821dc293. Regardless of -K, we now also print which output differs.
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.
2016-01-12 --check: Keep the differing output if -K is givenEelco Dolstra1-2/+12
This makes it easier to investigate the non-determinism, e.g. $ nix-build pkgs/stdenv/linux -A stage1.pkgs.zlib --check -K error: derivation ‘/nix/store/l54i8wlw22656i4pk05c52ngv9rpl39q-zlib-1.2.8.drv’ may not be deterministic: output ‘/nix/store/11a27shh6n2ivi4a7s964i65ql80cf27-zlib-1.2.8’ differs from ‘/nix/store/11a27shh6n2ivi4a7s964i65ql80cf27-zlib-1.2.8-check’ $ diffoscope /nix/store/11a27shh6n2ivi4a7s964i65ql80cf27-zlib-1.2.8 /nix/store/11a27shh6n2ivi4a7s964i65ql80cf27-zlib-1.2.8-check ... ├── lib/libz.a │ ├── metadata │ │ @@ -1,15 +1,15 @@ │ │ -rw-r--r-- 30001/30000 3096 Jan 12 15:20 2016 adler32.o ... │ │ +rw-r--r-- 30001/30000 3096 Jan 12 15:28 2016 adler32.o ...
2016-01-12 --check: Fix "failed to produce output path"Eelco Dolstra1-1/+1
This occured when sandbox building is disabled, at least one output exists, and at least one other output does not.
2016-01-12 --check: Fix assertion failure when some outputs are missingEelco Dolstra1-1/+1
E.g. $ nix-build pkgs/stdenv/linux/ -A stage1.pkgs.perl --check nix-store: src/libstore/build.cc:1323: void nix::DerivationGoal::tryToBuild(): Assertion `buildMode != bmCheck || validPaths.size() == drv->outputs.size()' failed. when perl.out exists but perl.man doesn't. The fix is to only check the outputs that exist. Note that "nix-build -A stage1.pkgs.all --check" will still give a (proper) error in this case.
2016-01-07 Fix "Bad address" executing build hookEelco Dolstra1-5/+9
This was observed in the deb_debian7x86_64 build: http://hydra.nixos.org/build/29973215 Calling c_str() on a temporary should be fine because the temporary shouldn't be destroyed until after the execl() call, but who knows...
2016-01-07 Fix some signedness warningsEelco Dolstra1-1/+1