about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2014-08-20 Use proper quotes everywhereEelco Dolstra11-234/+234
2014-08-20 Add some colorEelco Dolstra1-37/+1
2014-08-20 Filter Nix-specific ANSI escape sequences from stderrEelco Dolstra1-1/+37
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-19 Make hook shutdown more reliableEelco Dolstra1-1/+1
2014-08-18 DohEelco Dolstra1-4/+1
2014-08-17 Reduce verbosityEelco Dolstra1-1/+2
2014-08-17 Propagate remote timeouts properlyEelco Dolstra1-21/+33
2014-08-13 Use regular file GC roots if possibleEelco Dolstra1-1/+4
This makes hydra-eval-jobs create roots as regular files. See 1c208f2b7ef8ffb5e6d435d703dad83223a67bd6.
2014-08-05 Remove unnecessary call to addTempRoot()Eelco Dolstra1-1/+0
2014-08-05 DohEelco Dolstra1-9/+0
2014-08-04 Move some options out of globalsEelco Dolstra2-5/+11
2014-08-04 RefactorEelco Dolstra3-43/+43
2014-08-04 Add option ‘build-extra-chroot-dirs’Eelco Dolstra4-13/+9
This is useful for extending (rather than overriding) the default set of chroot paths.
2014-08-04 Get rid of "killing <pid>" message for unused build hooksEelco Dolstra1-1/+1
2014-08-04 Make chroot builds easier to set upEelco Dolstra1-0/+3
By default, we now include /bin/sh as a bind-mount of bash.
2014-08-01 Remove ugly hack for detecting build environment setup errorsEelco Dolstra1-13/+10
2014-08-01 Call commonChildInit() before doing chroot initEelco Dolstra1-4/+6
This ensures that daemon clients see error messages from the chroot setup.
2014-08-01 findRoots(): Prevent a call to lstat()Eelco Dolstra1-9/+14
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 Make readDirectory() return inode / file typeEelco Dolstra2-19/+15
2014-08-01 Allow regular files as GC rootsEelco Dolstra1-0/+6
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-07-31 Restore default SIGPIPE handler before invoking ‘man’Eelco Dolstra1-12/+0
Fixes NixOS/nixpkgs#3410.
2014-07-25 nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituterEelco Dolstra3-0/+12
2014-07-25 Change the default for use-ssh-substituter to ‘true’Eelco Dolstra1-2/+2
Now you only have to pass ‘--option ssh-substituter-hosts nix-ssh@bla’ to enable SSH substitution.
2014-07-24 Remove some dead codeEelco Dolstra1-1/+0
2014-07-23 Remove dead codeEelco Dolstra2-3/+0
2014-07-19 Revert old useBuildHook behaviourEelco Dolstra2-2/+2
2014-07-17 nix-daemon: Add trusted-users and allowed-users optionsEelco Dolstra2-0/+13
‘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-16 Handle case collisions on case-insensitive systemsEelco Dolstra1-0/+2
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-14 build-remote.pl: Fix building multiple output derivationsEelco Dolstra1-1/+0
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-11 build-remote.pl: Use ‘nix-store --serve’ on the remote sideEelco Dolstra1-0/+1
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-11 Allow $NIX_BUILD_HOOK to be relative to Nix libexec directoryEelco Dolstra2-3/+5
2014-07-10 Replace message "importing path <...>" with "exporting path <...>"Eelco Dolstra1-2/+2
This causes nix-copy-closure to show what it's doing before rather than after.
2014-07-10 Remove tabsEelco Dolstra1-3/+3
2014-07-10 Refactoring: Move all fork handling into a higher-order functionEelco Dolstra2-75/+33
C++11 lambdas ftw.
2014-07-10 Remove maybeVforkEelco Dolstra2-3/+3
2014-06-27 allow-arbitrary-code-during-evaluation -> ↵Eelco Dolstra1-1/+1
allow-unsafe-native-code-during-evaluation
2014-06-24 Only add the importNative primop if the ↵Shea Levy2-0/+5
allow-arbitrary-code-during-evaluation option is true (default false)
2014-06-10 Report daemon OOM betterEelco Dolstra1-5/+17
When copying a large path causes the daemon to run out of memory, you now get: error: Nix daemon out of memory instead of: error: writing to file: Broken pipe
2014-06-10 Print a warning when loading a large path into memoryEelco Dolstra1-0/+3
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-26 Use std::unordered_setEelco Dolstra2-12/+3
2014-05-21 nix-store -l: Fetch build logs from the InternetEelco Dolstra2-0/+4
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-05-15 lvlInfo -> lvlTalkativeEelco Dolstra1-1/+1
2014-05-15 nix-store --optimise: Remove bogus statisticsEelco Dolstra2-10/+7
2014-05-15 Remove tabEelco Dolstra1-2/+2
2014-05-15 Shortcut store files before lstatWout Mertens2-9/+37
readdir() already returns the inode numbers, so we don't need to call lstat to know if a file was already linked or not.
2014-05-14 Use the inodes given by readdir directlyWout Mertens2-21/+25
2014-05-13 Preload linked hashes to speed up lookupsWout Mertens2-10/+41
By preloading all inodes in the /nix/store/.links directory, we can quickly determine of a hardlinked file was already linked to the hashed links. This is tolerant of removing the .links directory, it will simply recalculate all hashes in the store.
2014-05-10 Shortcut already-hardlinked fileswmertens1-1/+10
If an inode in the Nix store has more than 1 link, it probably means that it was linked into .links/ by us. If so, skip. There's a possibility that something else hardlinked the file, so it would be nice to be able to override this. Also, by looking at the number of hardlinks for each of the files in .links/, you can get deduplication numbers and space savings.
2014-05-02 Set up directories and permissions for multi-user install automaticallyEelco Dolstra1-1/+28
This automatically creates /nix/var/nix/profiles/per-user and sets the permissions/ownership on /nix/store to 1775 and root:nixbld.
2014-05-02 Set build-max-jobs to the number of available cores by defaultEelco Dolstra1-0/+5
More zero configuration.