unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] daemon: Check for HAVE_CHROOT instead of CHROOT_ENABLED.
@ 2015-08-10 18:15 Manolis Ragkousis
  2015-08-11  0:04 ` Mark H Weaver
  0 siblings, 1 reply; 6+ messages in thread
From: Manolis Ragkousis @ 2015-08-10 18:15 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

Hello everyone,

There is an issue with the chrooted builds on Hurd. In
nix/libstore/build.cc CHROOT_ENABLED
is false because HAVE_UNSHARE && HAVE_SYS_MOUNT_H are not defined on Hurd.

The part that we are interested from build.cc is at line 1768. The
part of the code in that if, is used by the daemon for chrooted
builds. At this specific part of the daemon we only need
 HAVE_CHROOT to be defined, which is true on hurd, for the builds to
work. With this workaround,
things seem to work for me until now. WDYT?

I am sending this patch in order to discuss what could be done and see
if anyone has any better ideas.

Manolis

[-- Attachment #2: 0001-daemon-Check-for-HAVE_CHROOT-instead-of-CHROOT_ENABL.patch --]
[-- Type: text/x-patch, Size: 1084 bytes --]

From 9fd91c191d47d77f4abeee41c6846462badb5762 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Mon, 10 Aug 2015 20:56:03 +0300
Subject: [PATCH] daemon: Check for HAVE_CHROOT instead of CHROOT_ENABLED.

* nix/libstore/build.cc (DerivationGoal::startBuilder): Check only if HAVE_CHROOT is
  defined in order to enable chrooted builds on Hurd.
---
 nix/libstore/build.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index a9eedce..db85df3 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -1765,7 +1765,8 @@ void DerivationGoal::startBuilder()
     useChroot = settings.useChroot;
 
     if (useChroot) {
-#if CHROOT_ENABLED
+#if HAVE_CHROOT /* We only need chroot at this time and with this chroot builds are 
+                   enabled on Hurd*/
         /* Create a temporary directory in which we set up the chroot
            environment using bind-mounts.  We put it in the Nix store
            to ensure that we can create hard-links to non-directory
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-28  9:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10 18:15 [PATCH] daemon: Check for HAVE_CHROOT instead of CHROOT_ENABLED Manolis Ragkousis
2015-08-11  0:04 ` Mark H Weaver
2015-08-18 16:48   ` Ludovic Courtès
2015-08-19 10:10     ` Manolis Ragkousis
2015-08-19 12:22       ` Manolis Ragkousis
2015-08-28  9:34       ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).