]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Do not use "git log" to construct build timestamp
authorMichael Brown <mcb30@ipxe.org>
Wed, 21 Jan 2026 23:19:36 +0000 (23:19 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 21 Jan 2026 23:26:23 +0000 (23:26 +0000)
Using "git log" to automatically construct the build timestamp is of
minimal value.  Reproducible builds should be using SOURCE_DATE_EPOCH
anyway, and for ad hoc builds it is arguable that the time at which
the build was performed is more relevant than the commit timestamp.
(For example, the user may be trying to deliberately use an older
version of iPXE in order to track down a regression via bisection.)

Remove the use of "git log", and thereby remove any requirement for
the git tools to be available at the point of building iPXE.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/Makefile.housekeeping

index 3b6eb03ba1a632e33be4449bef9226d97a44fff1..6cc626b6df3a92c9cfb232dd885ef00db4b32b7b 100644 (file)
@@ -1230,8 +1230,6 @@ BUILD_ID_CMD = cat $^ | cksum | awk '{print $$1}'
 #
 ifdef SOURCE_DATE_EPOCH
 BUILD_TIMESTAMP := $(SOURCE_DATE_EPOCH)
-else ifdef GITVERSION
-BUILD_TIMESTAMP := $(shell git log -1 --pretty=%ct)
 else
 BUILD_TIMESTAMP := $(shell date +%s)
 endif