Page MenuHomeFreeBSD

mkimg: Add a reproducible mode
Needs ReviewPublic

Authored by markj on Tue, Apr 8, 9:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 29, 6:55 AM
Unknown Object (File)
Thu, Apr 17, 2:47 AM
Unknown Object (File)
Mon, Apr 14, 2:31 PM
Unknown Object (File)
Mon, Apr 14, 2:31 PM
Unknown Object (File)
Mon, Apr 14, 2:31 PM
Unknown Object (File)
Thu, Apr 10, 6:19 PM
Unknown Object (File)
Wed, Apr 9, 2:49 PM
Unknown Object (File)
Wed, Apr 9, 2:48 PM

Details

Reviewers
emaste
bnovkov
Summary

Merge the FreeBSD-specific implementation of osdep_uuidgen() with that
of Linux. While the latter is more complex, it lets us ensure that the
returned UUIDs are reproducible.

This mainly affects the UUID embedded in the GPT header.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63427
Build 60311: arc lint + arc unit

Event Timeline

markj requested review of this revision.Tue, Apr 8, 9:49 PM
usr.bin/mkimg/uuid.c
62

We could (also) check SOURCE_DATE_EPOCH here

usr.bin/mkimg/uuid.c
62

There are random(3) calls below, which is why I didn't do that here, but mkimg wasn't seeding the PRNG so I believe they are effectively deterministic anyway (modulo random(3) implementation being the same).

Handle SOURCE_DATE_EPOCH.