Skip to content

fix: reproducibility of rootfs-tree.tar#10302

Draft
basvandijk wants to merge 3 commits into
masterfrom
fix-rootfs-tree.tar
Draft

fix: reproducibility of rootfs-tree.tar#10302
basvandijk wants to merge 3 commits into
masterfrom
fix-rootfs-tree.tar

Conversation

@basvandijk
Copy link
Copy Markdown
Collaborator

No description provided.

Drop dependence on the host's fakeroot/faketime wrapper scripts when
building ext4 partition images. The wrapper binaries hard-code host
library paths (e.g. /usr/$LIB/faketime/libfaketime.so.1) which makes
them unsuitable for reproducible builds.

Instead, extract just libfaketime.so.1, faked-sysv and libfakeroot-sysv.so
from the pinned noble apt snapshot, and have build_ext4_image.py spawn
faked-sysv and apply LD_PRELOAD itself.

Note: e2fsdroid is still resolved from PATH; replacing it with a
source-built hermetic copy is a follow-up.
…ketime clock

Pin Google's Android SDK platform-tools r33.0.2 zip via http_archive,
expose the bundled statically-built e2fsdroid binary to build_ext4_image
via a new --e2fsdroid flag, and freeze the libfaketime clock with the
'x0' speed multiplier so e2fsdroid records a deterministic i_crtime
for every inode it creates (otherwise inodes created in different real
seconds end up with crtime=0 vs crtime=1, cascading non-determinism
through the dm-verity root hash into partition-boot).
The two artifacts are now reproducible after pinning hermetic
fakeroot/faketime/e2fsdroid and freezing the libfaketime clock.
@basvandijk basvandijk changed the title Fix rootfs tree.tar fix: reproducibility of rootfs-tree.tar May 22, 2026
@github-actions github-actions Bot added the fix label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant