From owner-svn-src-all@freebsd.org Thu Dec 15 21:26:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED92CC82D6C; Thu, 15 Dec 2016 21:26:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2B94176B; Thu, 15 Dec 2016 21:26:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFLQwiA011110; Thu, 15 Dec 2016 21:26:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFLQw6m011107; Thu, 15 Dec 2016 21:26:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201612152126.uBFLQw6m011107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 15 Dec 2016 21:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310128 - in head: sys/conf tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 21:27:00 -0000 Author: emaste Date: Thu Dec 15 21:26:58 2016 New Revision: 310128 URL: https://svnweb.freebsd.org/changeset/base/310128 Log: 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 Added: head/tools/build/options/WITH_REPRODUCIBLE_BUILD (contents, props changed) Modified: head/sys/conf/kern.opts.mk head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Thu Dec 15 20:13:40 2016 (r310127) +++ head/sys/conf/kern.opts.mk Thu Dec 15 21:26:58 2016 (r310128) @@ -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 Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Thu Dec 15 20:13:40 2016 (r310127) +++ head/sys/conf/kern.post.mk Thu Dec 15 21:26:58 2016 (r310128) @@ -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 Added: head/tools/build/options/WITH_REPRODUCIBLE_BUILD ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_REPRODUCIBLE_BUILD Thu Dec 15 21:26:58 2016 (r310128) @@ -0,0 +1,3 @@ +$FreeBSD$ +Set to exclude build metadata (build time, user, host and path) from the +kernel and uname output.