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, Jan 30, 6:29 PM
Unknown Object (File)
Fri, Jan 16, 9:08 AM
Unknown Object (File)
Fri, Jan 16, 3:53 AM
Unknown Object (File)
Jan 6 2026, 3:12 PM
Unknown Object (File)
Dec 9 2025, 6:31 PM
Unknown Object (File)
Nov 21 2025, 10:48 AM
Unknown Object (File)
Nov 2 2025, 12:15 PM
Unknown Object (File)
Nov 1 2025, 5:21 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