!LemuOOvbWqRXodtSsw:nixos.org

NixOS Reproducible Builds

505 Members
Report: https://reproducible.nixos.org Project progress: https://github.com/orgs/NixOS/projects/30109 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
28 Aug 2021
@mjolnir:nixos.orgNixOS Moderation Bot joined the room.02:32:39
@mjolnir:nixos.orgNixOS Moderation Bot banned @matthewcroughan:defenestrate.it@matthewcroughan:defenestrate.it (<no reason supplied>).02:35:47
@hexagonk:halogen.cityhexagonk joined the room.12:19:23
30 Aug 2021
@baloo_:matrix.orgbaloo nrdxp: https://blog.superbaloo.net/posts/emmett-vdso/ got some more details here 02:06:26
@cleverca22:matrix.orgcleverca22

while building some rpi disk images, i discovered ext4 images generated by nixos/lib/make-ext4-fs.nix not being reproducible

using debugfs on the images, and running show_super_stats, i found the following difference:

Directory Hash Seed:      153a13f8-fd63-4dec-9295-e702caea9421
Directory Hash Seed:      7ab5f8a0-ae47-4beb-a549-b32270a9ee1d

2021-08-30 11:15:54 < slyfox> e2fsprogs' tests force UUID to a constant to get stable output: tests/t_change_uuid_mcsum/script:$MKE2FS -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1

but when applying that to nixpkgs:

diff --git a/nixos/lib/make-ext4-fs.nix b/nixos/lib/make-ext4-fs.nix
index 416beeb32f2..179ab5998e3 100644
--- a/nixos/lib/make-ext4-fs.nix
+++ b/nixos/lib/make-ext4-fs.nix
@@ -64,7 +64,7 @@ pkgs.stdenv.mkDerivation {

       truncate -s $bytes $img

-      faketime -f "1970-01-01 00:00:01" fakeroot mkfs.ext4 -L ${volumeLabel} -U ${uuid} -d ./rootImage $img
+      faketime -f "1970-01-01 00:00:01" fakeroot mkfs.ext4 -O metadata_csum,^metadata_csum_seed -L ${volumeLabel} -U ${uuid} -d ./rootImage $img

       export EXT2FS_NO_MTAB_OK=yes
       # I have ended up with corrupted images sometimes, I suspect that happens when the build machine's disk gets full during the build.

the build fails with:

ext4-fs.img> Creating journal (8192 blocks): done
ext4-fs.img> Copying files into the device: ext2fs_mkdir: Directory block checksum does not match directory block while creating directory "lib"
ext4-fs.img> __populate_fs: Directory block checksum does not match directory block while making dir "lib"
ext4-fs.img> mkfs.ext4: Directory block checksum does not match directory block while populating file system
ext4-fs.img> builder for '/nix/store/i6y239h646p67l6pa9qyzw2v50cyf432-ext4-fs.img.drv' failed with exit code 1
14:37:56
@baloo_:matrix.orgbaloothe alternative could be to use tune2fs -O '^metadata_csum_seed' to disable it afterwards16:45:06
1 Sep 2021
@orpheus1:matrix.org@orpheus1:matrix.org joined the room.18:09:40

Show newer messages


Back to Room ListRoom Version: 6