[U-Boot] [Reproducible-builds] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
Paul Kocialkowski
contact at paulk.fr
Fri Oct 2 12:19:14 CEST 2015
Le mercredi 30 septembre 2015 à 08:50 -0700, Vagrant Cascadian a écrit :
> On 2015-09-28, Paul Kocialkowski wrote:
> > What do you think? Please let me know if I'm wrong.
>
> This patch on top of 2015.10-rc4 seems to resolve the issue for me:
>
> Index: u-boot/tools/default_image.c
> ===================================================================
> --- u-boot.orig/tools/default_image.c
> +++ u-boot/tools/default_image.c
> @@ -108,8 +108,6 @@ static void image_set_header(void *ptr,
> fprintf(stderr, "%s: SOURCE_DATE_EPOCH is not valid\n",
> __func__);
> time = 0;
> - } else {
> - time = mktime(time_universal);
> }
> } else {
> time = sbuf->st_mtime;
>
>
> It still checks for the validity of SOURCE_DATE_EPOCH using gmtime, but
> doesn't call mktime at all, just re-uses the value set from
> SOURCE_DATE_EPOCH.
That's a good plan! I guess we should also fully get rid of the
time_universal variable and make the check inline:
if (gmtime(&time) == NULL)
and of course drop the else statement.
Would you like to craft that patch for upstream U-Boot?
If not, I'd be happy to do it.
Thanks for your work!
--
Paul Kocialkowski, Replicant developer
Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.
Website: https://www.replicant.us/
Blog: https://blog.replicant.us/
Wiki/tracker/forums: https://redmine.replicant.us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151002/e45fb4e0/attachment.sig>
More information about the U-Boot
mailing list