From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] daemon: Check for HAVE_CHROOT instead of CHROOT_ENABLED. Date: Tue, 18 Aug 2015 18:48:46 +0200 Message-ID: <87614ck0ep.fsf@gnu.org> References: <877fp2pu52.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRk4G-00016b-2w for Guix-devel@gnu.org; Tue, 18 Aug 2015 12:48:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRk4F-0004xW-35 for Guix-devel@gnu.org; Tue, 18 Aug 2015 12:48:56 -0400 In-Reply-To: <877fp2pu52.fsf@netris.org> (Mark H. Weaver's message of "Mon, 10 Aug 2015 20:04:57 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: Guix-devel Mark H Weaver skribis: > Manolis Ragkousis 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 Hur= d. >> >> 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=E2=80=99s libc should really provide , =E2=80=98mount=E2=80=99 (including MS_BIND), and =E2=80=98umount=E2=80=99, = as discussed earlier. What=E2=80=99s the status of this? =E2=80=98unshare=E2=80=99 is actually no longer used, so we can patch the d= aemon (in upstream Nix) to get rid of HAVE_UNSHARE. HTH, Ludo=E2=80=99.