about summary refs log tree commit diff
path: root/src/libutil
AgeCommit message (Collapse)AuthorFilesLines
2014-08-20 Use proper quotes everywhereEelco Dolstra3-42/+42
2014-08-20 Add some colorEelco Dolstra2-0/+47
2014-08-20 nix-store -l: Automatically pipe output into $PAGEREelco Dolstra1-2/+2
2014-08-04 Get rid of "killing <pid>" message for unused build hooksEelco Dolstra2-3/+4
2014-08-01 Call commonChildInit() before doing chroot initEelco Dolstra1-8/+10
This ensures that daemon clients see error messages from the chroot setup.
2014-08-01 Eliminate redundant copyEelco Dolstra2-1/+3
2014-08-01 Make readDirectory() return inode / file typeEelco Dolstra3-17/+24
2014-07-31 Restore default SIGPIPE handler before invoking ‘man’Eelco Dolstra2-0/+14
Fixes NixOS/nixpkgs#3410.
2014-07-24 Use pthread_cancel instead of a signalEelco Dolstra1-5/+2
Signal handlers are process-wide, so sending SIGINT to the monitor thread will cause the normal SIGINT handler to run. This sets the isInterrupted flag, which is not what we want. So use pthread_cancel instead.
2014-07-24 Fix bogus pass by referenceEelco Dolstra1-6/+1
http://hydra.nixos.org/build/12711659
2014-07-24 More debuggingEelco Dolstra1-0/+1
2014-07-24 Add some assertionsEelco Dolstra1-0/+6
2014-07-23 nix-daemon: Simplify stderr handlingEelco Dolstra1-0/+1
2014-07-23 nix-daemon: Use a thread instead of SIGPOLL to catch client disconnectsEelco Dolstra1-0/+43
The thread calls poll() to wait until a HUP (or other error event) happens on the client connection. If so, it sends SIGINT to the main thread, which is then cleaned up normally. This is much nicer than messing around with SIGPOLL.
2014-07-23 startProcess: Make writing error messages from the child more robustEelco Dolstra1-2/+4
2014-07-18 Better fix for strcasecmp on DarwinEelco Dolstra1-3/+1
2014-07-17 Ugly hack to fix building on old DarwinEelco Dolstra1-0/+3
http://hydra.nixos.org/build/12580878
2014-07-16 Get rid of a compiler warningEelco Dolstra1-1/+2
2014-07-16 Be more strict about file names in NARsEelco Dolstra1-1/+6
2014-07-16 Handle case collisions on case-insensitive systemsEelco Dolstra2-75/+100
When running NixOps under Mac OS X, we need to be able to import store paths built on Linux into the local Nix store. However, HFS+ is usually case-insensitive, so if there are directories with file names that differ only in case, then importing will fail. The solution is to add a suffix ("~nix~case~hack~<integer>") to colliding files. For instance, if we have a directory containing xt_CONNMARK.h and xt_connmark.h, then the latter will be renamed to "xt_connmark.h~nix~case~hack~1". If a store path is dumped as a NAR, the suffixes are removed. Thus, importing and exporting via a case-insensitive Nix store is round-tripping. So when NixOps calls nix-copy-closure to copy the path to a Linux machine, you get the original file names back. Closes #119.
2014-07-10 Fix broken Pid constructorEelco Dolstra1-5/+2
2014-07-10 Refactoring: Move all fork handling into a higher-order functionEelco Dolstra2-54/+60
C++11 lambdas ftw.
2014-07-10 Remove maybeVforkEelco Dolstra2-11/+1
2014-07-09 Fix compilation error on some versions of GCCEelco Dolstra1-2/+2
src/libexpr/primops.cc:42:8: error: looser throw specifier for 'virtual nix::InvalidPathError::~InvalidPathError()' src/libexpr/nixexpr.hh:12:1: error: overriding 'virtual nix::EvalError::~EvalError() noexcept (true)' http://hydra.nixos.org/build/12385750
2014-06-12 Don't use member initialisersEelco Dolstra1-4/+4
They're a little bit too recent (only supported since GCC 4.7). http://hydra.nixos.org/build/11851475
2014-06-12 Fix bogus warnings about dumping large pathsEelco Dolstra1-2/+2
Also, yay for C++11 non-static initialisers.
2014-06-10 Print a warning when loading a large path into memoryEelco Dolstra2-4/+30
I.e. if you have a derivation with src = ./huge-directory; you'll get a warning that this is not a good idea.
2014-05-21 nix-store -l: Fetch build logs from the InternetEelco Dolstra2-1/+3
If a build log is not available locally, then ‘nix-store -l’ will now try to download it from the servers listed in the ‘log-servers’ option in nix.conf. For instance, if you have: log-servers = http://hydra.nixos.org/log then it will try to get logs from http://hydra.nixos.org/log/<base name of the store path>. So you can do things like: $ nix-store -l $(which xterm) and get a log even if xterm wasn't built locally.
2014-04-08 If a .drv cannot be parsed, show its pathEelco Dolstra2-1/+3
Otherwise you just get ‘expected string `Derive(['’ which isn't very helpful.
2014-04-03 Tweak error messageEelco Dolstra1-1/+1
2014-03-28 Don't interpret strings as format stringsEelco Dolstra3-23/+32
Ludo reported this error: unexpected Nix daemon error: boost::too_few_args: format-string refered to more arguments than were passed coming from this line: printMsg(lvlError, run.program + ": " + string(err, 0, p)); The problem here is that the string ends up implicitly converted to a Boost format() object, so % characters are treated specially. I always assumed (wrongly) that strings are converted to a format object that outputs the string as-is. Since this assumption appears in several places that may be hard to grep for, I've added some C++ type hackery to ensures that the right thing happens. So you don't have to worry about % in statements like printMsg(lvlError, "foo: " + s); or throw Error("foo: " + s);
2014-03-12 Remove unnecessary null pointer checksEelco Dolstra1-2/+2
Fixes #225.
2014-02-27 Set up a minimal /dev in chrootsEelco Dolstra3-2/+11
Not bind-mounting the /dev from the host also solves the problem with /dev/shm being a symlink to something not in the chroot.
2014-02-26 And another oneEelco Dolstra2-41/+2
2014-02-26 Remove another unused functionEelco Dolstra2-22/+0
2014-02-26 Remove unused functionEelco Dolstra2-32/+0
2014-02-01 Remove AutomakefilesEelco Dolstra1-18/+0
2014-02-01 Update Makefile variable namesEelco Dolstra1-1/+1
2014-01-30 Rename Makefile -> local.mkEelco Dolstra1-0/+0
2014-01-09 Update MakefilesEelco Dolstra1-2/+2
2013-11-25 Rename Makefile.new -> MakefileEelco Dolstra1-0/+0
2013-11-23 Use libnix as a prefix for all Nix librariesEelco Dolstra1-0/+2
In particular "libutil" was always a problem because it collides with Glibc's libutil. Even if we install into $(libdir)/nix, the linker sometimes got confused (e.g. if a program links against libstore but not libutil, then ld would report undefined symbols in libstore because it was looking at Glibc's libutil).
2013-11-23 Allow (dynamic) libraries to depend on other librariesEelco Dolstra1-1/+1
2013-11-22 Support building dynamic librariesEelco Dolstra1-2/+2
2013-11-22 Drop the dependency on AutomakeEelco Dolstra1-1/+3
2013-11-22 Rename $(here) to $(d) for brevity, and remove trailing slashEelco Dolstra1-4/+5
2013-11-22 New non-recursive, plain Make-based build systemEelco Dolstra1-0/+10
2013-11-14 Remove nix-setuid-helperEelco Dolstra2-17/+0
AFAIK, nobody uses it, it's not maintained, and it has no tests.
2013-09-17 RestoreSink: Slightly reduce the number of concurrent FDsEelco Dolstra1-0/+1
2013-09-06 Don't apply the CPU affinity hack to nix-shell (and other Perl programs)Eelco Dolstra1-6/+5
As discovered by Todd Veldhuizen, the shell started by nix-shell has its affinity set to a single CPU. This is because nix-shell connects to the Nix daemon, which causes the affinity hack to be applied. So we turn this off for Perl programs.