unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: David Craven <david@craven.ch>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Offloading to a VM
Date: Mon, 05 Sep 2016 22:28:12 +0200	[thread overview]
Message-ID: <87shtew0pv.fsf@gnu.org> (raw)
In-Reply-To: <CAL1_imm4SmMuLL-ieDk3ZtPASsiMeigyBW42k4jZdkw8O=xaEg@mail.gmail.com> (David Craven's message of "Sat, 3 Sep 2016 16:27:52 +0200")

David Craven <david@craven.ch> skribis:

>> The “build hook” is the mechanism by which the daemon asks an external
>> program whether it can build a derivation for some system.
>
>> Our (guix scripts offload) is such a program; it replies positively if
>> there’s a machine that matches the target system.
>
>> What I was suggesting is to have another build hook that would reply
>> positively as long as the target system can be emulated by QEMU.
>
> So I thought about this some more. guix offload uses guix build to
> build a derivation which again uses a different nix-daemon to build
> it. I'm not sure that guix offload can help us here.

Above, I was not suggesting to use ‘guix offload’.  Instead, I was
suggesting to write a new “build hook” that would run qemu-arm,
mentioning (guix scripts offload) as an example of a build hook.

> If it is possible to build a derivation using only qemu-arm instead of
> qemu-system-arm - which I'm still not convinced - I think it's the
> nix-daemon that would have to support this. In build.cc it sets up a
> chroot and then executes the builder. I think it's that builder that
> needs to be run with qemu-arm. But I don't think it's going to be as
> easy as that =)

guix-daemon can be extended via this “build hook” mechanism.  What I’m
proposing is to extend guix-daemon via an external build hook, which
means that guix-daemon itself can remain unchanged.

A derivation is essentially the file name of a “builder” along with its
argv and the needed dependencies.  For a given derivation, the hook
would roughly run:

   qemu-arm /gnu/store/…-builder arg1 arg2 …

Hope this clarifies things!

Ludo’.

  parent reply	other threads:[~2016-09-05 20:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19  7:50 Build machine sysadmin support Ludovic Courtès
2016-08-21 12:42 ` David Craven
2016-08-21 14:34   ` David Craven
2016-08-21 17:38     ` David Craven
2016-08-27 10:31       ` David Craven
2016-08-28 14:30         ` Offloading to a VM Ludovic Courtès
2016-08-28 14:38           ` David Craven
2016-08-29 12:54             ` Ludovic Courtès
2016-08-29 12:56               ` David Craven
2016-09-03 14:27                 ` David Craven
2016-09-03 14:32                   ` David Craven
2016-09-05 20:30                     ` Ludovic Courtès
2016-09-05 20:50                       ` David Craven
2016-09-05 20:28                   ` Ludovic Courtès [this message]
2016-08-28 14:22       ` ‘guix system vm’ and shared store Ludovic Courtès
2016-08-28 14:33   ` Build machine sysadmin support Ludovic Courtès

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87shtew0pv.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=david@craven.ch \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).