mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-10 06:46:59 -05:00
Build: replace fixed SOURCE_DATE_EPOCH fallback
Keep caller-provided SOURCE_DATE_EPOCH authoritative and derive the automatic default through a shared helper used by the Makefile, direct CMake/CPack packaging, and the deb packaging wrapper. When repository metadata is available, use the HEAD commit timestamp without relying on git -C. Resolve the source root before probing Git so symlinked source paths still use the checkout HEAD. For source tarballs without .git, derive the fallback timestamp from the release date encoded in Common/Tcdefs.h instead of the stale 2020-01-01 constant. Add TC_RELEASE_DATE_DAY and validate it together with TC_RELEASE_DATE_YEAR, TC_RELEASE_DATE_MONTH, and TC_STR_RELEASE_DATE. Abort when no valid timestamp can be derived. For direct CMake invocation, initialize SOURCEPATH when the wrapper has not provided it, use the shared helper for derivation, validate the result, and export it for package targets. Also persist the configured epoch through CPACK_PROJECT_CONFIG_FILE so later standalone cpack --config runs export the same value before invoking package generators. Document that automatic git-checkout builds and release-tarball builds intentionally use different epochs; release reproducers should build from the tarball or set SOURCE_DATE_EPOCH explicitly.
This commit is contained in:
@@ -119,6 +119,14 @@ it is also available [online](https://veracrypt.jp/en/CompilingGuidelineLinux.ht
|
||||
4. If successful, the VeraCrypt executable should be located in the directory
|
||||
'Main'.
|
||||
|
||||
Reproducible build note: when `SOURCE_DATE_EPOCH` is not set, a build from a
|
||||
git checkout uses the HEAD commit timestamp, while a build from a release
|
||||
tarball uses the release date in `src/Common/Tcdefs.h` at 00:00 UTC. To
|
||||
reproduce official release artifacts from a git checkout, set
|
||||
`SOURCE_DATE_EPOCH` explicitly or build from the release tarball. Vendored
|
||||
VeraCrypt sources tracked in another git checkout are treated the same way and
|
||||
use that checkout's HEAD timestamp.
|
||||
|
||||
By default, a universal executable supporting both graphical and text user
|
||||
interface (through the switch --text) is built.
|
||||
On Linux, a console-only executable, which requires no GUI library, can be
|
||||
|
||||
Reference in New Issue
Block a user