[guardian-dev] deterministic, repeatable build of LilDebi

Hans-Christoph Steiner hans at guardianproject.info
Thu Apr 17 14:16:56 EDT 2014



On 04/17/2014 12:22 PM, Michael Rogers wrote:
> On 16/04/14 22:22, Hans-Christoph Steiner wrote:
>> I wonder if setting the env var TZ=EDT or TZ=America/New_York will
>> fix it. Perhaps just by adding this in external/Makefile:
> 
>> export TZ=America/New_York
> 
> Well this is weird... setting TZ changes the timezone in the binary,
> but the timestamps still differ by a few seconds between your version
> and mine. Yours is 2013-06-29 11:00:33 EDT, mine is 2013-06-29
> 11:00:26 EDT. Neither of those matches the timestamp extracted from
> the git log, 2013-06-29 17:00:22 +0200. When I rebuilt my binary I got
> a different timestamp, 2013-06-29 11:00:31 EDT.
> 
> Perhaps faketime is passing the git timestamp to "make -C
> $(EXTERNAL_ROOT)/busybox/", and the gcc processes spawned by make are
> getting timestamps that reflect the elapsed time (a few seconds) since
> make was called?
> 
> Cheers,
> Michael

I think I figured it out, I pushed a new commit and a new build should be
posted with in an hour.  I had assumed that faketime was freezing time, but it
was not.  faketime needs to have a very specific timestamp format in order to
freeze time.  The time needs to be frozen so that the timestamps don't depend
on the speed of the machine that the build process is running on.  See `man
faketime` for more info on the "advanced timestamp format".  Also, I forced
time to UTC so its always the same on all machines.

.hc

-- 
PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 969 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mayfirst.org/pipermail/guardian-dev/attachments/20140417/3ead6364/attachment.pgp>


More information about the Guardian-dev mailing list