From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 16 12:19:08 2015 Return-Path: Delivered-To: freebsd-hackers@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFDFFBB1 for ; Tue, 16 Jun 2015 12:19:08 +0000 (UTC) (envelope-from steven@pyro.eu.org) Received: from manchester-1.man.uk.cluster.ok24.net (unknown [IPv6:2001:41c8:51:40::1]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59C05605 for ; Tue, 16 Jun 2015 12:19:07 +0000 (UTC) (envelope-from steven@pyro.eu.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=pyro.eu.org; s=06.2015; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=WzAx3wUimQjr/OplAmRN121PECA9qhW8rGbolJNjtII=; b=Cj4MW9saDyaCijIfoSAwMLVgVjhCIv2qOJQg+HbZWkyBLvmyMJJ1ZLF5xBUh1O0iVLLMoD+4vLQsen8ncv61tUJWyySZcAOO7rZCzEE5hee/smAlkk467LeXzX0DNYhMDW6uTpuPchavy8V74oUd0oyaDFOwQSDyMVW7lJFJR/0=; X-Spam-Status: No, score=-1.1 required=2.0 tests=ALL_TRUSTED, BAYES_00, DKIM_ADSP_DISCARD Received: from guisborough-1.rcc.uk.cluster.ok24.net ([217.155.40.118] helo=smtp.ok24.net) by manchester-1.man.uk.cluster.ok24.net with esmtp (Exim 4.80) (envelope-from ) id 1Z4ppS-0003cR-9m; Tue, 16 Jun 2015 13:19:04 +0100 Received: from kfreebsd-amd64.pyro.eu.org (smtp.ok24.net [10.1.1.1]) by smtp.ok24.net (Postfix) with ESMTPS id 257E211939A; Tue, 16 Jun 2015 13:18:58 +0100 (BST) Received: by kfreebsd-amd64.pyro.eu.org (Postfix, from userid 1000) id 1E65644CE; Tue, 16 Jun 2015 13:18:58 +0100 (BST) Date: Tue, 16 Jun 2015 13:18:58 +0100 From: Steven Chamberlain To: Holger Levsen Cc: "freebsd-hackers@freebsd.org" , "debian-bsd@lists.debian.org" Subject: Re: reproducible builds of FreeBSD in a chroot on Linux Message-ID: <20150616121857.GC14653@pyro.eu.org> References: <20150511183740.GA20721@pyro.eu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2015 12:19:08 -0000 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Holger! On 5/7/15 5:22 PM, Holger Levsen wrote: > Here's the catch: I have basically no clue about freebsd - and I want to > build on Debian linux (on amd64) in a chroot. As Ed Maste points out, building it on a Linux chroot might not be representative of whether FreeBSD's own build system makes reproducible binaries or not. Ed Maste wrote: > If it's to help FreeBSD overall with reproducible > builds, then using the FreeBSD build infrastructure on a FreeBSD > kernel ... is an important part of the story. I can think of two other options: * ssh to a real FreeBSD build system, trigger builds there and take copies of the output files for analysis; * build in a FreeBSD chroot/jail on Debian GNU/kFreeBSD; so that you have the familiar Debian tools and could run as a Jenkins slave (which I'd particularly like, because it should be useful for other QA jobs too). On a kfreebsd-amd64 host I was able to complete a `make universe` - a build of all FreeBSD (10.1) for all architectures - using a bare FreeBSD jail. Then I can look at the build tree and object files, from the Debian host system, and compare those with a subsequent, clean build. For now I only did a simple diff. The differences are quite typical of what has been seen from Debian's reproducibility work - timestamps added by the build system: diff -Nr -U0 obj1/arm.arm/usr/home/build/src/include/vers.c obj2/arm.arm/us= r/home/build/src/include/vers.c --- obj1/arm.arm/usr/home/build/src/include/vers.c 2015-05-31 22:51:27= =2E000000000 +0000 +++ obj2/arm.arm/usr/home/build/src/include/vers.c 2015-06-03 00:12:51= =2E000000000 +0000 @@ -28,2 +28,2 @@ -#define SCCSSTR "@(#)FreeBSD 10.1-RELEASE-p10 #0 r283831: Sun May 31 22:51= :24 UTC 2015" -#define VERSTR "FreeBSD 10.1-RELEASE-p10 #0 r283831: Sun May 31 22:51:24 U= TC 2015\n build@freebsd:/home/build/obj/arm.arm/usr/home/build/src/inclu= de\n" +#define SCCSSTR "@(#)FreeBSD 10.1-RELEASE-p10 #0 r283831: Wed Jun 3 00:12= :48 UTC 2015" +#define VERSTR "FreeBSD 10.1-RELEASE-p10 #0 r283831: Wed Jun 3 00:12:48 U= TC 2015\n build@freebsd:/home/build/obj/arm.arm/usr/home/build/src/inclu= de\n" --- obj1/arm.arm/usr/home/build/src/sys/boot/arm/uboot/vers.c 2015-05-31 = 23:18:17.000000000 +0000 +++ obj2/arm.arm/usr/home/build/src/sys/boot/arm/uboot/vers.c 2015-06-03 = 00:40:02.000000000 +0000 @@ -3 +3 @@ -char bootprog_date[] =3D "Sun May 31 23:18:17 UTC 2015"; +char bootprog_date[] =3D "Wed Jun 3 00:40:02 UTC 2015"; And then obviously, vers.o differs, and so do the kernel images. For this particular kernel (CNS11XXNAS arm), it was actually the only difference: --- kernel-hexdump1.txt 2015-06-16 13:12:27.000000000 +0100 +++ kernel-hexdump2.txt 2015-06-16 13:12:33.000000000 +0100 @@ -242194,2 +242194,2 @@ -003b5ff0 72 32 38 33 38 33 31 3a 20 4d 6f 6e 20 4a 75 6e |r283831: Mon = Jun| -003b6000 20 20 31 20 30 31 3a 30 39 3a 32 31 20 55 54 43 | 1 01:09:21 = UTC| +003b5ff0 72 32 38 33 38 33 31 3a 20 57 65 64 20 4a 75 6e |r283831: Wed = Jun| +003b6000 20 20 33 20 30 32 3a 32 37 3a 33 39 20 55 54 43 | 3 02:27:39 = UTC| @@ -242201,2 +242201,2 @@ -003b6070 38 33 31 3a 20 4d 6f 6e 20 4a 75 6e 20 20 31 20 |831: Mon Jun = 1 | -003b6080 30 31 3a 30 39 3a 32 31 20 55 54 43 20 32 30 31 |01:09:21 UTC = 201| +003b6070 38 33 31 3a 20 57 65 64 20 4a 75 6e 20 20 33 20 |831: Wed Jun = 3 | +003b6080 30 32 3a 32 37 3a 33 39 20 55 54 43 20 32 30 31 |02:27:39 UTC = 201| Regards, --=20 Steven Chamberlain steven@pyro.eu.org --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/kFreeBSD) iQEcBAEBCAAGBQJVgBQwAAoJELrpzbaMAu5TLlkH/AnY402Xexjy22vZd5plgeQI x+D1C7jNcVK54BspxMRSk22R6G8laA4jmlan/DkqHDmFMIVU4jP5i/8qne1fi+S7 n6kqvt3FMwbmhu2dLbMrAzUyaUZ0JodxbudRPhr82/iDejMyugqeVsq1aEoJN4E3 NJzzWyso9gMhaoYRyOnNzGlHjtP9KIwEwnT3h6eUHEVozQJY0xgXg9EMnicSo9br tCwyOfZHuywf5kc8LtoWy1w/7PzN6QMrjmRZEJ9/krYVDZniEgUWstrb6FXkLhzX HPLjRquf/4MQbDHiauv9q6ltmW5Oplo747I+LrwJesLJXcFhrYd1qJg0rxrDv1M= =Jf+b -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--