1 From: Anders Kaseorg <andersk@mit.edu>
2 Date: Sun, 4 Dec 2016 17:26:46 -0500
3 Subject: AFS_component_version_number.c: Respect SOURCE_DATE_EPOCH if set
5 This enables better build reproducibility.
7 https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
9 Change-Id: Id379543a4782a7c1267eaa3d9258751d857cc07b
11 src/config/Makefile.version-NOCML.in | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
14 diff --git a/src/config/Makefile.version-NOCML.in b/src/config/Makefile.version-NOCML.in
15 index c8ab053..4c7bd14 100644
16 --- a/src/config/Makefile.version-NOCML.in
17 +++ b/src/config/Makefile.version-NOCML.in
18 @@ -11,7 +11,7 @@ AFS_component_version_number.o: AFS_component_version_number.c
20 AFS_component_version_number.c: @TOP_OBJDIR@/src/config/Makefile.version
21 ( VERSION=`@abs_top_srcdir@/build-tools/git-version @abs_top_srcdir@ "@VERSION@"` && \
22 - echo 'char cml_version_number[]="@(#) OpenAFS '$$VERSION' built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c.NEW && \
23 + echo 'char cml_version_number[]="@(#) OpenAFS '$$VERSION' built ' `date +"%Y-%m-%d" $${SOURCE_DATE_EPOCH:+-u -d "@$$SOURCE_DATE_EPOCH"}` '";' >AFS_component_version_number.c.NEW && \
24 echo 'char* AFSVersion = "${PACKAGE} '$$VERSION'";' >>AFS_component_version_number.c.NEW && \
25 if cmp AFS_component_version_number.c.NEW AFS_component_version_number.c > /dev/null 2>&1 ; then : ; else \
26 mv AFS_component_version_number.c.NEW AFS_component_version_number.c ; fi )