Using --extra-files on a non-NixOS source machine causes crash with newer lockfile
Closed this issue · 0 comments
vancluever commented
Steps to reproduce
Source machine:
$ nix run nixpkgs#nix-info -- -m
- system: `"aarch64-linux"`
- host os: `Linux 6.2.0-36-generic, Ubuntu, 22.04.3 LTS (Jammy Jellyfish), nobuild`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.1`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
Set up target machine with the 23.05 installer.
- Clone repo flake to a local directory.
- Run
nix flake lock --update-input nixpkgs
. - Do a nixos-anywhere run with
--extra-files
; e.g.
nix run ~/nixos-anywhere -- --debug --flake ./src/etc/nixos#nixos --extra-files ./src root@TARGET
Expected behaviour
Normal install completed w/files copied.
Actual behaviour
rsync crashes when uploading files. Abridged output:
### Copying extra files ###
+ rsync -rlpv -FF -e 'ssh -i "/tmp/tmp.*****"/nixos-anywhere -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ' ./src/ root@192.168.xx.xx:/mnt/
Warning: Permanently added '192.168.xx.xx' (ED25519) to the list of known hosts.
sending incremental file list
*** buffer overflow detected ***: terminated
/nix/store/xp5ql5d6b2n6kiw4aqz6alvxg1vp5psy-nixos-anywhere-1.0.0/bin/.nixos-anywhere-wrapped: line 449: ... Aborted (core dumped) ...
Additional notes
I initially found this with the nixpkgs package; I guess something has recently changed that has caused mixing system SSH with Nix rsync to crash. Adding rsync to the suffix list that was added in #66 seems to fix the issue.