about summary refs log tree commit diff
path: root/src/libutil
AgeCommit message (Collapse)AuthorFilesLines
2005-12-15 * `nix-store --gc' prints out the number of bytes freed on stdoutEelco Dolstra2-4/+17
(even when it is interrupted by a signal).
2005-11-16 * Did something useful while waiting at IAD: reference scanning is nowEelco Dolstra2-1/+7
much faster.
2005-09-22 * Parse multi-valued options.Eelco Dolstra2-0/+19
2005-07-22 * Build dynamic libraries.Eelco Dolstra1-2/+2
2005-05-04 * FreeBSD 4.x doesn't have stdint.h, use inttypes.h instead (which isEelco Dolstra3-3/+3
also part of ISO C).
2005-05-04 * The eof() state isn't guaranteed to be set non-lazily. GCC 2.95Eelco Dolstra1-1/+1
compatibility fix.
2005-03-24 * Create missing log and temproots directories automatically (reportedEelco Dolstra2-0/+13
by Rob).
2005-03-23 * Fix endianness bug.Eelco Dolstra1-18/+18
2005-03-03 * Don't use fork() in copyPath(), but a string buffer.Eelco Dolstra1-0/+3
2005-02-11 * Refactoring to support different installation sources in nix-env.Eelco Dolstra1-0/+8
* Set the references for the user environment manifest properly. * Don't copy the manifest (this was accidental). * Don't store derivation paths in the manifest (maybe this should be made optional). This cleans up the semantics of nix-env, which were weird. * Hash on the output paths of activated components, not on derivation paths. This is because we don't know the derivation path of already installed components anymore, and it allows the installation of components by store path (skipping Nix expressions entirely). * Query options `--out-path' and `--drv-path' to show the output and derivation paths of components, respectively (the latter replaces the `--expr' query).
2005-02-09 * Automatically upgrade <= 0.7 Nix stores to the new schema (so thatEelco Dolstra2-0/+12
existing user environments continue to work). * `nix-store --verify': detect incomplete closures.
2005-02-01 * A GC setting `gc-keep-outputs' to specify whether output paths ofEelco Dolstra2-0/+25
derivations should be kept.
2005-02-01 * nix-build: use an indirection scheme to make it easier for users toEelco Dolstra2-0/+11
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-01-31 * Topologically sort paths under the references relation to ensureEelco Dolstra1-1/+0
that they are deleted in an order that maintains the closure invariant. * Presence of a path in a temporary roots file does not imply that all paths in its closure are also present, so add the closure.
2005-01-31 * Start of concurrent garbage collection. Processes write temporaryEelco Dolstra2-4/+12
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 * Make lock removal safe by signalling to blocked processes that theEelco Dolstra2-0/+10
lock they are waiting on has become stale (we do this by writing a meaningless token to the unlinked file).
2005-01-20 * Another change to low-level derivations. The last one this year, IEelco Dolstra1-0/+2
promise :-) This allows derivations to specify on *what* output paths of input derivations they are dependent. This helps to prevent unnecessary downloads. For instance, a build might be dependent on the `devel' and `lib' outputs of some library component, but not the `docs' output.
2005-01-17 * Removed the `id' attribute hack.Eelco Dolstra2-6/+67
* 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 * Shorten SHA-256 hashes used in store path name generation to 160Eelco Dolstra2-11/+85
bits, then encode them in a radix-32 representation (using digits and letters except e, o, u, and t). This produces store paths like /nix/store/4i0zb0z7f88mwghjirkz702a71dcfivn-aterm-2.3.1. The nice thing about this is that the hash part of the file name is still 32 characters, as before with MD5. (Of course, shortening SHA-256 to 160 bits makes it no better than SHA-160 in theory, but hopefully it's a bit more resistant to attacks; it's certainly a lot slower.)
2005-01-14 * Start move towards SHA-256 hashes instead of MD5.Eelco Dolstra2-1/+2
* Start cleaning up unique store path generation (they weren't always unique; in particular the suffix ("-aterm-2.2", "-builder.sh") was not part of the hash, therefore changes to the suffix would cause multiple store objects with the same hash).
2005-01-14 * Add SHA-256.Eelco Dolstra6-5/+904
* Tests for the various hashes.
2005-01-14 * Removed some dead code.Eelco Dolstra2-152/+1
2005-01-13 * Added SHA-1 support. `nix-hash' now has an option `--type sha1' toEelco Dolstra5-21/+471
select SHA-1 hashing.
2005-01-13 * Refactoring to support SHA-1.Eelco Dolstra2-11/+25
2004-11-08 * Fix broken format string.Eelco Dolstra1-1/+1
2004-11-03 * string2ATerm -> overloaded toATerm.Eelco Dolstra2-0/+17
2004-10-29 * Drop ATmake / ATMatcher also in handling store expressions.Eelco Dolstra4-204/+0
2004-09-10 * Operation `--delete-generations' to delete generations of aEelco Dolstra2-0/+12
profile. Arguments are either generation number, or `old' to delete all non-current generations. Typical use: $ nix-env --delete-generations old $ nix-collect-garbage * istringstream -> string2Int.
2004-09-09 * A very dirty hack to make setuid installations a bit nicer to use.Eelco Dolstra1-0/+10
Previously there was the problem that all files read by nix-env etc. should be reachable and readable by the Nix user. So for instance building a Nix expression in your home directory meant that the home directory should have at least g+x or o+x permission so that the Nix user could reach the Nix expression. Now we just switch back to the original user just prior to reading sources and the like. The places where this happens are somewhat arbitrary, however. Any scope that has a live SwitchToOriginalUser object in it is executed as the original user. * Back out r1385. setreuid() sets the saved uid to the new real/effective uid, which prevents us from switching back to the original uid. setresuid() doesn't have this problem (although the manpage has a bug: specifying -1 for the saved uid doesn't leave it unchanged; an explicit value must be specified).
2004-08-18 * The default verbosity level of all Nix commands is now lvlInfo.Eelco Dolstra1-1/+1
* Builder output is written to standard error by default. * The option `-B' is gone. * The option `-Q' suppresses builder output. The result of this is that most Nix invocations shouldn't need any flags w.r.t. logging.
2004-08-04 * Creating a file nix-support/no-scan in the output path of aEelco Dolstra1-1/+1
derivation disables scanning for dependencies. Use at your own risk. This is a quick hack to speed up UML image generation (image are very big, say 1 GB). It would be better if the scanner were faster, and didn't read the whole file into memory.
2004-06-25 * A flag `--keep-going / -k' to keep building goals if one fails, asEelco Dolstra1-9/+8
much as possible. (This is similar to GNU Make's `-k' flag.) * Refactoring to implement this: previously we just bombed out when a build failed, but now we have to clean up. In particular this means that goals must be freed quickly --- they shouldn't hang around until the worker exits. So the worker now maintains weak pointers in order not to prevent garbage collection. * Documented the `-k' and `-j' flags.
2004-06-22 * Some more diagnostics changes.Eelco Dolstra1-2/+2
2004-06-22 * Put WEXITSTATUS stuff somewhere else.Eelco Dolstra2-0/+8
2004-06-22 * Wrapper class around pids.Eelco Dolstra2-0/+125
2004-06-22 * Refactoring.Eelco Dolstra2-0/+18
2004-06-20 * Refactoring.Eelco Dolstra2-0/+50
2004-06-15 * Refactoring.Eelco Dolstra2-1/+39
2004-05-12 * An quick and dirty hack to support distributed builds.Eelco Dolstra2-2/+11
2004-05-11 * Ignore interrupt signals while handling an exception.Eelco Dolstra1-4/+15
* Ignore EINTR in reads and writes.
2004-04-23 * Pass SYSTEM through config.h, and allow spaces.Eelco Dolstra2-1/+3
2004-03-27 * Disallow the Nix store or any of its parents from being symlinks.Eelco Dolstra1-5/+8
This is because the contents of these symlinks are not incorporated into the hashes of derivations, and could therefore cause a mismatch between the build system and the target system. E.g., if `/nix/store' is a symlink to `/data/nix/store', then a builder could expand this path and store the result. If on the target system `/nix/store' is not a symlink, or is a symlink that points somewhere else, we have a dangling pointer. The trigger for this change is that gcc 3.3.3 does exactly that (it applies realpath() to some files, such as libraries, which causes our impurity checker to bail out.) An annoying side-effect of this change is that it makes it harder to move the Nix store to a different file system. On Linux, bind mounts can be used instead of symlink for this purpose (e.g., `mount -o bind /data/nix/store /nix/store').
2004-03-27 * Do not close a nesting level twice after close() has beenEelco Dolstra1-0/+1
called explicitly on a Nest object.
2004-03-22 * Some more nesting.Eelco Dolstra2-10/+27
2004-03-22 * Nix now has three different formats for the log information itEelco Dolstra2-6/+34
writes to stderr: - `pretty': the old nested style (default) - `escapes': uses escape codes to indicate nesting and message level; can be processed using `log2xml' - `flat': just plain text, no nesting These can be set using `--log-type TYPE' or the NIX_LOG_TYPE environment variable.
2004-02-16 * Allow linking against an external Berkeley DB / ATerm library.Eelco Dolstra1-2/+2
2004-02-06 * Use the profile pointed to by ~/.nix-profile if no --profileEelco Dolstra1-1/+1
argument is specified.
2004-01-15 * Catch SIGINT to terminate cleanly when the user tries to interruptEelco Dolstra3-0/+36
Nix. This is to prevent Berkeley DB from becoming wedged. Unfortunately it is not possible to throw C++ exceptions from a signal handler. In fact, you can't do much of anything except change variables of type `volatile sig_atomic_t'. So we set an interrupt flag in the signal handler and check it at various strategic locations in the code (by calling checkInterrupt()). Since this is unlikely to cover all cases (e.g., (semi-)infinite loops), sometimes SIGTERM may now be required to kill Nix.
2004-01-05 * Implemented Eelco V.'s `nix-env -I' command to specify the defaultEelco Dolstra3-4/+19
path of the Nix expression to be used with the import, upgrade, and query commands. For instance, $ nix-env -I ~/nixpkgs/pkgs/system/i686-linux.nix $ nix-env --query --available [aka -qa] sylpheed-0.9.7 bison-1.875 pango-1.2.5 subversion-0.35.1 ... $ nix-env -i sylpheed $ nix-env -u subversion There can be only one default at a time. * If the path to a Nix expression is a symlink, follow the symlink prior to resolving relative path references in the expression.
2003-12-22 * Upgrade operation in `nix-env'. For instance, you can sayEelco Dolstra1-1/+2
nix-env -u foo.nix strategoxt to replace the installed `strategoxt' derivation with the one from `foo.nix', if the latter has a higher version number. This is a no-op if `strategoxt' is not installed. Wildcards are also accepted, so nix-env -u foo.nix '*' will replace any installed derivation with newer versions from `foo.nix', if available. The notion of "version number" is somewhat ad hoc, but should be useful in most cases, as evidenced by the following unit tests for the version comparator: TEST("1.0", "2.3", -1); TEST("2.1", "2.3", -1); TEST("2.3", "2.3", 0); TEST("2.5", "2.3", 1); TEST("3.1", "2.3", 1); TEST("2.3.1", "2.3", 1); TEST("2.3.1", "2.3a", 1); TEST("2.3pre1", "2.3", -1); TEST("2.3pre3", "2.3pre12", -1); TEST("2.3a", "2.3c", -1); TEST("2.3pre1", "2.3c", -1); TEST("2.3pre1", "2.3q", -1); (-1 = less, 0 = equal, 1 = greater) * A new verbosity level `lvlInfo', between `lvlError' and `lvlTalkative'. This is the default for `nix-env', so without any `-v' flags users should get useful output, e.g., $ nix-env -u foo.nix strategoxt upgrading `strategoxt-0.9.2' to `strategoxt-0.9.3'