From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludovic.courtes@inria.fr (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: =?utf-8?Q?=E2=80=98guix?= pack =?utf-8?Q?--relocatable=E2=80=99?= and the binary installation tarball Date: Fri, 11 May 2018 18:42:11 +0200 Message-ID: <87k1sannz0.fsf@gnu.org> References: <20180503201531.22213-1-ludo@gnu.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]:36208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHB7b-0006YJ-0O for guix-devel@gnu.org; Fri, 11 May 2018 12:42:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHB7W-0007G2-4g for guix-devel@gnu.org; Fri, 11 May 2018 12:42:19 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:22852) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fHB7V-0007FZ-QF for guix-devel@gnu.org; Fri, 11 May 2018 12:42:14 -0400 In-Reply-To: <20180503201531.22213-1-ludo@gnu.org> ("Ludovic \=\?utf-8\?Q\?Cou\?\= \=\?utf-8\?Q\?rt\=C3\=A8s\=22's\?\= message of "Thu, 3 May 2018 22:15:31 +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@gnu.org Hello Guix! To continue the experiment with =E2=80=98guix pack --relocatable=E2=80=99, = I made a binary installation tarball like this: guix pack -S /bin=3Dbin -S /sbin=3Dsbin --localstatedir -R guix bash-stat= ic The resulting tarball can be sent on a Guix-less machine, and then you can run the daemon as non-root and build things, though you have to define a couple of undocumented variables and disable chroot support: --8<---------------cut here---------------start------------->8--- ~/tmp$ NIX_STATE_DIR=3D$PWD/var/guix NIX_LOG_DIR=3D$PWD/var/log/guix ./bin/= guix-daemon --disable-chroot & [1] 25103 ~/tmp$ NIX_STATE_DIR=3D$PWD/var/guix ./bin/guix build -e '(@@ (gnu packages= commencement) gnu-make-boot0)' guile: warning: failed to install locale warning: failed to install locale: Invalid argument accepted connection from pid 26073, user ludo /gnu/store/qw5n2f745cb8h71fpwrhha2d62q7x2kp-make-boot0-4.2.1-debug /gnu/store/f7q38v9fh9zz27qinjwscqip8k7fkirs-make-boot0-4.2.1 ~/tmp$ NIX_STATE_DIR=3D$PWD/var/guix ./bin/guix gc --list-live | wc -l guile: warning: failed to install locale warning: failed to install locale: Invalid argument accepted connection from pid 27833, user ludo finding garbage collector roots... guile: warning: failed to install locale determining live/dead paths... 46 --8<---------------cut here---------------end--------------->8--- Build results are not wrapped though, so you cannot execute them directly: --8<---------------cut here---------------start------------->8--- ~/tmp$ /gnu/store/f7q38v9fh9zz27qinjwscqip8k7fkirs-make-boot0-4.2.1/bin/make bash: /gnu/store/f7q38v9fh9zz27qinjwscqip8k7fkirs-make-boot0-4.2.1/bin/make= : No such file or directory --8<---------------cut here---------------end--------------->8--- Instead you have to enter a namespace where /gnu/store is properly bound, and this is where the =E2=80=98bash-static=E2=80=99 we added to the = tarball can be useful: --8<---------------cut here---------------start------------->8--- ~/tmp$ ./bin/sh=20 ~/tmp$ /gnu/store/f7q38v9fh9zz27qinjwscqip8k7fkirs-make-boot0-4.2.1/bin/mak= e --version GNU Make 4.2.1 Built for x86_64-unknown-linux-gnu Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. --8<---------------cut here---------------end--------------->8--- We could probably simplify this use case, though I wonder how far we need to go here. Thoughts? :-) Ludo=E2=80=99.