aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2005-02-01* Remove debug code.Eelco Dolstra
2005-02-01* Make check fixes.Eelco Dolstra
2005-02-01* Move root finding from `nix-collect-garbage' to `nix-store --gc'.Eelco Dolstra
This was necessary becase root finding must be done after acquisition of the global GC lock. This makes `nix-collect-garbage' obsolete; it is now just a wrapper around `nix-store --gc'. * Automatically remove stale GC roots (i.e., indirect GC roots that point to non-existent paths).
2005-02-01* nix-build: use an indirection scheme to make it easier for users toEelco Dolstra
get rid of GC roots. Nix-build places a symlink `result' in the current directory. Previously, removing that symlink would not remove the store path being linked to as a GC root. Now, the GC root created by nix-build is actually a symlink in `/nix/var/nix/gcroots/auto' to `result'. So if that symlink is removed the GC root automatically becomes invalid (since it can no longer be resolved). The root itself is not automatically removed - the garbage collector should delete dangling roots.
2005-02-01* nix-store, nix-instantiate: added an option `--add-root' toEelco Dolstra
immediately add the result as a permanent GC root. This is the only way to prevent a race with the garbage collector. For instance, the old style ln -s $(nix-store -r $(nix-instantiate foo.nix)) \ /nix/var/nix/gcroots/result has two time windows in which the garbage collector can interfere (by GC'ing the derivation and the output, respectively). On the other hand, nix-store --add-root /nix/var/nix/gcroots/result -r \ $(nix-instantiate --add-root /nix/var/nix/gcroots/drv \ foo.nix) is safe. * nix-build: use `--add-root' to prevent GC races.
2005-02-01* Get rid of hardcoded paths.Eelco Dolstra
2005-01-31* Start of concurrent garbage collection. Processes write temporaryEelco Dolstra
roots to a per-process temporary file in /nix/var/nix/temproots while holding a write lock on that file. The garbage collector acquires read locks on all those files, thus blocking further progress in other Nix processes, and reads the sets of temporary roots.
2005-01-27* Fix and simplify the garbage collector (it's still not concurrent,Eelco Dolstra
though). In particular it's now much easier to register a GC root. Just place a symlink to whatever store path it is that you want to keep in /nix/var/nix/gcroots.
2005-01-25* Really fix the substitute mechanism, i.e., ensure the closureEelco Dolstra
invariant by registering references through the manifest. * Added a test for nix-pull.
2005-01-19* Set the Perl search path properly (reported by Roy van den Broek).Eelco Dolstra
2005-01-17* Removed the `id' attribute hack.Eelco Dolstra
* Formalise the notion of fixed-output derivations, i.e., derivations for which a cryptographic hash of the output is known in advance. Changes to such derivations should not propagate upwards through the dependency graph. Previously this was done by specifying the hash component of the output path through the `id' attribute, but this is insecure since you can lie about it (i.e., you can specify any hash and then produce a completely different output). Now the responsibility for checking the output is moved from the builder to Nix itself. A fixed-output derivation can be created by specifying the `outputHash' and `outputHashAlgo' attributes, the latter taking values `md5', `sha1', and `sha256', and the former specifying the actual hash in hexadecimal or in base-32 (auto-detected by looking at the length of the attribute value). MD5 is included for compatibility but should be considered deprecated. * Removed the `drvPath' pseudo-attribute in derivation results. It's no longer necessary. * Cleaned up the support for multiple output paths in derivation store expressions. Each output now has a unique identifier (e.g., `out', `devel', `docs'). Previously there was no way to tell output paths apart at the store expression level. * `nix-hash' now has a flag `--base32' to specify that the hash should be printed in base-32 notation. * `fetchurl' accepts parameters `sha256' and `sha1' in addition to `md5'. * `nix-prefetch-url' now prints out a SHA-1 hash in base-32. (TODO: a flag to specify the hash.)
2005-01-14* Use absolute paths.Eelco Dolstra
2005-01-12* Script to remove patches from manifests.Eelco Dolstra
2005-01-12* Print out less garbage.Eelco Dolstra
2005-01-05* Prototype store optimiser. It searched the Nix store for identicalEelco Dolstra
files and hard-links them to each other to save disk space. Currently it doesn't actually do the hard-linking, it just reports the amount of space saved if it did.
2004-12-31* If a patch already exists, it must still be included in the manifest.Eelco Dolstra
2004-12-30* More instrumentation (statistics go to /nix/var/log/nix/downloads).Eelco Dolstra
2004-12-30* Fix handling of chained patches: don't skip patches if intermediateEelco Dolstra
paths are missing, etc.
2004-12-30* Some logging for evaluation.Eelco Dolstra
2004-12-29* Propagate patches from the source distribution to the destinationEelco Dolstra
distribution insofar they are applicable.
2004-12-29* Reject patches larger than the full archives they produce.Eelco Dolstra
2004-12-29* Atomic file replacement is good.Eelco Dolstra
2004-12-29* A utility to generate patches between releases based on theirEelco Dolstra
manifests.
2004-12-28* A small utility to add the Size and NarHash fields to old manifests.Eelco Dolstra
2004-12-28* Added a function to write manifests.Eelco Dolstra
2004-12-20* Place manifests in /nix/var/nix/manifests.Eelco Dolstra
* Use the new patch downloader.
2004-12-20* Sync with changed substitute mechanism.Eelco Dolstra
* Accept the NarHash line. * Clear substitutes in `nix-channel --update'.
2004-12-16* Fix nix-pull.Eelco Dolstra
2004-12-16* Remove `prebuilts.conf' file, it's not like anybody was using it.Eelco Dolstra
* Add /nix/var/nix/manifests directory.
2004-12-13* Include the size of the bzipped archive (necessary for computing theEelco Dolstra
cheapest download path), as well as the hash of the contents of the path (necessary for checking patch applicability).
2004-12-13* Patch deployment. `download.pl' (intended to be used in theEelco Dolstra
substitute mechanism) creates a store path by downloading full NAR archives and/or patches specified in the available manifests. Any combination of present paths, full downloads, and patches can be used to construct the target path. In particular, patches can be chained in sequence; and full NAR archives of the target path can be omitted (i.e., patch-only deployment is possible). A shortest path algorithm is used to find the smallest set of files to be downloaded (the edge weights are currently file sizes, but one can imagine taking the network speed to the various source into account). Patches are binary deltas between two store paths. To be precise, they are the output of the `bsdiff' program applied to the NAR archives obtained by dumping (`nix-store --dump') the two store paths. The advantage of diff'ing NAR archives (and not, say, doing file-by-file diffs) is that file renames/moves are handled automatically. The disadvantage is that we cannot optimise creation of unchanged files (by hard-linking).
2004-12-13* Allow an optional hash to be provided. This prevents redundantEelco Dolstra
fetches.
2004-11-04* Better error messages.Eelco Dolstra
2004-10-31* Fix `File exists' errors if the `result' symlink exists but isEelco Dolstra
dangling.
2004-10-20* Register channels as roots of the garbage collector (inEelco Dolstra
$(localstatedir)/nix/gcroots/channels). * In setuid installations, create gcroots/tmp and gcroots/channels group-writable.
2004-10-20* Fix nix-prefetch-url in setuid Nix installations.Eelco Dolstra
2004-10-20* Show error messages from curl.Eelco Dolstra
2004-08-25* `--min-age' flag in nix-store and nix-collect-garbage to only deleteEelco Dolstra
unreachable paths that haven't been used for N hours. For instance, `nix-collect-garbage --min-age 168' only deletes paths that haven't been accessed in the last week. This is useful for instance in the build farm where many derivations can be shared between consecutive builds, and we wouldn't want a garbage collect to throw them all away. We could of course register them as roots, but then we'd to unregister them at some point, which would be a pain to manage. The `--min-age' flag gives us a sort of MRU caching scheme. BUG: this really shouldn't be in gc.cc since that violates mechanism/policy separation.
2004-08-25* `nix-collect-garbage' now actually performs a garbage collection, itEelco Dolstra
doesn't just print the set of paths that should be deleted. So there is no more need to pipe the result into `nix-store --delete' (which doesn't even exist anymore).
2004-08-20* Setuid support for sharing a Nix installation between multipleEelco Dolstra
users. If the configure flag `--enable-setuid' is used, the Nix programs nix-env, nix-store, etc. are installed with the setuid bit turned on so that they are executed as the user and group specified by `--with-nix-user=USER' and `--with-nix-group=GROUP', respectively (with defaults `nix' and `nix'). The setuid programs drop all special privileges if they are executed by a user who is not a member of the Nix group. The setuid feature is a quick hack to enable sharing of a Nix installation between users who trust each other. It is not generally secure, since any user in the Nix group can modify (by building an appropriate derivation) any object in the store, and for instance inject trojans into binaries used by other users. The setuid programs are owned by root, not the Nix user. This is because on Unix normal users cannot change the real uid, only the effective uid. Many programs don't work properly when the real uid differs from the effective uid. For instance, Perl will turn on taint mode. However, the setuid programs drop all root privileges immediately, changing all uids and gids to the Nix user and group.
2004-08-18* Flag `--no-link' suppresses symlinking to the output path.Eelco Dolstra
* Handle multiple derivations correctly.
2004-07-28* Nix-build places a symlink `result' in the current directory to theEelco Dolstra
store object just built.
2004-06-22* Nix-instantiate can return multiple store expressions.Eelco Dolstra
2004-06-22* A utility script `nix-build' that builds Nix expressions and printsEelco Dolstra
their output paths (and only that) on standard output.
2004-06-21* Adapted nix-pull to use the new substitute mechanism.Eelco Dolstra
2004-04-22* Look for GC roots in @localstatedir@/nix/gcroots.Eelco Dolstra
2004-04-21* Channels. These allow you to stay current with an evolving set ofEelco Dolstra
Nix expressions. To subscribe to a channel (needs to be done only once): nix-channel --add \ http://catamaran.labs.cs.uu.nl/dist/nix/channels/nixpkgs-unstable This just adds the given URL to ~/.nix-channels (which can also be edited manually). To update from all channels: nix-channel --update This fetches the latest expressions and pulls cache manifests. The default Nix expression (~/.nix-defexpr) is made to point to the conjunction of the expressions downloaded from all channels. So to update all installed derivations in the current user environment: nix-channel --update nix-env --upgrade '*' If you are really courageous, you can put this in a cronjob or something. You can subscribe to multiple channels. It is not entirely clear what happens when there are name clashes between derivations from different channels. From nix-env/main.cc it appears that the one with the lowest (highest?) hash will be used, which is pretty meaningless.
2004-04-15* Allow extra parameters to be passed to Curl through the `CURL_FLAGS'Eelco Dolstra
environment variable. This is useful for passing authentication information (it won't show up in `ps'). Hacky - nix-push should abstract over the use of Curl.
2004-04-14* `*.gcroot' files can now containing multiple roots.Eelco Dolstra
2004-04-06* Distributed the wrong file.Eelco Dolstra