From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 20:30:49 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7293A1065674 for ; Fri, 12 Nov 2010 20:30:49 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id DE9BC8FC24 for ; Fri, 12 Nov 2010 20:30:48 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.5, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_05 -0.50) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: oACKKGoV031818 Received: from gkeramidas-glaptop.linux.gr (217-162-216-74.dclient.hispeed.ch [217.162.216.74]) (authenticated bits=0) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.4) with ESMTP id oACKKGoV031818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 12 Nov 2010 22:20:23 +0200 From: Giorgos Keramidas To: Erik Cederstrand In-Reply-To: <8B6E3E35-68AF-42ED-98CF-E2A4448DAA11@cederstrand.dk> (Erik Cederstrand's message of "Fri, 12 Nov 2010 15:13:36 +0100") References: <718D8E86-EA2E-4D07-BAFF-5D8D093FD296@cederstrand.dk> <20101011084733.GM2392@deviant.kiev.zoral.com.ua> <95F3B27C-42E6-4267-9965-AC3219310C35@cederstrand.dk> <20101021175748.GD19295@acme.spoerlein.net> <20101022100134.GL19295@acme.spoerlein.net> <8B6E3E35-68AF-42ED-98CF-E2A4448DAA11@cederstrand.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Date: Fri, 12 Nov 2010 21:20:10 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Ulrich =?iso-8859-1?Q?Sp=F6rlein?= , FreeBSD Hackers Subject: Re: Deterministic builds? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2010 20:30:49 -0000 On Fri, 12 Nov 2010 15:13:36 +0100, Erik Cederstrand = wrote: > Den 22/10/2010 kl. 12.01 skrev Ulrich Sp=F6rlein: >> Why do you make this a requirement? Of course it's usually easier to >> build different releases from different source directories, but I think >> requiring the following conditions are fine: >> >> 1. If you build a specific svn revision, >> 2. sitting in /usr/src with >> 3. the default make.conf (ie., no special flags, no frobbing of OBJDIR) >> 4. at different times >> >> then you get the same binaries. >> >> Let's start with an achievable, not-so-intrusive goal, right? :) > > > Ok, here's a new attempt with SRCDIR and OBJDIR constant between the two = builds. > > This time, /boot/kernel/kernel, /boot/loader, /boot/pxeboot and > /boot/zfsloader differ. According to strings(1), the only difference > is the timestamp. E.g. the kernel: > > < @(#)FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 22:58:34 CET 2010 > < FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 22:58:34 CET 2010 > --- >> @(#)FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 23:29:17 CET 2010 >> FreeBSD 9.0-CURRENT #0 r215143: Thu Nov 11 23:29:17 CET 2010 > > Since the SVN rev. is recorded, I think a timestamp is redundant. Any > ideas where I can disable the timestamps in the source? The timestamp is not 'redundant'. It records _when_ you compiled the sources of the kernel, which in itself is a useful bit of information. We could probably get away with making it an option though, e.g. in src.conf(5) something that defaults to 'yes': WITH_KERNEL_TIMESTAMP=3D'yes' Then if it's the only remaining bit of information that changes between two subsequent builds of precisely the same tree one can set it to 'no' or overload it under WITH_REPEATABLE_BUILDS=3D'yes' or similar. FYI, have a look at "src/conf/newvers.sh" for the place where this information is gathered at kernel-build time.