aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
AgeCommit message (Collapse)Author
2010-11-17* Implement RemoteStore::queryPathInfo().Eelco Dolstra
2010-11-16* Store the size of a store path in the database (to be precise, theEelco Dolstra
size of the NAR serialisation of the path, i.e., `nix-store --dump PATH'). This is useful for Hydra.
2010-11-16* Sync with the trunk.Eelco Dolstra
2010-10-14* Wrap deleteFromStore() in a transaction. Otherwise there might be aEelco Dolstra
race with other processes that add new referrers to a path, resulting in the garbage collector crashing with "foreign key constraint failed". (Nix/4) * Make --gc --print-dead etc. interruptible.
2010-10-04* Make sure that config.h is included before the system headers,Eelco Dolstra
because it defines _FILE_OFFSET_BITS. Without this, on OpenSolaris the system headers define it to be 32, and then the 32-bit stat() ends up being called with a 64-bit "struct stat", or vice versa. This also ensures that we get 64-bit file sizes everywhere. * Remove the redundant call to stat() in parseExprFromFile(). The file cannot be a symlink because that's the exit condition of the loop before.
2010-09-01* Only do "pragma journal_mode = ..." if the current journal modeEelco Dolstra
differs from the desired mode. There is an open SQLite ticket `Executing "PRAGMA journal_mode" may delete journal file while it is in use.'
2010-08-31* Always print hook output on stderr, even if --no-build-output isEelco Dolstra
set. * In the build hook, print a trace message to allow Hydra to pick up the name of the remote machine used for the build.
2010-08-31`nix-store --verify' improvements:Eelco Dolstra
* If a path has disappeared, check its referrers first, and don't try to invalidate paths that have valid referrers. Otherwise we get a foreign key constraint violation. * Read the whole Nix store directory instead of statting each valid path, which is slower. * Acquire the global GC lock.
2010-08-30* When using the build hook, distinguish between the stderr of theEelco Dolstra
hook script proper, and the stdout/stderr of the builder. Only the latter should be saved in /nix/var/log/nix/drvs. * Allow the verbosity to be set through an option. * Added a flag --quiet to lower the verbosity level.
2010-08-30* Disable the GC reachability check for now (when creating new roots),Eelco Dolstra
as it's hopelessly inefficient.
2010-08-27* Experimental feature: allow a derivation to tell the build hook thatEelco Dolstra
it requires a certain feature on the build machine, e.g. requiredSystemFeatures = [ "kvm" ]; We need this in Hydra to make sure that builds that require KVM support are forwarded to machines that have KVM support. Probably this should also be enforced for local builds.
2010-08-25* Made the build hook mechanism more efficient. Rather than startingEelco Dolstra
the hook every time we want to ask whether we can run a remote build (which can be very often), we now reuse a hook process for answering those queries until it accepts a build. So if there are N derivations to be built, at most N hooks will be started.
2010-08-24* Don't complain if the stored hash of a path is zero (unknown).Eelco Dolstra
2010-08-24* Handle the unlikely case where a derivation has no dependencies atEelco Dolstra
all.
2010-08-24* Sync with the trunk.Eelco Dolstra
2010-08-12* Make --cores work when building through the Nix daemon.Eelco Dolstra
2010-08-04* Sync with the trunk.Eelco Dolstra
2010-08-04* Use SQLite 3.7.0's write-ahead logging (WAL mode). This is a lotEelco Dolstra
faster than the old mode when fsyncs are enabled, because it only performs an fsync() when doing a checkpoint, rather than at every commit. Some timings for doing a "nix-instantiate /etc/nixos/nixos -A system" after modifying the stdenv setup script: 42.5s - SQLite 3.6.23 with truncate mode and fsync 3.4s - SQLite 3.6.23 with truncate mode and no fsync 32.1s - SQLite 3.7.0 with truncate mode and fsync 16.8s - SQLite 3.7.0 with WAL mode and fsync, auto-checkpoint every 1000 pages 8.3s - SQLite 3.7.0 with WAL mode and fsync, auto-checkpoint every 8192 pages 1.7s - SQLite 3.7.0 with WAL mode and no fsync The default is now to use WAL mode with fsyncs. Because WAL doesn't work on remote filesystems such as NFS (as it uses shared memory), truncate mode can be re-enabled by setting the "use-sqlite-wal" option to false.
2010-08-04* Allow derivations to hint that they should not be built remotelyEelco Dolstra
using the build hook mechanism, by setting the derivation attribute "preferLocalBuild" to true. This has a few use cases: - The user environment builder. Since it just creates a bunch of symlinks without much computation, there is no reason to do it remotely. In fact, doing it remotely requires the entire closure of the user environment to be copied to the remote machine, which is extremely wasteful. - `fetchurl'. Performing the download on a remote machine and then copying it to the local machine involves twice as much network traffic as performing the download locally, and doesn't save any CPU cycles on the local machine.
2010-06-24Include <cstring> to ensure that strcpy(), strlen(), and memset() are declared.Peter Simons
An "using namespace std" was added locally in those functions that refer to names from <cstring>. That is not pretty, but it's a very portable solution, because strcpy() and friends will be found in both the 'std' and in the global namespace.
2010-06-23Added support for passing an (impure) NIX_BUILD_CORES variable to build ↵Peter Simons
expressions. This patch adds the configuration file variable "build-cores" and the command line argument "--cores". These settings specify the number of CPU cores to utilize for parallel building within a job, i.e. by passing an appropriate "-j" flag to GNU Make. The default value is 1, which means that parallel building is *disabled*. If the number of build cores is specified as 0 (synonymously: "guess" or "auto"), then the actual value is supposed to be auto-detected by builders at run-time, i.e by calling the nproc(1) utility from coreutils. The environment variable $NIX_BUILD_CORES is available to builders, but the contents of that variable does *not* influence the hash that goes into the $out store path, i.e. the number of build cores to be utilized can be changed at will without requiring any re-builds.
2010-06-21* Okay, putting a lock on the temporary directory used by importPath()Eelco Dolstra
doesn't work because the garbage collector doesn't actually look at locks. So r22253 was stupid. Use addTempRoot() instead. Also, locking the temporary directory in exportPath() was silly because it isn't even in the store.
2010-06-21* Sync with the trunk.Eelco Dolstra
2010-06-14* In importPath() and exportPath(), lock the temporary directory toEelco Dolstra
prevent it from being deleted by the garbage collector.
2010-06-08* Replacing ValidPath rows doesn't work because it causes a constraintEelco Dolstra
violation of the Refs table. So don't do that.
2010-06-04* Applied a patch from David Brown to prevent `nix-store --optimise'Eelco Dolstra
from failing on rename() on BtrFS.
2010-06-01* Turn build errors during evaluation into EvalErrors.Eelco Dolstra
2010-06-01* Hack to allow derivations to disable chroot builds by setting theEelco Dolstra
attribute "__noChroot = true" (requested by Rob).
2010-05-12* Sync with the trunk.Eelco Dolstra
2010-05-04* Allow unprivileged users to do `nix-store --clear-failed-paths' andEelco Dolstra
`nix-store --query-failed-paths'.
2010-04-26* Added a command `nix-store --clear-failed-paths <PATHS>' to clearEelco Dolstra
the "failed" status of the given store paths. The special value `*' clears all failed paths.
2010-04-26* Add an command `nix-store --query-failed-paths' to list the cachedEelco Dolstra
failed paths (when using the `build-cache-failure' option).
2010-04-21* Don't use an ostringstream in unparseDerivation(), because it'sEelco Dolstra
slow. A `nix-env -qa --drv-path \*' on Nixpkgs was spending 40% of its time in unparseDerivation() because of this (now 11%).
2010-04-19* Drop the dependency on the ATerm library.Eelco Dolstra
2010-04-19* Don't use the ATerm library for parsing/printing .drv files.Eelco Dolstra
2010-03-11* Sync with the trunk.Eelco Dolstra
2010-03-11Show the build user's group in /etc/group in chroots.Ludovic Courtès
* src/libstore/build.cc (nix::DerivationGoal::startBuilder): Create /etc/group showing the build user's group.
2010-03-11* Sync with the trunk.Eelco Dolstra
2010-03-11Fix thinko in r20547.Ludovic Courtès
* src/libstore/build.cc (nix::DerivationGoal::startBuilder): Fix the GID of the build user in /etc/passwd.
2010-03-11Clear supplementary groups of `nixbld' in /etc/passwd in chroots.Ludovic Courtès
* src/libstore/build.cc (nix::DerivationGoal::startBuilder): Don't display any supplementary groups for `nixbld' in /etc/passwd.
2010-03-10* Remove a debug statement.Eelco Dolstra
2010-03-09* In `nix-store --export', abort if the contents of a path hasEelco Dolstra
changed. This prevents corrupt paths from spreading to other machines. Note that checking the hash is cheap because we're hashing anyway (because of the --sign feature).
2010-03-08* Set `gc-keep-outputs' or `gc-keep-derivations' to false withEelco Dolstra
`--delete --ignore-liveness'.
2010-03-08* Increase the sqlite timeout.Eelco Dolstra
2010-03-04* Remove some unused functions.Eelco Dolstra
2010-03-02* checkInterrupt() shouldn't be called from a destructor.Eelco Dolstra
2010-03-02* When using the included sqlite/aterm libraries, build withEelco Dolstra
--enable-shared. * In libutil/libstore/libexpr etc., link against sqlite and aterm. * Some more header file hygiene.
2010-02-26* Implement RemoteStore::queryValidPaths().Eelco Dolstra
2010-02-25* Implement RemoteStore::queryDerivationOutputs().Eelco Dolstra
2010-02-24* Support read-only access to the database.Eelco Dolstra