[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] daemon: Check for HAVE_CHROOT instead of CHROOT_ENABLED.

From: Ludovic Courtès
Subject: Re: [PATCH] daemon: Check for HAVE_CHROOT instead of CHROOT_ENABLED.
Date: Tue, 18 Aug 2015 18:48:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Mark H Weaver <address@hidden> skribis:

> Manolis Ragkousis <address@hidden> writes:
>> There is an issue with the chrooted builds on Hurd. In
>> nix/libstore/ CHROOT_ENABLED
>> is false because HAVE_UNSHARE && HAVE_SYS_MOUNT_H are not defined on Hurd.
>> The part that we are interested from 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]