From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludovic.courtes@inria.fr (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Generating wrappers for execution in non-root non-Guix contexts Date: Fri, 27 Apr 2018 18:38:36 +0200 Message-ID: <87a7tod2pf.fsf@inria.fr> References: <87zi1rwsv6.fsf@inria.fr> <87r2n12v2z.fsf@gmail.com> 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]:44704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC6Oe-00073s-JZ for guix-devel@gnu.org; Fri, 27 Apr 2018 12:38:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fC6OZ-0001pB-NW for guix-devel@gnu.org; Fri, 27 Apr 2018 12:38:56 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:54046) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fC6OZ-0001oN-Be for guix-devel@gnu.org; Fri, 27 Apr 2018 12:38:51 -0400 In-Reply-To: <87r2n12v2z.fsf@gmail.com> (Chris Marusich's message of "Thu, 26 Apr 2018 20:21:08 -0700") 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" To: Chris Marusich Cc: guix-devel Hello! Chris Marusich skribis: > ludovic.courtes@inria.fr (Ludovic Court=C3=A8s) writes: > >> Hello Guix! >> >> The hack below allows =E2=80=98guix pack=E2=80=99 to produce wrappers th= at allow, >> through user namespaces, programs to automatically relocate themselves >> when you run them unprivileged on a machine that lacks Guix. > > That's really cool! > > I've noticed that when running in a chroot-like environment, sometimes > programs expect certain files to exist that don't - for example, device > files in /dev, procfs files in /proc, or even things like > /etc/resolv.conf. Does this wrapper automatically create those kinds of > files, or would programs that want to access those kinds of files still > need some special love on an case-by-case basis? The wrapper automatically bind-mounts every entry in /, such that the only difference compared to the =E2=80=9Creal=E2=80=9D system is the extra = /gnu/store. Note: we had this discussion about =E2=80=98guix run=E2=80=99 with Mike Ger= witz and Rutger not long ago (to run applications in isolated environments). In a pretty similar way, we could generate least-authority wrappers for what you install with =E2=80=98guix package=E2=80=99. Like, one could writ= e: guix package -i icecat --least-authority or something like that. Food for thought=E2=80=A6 Ludo=E2=80=99.