summary refs log tree commit diff
AgeCommit message (Collapse)Author
2015-05-11findRoots(): Prevent a call to lstat()Eelco Dolstra
This means that getting the roots from /nix/var/nix/.../hydra-roots doesn't need any I/O other than reading the directory.
2015-05-11Make readDirectory() return inode / file typeEelco Dolstra
2015-05-11Allow regular files as GC rootsEelco Dolstra
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.
2015-05-11Remove some dead codeEelco Dolstra
2015-05-11nix-daemon: Less verbosityEelco Dolstra
2015-05-11nix-daemon: Simplify stderr handlingEelco Dolstra
2015-05-11Merge commit 'fdee1ced43fb495d612a29e955141cdf6b9a95ba' into nixLudovic Courtès
2015-05-06Merge commit '8e9140cfdef9dbd1eb61e4c75c91d452ab5e4a74' into nixLudovic Courtès
Conflicts: Makefile.config.in configure.ac dev-shell doc/manual/builtins.xml doc/manual/conf-file.xml doc/manual/local.mk doc/manual/nix-instantiate.xml doc/manual/nix-store.xml doc/manual/writing-nix-expressions.xml misc/emacs/nix-mode.el perl/lib/Nix/CopyClosure.pm release.nix scripts/nix-build.in scripts/nix-copy-closure.in src/download-via-ssh/download-via-ssh.cc src/libexpr/common-opts.cc src/libexpr/common-opts.hh src/libexpr/eval.cc src/libexpr/eval.hh src/libexpr/local.mk src/libexpr/nixexpr.cc src/libexpr/nixexpr.hh src/libexpr/parser.y src/libexpr/primops.cc src/libexpr/symbol-table.hh src/libmain/shared.cc src/libstore/local.mk src/nix-env/nix-env.cc src/nix-instantiate/nix-instantiate.cc src/nix-store/local.mk src/nix-store/nix-store.cc src/nix-store/serve-protocol.hh tests/lang.sh tests/lang/eval-okay-context.nix tests/lang/eval-okay-search-path.exp tests/lang/eval-okay-search-path.nix tests/local.mk tests/nix-copy-closure.nix
2015-01-04Merge commit '8d5f472f2c49c79a0d3ae2e506f4d4d76224b328' into nixLudovic Courtès
Conflicts: .gitignore Makefile doc/manual/installation.xml doc/manual/introduction.xml doc/manual/local.mk doc/manual/manual.xml doc/manual/nix-collect-garbage.xml doc/manual/nix-env.xml doc/manual/nix-install-package.xml doc/manual/nix-store.xml doc/manual/quick-start.xml doc/manual/release-notes.xml local.mk misc/emacs/nix-mode.el mk/functions.mk mk/install.mk mk/lib.mk mk/libraries.mk mk/patterns.mk mk/programs.mk nix.spec.in release.nix scripts/install-nix-from-closure.sh scripts/nix-build.in src/libexpr/eval-inline.hh src/libexpr/eval.cc src/libexpr/eval.hh src/libexpr/get-drvs.cc src/libexpr/nixexpr.cc src/libexpr/nixexpr.hh src/libexpr/parser.y src/libexpr/primops.cc src/libstore/local.mk src/nix-daemon/local.mk src/nix-env/nix-env.cc src/nix-env/user-env.cc src/nix-instantiate/nix-instantiate.cc src/nix-store/nix-store.cc tests/init.sh tests/nix-copy-closure.nix tests/remote-builds.nix version
2014-12-17nix: Adjust code for Guix.Ludovic Courtès
* nix/libstore/gc.cc (addAdditionalRoots): Refer to 'list-runtime-roots' instead of 'find-runtime-roots.pl'. * nix/libutil/hash.cc, nix/libutil/hash.hh: Change 'union Ctx' to 'struct Ctx', like 'nix/sync-with-upstream' did. * nix/AUTHORS: New file. * nix/COPYING: New file, from upstream Nix. * nix/libutil/md32_common.h, nix/libutil/md5.c, nix/libutil/md5.h, nix/libutil/sha1.c, nix/libutil/sha1.h, nix/libutil/sha256.c, nix/libutil/sha256.h: Remove.
2014-12-17Keep only libstore, nix-daemon, and related stuff.Ludovic Courtès
2014-07-23startProcess: Make writing error messages from the child more robustEelco Dolstra
2014-07-23Remove dead codeEelco Dolstra
2014-07-19Revert old useBuildHook behaviourEelco Dolstra
2014-07-18Better fix for strcasecmp on DarwinEelco Dolstra
2014-07-18BumpEelco Dolstra
2014-07-17Ugly hack to fix building on old DarwinEelco Dolstra
http://hydra.nixos.org/build/12580878
2014-07-17nix-daemon: Add trusted-users and allowed-users optionsEelco Dolstra
‘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-17nix-daemon: Show name of connecting userEelco Dolstra
2014-07-17nix-daemon: Only print connection info if we have SO_PEERCREDEelco Dolstra
2014-07-17nix-daemon: Fix compat with older clientsEelco Dolstra
2014-07-16Get rid of a compiler warningEelco Dolstra
2014-07-16Be more strict about file names in NARsEelco Dolstra
2014-07-16Handle case collisions on case-insensitive systemsEelco Dolstra
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-16Make dev-shell script work on DarwinEelco Dolstra
2014-07-16Install systemd and Upstart stuff only on LinuxEelco Dolstra
2014-07-16Pass *_proxy vars to bootstrap fetchurlShea Levy
2014-07-16Manual: TypoEelco Dolstra
2014-07-14Remove cruftEelco Dolstra
2014-07-14build-remote.pl: Fix building multiple output derivationsEelco Dolstra
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-12build-remote.pl: Don't keep a shell process aroundEelco Dolstra
2014-07-12build-remote.pl: Fix build logEelco Dolstra
2014-07-11Fix testEelco Dolstra
2014-07-11build-remote.pl: Use ‘nix-store --serve’ on the remote sideEelco Dolstra
This makes things more efficient (we don't need to use an SSH master connection, and we only start a single remote process) and gets rid of locking issues (the remote nix-store process will keep inputs and outputs locked as long as they're needed). It also makes it more or less secure to connect directly to the root account on the build machine, using a forced command (e.g. ‘command="nix-store --serve --write"’). This bypasses the Nix daemon and is therefore more efficient. Also, don't call nix-store to import the output paths.
2014-07-11Fix closure size displayEelco Dolstra
2014-07-11Allow $NIX_BUILD_HOOK to be relative to Nix libexec directoryEelco Dolstra
2014-07-10Fix broken Pid constructorEelco Dolstra
2014-07-10Replace message "importing path <...>" with "exporting path <...>"Eelco Dolstra
This causes nix-copy-closure to show what it's doing before rather than after.
2014-07-10Fix use of sysreadEelco Dolstra
2014-07-10nix-copy-closure -s: Do substitutions via ‘nix-store --serve’Eelco Dolstra
This means we no longer need an SSH master connection, since we only execute a single command on the remote host.
2014-07-10nix-copy-closure: Fix --dry-runEelco Dolstra
2014-07-10Remove tabsEelco Dolstra
2014-07-10Refactoring: Move all fork handling into a higher-order functionEelco Dolstra
C++11 lambdas ftw.
2014-07-10nix-copy-closure: Restore compression and the progress viewerEelco Dolstra
2014-07-10Remove maybeVforkEelco Dolstra
2014-07-10nix-copy-closure: Fix race conditionEelco Dolstra
There is a long-standing race condition when copying a closure to a remote machine, particularly affecting build-remote.pl: the client first asks the remote machine which paths it already has, then copies over the missing paths. If the garbage collector kicks in on the remote machine between the first and second step, the already-present paths may be deleted. The missing paths may then refer to deleted paths, causing nix-copy-closure to fail. The client now performs both steps using a single remote Nix call (using ‘nix-store --serve’), locking all paths in the closure while querying. I changed the --serve protocol a bit (getting rid of QueryCommand), so this breaks the SSH substituter from older versions. But it was marked experimental anyway. Fixes #141.
2014-07-10Fix security hole in ‘nix-store --serve’Eelco Dolstra
Since it didn't check that the path received from the client is a store path, the client could dump any path in the file system.
2014-07-10Add a test for the SSH substituterEelco Dolstra
2014-07-09Fix compilation error on some versions of GCCEelco Dolstra
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-07-08Don't build on Ubuntu 10.10Eelco Dolstra
Its C++ compiler is too old. http://hydra.nixos.org/build/12385722