Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btrfs-fs.img is not a reproducible build [bug] [priority:low] [upstream] #21

Open
nakato opened this issue Sep 12, 2024 · 2 comments
Open

Comments

@nakato
Copy link
Owner

nakato commented Sep 12, 2024

The output of btrfs-fs.img is not a reproducible build. This issue tracks that as well as a upstream bug around permissions.

  1. Files inside the image produced by make-btrfs-fs.nix are owned by UID 1000 and GID 100.
  • Fixed by swapping fakeroot for a user-namespace (unshare -U -r) in forked make-btrfs-fs.nix.
  • Fix needs to be submitted upstream
  1. mkfs.btrfs copies other attributes of the files being included into the new image, such as CTIME and maybe ATIME, these times are not set to Epoch+1 for any files in the image
  • ctime/atime on /nix/store paths [upstream bug]
  1. mkdir invocations use current time for A/C/M/BTIME.
  • mkdir -p ./rootImage/nix/store [upstream bug]
  1. Populating /boot is similarly not using controlled times.
@nakato
Copy link
Owner Author

nakato commented Sep 12, 2024

I've got a fix for the ownership problem of this issue, it requires access to make-btrfs-fs.nix, so I'll make the fix be part of #20, which already requires modifications to make-btrfs-fs.nix, and thus already is pulling it in.

@nakato nakato changed the title Invalid btrfs root permissions on sdImage btrfs-fs.img is not a reproducible build Sep 13, 2024
@nakato nakato changed the title btrfs-fs.img is not a reproducible build btrfs-fs.img is not a reproducible build [bug] [priority:low] [upstream] Sep 13, 2024
@nakato
Copy link
Owner Author

nakato commented Sep 17, 2024

mkfs.btrfs switched from a bespoke file-tree walking implementation to using nftw(3) in kdave/btrfs-progs@c6464d3

This has broken both libfaketime and fakeroot.

I've submitted bugs upstream to both libfaketime and fakeroot, as the best case scenario is those get updated and we can get faketime back and drop the root ownership hacks.

libfaketime issue 476
fakeroot debian bug ID 1081976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant