Skip to content

boot: in transform_for_boot, also set mtime nanoseconds - #396

Open
alexlarsson wants to merge 1 commit into
mainfrom
fix-boot-mtime
Open

alexlarsson wants to merge 1 commit into
mainfrom
fix-boot-mtime

Conversation

@alexlarsson

Copy link
Copy Markdown
Contributor

To avoid changes to the /boot and /sysroot mtime due to changes after computing the digest we currently copy the usr mtime to it. However, we're only copying st_mtim_sec, not st_mtim_nsec.

This means a change to e.g. /boot on a fs that stores nsec timestamps can still run into this problem. Fix this by copying also the nsec.

Johan-Liebert1
Johan-Liebert1 previously approved these changes Sep 17, 2026
To avoid changes to the /boot and /sysroot mtime due to changes after
computing the digest we currently copy the usr mtime to it. However,
we're only copying st_mtim_sec, not st_mtim_nsec.

This means a change to e.g. /boot on a fs that stores nsec timestamps
can still run into this problem. Fix this by copying also the nsec.

Signed-off-by: Alexander Larsson <[email protected]>
@alexlarsson

Copy link
Copy Markdown
Contributor Author

Fixed some fmt issues

@alexlarsson

Copy link
Copy Markdown
Contributor Author

Hmm, the rustix issues are not from this repo, and I have no idea why the arch test is failing to start the vm.

@alexlarsson

alexlarsson commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Rustix issue seems to be: bytecodealliance/rustix#1620, and waiting on a release

@alexlarsson

Copy link
Copy Markdown
Contributor Author

Testing a rustix update in #397

@cgwalters

Copy link
Copy Markdown
Collaborator

This means a change to e.g. /boot on a fs that stores nsec timestamps can still run into this problem.

I wonder now if this hasn't been the source of some composefs digest mismatches various people were hitting...

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

Successfully merging this pull request may close these issues.

3 participants