Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jun 2015 13:18:58 +0100
From:      Steven Chamberlain <steven@pyro.eu.org>
To:        Holger Levsen <holger@layer-acht.org>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, "debian-bsd@lists.debian.org" <debian-bsd@lists.debian.org>
Subject:   Re: reproducible builds of FreeBSD in a chroot on Linux
Message-ID:  <20150616121857.GC14653@pyro.eu.org>
In-Reply-To: <CAPyFy2Cb0SbLAZ0psH3AUS4tP5ausAVrvGGf57fparmCKHVr_g@mail.gmail.com>
References:  <20150511183740.GA20721@pyro.eu.org> <CAPyFy2Cb0SbLAZ0psH3AUS4tP5ausAVrvGGf57fparmCKHVr_g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150616121857.GC14653>