Not used anywhere right now; will be used for reproducible builds. It doesn't really need to be in a .c file, but doing so has the nice property of keeping git derived info in the same place.
Details
- Reviewers
- None
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/conf/newvers.sh | ||
---|---|---|
275 | What about $git_cmd log -1 --format=%ct? |
sys/conf/newvers.sh | ||
---|---|---|
275 |
I'm not familiar with reproducible build. Does that require a clean work tree ? |
I'm not familiar with reproducible build. Does that require a clean work tree ?
https://reproducible-builds.org/ has a good overview that covers the what, why, and how of reproducible builds. The most important aspect is that someone can independently build a release and produce identical artifacts, which will inherently involve an unmodified tree. The r-b definition describes an "independently-verifiable path from source to binary code" and implicit in this is that there's a way to identify the precise source that was used. You could have a reproducible build of "FreeBSD 14.2 with <patch> applied", say, but it's likely not that useful.
With respect to git log -1 --format=%ct in particular, a working tree with modifications still shows the timestamp from the most recent commit.
Ahh, I see. Apparently a dirty working tree requires extra work to archive the goal reproducible build. See calculate a reproducible checksum of the dirty parts / uncommitted patch, so that a different user can apply the same patch and produce identical artifacts.