GNU bug report logs - #36117
qemu-binfmt with non-native chroot

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Vagrant Cascadian <vagrant@HIDDEN>; dated Thu, 6 Jun 2019 17:56:01 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 36117 <at> debbugs.gnu.org:


Received: (at 36117) by debbugs.gnu.org; 24 Jun 2019 12:25:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 24 08:25:59 2019
Received: from localhost ([127.0.0.1]:55739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hfO2p-0003sc-Lf
	for submit <at> debbugs.gnu.org; Mon, 24 Jun 2019 08:25:59 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43732)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1hfO2l-0003sJ-Q8
 for 36117 <at> debbugs.gnu.org; Mon, 24 Jun 2019 08:25:56 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36286)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1hfO2e-0005HW-57; Mon, 24 Jun 2019 08:25:49 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=43572 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1hfO2b-0000vK-DN; Mon, 24 Jun 2019 08:25:47 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Vagrant Cascadian <vagrant@HIDDEN>
Subject: Re: bug#36117: qemu-binfmt with non-native chroot
References: <87r286zjhu.fsf@yucca> <87blz9ft3j.fsf@HIDDEN>
 <87zhmsy5pn.fsf@yucca>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 6 Messidor an 227 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Mon, 24 Jun 2019 14:25:43 +0200
In-Reply-To: <87zhmsy5pn.fsf@yucca> (Vagrant Cascadian's message of "Fri, 07
 Jun 2019 23:03:00 -0700")
Message-ID: <87k1dbb260.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36117
Cc: 36117 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

Vagrant Cascadian <vagrant@HIDDEN> skribis:

> That said, it's still a manual step (mounting /gnu or /gnu/store/qemu*)
> required to do something that could otherwise be handled transparently
> with a static build of qemu and adjusting the binfmt_misc flags... so if
> permitted to dream, I still think that would be a nice option to have
> available. :)

Yes, it sounds like we could/should do that too!

We=E2=80=99ll end up having big qemu-* binaries, each one with its own copy=
 of
glibc, for instance.  Is there something smart we could do to avoid
ending up with a huge package?

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#36117; Package guix. Full text available.

Message received at 36117 <at> debbugs.gnu.org:


Received: (at 36117) by debbugs.gnu.org; 8 Jun 2019 06:03:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 08 02:03:14 2019
Received: from localhost ([127.0.0.1]:52741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hZURd-0002gn-Sr
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2019 02:03:14 -0400
Received: from cascadia.aikidev.net ([173.255.214.101]:44110)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vagrant@HIDDEN>) id 1hZURc-0002ga-8b
 for 36117 <at> debbugs.gnu.org; Sat, 08 Jun 2019 02:03:13 -0400
Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b])
 (Authenticated sender: vagrant@HIDDEN)
 by cascadia.aikidev.net (Postfix) with ESMTPSA id 2196C1AC23;
 Fri,  7 Jun 2019 23:03:04 -0700 (PDT)
From: Vagrant Cascadian <vagrant@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#36117: qemu-binfmt with non-native chroot
In-Reply-To: <87blz9ft3j.fsf@HIDDEN>
References: <87r286zjhu.fsf@yucca> <87blz9ft3j.fsf@HIDDEN>
Date: Fri, 07 Jun 2019 23:03:00 -0700
Message-ID: <87zhmsy5pn.fsf@yucca>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36117
Cc: 36117 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2019-06-07, Ludovic Court=C3=A8s wrote:
> Vagrant Cascadian <vagrant@HIDDEN> skribis:
>> On Guix there are no flags set, and the binary used is a dynamically
>> linked executable:
>>
>>   $ cat /proc/sys/fs/binfmt_misc/qemu-aarch64
>>   enabled
>>   interpreter
>>   /gnu/store/sw2rrqmjij73wcy3ajd47ypvmzh12yz6-qemu-3.1.0/bin/qemu-aarch64
>>   flags:
>>   offset 0
>>   magic 7f454c460201010000000000000000000200b700
>>   mask ffffffffffffff00fffffffffffffffffeffffff
>>
>>
>> So there are (at least) two things needed to make this work on Guix:
>>
>> * A way to set the flags on qemu-binfmt-service-type.
>>
>> * A static build of qemu-user targets
>>
>> * A way to set which qemu to use for qemu-binfmt-service-type.
>>
>> The *three* things are...
>>
>>
>> With this working correctly foreign-architecture chroots would become
>> trivial:
>>
>>   # on an amd64 host:
>>   $ debootstrap --arch=3Darm64 buster buster-chroot http://deb.debian.or=
g/debian
>>   ...
>>   $ chroot buster-chroot /bin/bash
>>
>>
>> Enabling qemu-binfmt-service-type to operate in this way would obviate
>> the need for the "guix-support?" qemu-binfmt-configuration option, as
>> you could simply assemble the build environment without having to
>> include all of qemu's dependencies in the container.
>>
>> It's a pretty magical feature.
>
> True!  Though adding all the dependencies of QEMU in the chroot the way
> =E2=80=98guix-support?=E2=80=99 does it turns out to be pretty magical to=
o ;-), because
> we can precisely list those dependencies and include nothing but these
> dependencies in the chroot=E2=80=94something that cannot be done on an FHS
> system.

Indeed!


> As an quick workaround, perhaps you could bind-mount all the entries of:
>
>   guix gc -R $(guix build qemu)
>
> in your Debian chroot?

I tried an even lazier experiment, bind-mounting all of /gnu into the
new chroot directory before running debootstrap, and it worked!


That said, it's still a manual step (mounting /gnu or /gnu/store/qemu*)
required to do something that could otherwise be handled transparently
with a static build of qemu and adjusting the binfmt_misc flags... so if
permitted to dream, I still think that would be a nice option to have
available. :)


Another interesting angle is that including qemu and all of qemu's
dependencies in a guix build environment is that qemu or one of it's
dependencies might actually get used during the build... even if not
explicitly included in one of the inputs or one of the build systems. So
maybe the case can be made that the qemu-static build from executed from
the host system is cleaner than copying all of qemu and dependencies
into the build environment...


> (Speaking of which=E2=80=A6 it would be great to have a Debian API in Gui=
x, where
> you could write, say:
>
>   (debian-build #~(system (string-append "/bin/uname > "
>                                          #$output)))
>
> Food for thought=E2=80=A6)

Not quite sure of what you're going for, but perhaps best to have that
conversation elsewhere.


live well,
  vagrant

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXPtPlQAKCRDcUY/If5cW
qn5XAP9vawKbpFGZ7nQebyNRJAEii1KsHrCQiX0Igxm0OFSQPgEAq8tC5bzbmerU
EVf/BVGnkypsbR67QuBLPgw5VHpeEwI=
=7eK6
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#36117; Package guix. Full text available.

Message received at 36117 <at> debbugs.gnu.org:


Received: (at 36117) by debbugs.gnu.org; 7 Jun 2019 13:00:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 07 09:00:46 2019
Received: from localhost ([127.0.0.1]:51513 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hZEU8-0003Uk-BO
	for submit <at> debbugs.gnu.org; Fri, 07 Jun 2019 09:00:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53564)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1hZEU6-0003UY-Ms
 for 36117 <at> debbugs.gnu.org; Fri, 07 Jun 2019 09:00:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47668)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1hZEU0-0008GN-Ch; Fri, 07 Jun 2019 09:00:36 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=39554 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1hZETy-0006D6-Ee; Fri, 07 Jun 2019 09:00:35 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Vagrant Cascadian <vagrant@HIDDEN>
Subject: Re: bug#36117: qemu-binfmt with non-native chroot
References: <87r286zjhu.fsf@yucca>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 19 Prairial an 227 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Fri, 07 Jun 2019 15:00:32 +0200
In-Reply-To: <87r286zjhu.fsf@yucca> (Vagrant Cascadian's message of "Thu, 06
 Jun 2019 10:55:25 -0700")
Message-ID: <87blz9ft3j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36117
Cc: 36117 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

Vagrant Cascadian <vagrant@HIDDEN> skribis:

> On Guix there are no flags set, and the binary used is a dynamically
> linked executable:
>
>   $ cat /proc/sys/fs/binfmt_misc/qemu-aarch64
>   enabled
>   interpreter
>   /gnu/store/sw2rrqmjij73wcy3ajd47ypvmzh12yz6-qemu-3.1.0/bin/qemu-aarch64
>   flags:
>   offset 0
>   magic 7f454c460201010000000000000000000200b700
>   mask ffffffffffffff00fffffffffffffffffeffffff
>
>
> So there are (at least) two things needed to make this work on Guix:
>
> * A way to set the flags on qemu-binfmt-service-type.
>
> * A static build of qemu-user targets
>
> * A way to set which qemu to use for qemu-binfmt-service-type.
>
> The *three* things are...
>
>
> With this working correctly foreign-architecture chroots would become
> trivial:
>
>   # on an amd64 host:
>   $ debootstrap --arch=3Darm64 buster buster-chroot http://deb.debian.org=
/debian
>   ...
>   $ chroot buster-chroot /bin/bash
>
>
> Enabling qemu-binfmt-service-type to operate in this way would obviate
> the need for the "guix-support?" qemu-binfmt-configuration option, as
> you could simply assemble the build environment without having to
> include all of qemu's dependencies in the container.
>
> It's a pretty magical feature.

True!  Though adding all the dependencies of QEMU in the chroot the way
=E2=80=98guix-support?=E2=80=99 does it turns out to be pretty magical too =
;-), because
we can precisely list those dependencies and include nothing but these
dependencies in the chroot=E2=80=94something that cannot be done on an FHS
system.

As an quick workaround, perhaps you could bind-mount all the entries of:

  guix gc -R $(guix build qemu)

in your Debian chroot?

(Speaking of which=E2=80=A6 it would be great to have a Debian API in Guix,=
 where
you could write, say:

  (debian-build #~(system (string-append "/bin/uname > "
                                         #$output)))

Food for thought=E2=80=A6)

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#36117; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Jun 2019 17:55:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 06 13:55:59 2019
Received: from localhost ([127.0.0.1]:50536 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hYwcH-0002kQ-QG
	for submit <at> debbugs.gnu.org; Thu, 06 Jun 2019 13:55:59 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33436)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vagrant@HIDDEN>) id 1hYwcF-0002kA-71
 for submit <at> debbugs.gnu.org; Thu, 06 Jun 2019 13:55:55 -0400
Received: from lists.gnu.org ([209.51.188.17]:32800)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <vagrant@HIDDEN>) id 1hYwc8-0005fF-A3
 for submit <at> debbugs.gnu.org; Thu, 06 Jun 2019 13:55:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47784)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <vagrant@HIDDEN>) id 1hYwc7-0003tO-0X
 for bug-guix@HIDDEN; Thu, 06 Jun 2019 13:55:48 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <vagrant@HIDDEN>) id 1hYwc4-0005Yg-Gd
 for bug-guix@HIDDEN; Thu, 06 Jun 2019 13:55:46 -0400
Received: from cascadia.aikidev.net ([2600:3c01:e000:267:0:a171:de7:c]:34872)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <vagrant@HIDDEN>) id 1hYwc3-0005O7-6N
 for bug-guix@HIDDEN; Thu, 06 Jun 2019 13:55:44 -0400
Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b])
 (Authenticated sender: vagrant@HIDDEN)
 by cascadia.aikidev.net (Postfix) with ESMTPSA id E47A71AC23
 for <bug-guix@HIDDEN>; Thu,  6 Jun 2019 10:55:29 -0700 (PDT)
From: Vagrant Cascadian <vagrant@HIDDEN>
To: bug-guix@HIDDEN
Subject: qemu-binfmt with non-native chroot
Date: Thu, 06 Jun 2019 10:55:25 -0700
Message-ID: <87r286zjhu.fsf@yucca>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2600:3c01:e000:267:0:a171:de7:c
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

I've been trying to use qemu-binfmt-service-type to build a non-native
chroot of a Debian system on Guix... because, well... because!

In Debian, this works with the qemu-user-static package, where the
binfmt sets these flags:

  $ cat /proc/sys/fs/binfmt_misc/qemu-aarch64
  enabled
  interpreter /usr/bin/qemu-aarch64-static
  flags: OCF
  offset 0
  magic 7f454c460201010000000000000000000200b700
  mask ffffffffffffff00fffffffffffffffffeffffff

In particular, the F flag allows the host system binaries to be used as
the interpreter inside the chroot. But apparently, this only works with
static-built qemu targets, according to the linux's
Documentation/admin-guide/binfmt-misc.rst.

On Guix there are no flags set, and the binary used is a dynamically
linked executable:

  $ cat /proc/sys/fs/binfmt_misc/qemu-aarch64
  enabled
  interpreter
  /gnu/store/sw2rrqmjij73wcy3ajd47ypvmzh12yz6-qemu-3.1.0/bin/qemu-aarch64
  flags:
  offset 0
  magic 7f454c460201010000000000000000000200b700
  mask ffffffffffffff00fffffffffffffffffeffffff


So there are (at least) two things needed to make this work on Guix:

* A way to set the flags on qemu-binfmt-service-type.

* A static build of qemu-user targets

* A way to set which qemu to use for qemu-binfmt-service-type.

The *three* things are...


With this working correctly foreign-architecture chroots would become
trivial:

  # on an amd64 host:
  $ debootstrap --arch=arm64 buster buster-chroot http://deb.debian.org/debian
  ...
  $ chroot buster-chroot /bin/bash


Enabling qemu-binfmt-service-type to operate in this way would obviate
the need for the "guix-support?" qemu-binfmt-configuration option, as
you could simply assemble the build environment without having to
include all of qemu's dependencies in the container.

It's a pretty magical feature.


live well,
  vagrant

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXPlTjQAKCRDcUY/If5cW
qoyzAPwN0Pfs8K7XDxPZwr5pCsE9J17Y0vwvleFkRkdv6t2fRwD/fXCsT/L6RaTv
PaLNLd2mCSM8uXgJXyuXJYU1MmQoNgk=
=NkZM
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to Vagrant Cascadian <vagrant@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#36117; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.