Page MenuHomeFreeBSD

D50246.diff
No OneTemporary

D50246.diff

diff --git a/Makefile.inc1 b/Makefile.inc1
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -35,7 +35,10 @@
# KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel
# SUBDIR_OVERRIDE="list of dirs" to build rather than everything.
# All libraries and includes, and some build tools will still build.
-
+# REPRODUCIBLE_EPOCH="timestamp" to use instead of gmtime(3) for all
+# timestamps in the build. This is used to facilitate reproducible
+# build artifacts from the same source tree, with build tools like
+# thermite.
#
# The intended user-driven targets are:
# buildworld - rebuild *everything*, including glue to help do upgrades
@@ -573,7 +576,7 @@
_PKG_REVISION= ${_REVISION}
_STRTIMENOW= %Y%m%d%H%M%S
-_TIMENOW= ${_STRTIMENOW:gmtime}
+_TIMENOW= ${_STRTIMENOW:gmtime=${REPRODUCIBLE_EPOCH:U0}}
BRANCH_EXT=
.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*}
_PKG_REVISION:= ${MAJOR_REVISION}
@@ -602,7 +605,7 @@
SOURCE_DATE_EPOCH!= ${GIT_CMD} -C ${SRCDIR} show -s --format=%ct HEAD
.else
TIMEEPOCHNOW= %s
-SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime}
+SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime=${REPRODUCIBLE_EPOCH:U0}}
.endif
.else
SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP}

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 19, 11:45 PM (18 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34102304
Default Alt Text
D50246.diff (1 KB)

Event Timeline