aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
AgeCommit message (Collapse)Author
2015-10-21remove sandbox defaults into a new fileJude Taylor
2015-10-21restore allowed impure prefixesJude Taylor
2015-10-21remove an unneeded default impure-depJude Taylor
2015-10-21make sandbox builds more permissiveJude Taylor
2015-10-21add a few more permissionsJude Taylor
2015-10-21Allow builtin fetchurl regardless of the derivation's system attributeEelco Dolstra
2015-10-21Show progress indicator for builtin fetchurlEelco Dolstra
2015-10-21Disable TLS verification for builtin fetchurlEelco Dolstra
This makes it consistent with the Nixpkgs fetchurl and makes it work in chroots. We don't need verification because the hash of the result is checked anyway.
2015-10-21Fix segfault in builtin fetchurlEelco Dolstra
The stack allocated for the builder was way too small (32 KB). This is sufficient for normal derivations, because they just do some setup and then exec() the actual builder. But for the fetchurl builtin derivation it's not enough. Also, allocating the stack on the caller's stack was fishy business.
2015-10-08Allow building ARMv6 stuff on ARMv7Tuomas Tynkkynen
This allows building a Raspberry Pi image on modern, faster boards.
2015-10-08Revert to CURLOPT_PROGRESSFUNCTIONEelco Dolstra
CURLOPT_XFERINFOFUNCTION isn't widely supported yet. http://hydra.nixos.org/build/26679495
2015-10-07Show progress during downloadsEelco Dolstra
2015-10-06Use pkg-config-provided LDFLAGS for libsqlite3 and libcurl.Manuel Jacob
Previously, pkg-config was already queried for libsqlite3's and libcurl's link flags. However they were not used, but hardcoded instead. This commit replaces the hardcoded LDFLAGS by the ones provided by pkg-config in a similar pattern as already used for libsodium.
2015-10-06nix-store --serve: Implement log size limitEelco Dolstra
2015-09-18Shut up clang warningsEelco Dolstra
2015-09-03Implement buildDerivation() via the daemonEelco Dolstra
2015-09-02Filter build-chroot-dirs entries that conflict with derivation outputsEelco Dolstra
Fixes https://github.com/NixOS/nixpkgs/issues/9504. Note that this means we may have a non-functional /bin/sh in the chroot while rebuilding Bash or one of its dependencies. Ideally those packages don't rely on /bin/sh though.
2015-09-02Remove unused variableEelco Dolstra
2015-08-24Prevent .chroot from being GC'ed when using LocalStore::buildDerivation()Eelco Dolstra
Fixes #616.
2015-08-21nix-collect-garbage: Revive --max-freedEelco Dolstra
Fixes #609.
2015-08-19Remove unneeded HAVE_UNSHARE.Manolis Ragkousis
* src/libstore/build.cc (CHROOT_ENABLED): Remove HAVE_UNSHARE.
2015-08-04Don't include <iostream> before config.hEelco Dolstra
This breaks the build on 32-bit systems. http://hydra.nixos.org/build/24373658
2015-08-03Handle debug messages from runChild()Eelco Dolstra
Turns out that "nix-build -vvv" with chroots enabled has been broken for some time, because some debug message got interpreted as an error.
2015-07-26Remove unnecessary parenthesesEelco Dolstra
2015-07-23Fix fetchurl of executable fileEelco Dolstra
Pointed out by @cstrahan, thanks!
2015-07-21Fix Darwin buildEelco Dolstra
Turns out getgrouplist() is not POSIX. http://hydra.nixos.org/build/23881243
2015-07-20Make <nix/fetchurl.nix> a builtin builderEelco Dolstra
This ensures that 1) the derivation doesn't change when Nix changes; 2) the derivation closure doesn't contain Nix and its dependencies; 3) we don't have to rely on ugly chroot hacks.
2015-07-20Provide more detailed info about build status to hydra-queue-runnerEelco Dolstra
In particular, hydra-queue-runner can now distinguish between remote build / substitution / already-valid. For instance, if a path already existed on the remote side, we don't want to store a log file.
2015-07-20nix-copy-closure: Add -v flagEelco Dolstra
And make exportPath() less spammy by default.
2015-07-20More cleanupEelco Dolstra
2015-07-17OCD: foreach -> C++11 ranged forEelco Dolstra
2015-07-17Allow remote builds without sending the derivation closureEelco Dolstra
Previously, to build a derivation remotely, we had to copy the entire closure of the .drv file to the remote machine, even though we only need the top-level derivation. This is very wasteful: the closure can contain thousands of store paths, and in some Hydra use cases, include source paths that are very large (e.g. Git/Mercurial checkouts). So now there is a new operation, StoreAPI::buildDerivation(), that performs a build from an in-memory representation of a derivation (BasicDerivation) rather than from a on-disk .drv file. The only files that need to be in the Nix store are the sources of the derivation (drv.inputSrcs), and the needed output paths of the dependencies (as described by drv.inputDrvs). "nix-store --serve" exposes this interface. Note that this is a privileged operation, because you can construct a derivation that builds any store path whatsoever. Fixing this will require changing the hashing scheme (i.e., the output paths should be computed from the other fields in BasicDerivation, allowing them to be verified without access to other derivations). However, this would be quite nice because it would allow .drv-free building (e.g. "nix-env -i" wouldn't have to write any .drv files to disk). Fixes #173.
2015-07-02TypoEelco Dolstra
2015-07-01Preserve supplementary groups of build usersLudovic Courtès
The following patch is an attempt to address this bug (see <http://bugs.gnu.org/18994>) by preserving the supplementary groups of build users in the build environment. In practice, I would expect that supplementary groups would contain only one or two groups: the build users group, and possibly the “kvm” group. [Changed &at(0) to data() and removed tabs - Eelco]
2015-06-30GC: Handle ENOSPC creating/moving to the trash directoryEelco Dolstra
Issue #564.
2015-06-22Use posix_fallocate to create /nix/var/nix/db/reservedEelco Dolstra
2015-06-22Make /nix/var/nix/db/reserved biggerEelco Dolstra
Issue #564.
2015-06-10Export outputPaths functionEelco Dolstra
This is useful for the new hydra-queue-runner.
2015-06-09Use std::vector::data()Eelco Dolstra
2015-06-04Allow substitutes for builds that have preferLocalBuild setEelco Dolstra
Not substituting builds with "preferLocalBuild = true" was a bad idea, because it didn't take the cost of dependencies into account. For instance, if we can't substitute a fetchgit call, then we have to download/build git and all its dependencies. Partially reverts 5558652709f27e8a887580b77b93c705659d7a4b and adds a new derivation attribute "allowSubstitutes" to specify whether a derivation may be substituted.
2015-06-04Chown files created for passAsFileEelco Dolstra
Nixpkgs' writeTextAsFile does this: mv "$textPath" "$n" Since $textPath was owned by root, if $textPath is on the same filesystem as $n, $n will be owned as root. As a result, the build result was rejected as having suspicious ownership. http://hydra.nixos.org/build/22836807
2015-06-02Add a ‘verifyStore’ RPCLudovic Courtès
Hello! The patch below adds a ‘verifyStore’ RPC with the same signature as the current LocalStore::verifyStore method. Thanks, Ludo’. >From aef46c03ca77eb6344f4892672eb6d9d06432041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org> Date: Mon, 1 Jun 2015 23:17:10 +0200 Subject: [PATCH] Add a 'verifyStore' remote procedure call.
2015-05-21nix-collect-garbage: Don't call nix-envEelco Dolstra
Also, make sure --delete-older-than doesn't delete the current generation.
2015-05-21Move profiles.{cc,hh} to libstoreEelco Dolstra
2015-05-13cygwin: explicitly include required c headersRok Garbas
2015-05-12Don't try to map /bin/sh to a store path on non-LinuxShea Levy
2015-04-18Add the pre-build hook.Shea Levy
This hook can be used to set system-specific per-derivation build settings that don't fit into the derivation model and are too complex or volatile to be hard-coded into nix. Currently, the pre-build hook can only add chroot dirs/files through the interface, but it also has full access to the chroot root. The specific use case for this is systems where the operating system ABI is more complex than just the kernel-support system calls. For example, on OS X there is a set of system-provided frameworks that can reliably be accessed by any program linked to them, no matter the version the program is running on. Unfortunately, those frameworks do not necessarily live in the same locations on each version of OS X, nor do their dependencies, and thus nix needs to know the specific version of OS X currently running in order to make those frameworks available. The pre-build hook is a perfect mechanism for doing just that.
2015-04-18Revert "Add the pre-build hook."Shea Levy
Going to reimplement differently. This reverts commit 1e4a4a2e9fc382f47f58b448f3ee034cdd28218a.
2015-04-16Fix using restricted mode with chrootsEelco Dolstra
2015-04-12Add the pre-build hook.Shea Levy
This hook can be used to set system specific per-derivation build settings that don't fit into the derivation model and are too complex or volatile to be hard-coded into nix. Currently, the pre-build hook can only add chroot dirs/files. The specific use case for this is systems where the operating system ABI is more complex than just the kernel-supported system calls. For example, on OS X there is a set of system-provided frameworks that can reliably be accessed by any program linked to them, no matter the version the program is running on. Unfortunately, those frameworks do not necessarily live in the same locations on each version of OS X, nor do their dependencies, and thus nix needs to know the specific version of OS X currently running in order to make those frameworks available. The pre-build hook is a perfect mechanism for doing just that.