about summary refs log tree commit diff
path: root/src/libstore/optimise-store.cc
AgeCommit message (Collapse)AuthorFilesLines
2012-02-15 On Linux, make the Nix store really read-only by using the immutable bitEelco Dolstra1-2/+24
I was bitten one time too many by Python modifying the Nix store by creating *.pyc files when run as root. On Linux, we can prevent this by setting the immutable bit on files and directories (as in ‘chattr +i’). This isn't supported by all filesystems, so it's not an error if setting the bit fails. The immutable bit is cleared by the garbage collector before deleting a path. The only tricky aspect is in optimiseStore(), since it's forbidden to create hard links to an immutable file. Thus optimiseStore() temporarily clears the immutable bit before creating the link.
2010-11-16 * Store the size of a store path in the database (to be precise, theEelco Dolstra1-1/+1
size of the NAR serialisation of the path, i.e., `nix-store --dump PATH'). This is useful for Hydra.
2010-06-04 * Applied a patch from David Brown to prevent `nix-store --optimise'Eelco Dolstra1-1/+15
from failing on rename() on BtrFS.
2009-09-24 * And some more.Eelco Dolstra1-0/+1
2009-04-21 * Use foreach in a lot of places.Eelco Dolstra1-2/+2
2008-06-18 * `nix-store --optimise': handle files with >= 32000 hard links.Eelco Dolstra1-6/+31
(There can easily be more than 32000 occurrences of the empty file.)
2008-06-18 * Some refactoring: put the GC options / results in separate structs.Eelco Dolstra1-0/+1
* The garbage collector now also prints the number of blocks freed.
2008-06-09 * Merged the no-bdb branch (-r10900:HEADEelco Dolstra1-0/+129
https://svn.nixos.org/repos/nix/nix/branches/no-bdb).