Switch reproducible builds to unmodified src tree mode

newvers.sh supports two modes for reproducible builds:

 -r    Reproducible build.  Do not embed directory names, user
       names, time stamps or other dynamic information into
       the output file.  This is intended to allow two builds
       done at different times and even by different people on
       different hosts to produce identical output.

 -R    Reproducible build if the tree represents an unmodified
       checkout from a version control system.  Metadata is
       included if the tree is modified.

Switch to the second mode when reproducible builds are enabled.
The value of a reproducible build is much less when building from an
uncontrolled, modified src tree, and -R likely provides the best
compromise in allowing the REPRODUCIBLE_BUILD knob to be enabled by
default for the release.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2018-09-11 19:19:07 +00:00
parent de35521a3b
commit 08d0704d74
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338598

View File

@ -382,7 +382,7 @@ config.o env.o hints.o vers.o vnode_if.o:
${NORMAL_CTFCONVERT}
.if ${MK_REPRODUCIBLE_BUILD} != "no"
REPRO_FLAG="-r"
REPRO_FLAG="-R"
.endif
vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP}
MAKE="${MAKE}" sh $S/conf/newvers.sh ${REPRO_FLAG} ${KERN_IDENT}