Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 47497ea

Browse files
committed
Allow to override build date
in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. Also uses UTC to be independent of timezone settings.
1 parent 604758e commit 47497ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ ${TARGLIB}.so.${MAJOR}: ${TARGLIB}.so.${MAJOR}.${MINOR}
270270
# file around. Generate it such that the ident command can find it
271271
# and strings -a | grep InfiniPath does a reasonable job as well.
272272
${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs}
273-
date +'char psmi_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c
273+
date -u -d@$${SOURCE_DATE_EPOCH:-$$(date +%s)} +'char psmi_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c
274274
$(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o
275275
$(CC) $(LDFLAGS) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared -Wl,--unique='*fastpath*' \
276276
${${TARGLIB}-objs} _revision.o -L$(build_dir)/ipath $(LDLIBS)

0 commit comments

Comments
 (0)