1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

Add WITH_REPRODUCIBLE_BUILD src.conf(5) knob to disable kernel metadata

The kernel builds reproducibly, except for the time, date, user, and
hostname baked into the kernel (reported at startup and via the
kern.version sysctl for uname).  Add a build knob to disable the
inclusion of this metadata.

Reviewed by:	jhb
MFC after:	1 month
Relnotes:	Yes
Sponsored by:	Reproducible Builds World Summit 2, Berlin
Differential Revision:	https://reviews.freebsd.org/D8809
This commit is contained in:
Ed Maste 2016-12-15 21:26:58 +00:00
parent 6eef858694
commit 602f95d4c4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=310128
3 changed files with 9 additions and 2 deletions

View File

@ -47,7 +47,8 @@ __DEFAULT_NO_OPTIONS = \
EISA \
EXTRA_TCP_STACKS \
NAND \
OFED
OFED \
REPRODUCIBLE_BUILD
# Some options are totally broken on some architectures. We disable
# them. If you need to enable them on an experimental basis, you

View File

@ -357,8 +357,11 @@ config.o env.o hints.o vers.o vnode_if.o:
config.ln env.ln hints.ln vers.ln vnode_if.ln:
${NORMAL_LINT}
.if ${MK_REPRODUCIBLE_BUILD} != "no"
REPRO_FLAG="-r"
.endif
vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP}
MAKE=${MAKE} sh $S/conf/newvers.sh ${KERN_IDENT}
MAKE=${MAKE} sh $S/conf/newvers.sh ${REPRO_FLAG} ${KERN_IDENT}
vnode_if.c: $S/tools/vnode_if.awk $S/kern/vnode_if.src
${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -c

View File

@ -0,0 +1,3 @@
$FreeBSD$
Set to exclude build metadata (build time, user, host and path) from the
kernel and uname output.