mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Writing the OCI manifest file to the blobs/digest dir will update the directory mtime, producing a tar file containing a member with a contemporary mtime. Exported tars for the same image will therefore have different checksums. Although this was previously addressed by overriding the mtime manually to 0, this was done before the OCI manifest file was written. This change simply moves the call to system.Chtimes to set the mtime of the blobs/digest directory to 0 after writing the OCI manifest file. This commit also updates the TestSaveCheckTimes integration test to check the mtime of all members in the exported tar to ensure that all mtime are not newer than img.Created or 0 (depending on whether the containerd-snapshotter is disabled or enabled, respectively). Signed-off-by: Sam Nicholls <sam.nicholls@nanoporetech.com>