aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
AgeCommit message (Collapse)Author
2012-10-03Add a ‘--repair’ flag to nix-instantiateEelco Dolstra
This allows repairing corrupted derivations and other source files.
2012-10-03Handle repairing paths that are in build-chroot-dirsEelco Dolstra
2012-10-03When repairing a derivation, check and repair the entire output closureEelco Dolstra
If we find a corrupted path in the output closure, we rebuild the derivation that produced that particular path.
2012-10-02Add a --repair flag to ‘nix-store -r’ to repair derivation outputsEelco Dolstra
With this flag, if any valid derivation output is missing or corrupt, it will be recreated by using a substitute if available, or by rebuilding the derivation. The latter may use hash rewriting if chroots are not available.
2012-10-02nix-store --verify: Add an option ‘--repair’ to repair all ↵Eelco Dolstra
missing/corrupt paths Also, return a non-zero exit code if errors remain after verifying/repairing.
2012-10-02Add operation ‘nix-store --repair-path’Eelco Dolstra
This operation allows fixing corrupted or accidentally deleted store paths by redownloading them using substituters, if available. Since the corrupted path cannot be replaced atomically, there is a very small time window (one system call) during which neither the old (corrupted) nor the new (repaired) contents are available. So repairing should be used with some care on critical packages like Glibc.
2012-09-28Handle octal escapes in /proc/self/mountinfoEelco Dolstra
2012-09-28Print a more descriptive error message if setting up the build environment failsEelco Dolstra
2012-09-25Make the store writable before creating /nix/store/.linksEelco Dolstra
2012-09-25Merge branch 'readonly-store'Eelco Dolstra
2012-09-25Include <sys/types.h> for off_tEelco Dolstra
Reported by "gio" on IRC.
2012-09-19Remove setting of the immutable bitEelco Dolstra
Using the immutable bit is problematic, especially in conjunction with store optimisation. For instance, if the garbage collector deletes a file, it has to clear its immutable bit, but if the file has additional hard links, we can't set the bit afterwards because we don't know the remaining paths. So now that we support having the entire Nix store as a read-only mount, we may as well drop the immutable bit. Unfortunately, we have to keep the code to clear the immutable bit for backwards compatibility.
2012-09-19Support having /nix/store as a read-only bind mountEelco Dolstra
It turns out that the immutable bit doesn't work all that well. A better way is to make the entire Nix store a read-only bind mount, i.e. by doing $ mount --bind /nix/store /nix/store $ mount -o remount,ro,bind /nix/store (This would typically done in an early boot script, before anything from /nix/store is used.) Since Nix needs to be able to write to the Nix store, it now detects if /nix/store is a read-only bind mount and then makes it writable in a private mount namespace.
2012-09-19Templatise tokenizeString()Eelco Dolstra
2012-09-18Keep build directory if not all expected outputs were producedEelco Dolstra
Fixes issue #123 in Nixpkgs.
2012-09-13RemoteStore::connectToDaemon(): Set close-on-exec flagEelco Dolstra
This ensures that "nix-build --run-env" doesn't keep a connection to the worker open, preventing it from exiting.
2012-09-13Vacuum the SQLite DB after running the garbage collectorEelco Dolstra
2012-09-13Delete paths in a component in topologically sorted orderEelco Dolstra
The outputs of a derivation can refer to each other (even though they cannot have cycles), so they have to be deleted in the right order. http://hydra.nixos.org/build/3026118
2012-09-13Disable auto store optimisation for nowEelco Dolstra
I've seen operations like "nix-store --import" take much longer on one system. So default to off until I've investigated this a bit further.
2012-09-13In startBuilder(), only print the new paths we're buildingEelco Dolstra
2012-09-12Handle gc-keep-outputs and gc-keep-derivations both enabledEelco Dolstra
If the options gc-keep-outputs and gc-keep-derivations are both enabled, you can get a cycle in the liveness graph. There was a hack to handle this, but it didn't work with multiple-output derivations, causing the garbage collector to fail with errors like ‘error: cannot delete path `...' because it is in use by `...'’. The garbage collector now handles strongly connected components in the liveness graph as a unit and decides whether to delete all or none of the paths in an SCC.
2012-09-12Build hook: Pass the timeout to the remote builderEelco Dolstra
Note that this will only work if the client has a very recent Nix version (post 15e1b2c223494ecb5efefc3ea0e3b926a6b1d7dc), otherwise the --option flag will just be ignored. Fixes #50.
2012-09-11Fix "non-zero padding" errorEelco Dolstra
Probably it's not a good idea to pass a temporary object to StringSource.
2012-09-11Support building a derivation if some outputs are already valid (non-chroot ↵Eelco Dolstra
case) This uses scary hash rewriting. Fixes #21.
2012-09-11Remove debug lineEelco Dolstra
2012-09-11Support building a derivation if some outputs are already validEelco Dolstra
This handles the chroot and build hook cases, which are easy. Supporting the non-chroot-build case will require more work (hash rewriting!). Issue #21.
2012-09-11Include config.h before any other headerEelco Dolstra
"config.h" must be included first, because otherwise the compiler might not see the right value of _FILE_OFFSET_BITS. We've had this before; see 705868a8a96a10f70e629433cfffc2d5cd2703eb. In this case, GCC would compute a different address for ‘settings.useSubstitutes’ in misc.cc because of the off_t in ‘settings’. Reverts 3854fc9b42d16b810f62b64194b699033b03aaf1. http://hydra.nixos.org/build/3016700
2012-08-27Fix stupid type error in calling std::maxEelco Dolstra
2012-08-27Merge branch 'master' into no-manifestsEelco Dolstra
2012-08-20Check if MS_PRIVATE is definedEelco Dolstra
http://hydra.nixos.org/build/2955671
2012-08-20In the chroot, make all mounted filesystems privateEelco Dolstra
This is required on systemd, which mounts filesystems as "shared" subtrees. Changes to shared trees in a private mount namespace are propagated to the outside world, which is bad.
2012-08-20Don't bind-mount /proc since we mount our ownEelco Dolstra
2012-08-19Fix 1755 permission on temporary directories left behind by ‘-K’Eelco Dolstra
2012-08-07Don't warn about maximum link count exceeded on 0-byte filesEelco Dolstra
2012-08-05Handle amount of disk space saved by hard linking being negativeEelco Dolstra
Fixes bogus messages like "currently hard linking saves 17592186044416.00 MiB".
2012-08-05Fix race condition when two processes create a hard link to a file in .linksEelco Dolstra
This is a problem because one process may set the immutable bit before the second process has created its link. Addressed random Hydra failures such as: error: cannot rename `/nix/store/.tmp-link-17397-1804289383' to `/nix/store/rsvzm574rlfip3830ac7kmaa028bzl6h-nixos-0.1pre-git/upstart-interface-version': Operation not permitted
2012-08-05Fix race condition when two processes create the same link in /nix/store/.linksEelco Dolstra
2012-08-01Count bytes freed deleting unused linksEelco Dolstra
2012-08-01Drop the block count in the garbage collectorEelco Dolstra
2012-08-01nix-store --gc: Make ‘--max-freed 0’ do the right thingEelco Dolstra
That is, delete almost nothing (it will still remove unused links from /nix/store/.links).
2012-08-01removeUnusedLinks(): Print stats on disk space saved by hard linkingEelco Dolstra
2012-08-01Merge branch 'master' into no-manifestsEelco Dolstra
2012-08-01DohEelco Dolstra
2012-08-01Make ‘nix-store --optimise’ interruptibleEelco Dolstra
2012-08-01Report substituter errors to clients of the Nix daemonEelco Dolstra
2012-07-31Prevent an injection attack in passing untrusted options to substitutersEelco Dolstra
2012-07-31Pass all --option flags to the daemonEelco Dolstra
2012-07-31Add an option ‘build-fallback’ (equivalent to the --fallback flag)Eelco Dolstra
2012-07-30Refactor settings processingEelco Dolstra
Put all Nix configuration flags in a Settings object.
2012-07-30WhitespaceEelco Dolstra