diff options
| author | Chris Lamb <chris@chris-lamb.co.uk> | 2018-03-17 22:48:29 +0000 |
|---|---|---|
| committer | Chris Lamb <chris@chris-lamb.co.uk> | 2018-03-18 23:27:50 +0000 |
| commit | be95e05da2adb84b210c3048522d222073002ac5 (patch) | |
| tree | 9cd6745adcf70e77bca408850c0c9b3de280c267 /src/extension/implementation | |
| parent | Removing sample meson build files. (diff) | |
| download | inkscape-be95e05da2adb84b210c3048522d222073002ac5.tar.gz inkscape-be95e05da2adb84b210c3048522d222073002ac5.zip | |
Make the command-line PDF output reproducible.
Whilst working on the Reproducible Builds effort [0], we noticed
that inkscape generates output that is not reproducible:
$ cp /usr/share/icons/gnome/scalable/places/debian-swirl.svg .
$ inkscape -z debian-swirl.svg --export-width=25 --export-pdf=a.pdf
$ sleep 1
$ inkscape -z debian-swirl.svg --export-width=25 --export-pdf=b.pdf
$ sha1sum *.pdf
bee6f300a8fce628e94febd0700fa97f90aa7b37 a.pdf
32f26595ec1957c7e714174e007c452f6cb5dd79 b.pdf
This is affecting (at least) the "debian-astro" package:
│ │ │ ├── ./usr/share/pixmaps/Debian-Astro-logo.pdf
│ │ │ │ ├── pdftk {} output - uncompress
│ │ │ │ │ @@ -357,15 +357,15 @@
│ │ │ │ │ <<
│ │ │ │ │ /Type /Catalog
│ │ │ │ │ /Pages 1 0 R
│ │ │ │ │ >>
│ │ │ │ │ endobj
│ │ │ │ │ 6 0 obj
│ │ │ │ │ <<
│ │ │ │ │ -/CreationDate (D:20180315093948-12'00)
│ │ │ │ │ +/CreationDate (D:20190418180346+14'00)
│ │ │ │ │ /Producer (cairo 1.15.10 \(http://cairographics.org\))
│ │ │ │ │ >>
│ │ │ │ │ endobj xref
After applying this patch (which uses SOURCE_DATE_EPOCH [1]):
$ export SOURCE_DATE_EPOCH=1521324801
$ […]
$ sha1sum *.pdf
620bf8469600ab744ffa6fcc3eee4c6845f4f159 a.pdf
620bf8469600ab744ffa6fcc3eee4c6845f4f159 b.pdf
This was originally filed in Debian as #893314 [2].
[0] https://reproducible-builds.org/
[1] https://reproducible-builds.org/specs/source-date-epoch/
[2] https://bugs.debian.org/893314
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Diffstat (limited to 'src/extension/implementation')
0 files changed, 0 insertions, 0 deletions
