all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: Guix-devel <Guix-devel@gnu.org>
Subject: Re: [PATCH] daemon: Check for HAVE_CHROOT instead of CHROOT_ENABLED.
Date: Tue, 18 Aug 2015 18:48:46 +0200	[thread overview]
Message-ID: <87614ck0ep.fsf@gnu.org> (raw)
In-Reply-To: <877fp2pu52.fsf@netris.org> (Mark H. Weaver's message of "Mon, 10 Aug 2015 20:04:57 -0400")

Mark H Weaver <mhw@netris.org> skribis:

> Manolis Ragkousis <manolis837@gmail.com> writes:
>
>> 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?
>
> This won't be sufficient, because if you set up a chroot, you'll also
> need to do some of the things within the "#if CHROOT_ENABLED" starting
> on line 1997, such as setting up local instances of /dev and /etc.
>
> Here's what I'd suggest: instead of using HAVE_CHROOT on line 1768,
> instead split CHROOT_ENABLED into two separate flags: CHROOT_ENABLED and
> maybe CONTAINER_ENABLED.  All existing occurrences of CHROOT_ENABLED
> would initially be replaced with CONTAINER_ENABLED.  Then, define
> CHROOT_ENABLED (now a newly defined name) to depend on a smaller set of
> requirements, maybe just HAVE_CHROOT && HAVE_SYS_MOUNT_H.

That sounds good.

But note that the Hurd’s libc should really provide <sys/mount.h>,
‘mount’ (including MS_BIND), and ‘umount’, as discussed earlier.  What’s
the status of this?

‘unshare’ is actually no longer used, so we can patch the daemon (in
upstream Nix) to get rid of HAVE_UNSHARE.

HTH,
Ludo’.

  reply	other threads:[~2015-08-18 16:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-08-19 10:10     ` Manolis Ragkousis
2015-08-19 12:22       ` Manolis Ragkousis
2015-08-28  9:34       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87614ck0ep.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=Guix-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.