all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludovic.courtes@inria.fr (Ludovic Courtès)
To: guix-devel@gnu.org
Subject: ‘guix pack --relocatable’ and the binary installation tarball
Date: Fri, 11 May 2018 18:42:11 +0200	[thread overview]
Message-ID: <87k1sannz0.fsf@gnu.org> (raw)
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")

Hello Guix!

To continue the experiment with ‘guix pack --relocatable’, I made a
binary installation tarball like this:

  guix pack -S /bin=bin -S /sbin=sbin --localstatedir -R guix bash-static

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=$PWD/var/guix NIX_LOG_DIR=$PWD/var/log/guix ./bin/guix-daemon --disable-chroot &
[1] 25103
~/tmp$ NIX_STATE_DIR=$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=$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 ‘bash-static’ we added to the tarball can
be useful:

--8<---------------cut here---------------start------------->8---
~/tmp$ ./bin/sh 
~/tmp$ /gnu/store/f7q38v9fh9zz27qinjwscqip8k7fkirs-make-boot0-4.2.1/bin/make --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 <http://gnu.org/licenses/gpl.html>
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’.

      parent reply	other threads:[~2018-05-11 16:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 20:15 [bug#31360] [PATCH 0/5] 'guix pack --relocatable' Ludovic Courtès
2018-05-03 20:22 ` [bug#31360] [PATCH 1/5] union: Add 'relative-file-name' Ludovic Courtès
2018-05-03 20:22   ` [bug#31360] [PATCH 2/5] profiles: Optionally use relative file names for symlink targets Ludovic Courtès
2018-05-03 20:22   ` [bug#31360] [PATCH 3/5] profiles: Allow lowerable objects other than packages in <manifest-entry> Ludovic Courtès
2018-05-03 20:22   ` [bug#31360] [PATCH 4/5] search-paths: Add 'set-search-paths' Ludovic Courtès
2018-05-03 20:22   ` [bug#31360] [PATCH 5/5] pack: Add '--relocatable' Ludovic Courtès
2018-05-04  2:45 ` [bug#31360] [PATCH 0/5] 'guix pack --relocatable' Thompson, David
2018-05-04  9:27   ` Ludovic Courtès
2018-05-04 13:01     ` Thompson, David
2018-05-10 12:55 ` bug#31360: " Ludovic Courtès
2018-05-11 16:42 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1sannz0.fsf@gnu.org \
    --to=ludovic.courtes@inria.fr \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.