mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-22 09:05:54 +02:00
services/qemu-binfmt: Use the F flag and the static output of QEMU.
Fixes <https://issues.guix.gnu.org/36117>. Before this change, the 'binfmt_misc' entries registered for QEMU would not be usable in container contexts outside of guix-daemon (without manually bind mounting file names). For example: $ docker run --rm arm32v7/debian true standard_init_linux.go:207: exec user process caused "no such file or directory" After this change, any container can make use of the QEMU binfmt_misc registrations, as their corresponding QEMU static binaries are fully pre-loaded by the kernel. * gnu/services/virtualization.scm (<qemu-platform>): Define using 'define-record-type*'. [flags]: New field, which defaults to "F" (fix binary). (%i386, %i486, %alpha, %arm, %armeb, %sparc, %sparc32plus, %ppc, %ppc64) (%ppc64le, %m68k, %mips, %mipsel, %mipsn32, %mipsn32el, %mips64, %mips64el) (%riscv32, %riscv64, %sh4, %sh4eb, %s390x, %aarch64, %hppa): Adjust. (qemu-binfmt-guix-chroot): Remove variable. (qemu-binfmt-service-type): Remove the qemu-binfmt-guix-chroot extension. * gnu/services/qemu-binfmt (qemu-platform->binfmt): Use the static output of QEMU. * doc/contributing.texi (Submitting Patches): Update doc. * doc/guix.texi (Virtualization Services): Update doc.
This commit is contained in:
@@ -1016,7 +1016,6 @@ your @code{operating-system} configuration:
|
||||
(service qemu-binfmt-service-type
|
||||
(qemu-binfmt-configuration
|
||||
(platforms (lookup-qemu-platforms "arm" "aarch64"))
|
||||
(guix-support? #t)))
|
||||
@end lisp
|
||||
|
||||
Then reconfigure your system.
|
||||
|
||||
@@ -28723,13 +28723,6 @@ This is the configuration for the @code{qemu-binfmt} service.
|
||||
The list of emulated QEMU platforms. Each item must be a @dfn{platform
|
||||
object} as returned by @code{lookup-qemu-platforms} (see below).
|
||||
|
||||
@item @code{guix-support?} (default: @code{#t})
|
||||
When it is true, QEMU and all its dependencies are added to the build
|
||||
environment of @command{guix-daemon} (@pxref{Invoking guix-daemon,
|
||||
@option{--chroot-directory} option}). This allows the @code{binfmt_misc}
|
||||
handlers to be used within the build environment, which in turn means
|
||||
that you can transparently build programs for another architecture.
|
||||
|
||||
For example, let's suppose you're on an x86_64 machine and you have this
|
||||
service:
|
||||
|
||||
@@ -28737,7 +28730,6 @@ service:
|
||||
(service qemu-binfmt-service-type
|
||||
(qemu-binfmt-configuration
|
||||
(platforms (lookup-qemu-platforms "arm"))
|
||||
(guix-support? #t)))
|
||||
@end lisp
|
||||
|
||||
You can run:
|
||||
@@ -28752,10 +28744,6 @@ build}, transparently using QEMU to emulate the ARMv7 CPU@. Pretty handy
|
||||
if you'd like to test a package build for an architecture you don't have
|
||||
access to!
|
||||
|
||||
When @code{guix-support?} is set to @code{#f}, programs for other
|
||||
architectures can still be executed transparently, but invoking commands
|
||||
like @command{guix build -s armhf-linux @dots{}} will fail.
|
||||
|
||||
@item @code{qemu} (default: @code{qemu})
|
||||
The QEMU package to use.
|
||||
@end table
|
||||
|
||||
Reference in New Issue
Block a user