about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2017-10-25 attempt to fix #1630: make the queries of store paths run in parallel using ↵AmineChikhaoui1-1/+8
a thread pool
2017-10-25 exportReferencesGraph: Allow exporting a list of store pathsEelco Dolstra1-14/+22
2017-10-25 Fix exportReferencesGraph in the structured attrs caseEelco Dolstra1-69/+68
2017-10-25 Pass lists/attrsets to bash as (associative) arraysEelco Dolstra1-3/+93
2017-10-24 Allow shorter syntax for chroot storesEelco Dolstra2-4/+12
You can now say '--store /tmp/nix' instead of '--store local?root=/tmp/nix'.
2017-10-24 More progress indicator improvementsEelco Dolstra1-13/+9
In particular, don't show superfluous "fetching path" and "building path(s)" messages, and show the current round (with --repeat).
2017-10-24 More progress indicator improvementsEelco Dolstra2-6/+14
Fixes #1599.
2017-10-24 Progress indicator: Show on what machine we're buildingEelco Dolstra1-3/+7
E.g. $ nix build nixpkgs.hello --builders 'root@wendy' [1/0/1 built] building hello-2.10 on ssh://root@wendy: checking for minix/config.h... no
2017-10-24 Handle log messages from build-remoteEelco Dolstra1-114/+22
This makes the progress indicator show statuses like "connecting to 'root@machine'".
2017-10-24 nix: Respect -I, --arg, --argstrEelco Dolstra1-3/+3
Also, random cleanup to argument handling.
2017-10-24 Remove the remote-builds optionEelco Dolstra3-6/+7
This is superfluous since you can now just set "builders" to empty, e.g. "--builders ''".
2017-10-24 Remove the builder-files optionEelco Dolstra3-16/+21
You can now include files via the "builders" option, using the syntax "@<filename>". Having only one option makes it easier to override builders completely. For backward compatibility, the default is "@/etc/nix/machines", or "@<filename>" for each file name in NIX_REMOTE_SYSTEMS.
2017-10-23 Pass all settings to build-remoteEelco Dolstra1-10/+18
This ensures that command line flags such as --builders get passed correctly.
2017-10-23 Turn $NIX_REMOTE into a configuration optionEelco Dolstra2-2/+7
2017-10-20 Merge pull request #1616 from copumpkin/separate-darwin-sandboxEelco Dolstra2-13/+11
Shift Darwin sandbox to separate installed files
2017-10-19 Revert "Let's not populate the NAR cache from hydra-queue-runner for now"Eelco Dolstra1-2/+2
This reverts commit 908590dc6cfcca3a98755b194d93b2da39aee95c. Since hydra-server can have a different store URI from hydra-queue-runner now, we don't really need this.
2017-10-18 Let's not populate the NAR cache from hydra-queue-runner for nowEelco Dolstra1-2/+2
2017-10-18 Errors writing to the NAR cache should not be fatalEelco Dolstra1-1/+5
2017-10-18 Suppress "copying 0 paths" messageEelco Dolstra1-0/+2
2017-10-17 Shift Darwin sandbox to separate installed filesDan Peebles2-13/+11
This makes it slightly more manageable to see at a glance what in a build's sandbox profile is unique to the build and what is standard. Also a first step to factoring more of our Darwin logic into scheme functions that will allow us a bit more flexibility. And of course less of that nasty codegen in C++! 😀
2017-10-17 BinaryCacheStore::addToStore(): Add NARs to the local cacheEelco Dolstra3-10/+26
2017-10-17 BinaryCacheStore: Support local caching of NARsEelco Dolstra4-5/+25
This speeds up commands like "nix cat-store". For example: $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nar-cache /nix/store/i60yncmq6w9dyv37zd2k454g0fkl3arl-systemd-234/etc/udev/udev.conf real 0m4.336s $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nar-cache /nix/store/i60yncmq6w9dyv37zd2k454g0fkl3arl-systemd-234/etc/udev/udev.conf real 0m0.045s The primary motivation is to allow hydra-server to serve files from S3 binary caches. Previously Hydra had a hack to do "nix-store -r <path>", but that fetches the entire closure so is prohibitively expensive. There is no garbage collection of the NAR cache yet. Also, the entire NAR is read when accessing a single member file. We could generate the NAR listing to provide random access. Note: the NAR cache is indexed by the store path hash, not the content hash, so NAR caches should not be shared between binary caches, unless you're sure that all your builds are binary-reproducible.
2017-10-17 Remove BinaryCacheStoreAccessorEelco Dolstra2-61/+4
Probably as a result of a bad merge in 4b8f1b0ec066a5b994747b1afd050f5f62d857f6, we had both a BinaryCacheStoreAccessor and a RemoteFSAccessor. BinaryCacheStore::getFSAccessor() returned the latter, but BinaryCacheStore::addToStore() checked for the former. This probably caused hydra-queue-runner to download paths that it just uploaded.
2017-10-12 Add option to disable the seccomp filterEelco Dolstra2-0/+8
I needed this to test ACL/xattr removal in canonicalisePathMetaData(). Might also be useful if you need to build old Nixpkgs that doesn't have the required patches to remove setuid/setgid creation.
2017-10-02 Reverse retry logic to retry in all but a few casesDan Peebles1-20/+37
It was getting too much like whac-a-mole listing all the retriable error conditions, so we now retry by default and list the cases where retrying is almost certainly hopeless.
2017-09-18 Don't remove Content-Encoding in fetchurl / nix-prefetch-urlEelco Dolstra3-1/+4
Fixes #1568.
2017-09-14 RemoteStore: Add option to drop old connections from the poolEelco Dolstra2-1/+21
This is a hack to make hydra-queue-runner free its temproots periodically, thereby ensuring that garbage collection of the corresponding paths is not blocked until the queue runner is restarted. It would be better if temproots could be released earlier than at process exit. I started working on a RAII object returned by functions like addToStore() that releases temproots. However, this would be a pretty massive change so I gave up on it for now.
2017-09-14 Show the pid of temporary rootsEelco Dolstra2-11/+16
2017-09-14 nix-store -q --roots / --gc --print-roots: Print temporary / in-memory rootsEelco Dolstra2-22/+41
For example, $ nix-store -q --roots /nix/store/7phd2sav7068nivgvmj2vpm3v47fd27l-patchelf-0.8pre845_0315148 {temp:1} denotes that the path is only being kept alive by a temporary root (i.e. /nix/var/nix/temproots/). Similarly, $ nix-store --gc --print-roots ... {memory:9} -> /nix/store/094gpjn9f15ip17wzxhma4r51nvsj17p-curl-7.53.1 shows that curl is being used by some process.
2017-09-08 LegacySSHStore: Include signatures etc.Eelco Dolstra2-1/+8
2017-09-08 copyStorePath(): Fill in missing narHash regardless of checkSigsEelco Dolstra1-5/+1
I don't remember what the reasoning was here, but security is provided by the signatures, not by whether the hash is provided by the other store.
2017-09-08 Communicate the structured log FD to buildersEelco Dolstra1-1/+6
Since we may use a dedicated file descriptor in the future, this allows us to change it. So builders can do if [[ -n $NIX_LOG_FD ]]; then echo "@nix { message... }" >&$NIX_LOG_FD fi
2017-09-06 Fix abort when the GC thread gets an exceptionEelco Dolstra1-13/+21
2017-09-05 Add automatic garbage collectionEelco Dolstra5-1/+123
Nix can now automatically run the garbage collector during builds or while adding paths to the store. The option "min-free = <bytes>" specifies that Nix should run the garbage collector whenever free space in the Nix store drops below <bytes>. It will then delete garbage until "max-free" bytes are available. Garbage collection during builds is asynchronous; running builds are not paused and new builds are not blocked. However, there also is a synchronous GC run prior to the first build/substitution. Currently, no old GC roots are deleted (as in "nix-collect-garbage -d").
2017-09-05 GC: Don't delete own temproots fileEelco Dolstra3-34/+34
Since file locks are per-process rather than per-file-descriptor, the garbage collector would always acquire a lock on its own temproots file and conclude that it's stale.
2017-09-01 Abort curl downloads if there is no progress for 5 minutesEelco Dolstra1-1/+6
Maybe this will fix the curl hangs on macOS. (We could also use CURLOPT_TIMEOUT but that seems more of a sledgehammer.)
2017-08-31 Call queryMissing() prior to buildingEelco Dolstra2-0/+14
Without this, substitute info is fetched sequentially, which is superslow. In the old UI (e.g. nix-build), we call printMissing(), which calls queryMissing(), thereby preheating the binary cache cache. But the new UI doesn't do that.
2017-08-31 Add an activity for binary cache queriesEelco Dolstra2-1/+8
2017-08-31 Rename a few configuration optionsEelco Dolstra3-44/+56
In particular, drop the "build-" and "gc-" prefixes which are pointless. So now you can say nix build --no-sandbox instead of nix build --no-build-use-sandbox
2017-08-28 Give activities a verbosity level againEelco Dolstra5-9/+12
And print them (separately from the progress bar) given sufficient -v flags.
2017-08-28 Don't send progress messages to older clientsEelco Dolstra1-1/+1
2017-08-28 Tunnel progress messages from the daemon to the clientEelco Dolstra2-11/+61
This makes the progress bar work for non-root users.
2017-08-25 SimplifyEelco Dolstra1-10/+36
2017-08-25 Allow derivations to update the build phaseEelco Dolstra1-0/+5
So the progress bar can show [1/0/1 built, 0.0 MiB DL] building hello-2.10 (configuring): checking whether pread is declared without a macro... yes
2017-08-25 Allow activities to be nestedEelco Dolstra4-6/+13
In particular, this allows more relevant activities ("substituting X") to supersede inferior ones ("downloading X").
2017-08-25 Restore activity metadataEelco Dolstra1-2/+5
This allows the progress bar to display "building perl-5.22.3" instead of "building /nix/store/<hash>-perl-5.22.3.drv".
2017-08-21 Clean up JSON constructionEelco Dolstra1-3/+18
2017-08-21 Allow builders to create activitiesEelco Dolstra1-6/+72
Actually, currently they can only create download activities. Thus, downloads by builtins.fetchurl show up in the progress bar.
2017-08-16 nix optimise-store: Show how much space has been freedEelco Dolstra3-7/+11
2017-08-16 nix optimise-store: AddEelco Dolstra1-2/+12
This replaces "nix-store --optimise". Main difference is that it has a progress indicator.