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

Mattia Rizzolo mattia at debian.org
Sat Apr 2 12:17:19 UTC 2016

On Sat, Apr 02, 2016 at 01:21:53PM +0200, Dhole wrote:
> > 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.

Consider that the SOURCE_DATE_EPOCH spec explicitly says so:

"If the value is malformed, the build process SHOULD exit with a
non-zero error code."


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

The example that you link errors out (as I'd expect) though.

                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  http://mapreri.org                              : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160402/a11e10b3/attachment.sig>

More information about the Reproducible-builds mailing list