Hermetic cross system deployments fail #33

Closed
opened 2022-10-27 13:53:15 +00:00 by Gerschtli · 4 comments
Gerschtli commented 2022-10-27 13:53:15 +00:00 (Migrated from github.com)

Currently, it is not possible to run an hermetic deployment from a x86_64-linux to an aarch64-linux machine. It fails with

/nix/store/5xr8ndqi3i7pxydh41lvx859mqfq1c0g-nixos-rebuild
/nix/store/5xr8ndqi3i7pxydh41lvx859mqfq1c0g-nixos-rebuild/bin/nixos-rebuild: line 373: /nix/store/qarssrazji0q9xp80xg8shsm2crckfr0-coreutils-9.0/bin/mktemp: cannot execute binary file: Exec format error

Hermetic deployment should copy and use cross compiled packages on the target machine.

Currently, it is not possible to run an hermetic deployment from a x86_64-linux to an aarch64-linux machine. It fails with ``` /nix/store/5xr8ndqi3i7pxydh41lvx859mqfq1c0g-nixos-rebuild /nix/store/5xr8ndqi3i7pxydh41lvx859mqfq1c0g-nixos-rebuild/bin/nixos-rebuild: line 373: /nix/store/qarssrazji0q9xp80xg8shsm2crckfr0-coreutils-9.0/bin/mktemp: cannot execute binary file: Exec format error ``` Hermetic deployment should copy and use cross compiled packages on the target machine.
MatthewCroughan commented 2022-10-27 13:57:47 +00:00 (Migrated from github.com)

This is actually an issue with nixos-rebuild, which is why I was thinking of implementing multiple backends, so that we could for example choose between using nixos-rebuild and nix copy to implement the deployment, or any other method, perhaps our own custom activation.

If we use nixos-rebuild we encounter this bug https://github.com/NixOS/nixpkgs/issues/177873

If we use nix copy and use the activation script from a NixOS system closure directly, we encounter this bug https://github.com/NixOS/nixpkgs/issues/82851

This is actually an issue with `nixos-rebuild`, which is why I was thinking of implementing multiple backends, so that we could for example choose between using `nixos-rebuild` and `nix copy` to implement the deployment, or any other method, perhaps our own custom activation. If we use `nixos-rebuild` we encounter this bug https://github.com/NixOS/nixpkgs/issues/177873 If we use `nix copy` and use the activation script from a NixOS system closure directly, we encounter this bug https://github.com/NixOS/nixpkgs/issues/82851
Gerschtli commented 2022-10-27 14:15:02 +00:00 (Migrated from github.com)

Ouh, that looks like fun :D If you need some help, I would be glad to join :)

Ouh, that looks like fun :D If you need some help, I would be glad to join :)
MatthewCroughan commented 2022-10-27 15:13:37 +00:00 (Migrated from github.com)

@Gerschtli Just fixing those bugs I posted would ultimately fix them in Nixinate too. I don't have the time to work on them right now, but I may find interest later on, in which case I'll give you a ping!

@Gerschtli Just fixing those bugs I posted would ultimately fix them in Nixinate too. I don't have the time to work on them right now, but I may find interest later on, in which case I'll give you a ping!

Closed due to fork migration, feel free to reopen.

Closed due to fork migration, feel free to reopen.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tristan/nixinate#33
No description provided.