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: Thu, 03 May 2018 22:51:19 +0200 Message-ID: <87a7tgh394.fsf@gnu.org> References: <87zi1rwsv6.fsf@inria.fr> 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]:44955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fELCI-0005cv-Tl for guix-devel@gnu.org; Thu, 03 May 2018 16:51:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fELCE-0000DV-RU for guix-devel@gnu.org; Thu, 03 May 2018 16:51:26 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:64949) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fELCE-00009W-D8 for guix-devel@gnu.org; Thu, 03 May 2018 16:51:22 -0400 In-Reply-To: <87zi1rwsv6.fsf@inria.fr> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22\?\= \=\?utf-8\?Q\?'s\?\= message of "Wed, 25 Apr 2018 11:14:05 +0200") 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: guix-devel ludovic.courtes@inria.fr (Ludovic Court=C3=A8s) skribis: > The hack below allows =E2=80=98guix pack=E2=80=99 to produce wrappers tha= t allow, > through user namespaces, programs to automatically relocate themselves > when you run them unprivileged on a machine that lacks Guix. In the > example below, I run =E2=80=98sed=E2=80=99 from a pack on a machine that = lacks Guix: > > ludo@fencepost:~/tmp$ tar xf ../pack.tgz > ludo@fencepost:~/tmp$ echo hello > foo > ludo@fencepost:~/tmp$ gnu/store/ffdzkyi23n8xh3n6vfqpa1lzg3xx9jpj-sed-4.4/= bin/sed -i foo -es/hello/bye/g > ludo@fencepost:~/tmp$ cat foo > bye > ludo@fencepost:~/tmp$ ls /gnu/store > ls: cannot access '/gnu/store': No such file or directory You can watch the next episode of this season (and be part of it!) at . Ludo=E2=80=99.