all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pjotr Prins <pjotr.public12@thebird.nl>
To: guix-devel <guix-devel@gnu.org>
Subject: Re: Unprivileged /gnu/store with PRoot
Date: Sun, 16 Jul 2017 14:35:14 +0200	[thread overview]
Message-ID: <20170716123514.GA11163@thebird.nl> (raw)
In-Reply-To: <87d1beoyvi.fsf@gnu.org>

On Fri, May 12, 2017 at 05:53:21PM +0200, Ludovic Court??s wrote:
> One way to work around the problem is to use PRoot, a ptrace(2)-based
> tool to virtualize the file system??.  With the 'proot-static' package I
> just pushed, one can run, say, hwloc, on such a hostile machine by
> sending locally-created packs as well as 'proot':
> 
>   scp $(guix build proot-static)/bin/proot hostile:
>   scp $(guix pack hwloc -S /bin=bin) hostile:hwloc.tgz
> 
> and then on the hostile machine:
> 
>   mkdir ~/.local
>   cd ~/.local
>   tar xf ~/hwloc.tgz
>   cd
>   ./proot -b .local:/ /bin/lstopo
> 
> where 'proot -b .local:/' essentially 'bind-mounts' ~/.local to /.

I took it a bit further and can run guix-daemon in proot:

  https://gitlab.com/pjotrp/guix-notes/blob/master/GUIX-NO-ROOT.org

this means you can install binary packages inside proot and run them. That is
pretty cool already :).

I can also create a build system for building Guix from source. So we
are bootstrapping with our own standard environment.

Now, what I really want to do, from this, is to build packages that get
installed in a non-/gnu/store. E.g., ~/opt/store instead. It should be
possible with the instructions Roel wrote down in 

  https://github.com/UMCUGenetics/guix-additions/blob/master/doc/Deployment.md

but I am failing because it appears the guix-daemon is still linked
against the old store. After

  ./configure --localstatedir=$HOME/opt/var --with-store-dir=$HOME/opt/store --prefix=$HOME/opt/local
  make clean
  make guix-daemon
  make install

  ldd ~/opt/local/bin/guix-daemon
        linux-vdso.so.1 (0x00007ffcc4ffb000)
        libsqlite3.so.0 => not found
        libgcrypt.so.20 => not found
        libstdc++.so.6 => /gnu/store/b3z4d4zjibqix6pn58q6b1rgfhrarcaq-gcc-7.1.0-lib/lib/libstdc++.so.6 (0x00007f3c2ecb9000)
        libm.so.6 => /gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/libm.so.6 (0x00007f3c2e9a7000)
        libgcc_s.so.1 => /gnu/store/b3z4d4zjibqix6pn58q6b1rgfhrarcaq-gcc-7.1.0-lib/lib/libgcc_s.so.1 (0x00007f3c2e790000)
        libc.so.6 => /gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/libc.so.6 (0x00007f3c2e3f1000)
        /gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/ld-linux-x86-64.so.2 (0x00007f3c2f039000)

Anything I am missing? 

Maybe it is logical but I want to link against $HOME/opt/store/... so I can run guix-daemon outside
proot. 

Note it still runs in proot:

   proot -0 -b /proc -b /dev -b /etc -r . -b etc_guix/acl:/etc/guix/acl guix/guix-daemon --disable-chroot
      warning: daemon is running as root, so using `--build-users-group' is highly recommended
      accepted connection from pid 15774, user user

only now the guix client balks with

   error: failed to run download program '/home/user/opt/local/libexec/guix/download': No such file or directory

That file actually exists in the proot environment

   ls -l /home/user/opt/local/libexec/guix/download
   -rwxr-xr-x 1 user 502 281 Jul 16 08:11 /home/user/opt/local/libexec/guix/download

So close to a solution...

Pj.

  parent reply	other threads:[~2017-07-16 12:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 15:53 Unprivileged /gnu/store with PRoot Ludovic Courtès
2017-05-12 16:20 ` Alex Sassmannshausen
2017-05-12 21:28 ` Hartmut Goebel
2017-05-13  5:38 ` Unprivileged /gnu/store with PRoot - or relocate Pjotr Prins
2017-05-13 14:12   ` Ludovic Courtès
2017-05-13  7:04 ` Unprivileged /gnu/store with PRoot Maxim Cournoyer
2017-05-13 14:02   ` Ludovic Courtès
2017-06-08 15:29 ` Ricardo Wurmus
2017-06-09  8:09   ` Ludovic Courtès
2017-07-16 12:35 ` Pjotr Prins [this message]
2017-07-16 12:51   ` Pjotr Prins
2017-07-16 16:09     ` Pjotr Prins

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=20170716123514.GA11163@thebird.nl \
    --to=pjotr.public12@thebird.nl \
    --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.