Eelco Dolstra
988bf59421
Move some options out of globals
2014-08-04 18:13:14 +02:00
Eelco Dolstra
daccd68999
Refactor
2014-08-04 18:02:29 +02:00
Eelco Dolstra
7018830509
Update manual
2014-08-04 18:00:33 +02:00
Eelco Dolstra
d5a076c36f
Add option ‘build-extra-chroot-dirs’
...
This is useful for extending (rather than overriding) the default set
of chroot paths.
2014-08-04 18:00:00 +02:00
Eelco Dolstra
4d73e2e893
Get rid of "killing <pid>" message for unused build hooks
2014-08-04 17:27:45 +02:00
Eelco Dolstra
bb45092f72
Make chroot builds easier to set up
...
By default, we now include /bin/sh as a bind-mount of bash.
2014-08-04 17:09:26 +02:00
Eelco Dolstra
7a60ff9a62
Speed up nix-shell
2014-08-04 17:09:26 +02:00
Eelco Dolstra
51485dcda2
Remove ugly hack for detecting build environment setup errors
2014-08-01 19:38:21 +02:00
Eelco Dolstra
4c4b219c07
Call commonChildInit() before doing chroot init
...
This ensures that daemon clients see error messages from the chroot
setup.
2014-08-01 19:29:03 +02:00
Eelco Dolstra
eea0401d7a
Eliminate redundant copy
2014-08-01 17:30:51 +02:00
Eelco Dolstra
e0d7d0e45c
findRoots(): Prevent a call to lstat()
...
This means that getting the roots from /nix/var/nix/.../hydra-roots
doesn't need any I/O other than reading the directory.
2014-08-01 17:20:25 +02:00
Eelco Dolstra
daf3f2c11f
Make readDirectory() return inode / file type
2014-08-01 17:14:28 +02:00
Eelco Dolstra
1c208f2b7e
Allow regular files as GC roots
...
If a root is a regular file, then its name must denote a store
path. For instance, the existence of the file
/nix/var/nix/gcroots/per-user/eelco/hydra-roots/wzc3cy1wwwd6d0dgxpa77ijr1yp50s6v-libxml2-2.7.7
would cause
/nix/store/wzc3cy1wwwd6d0dgxpa77ijr1yp50s6v-libxml2-2.7.7
to be a root.
This is useful because it involves less I/O (no need for a readlink()
call) and takes up less disk space (the symlink target typically takes
up a full disk block, while directory entries are packed more
efficiently). This is particularly important for hydra.nixos.org,
which has hundreds of thousands of roots, and where reading the roots
can take 25 minutes.
2014-08-01 17:14:28 +02:00
Eelco Dolstra
50dc1f5b71
Restore default SIGPIPE handler before invoking ‘man’
...
Fixes NixOS/nixpkgs#3410 .
2014-07-31 10:31:17 +02:00
Eelco Dolstra
45f9a91e18
make clean: Remove Makefile.config
2014-07-30 11:36:28 +02:00
Eelco Dolstra
3d221a7bb1
Rename nixPath to __nixPath
...
The name ‘nixPath’ breaks existing code.
2014-07-30 11:28:39 +02:00
Eelco Dolstra
2ea2703fe9
install-nix-from-closure.sh: Install cacert
2014-07-29 17:12:15 +02:00
Eelco Dolstra
50ed345fad
nix-profile.sh: Set $SSL_CERT_FILE
2014-07-29 17:11:54 +02:00
Eelco Dolstra
13a63b59bb
Remove outdated AUTHORS file
2014-07-28 12:02:45 +02:00
Eelco Dolstra
67937907ca
nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter
2014-07-25 18:02:48 +02:00
Eelco Dolstra
71a20d4d95
Change the default for use-ssh-substituter to ‘true’
...
Now you only have to pass ‘--option ssh-substituter-hosts
nix-ssh@bla’ to enable SSH substitution.
2014-07-25 12:57:12 +02:00
Eelco Dolstra
02b66e97ba
Fix building against current Nix master
2014-07-24 17:53:32 +02:00
Eelco Dolstra
2cf0e67761
Handle non-numeric version strings
...
Fixes #2 .
2014-07-24 17:46:58 +02:00
Eelco Dolstra
1a44f1cb65
nix-copy-closure: Drop --bzip2, --xz, --show-progress
...
These are too difficult to implement via nix-store --serve.
‘--show-progress’ could be re-implemented fairly easily via a
sink/source wrapper class.
2014-07-24 17:11:54 +02:00
Eelco Dolstra
7f7d4ab686
nix-copy-closure: Implement --gzip via ssh's -C flag
2014-07-24 16:32:55 +02:00
Eelco Dolstra
17ef234672
Fix NIX_SSHOPTS
...
Closes #302 .
2014-07-24 16:30:37 +02:00
Eelco Dolstra
7b351da680
Remove obsolete SSH master connection code
2014-07-24 16:19:42 +02:00
Eelco Dolstra
03103c0a36
Implement nix-copy-closure --from via nix-store --serve
2014-07-24 16:19:41 +02:00
Eelco Dolstra
62309a2c56
build-remote.pl: Be less verbose on failing builds
2014-07-24 12:43:59 +02:00
Eelco Dolstra
56131a2709
Refactor
2014-07-24 12:24:25 +02:00
Eelco Dolstra
01ddf53ee9
tests/remote-builds.nix: Test failing build
2014-07-24 12:10:06 +02:00
Eelco Dolstra
d7a92ed4a9
nix-store --serve: Only monitor stdin during builds
...
Other operations cannot hang indefinitely (except when we're reading
from stdin, in which case we'll notice a client disconnect). But
monitoring works badly during compressed imports, since there the
client can close the connection before we've sent an ack.
http://hydra.nixos.org/build/12711638
2014-07-24 11:59:35 +02:00
Eelco Dolstra
a6ab3cf35f
tests/remote-builds.nix: Don't try cache.nixos.org
2014-07-24 11:50:05 +02:00
Eelco Dolstra
0fae20c362
Use pthread_cancel instead of a signal
...
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 11:47:51 +02:00
Eelco Dolstra
aa1560ca07
Fix bogus pass by reference
...
http://hydra.nixos.org/build/12711659
2014-07-24 09:58:07 +02:00
Eelco Dolstra
24c6d992c6
More debugging
2014-07-24 01:21:56 +02:00
Eelco Dolstra
1eb0af7ed5
Add some assertions
2014-07-24 00:16:06 +02:00
Eelco Dolstra
d3c61d83be
Remove some dead code
2014-07-24 00:00:53 +02:00
Eelco Dolstra
62ad3dfc43
Remove some obsolete files
2014-07-23 23:56:58 +02:00
Eelco Dolstra
bd91453bb1
Pass -pthread only for programs that need it
2014-07-23 19:48:18 +02:00
Eelco Dolstra
ece531d105
nix-daemon: Less verbosity
2014-07-23 19:43:46 +02:00
Eelco Dolstra
d0fad1779f
nix-daemon: Simplify stderr handling
2014-07-23 19:37:40 +02:00
Eelco Dolstra
78224cd871
nix-store --serve: Monitor for client disconnects
...
This is necessary because build-remote.pl now builds via ‘nix-store
--serve’. So if a build hangs without writing to stdout/stderr, and
the client disconnects, then we need to detect that.
2014-07-23 19:26:34 +02:00
Eelco Dolstra
49fe9592a4
nix-daemon: Use a thread instead of SIGPOLL to catch client disconnects
...
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 19:21:00 +02:00
Eelco Dolstra
fdee1ced43
startProcess: Make writing error messages from the child more robust
2014-07-23 19:11:26 +02:00
Eelco Dolstra
5989966ed3
Remove dead code
2014-07-23 14:46:28 +02:00
Eelco Dolstra
ee3c5d7916
Revert old useBuildHook behaviour
2014-07-19 02:25:47 +02:00
Eelco Dolstra
2e77bd70fa
Better fix for strcasecmp on Darwin
2014-07-18 12:54:30 +02:00
Eelco Dolstra
f609eec71a
Bump
2014-07-18 00:01:06 +02:00
Eelco Dolstra
8ddffe7aac
Ugly hack to fix building on old Darwin
...
http://hydra.nixos.org/build/12580878
2014-07-17 23:57:17 +02:00