Danny Milosavljevic <dan...@scratchpost.org> skribis: > On Fri, 07 Jul 2017 19:51:10 +0200 > l...@gnu.org (Ludovic Courtès) wrote: > >> For CreationDate/ModDate, I think it should honor SOURCE_DATE_EPOCH as >> in >> <https://anonscm.debian.org/git/printing/ghostscript.git/tree/debian/patches/2010_add_build_timestamp_setting.patch?id=e2bf3ad7026afe13636d4937430c3fdae7854078>. > > Really? I've been leaving them off, too. Especially because of this funny > comment in the upstream ghostscript: > > /* Initialize the IDs allocated at startup. */ > void > pdf_initialize_ids(gx_device_pdf * pdev) > { > ... > /* > * Acrobat Distiller sets CreationDate and ModDate to the current > * date and time, rather than (for example) %%CreationDate from the > * PostScript file. We think this is wrong, but we do the same. > */ > { > ... proceed to set CreationDate and ModDate to the current time. > } > }
I guess they hamper reproducibility if they’re always created? In that case, they need to follow SOURCE_DATE_EPOCH; if OTOH they’re only created in specific cases that don’t matter much, we can leave them. >> For the two UUIDs (and “ID” too?), maybe we can use, say, >> GS_GENERATE_UUIDS; if set to 0 or “no” it’s disable, otherwise it’s >> enabled. > > That would look like this: > > if (!getenv("GS_GENERATE_UUIDS") || strcmp(getenv("GS_GENERATE_UUIDS"), "0") > == 0 || strcmp(getenv("GS_GENERATE_UUIDS"), "no") == 0) ... Yes. Thanks! Ludo’.