[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
110/376: Make chroot builds easier to set up
From: |
Ludovic Courtès |
Subject: |
110/376: Make chroot builds easier to set up |
Date: |
Wed, 28 Jan 2015 22:04:23 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit bb45092f72d173a7754f7e4a6457d44c748a893b
Author: Eelco Dolstra <address@hidden>
Date: Mon Aug 4 17:07:28 2014 +0200
Make chroot builds easier to set up
By default, we now include /bin/sh as a bind-mount of bash.
---
release.nix | 8 ++++++++
src/libstore/globals.cc | 3 +++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/release.nix b/release.nix
index 1f91e23..c439257 100644
--- a/release.nix
+++ b/release.nix
@@ -93,6 +93,14 @@ let
--sysconfdir=/etc
'';
+ # Provide a default value for the ‘build-chroot-dirs’ setting
+ # that includes /bin/sh pointing to bash.
+ preHook = lib.optionalString stdenv.isLinux (
+ let sh = stdenv.shell; in
+ ''
+ NIX_CFLAGS_COMPILE+=" -DDEFAULT_CHROOT_DIRS=\"/bin/sh=${sh}:$(tr
'\n' ':' < ${writeReferencesToFile sh})\""
+ '');
+
enableParallelBuilding = true;
makeFlags = "profiledir=$(out)/etc/profile.d";
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index e9fe0be..77f2500 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -48,6 +48,9 @@ Settings::Settings()
useSubstitutes = true;
buildUsersGroup = getuid() == 0 ? "nixbld" : "";
useChroot = false;
+#ifdef DEFAULT_CHROOT_DIRS
+ dirsInChroot = tokenizeString<StringSet>(DEFAULT_CHROOT_DIRS, ":");
+#endif
useSshSubstituter = true;
impersonateLinux26 = false;
keepLog = true;
- 84/376: Use pthread_cancel instead of a signal, (continued)
- 84/376: Use pthread_cancel instead of a signal, Ludovic Courtès, 2015/01/28
- 102/376: Restore default SIGPIPE handler before invoking ‘man’, Ludovic Courtès, 2015/01/28
- 98/376: nix-profile.sh: Set $SSL_CERT_FILE, Ludovic Courtès, 2015/01/28
- 96/376: nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter, Ludovic Courtès, 2015/01/28
- 101/376: make clean: Remove Makefile.config, Ludovic Courtès, 2015/01/28
- 105/376: findRoots(): Prevent a call to lstat(), Ludovic Courtès, 2015/01/28
- 108/376: Remove ugly hack for detecting build environment setup errors, Ludovic Courtès, 2015/01/28
- 107/376: Call commonChildInit() before doing chroot init, Ludovic Courtès, 2015/01/28
- 104/376: Make readDirectory() return inode / file type, Ludovic Courtès, 2015/01/28
- 106/376: Eliminate redundant copy, Ludovic Courtès, 2015/01/28
- 110/376: Make chroot builds easier to set up,
Ludovic Courtès <=
- 109/376: Speed up nix-shell, Ludovic Courtès, 2015/01/28
- 121/376: nix-install-package: Use extra-binary-caches, Ludovic Courtès, 2015/01/28
- 119/376: Add support for order-only dependencies, Ludovic Courtès, 2015/01/28
- 118/376: install-nix-from-closure.sh: Use https channel if possible, Ludovic Courtès, 2015/01/28
- 114/376: Refactor, Ludovic Courtès, 2015/01/28
- 117/376: Remove unnecessary call to addTempRoot(), Ludovic Courtès, 2015/01/28
- 115/376: Move some options out of globals, Ludovic Courtès, 2015/01/28
- 116/376: Doh, Ludovic Courtès, 2015/01/28
- 112/376: Add option ‘build-extra-chroot-dirs’, Ludovic Courtès, 2015/01/28
- 111/376: Get rid of "killing <pid>" message for unused build hooks, Ludovic Courtès, 2015/01/28