Hi Ivan,
Please send an email to coreboot@coreboot.org
Thx
De : "Ivan Jager" A : "NixOS/nixpkgs" ,"Elyes HAOUAS" ,"Mention" Envoyé: samedi 23 Septembre 2023 15:19 Objet : [NixOS/nixpkgs] Build failure: diffoscobe broken by coreboot-utils 4.21 upgrade (Issue #256896)
Steps To Reproduce
Steps to reproduce the behavior:
build diffoscope
Eg: nix-build -A diffoscope
Build log
https://gist.github.com/aij/ffc8e357eed2c6f4411910972ce0b920
Additional context
Broken since #251110 merged per git bisect
I looked into this a bit and I'm not sure if it's a diffoscope bug or a coreboot bug.
The failing tests generate test files with cbfstool (from coreboot) and the files generated by cbfstool 4.21 are using 4 bytes less space for the "header" (trailer) at the end of the file:
$ diffoscope coreboot1.rom.4.20 coreboot1.rom.4.21 --- coreboot1.rom.4.20 +++ coreboot1.rom.4.21 @@ -2039,10 +2039,10 @@ 00007f60: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00007f70: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00007f80: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00007f90: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00007fa0: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00007fb0: ffff ffff ffff ffff ffff ffff ffff ffff ................ 00007fc0: ffff ffff ffff ffff ffff ffff ffff ffff ................ -00007fd0: ffff ffff ffff ffff ffff ffff 4f52 4243 ............ORBC -00007fe0: 3131 3132 0000 8000 0000 0000 0000 0040 1112...........@ -00007ff0: 0000 0000 0000 0001 ffff ffff dcff ffff ................ +00007fd0: ffff ffff ffff ffff ffff ffff ffff ffff ................ +00007fe0: 4f52 4243 3131 3132 0000 8000 0000 0000 ORBC1112........ +00007ff0: 0000 0040 0000 0000 0000 0001 e0ff ffff ...@............
As a result, CbfsFile.recognizes does not match.
My first thought was to change the matcher
@@ -139,7 +138,7 @@ class CbfsFile(File): rel_offset = struct.unpack("<i", f.read(4))[0] if ( rel_offset < 0 - and -rel_offset > CBFS_HEADER_SIZE + and -rel_offset >= CBFS_HEADER_SIZE and -rel_offset < size ): f.seek(rel_offset, io.SEEK_END)
but then the rom2 tests still fail...
Looking into the relevant change on the coreboot side it looks like the change to the cbfs_header size may have been accidental. (C99 flexible arrays are nice for filename and data but not for fixed size padding...)
Anyway, even if this is a coreboot bug, it may still be useful to update diffutils to be able to recognize files produced by coreboot 4.21.
Notify maintainers
Diffoscope: @dezgeg @danielfullmer @RaitoBezarius
coreboot-utils: @felixsinger @yuka
Other: @ElyesH @jmbaur @felixsinger @lamby
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
ivan@tobati:~/nixops/aij/unstable$ nix-shell -p nix-info --run "nix-info -m" - system: `"x86_64-linux"` - host os: `Linux 6.1.50, NixOS, 23.11 (Tapir), 23.11.git.bfb7dfec93f3` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.17.0` - channels(root): `"nixos-21.11pre329341.9e70e9f732f"` - nixpkgs: `/etc/nixos/aij/unstable`
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: NixOS/nixpkgs/issues/256896@github.com