about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2012-08-27 Fix stupid type error in calling std::maxEelco Dolstra1-1/+1
2012-08-27 Merge branch 'master' into no-manifestsEelco Dolstra7-64/+103
2012-08-20 Check if MS_PRIVATE is definedEelco Dolstra1-1/+1
http://hydra.nixos.org/build/2955671
2012-08-20 In the chroot, make all mounted filesystems privateEelco Dolstra1-0/+18
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-20 Don't bind-mount /proc since we mount our ownEelco Dolstra1-2/+2
2012-08-19 Fix 1755 permission on temporary directories left behind by ‘-K’Eelco Dolstra1-4/+4
2012-08-07 Don't warn about maximum link count exceeded on 0-byte filesEelco Dolstra1-2/+4
2012-08-05 Handle amount of disk space saved by hard linking being negativeEelco Dolstra1-2/+2
Fixes bogus messages like "currently hard linking saves 17592186044416.00 MiB".
2012-08-05 Fix race condition when two processes create a hard link to a file in .linksEelco Dolstra1-27/+37
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-05 Fix race condition when two processes create the same link in /nix/store/.linksEelco Dolstra1-4/+4
2012-08-01 Count bytes freed deleting unused linksEelco Dolstra2-3/+5
2012-08-01 Drop the block count in the garbage collectorEelco Dolstra5-16/+9
2012-08-01 nix-store --gc: Make ‘--max-freed 0’ do the right thingEelco Dolstra3-6/+5
That is, delete almost nothing (it will still remove unused links from /nix/store/.links).
2012-08-01 removeUnusedLinks(): Print stats on disk space saved by hard linkingEelco Dolstra1-1/+16
2012-08-01 Merge branch 'master' into no-manifestsEelco Dolstra1-1/+4
2012-08-01 DohEelco Dolstra1-1/+2
2012-08-01 Make ‘nix-store --optimise’ interruptibleEelco Dolstra1-0/+2
2012-08-01 Report substituter errors to clients of the Nix daemonEelco Dolstra2-22/+38
2012-07-31 Prevent an injection attack in passing untrusted options to substitutersEelco Dolstra1-0/+4
2012-07-31 Pass all --option flags to the daemonEelco Dolstra3-3/+22
2012-07-31 Add an option ‘build-fallback’ (equivalent to the --fallback flag)Eelco Dolstra1-1/+2
2012-07-30 Refactor settings processingEelco Dolstra11-428/+475
Put all Nix configuration flags in a Settings object.
2012-07-30 WhitespaceEelco Dolstra2-22/+22
2012-07-30 Pass configuration settings to the substitutersEelco Dolstra4-5/+28
Previously substituters could read nix.conf themselves, but this didn't take --option flags into account.
2012-07-30 Remove unused variablesEelco Dolstra2-5/+0
2012-07-30 Fix whitespaceEelco Dolstra1-71/+71
2012-07-27 Let build.cc verify the expected hash of a substituter's outputEelco Dolstra1-6/+33
Since SubstitutionGoal::finished() in build.cc computes the hash anyway, we can prevent the inefficiency of computing the hash twice by letting the substituter tell Nix about the expected hash, which can then verify it.
2012-07-27 Remove more tabsEelco Dolstra1-9/+9
2012-07-27 Remove trailing whitespace / tabsEelco Dolstra1-130/+130
2012-07-26 Fix the substituter testsEelco Dolstra1-1/+2
2012-07-26 Merge branch 'master' into no-manifestsEelco Dolstra13-160/+199
2012-07-26 Set permissions on temporary build directories to 0700Eelco Dolstra1-1/+2
Fixes #39.
2012-07-23 Handle platforms that don't support linking to a symlinkEelco Dolstra1-2/+7
E.g. Darwin doesn't allow this.
2012-07-23 Unlink the right fileEelco Dolstra1-2/+2
2012-07-23 Garbage collect unused links in /nix/store/.linksEelco Dolstra2-0/+39
Incremental optimisation requires creating links in /nix/store/.links to all files in the store. However, this means that if we delete a store path, no files are actually deleted because links in /nix/store/.links still exists. So we need to check /nix/store/.links for files with a link count of 1 and delete them.
2012-07-23 Automatically optimise the Nix store when a new path is addedEelco Dolstra4-9/+31
Auto-optimisation is enabled by default. It can be turned off by setting auto-optimise-store to false in nix.conf.
2012-07-23 optimiseStore(): Use a content-addressed file store in /nix/store/.linksEelco Dolstra2-107/+108
optimiseStore() now creates persistent, content-addressed hard links in /nix/store/.links. For instance, if it encounters a file P with hash H, it will create a hard link P' = /nix/store/.link/<H> to P if P' doesn't already exist; if P' exist, then P is replaced by a hard link to P'. This is better than the previous in-memory map, because it had the tendency to unnecessarily replace hard links with a hard link to whatever happened to be the first file with a given hash it encountered. It also allows on-the-fly, incremental optimisation.
2012-07-23 Use lutimes() if available to canonicalise the timestamp of symlinksEelco Dolstra1-9/+16
Also use utimes() instead of utime() if lutimes() is not available.
2012-07-18 Use "#pragma once" to prevent repeated header file inclusionEelco Dolstra9-45/+9
2012-07-18 Merge branch 'master' into no-manifestsEelco Dolstra7-15/+78
2012-07-17 Add function queryPathFromHashPart()Eelco Dolstra6-0/+46
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-17 Return an exit code of 100 for cached failed buildsEelco Dolstra1-0/+1
Exit code 100 should be returned for all permanent failures. This includes cached failures. Fixes #34.
2012-07-17 Update Nix 1.1 release notesEelco Dolstra1-0/+3
2012-07-17 Allow disabling log compressionEelco Dolstra1-12/+25
2012-07-11 Update the other substitutersEelco Dolstra1-2/+2
2012-07-11 Replace hasSubstitutes() with querySubstitutablePaths()Eelco Dolstra6-18/+35
querySubstitutablePaths() takes a set of paths, so this greatly reduces daemon <-> client latency.
2012-07-11 Add a function queryValidPaths()Eelco Dolstra6-0/+34
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 Dolstra7-14/+14
2012-07-11 Implement querySubstitutablePathInfos() in the daemonEelco Dolstra6-47/+42
Also removed querySubstitutablePathInfo().
2012-07-08 build.cc: Don't use hasSubstitute()Eelco Dolstra1-11/+25
Instead make a single call to querySubstitutablePathInfo() per derivation output. This is faster and prevents having to implement the "have" function in the binary cache substituter.