guix/gnu/system
Thiago Jung Bauermann a75deb8844
system: image: Define correct docker image arch when cross building
Cross-building a docker image with:

  $ guix system image --image-type=docker --target=aarch64-linux-gnu os.scm

results in an image where the architecture declared in its config.json is
the host architecture rather than the target one.  The binaries are
correctly cross-compiled, so the image can be loaded and used despite the
warning message shown by docker:

  $ docker load -i vcal7bvsqcijchifhqdvprpd1niqh8sk-docker-image.tar.gz
  Loaded image: guix:latest
  $ docker create guix:latest
  WARNING: The requested image's platform (linux/amd64) does not match the
  detected host platform (linux/arm64/v8) and no specific platform was
  requested
  40f06aa869ed690489c4a3824a7f7721bd4bf453b85f25ac7199266939fe2fba
  $ echo $?
  0

This is fixed by passing the correct triplet to the build-docker-image
function.

* gnu/system/image.scm (system-docker-image) Add ‘image-target’ variable.
[builder]: Pass ‘#:system’ argument to ‘build-docker-image’.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-11-04 08:46:11 +01:00
..
examples system: Support bare-bones serial console. 2022-10-23 02:00:06 +02:00
images system: Use a valid license as the dummy license. 2022-10-13 17:41:59 +02:00
accounts.scm
file-systems.scm file-systems: Add cgroup2 to %pseudo-file-system-types. 2022-09-26 23:29:38 +02:00
hurd.scm system: hurd: Fix bogus 'initrd-modules' field. 2022-04-08 18:14:35 +02:00
image.scm system: image: Define correct docker image arch when cross building 2022-11-04 08:46:11 +01:00
install.scm system: install: Do not load amdgpu in the installer image. 2022-09-16 10:14:39 +02:00
keyboard.scm
linux-container.scm linux-container: container-script: Parse command line options. 2022-08-09 20:32:13 +02:00
linux-initrd.scm initrd: Use non-hyphenated kernel command-line parameter names. 2022-03-01 10:30:17 -05:00
locale.scm system: locale: Use only the current glibc. 2022-01-14 14:29:20 +01:00
mapped-devices.scm mapped-devices: Ensure 'cryptsetup open' gets a tty. 2022-04-08 18:14:35 +02:00
nss.scm
pam.scm system: Allow 'chfn' to change the user's full name. 2022-01-01 15:10:12 +01:00
setuid.scm system: Add (gnu system setuid). 2021-07-29 13:09:48 -04:00
shadow.scm Merge branch 'master' into core-updates 2021-02-03 09:57:35 +00:00
uuid.scm uuid: Support XFS. 2021-09-23 18:17:17 +02:00
vm.scm system: vm: Change the writable image name. 2022-01-14 12:26:07 +01:00