Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
inkscape
inkscape
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,105
    • Issues 1,105
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 98
    • Merge Requests 98
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Inkscape
  • inkscapeinkscape
  • Merge Requests
  • !219

Merged
Opened Mar 17, 2018 by Chris Lamb@lambyContributor

Make the command-line PDF output reproducible.

  • Overview 15
  • Commits 1
  • Pipelines 2
  • Changes 1

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

Edited Mar 17, 2018 by Chris Lamb
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: inkscape/inkscape!219
Source branch: reproducible-output