Page MenuHomeFreeBSD

mkimg: Make output reproducible using a specific timestamp
ClosedPublic

Authored by markj on Jun 27 2025, 6:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 3:38 PM
Unknown Object (File)
Fri, Oct 10, 3:38 PM
Unknown Object (File)
Fri, Oct 10, 9:25 AM
Unknown Object (File)
Thu, Oct 9, 10:11 PM
Unknown Object (File)
Wed, Oct 8, 9:12 PM
Unknown Object (File)
Wed, Oct 1, 6:57 PM
Unknown Object (File)
Wed, Sep 24, 3:12 AM
Unknown Object (File)
Wed, Sep 24, 3:00 AM
Subscribers

Details

Summary

In commit 95ac5b0e27e9 ("mkimg: Add a reproducible mode"), I added a -R
flag to mkimg, indicating that output should be reproducible.

There is one place in the VHD image backend that uses time(3) to
populate an image metadata field; this field is visible to tools which
know how to process VHD images. Rather than picking an arbitrary value
for that timestamp, it seems better to behave like makefs(8) and let the
invoker pick a suitable timestamp.

So, remove -R and instead add a -t option which lets the timestamp be
specified directly. Then, modify the VHD backend to use that timestamp.

Fixes: 95ac5b0e27e9 ("mkimg: Add a reproducible mode")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable