[Reproducible-builds] Best approach to strip timestamp in postscript files

Dhole dhole at riseup.net
Sat Apr 2 11:21:53 UTC 2016

Hi Alexis,

First of all, like Reiner said, thanks for working on the patch!

On 16-04-01 23:20:16, Alexis Bienvenüe wrote:
> > The imagemagick/transfig patches look good to me, though you could
> > make it a bit more robust by checking if strtoull was actually
> > successfully parsing an integer.
> What should be the behavior in case some characters are not parsed?
> Maybe dying without converting the image is too abrupt, so the partial
> parsing made by strtoull appeared sensible to me.

I also think that dying because of a wrong value in SOURCE_DATE_EPOCH is
not the best idea.  Although the man GNU man page for strtoull doesn't
say so, it seems to return 0 when failing to parse, so it would give the
date 1 January 1970, but you'd only notice after inspecting the image.
You can look at [1] for a C example code that considers the different
parsing errors that can occur.  Maybe you could make it output the error
to stderr (so that the user can be aware) and set the value to 0 so that
everything continues.

I would also encourage you to send these patches upstream!  If you
decide to do so, consider the following:
In kannel you are setting the variable BUILDDATE with `date` using the
`-d` flag to give it the timestamp.  This doesn't work with BSD date
(the `-d` flag does a totally different thing).  If you want to make it
work both with GNU and BSD date, you can use the receip from [2].

[1] https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#C
[2] https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Bash_.2F_POSIX_shell

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160402/4b023050/attachment.sig>

More information about the Reproducible-builds mailing list