Eelco Dolstra
65243ee833
Flush std::cout before closing stdout
2014-08-20 21:44:55 +02:00
Eelco Dolstra
43579c9799
Use pager for more commands
2014-08-20 21:44:55 +02:00
Eelco Dolstra
9481f77693
Provide reasonable default flags for $LESS
...
Borrowed from systemd.
2014-08-20 21:22:41 +02:00
Eelco Dolstra
c93690a68a
Merge commit '2aa93858afee22e0c32d8f4366970976374091ac'
2014-08-20 18:44:26 +02:00
Eelco Dolstra
2aa93858af
Force template regeneration
2014-08-20 18:44:15 +02:00
Eelco Dolstra
ab4eba5b91
Handle header file instantiation
2014-08-20 18:39:48 +02:00
Eelco Dolstra
f0610e28e8
Install config.h only once
2014-08-20 18:33:07 +02:00
Eelco Dolstra
11849a320e
Use proper quotes everywhere
2014-08-20 18:03:48 +02:00
Eelco Dolstra
373fad75e1
Add some color
2014-08-20 16:50:17 +02:00
Eelco Dolstra
392430b2c4
nix-store -l: Automatically pipe output into $PAGER
2014-08-20 15:12:58 +02:00
Eelco Dolstra
894fa5e42d
Reduce test verbosity
2014-08-20 14:30:01 +02:00
Eelco Dolstra
954188af27
Filter Nix-specific ANSI escape sequences from stderr
...
The Nixpkgs stdenv prints some custom escape sequences to denote
nesting and stuff like that. Most terminals (e.g. xterm, konsole)
ignore them, but some do not (e.g. xfce4-terminal). So for the benefit
of the latter, filter them out.
2014-08-20 14:30:01 +02:00
Eelco Dolstra
029424d17d
Make hook shutdown more reliable
2014-08-19 17:47:30 +02:00
Eelco Dolstra
02843ba4cb
Fix --attr parsing
2014-08-18 15:48:23 +02:00
Eelco Dolstra
632f989b51
Doh
2014-08-18 11:35:50 +02:00
Eelco Dolstra
c160ead82f
Reduce verbosity
2014-08-17 19:11:50 +02:00
Eelco Dolstra
42e9ad8fd1
Propagate remote timeouts properly
2014-08-17 19:09:03 +02:00
Eelco Dolstra
c6e85ee474
nix-build: Propagate exit status from nix-store -r
2014-08-17 18:37:09 +02:00
Eelco Dolstra
ccd4fe5c49
build-remote.pl: Provide defaults for $NIX_CURRENT_LOAD and $NIX_REMOTE_SYSTEMS
2014-08-17 18:05:24 +02:00
Eelco Dolstra
ad716378dc
Fix download-via-ssh
...
http://hydra.nixos.org/build/13286020
2014-08-17 14:28:17 +02:00
Eelco Dolstra
3e5dbb2433
nix-shell: Use $XDG_RUNTIME_DIR
...
This prevents collisions with other users.
Fixes #262 .
2014-08-13 23:16:08 +02:00
Eelco Dolstra
3bea429ae8
Use $XDG_RUNTIME_DIR for temporary files
2014-08-13 23:12:57 +02:00
Eelco Dolstra
fde819f2e2
nix-log2xml: Handle newlines
2014-08-13 19:06:20 +02:00
Eelco Dolstra
cb921f67c3
Remove log2html.xsl and friends
...
It's part of Hydra now.
2014-08-13 19:01:14 +02:00
Eelco Dolstra
e9b609bf9a
nix-log2xml: Handle UTF-8 characters
...
C++ chars can be negative...
2014-08-13 19:00:07 +02:00
Eelco Dolstra
9367046fef
Use regular file GC roots if possible
...
This makes hydra-eval-jobs create roots as regular files. See
1c208f2b7e .
2014-08-13 17:44:41 +02:00
Eelco Dolstra
5f05197df4
Handle compound single dash options properly
...
So now
nix-instantiate --eval -E '{x}: x' --argstr x -xyzzy
correctly prints "-xyzzy", rather than giving an error.
Issue NixOS/hydra#176 .
2014-08-13 04:08:33 +02:00
Eelco Dolstra
47e185847e
Refactor option handling
2014-08-13 03:50:44 +02:00
Eelco Dolstra
5bed74d1b0
Fix warning about non-existant -I directories
2014-08-13 02:57:59 +02:00
Eelco Dolstra
401ab50566
Remove pointless NIX_LOG_TYPE environment variable
2014-08-13 01:19:02 +02:00
Eelco Dolstra
57695d8f76
Warn about untrusted binary caches in extra-binary-caches
2014-08-07 22:46:35 +02:00
Eelco Dolstra
6e1f4c1488
nix-install-package: Use extra-binary-caches
2014-08-07 22:41:44 +02:00
Eelco Dolstra
393a9b92b1
download-from-binary-cache.pl: Respect $SSL_CERT_FILE
2014-08-07 22:41:15 +02:00
Eelco Dolstra
a6f4554656
Add support for order-only dependencies
2014-08-07 16:10:23 +02:00
Eelco Dolstra
4a198dae74
install-nix-from-closure.sh: Use https channel if possible
2014-08-07 15:37:21 +02:00
Eelco Dolstra
98873ff7de
Remove unnecessary call to addTempRoot()
2014-08-05 16:41:42 +02:00
Eelco Dolstra
f02c52e3d4
Doh
2014-08-05 10:19:57 +02:00
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
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
Eelco Dolstra
049c0eb49c
nix-daemon: Add trusted-users and allowed-users options
...
‘trusted-users’ is a list of users and groups that have elevated
rights, such as the ability to specify binary caches. It defaults to
‘root’. A typical value would be ‘@wheel’ to specify all users in the
wheel group.
‘allowed-users’ is a list of users and groups that are allowed to
connect to the daemon. It defaults to ‘*’. A typical value would be
‘@users’ to specify the ‘users’ group.
2014-07-17 16:57:07 +02:00
Eelco Dolstra
0c730887c4
nix-daemon: Show name of connecting user
2014-07-17 15:49:33 +02:00
Eelco Dolstra
77c972c898
nix-daemon: Only print connection info if we have SO_PEERCRED
2014-07-17 15:44:51 +02:00
Eelco Dolstra
8f72e702a1
nix-daemon: Fix compat with older clients
2014-07-17 15:23:31 +02:00
Eelco Dolstra
2304a7dd21
Get rid of a compiler warning
2014-07-16 16:32:26 +02:00
Eelco Dolstra
985f1595fe
Be more strict about file names in NARs
2014-07-16 16:30:50 +02:00
Eelco Dolstra
276a40b31f
Handle case collisions on case-insensitive systems
...
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-16 16:02:05 +02:00
Eelco Dolstra
bb65460feb
Make dev-shell script work on Darwin
2014-07-16 11:53:47 +02:00
Eelco Dolstra
de8be7c3e0
Install systemd and Upstart stuff only on Linux
2014-07-16 11:53:47 +02:00
Eelco Dolstra
a2c85b2ef8
Manual: Typo
2014-07-16 11:21:44 +02:00
Eelco Dolstra
5bcb982711
Remove cruft
2014-07-14 12:39:53 +02:00
Eelco Dolstra
fa13d3f4f3
build-remote.pl: Fix building multiple output derivations
...
We were importing paths without sorting them topologically, leading to
"path is not valid" errors.
See e.g. http://hydra.nixos.org/build/12451761
2014-07-14 12:19:27 +02:00
Eelco Dolstra
b2e0293f02
build-remote.pl: Don't keep a shell process around
2014-07-12 00:43:28 +02:00
Eelco Dolstra
a00a98548e
build-remote.pl: Fix build log
2014-07-12 00:09:43 +02:00
Eelco Dolstra
838138c5c4
Fix test
2014-07-11 16:22:24 +02:00