Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make png creation reproducible #1270

Closed
wants to merge 1 commit into from

Conversation

bmwiedemann
Copy link

@bmwiedemann bmwiedemann commented Aug 28, 2018

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practices as demonstrated in the repository.

Description

Many (Linux distribution) package build processes use convert to create png files.
For those source files, ctime will often vary (and sometimes mtime, too).
This results in png files (and thus packages) that differ for every build.

When users intend to do a reproducible build, they set SOURCE_DATE_EPOCH,
so in this case we default to the equivalent of
convert +set date:create +set date:modify
in order to make png creation reproducible.

See https://reproducible-builds.org/ for why this is good.

The alternative of patching individual callers is an infinite effort:

@dlemstra
Copy link
Member

Thanks for your PR but we already have a define for excluding time/data. Its png:exclude-chunks. See command-line-options for details.

@dlemstra dlemstra closed this Aug 31, 2018
@bmwiedemann
Copy link
Author

I'd need something that can be triggered through an environment variable, because the call to convert may be anywhere deep in a package and I cannot patch all calls of all packages.

bmwiedemann added a commit to bmwiedemann/mapcrafter that referenced this pull request Sep 28, 2018
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.

Needed, because convert is not reproducible by default:
ImageMagick/ImageMagick#1270
bmwiedemann added a commit to bmwiedemann/mapcrafter that referenced this pull request Sep 28, 2018
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.

Needed, because convert does not generate reproducible output by default:
ImageMagick/ImageMagick#1270
m0r13 pushed a commit to mapcrafter/mapcrafter that referenced this pull request Sep 28, 2018
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.

Needed, because convert does not generate reproducible output by default:
ImageMagick/ImageMagick#1270
bmwiedemann added a commit to bmwiedemann/pw3270 that referenced this pull request Dec 5, 2019
to not add the build date into the produced .png file
to make the package build reproducible.

needed because of declined ImageMagick/ImageMagick#1270
PerryWerneck pushed a commit to PerryWerneck/pw3270 that referenced this pull request Dec 5, 2019
to not add the build date into the produced .png file
to make the package build reproducible.

needed because of declined ImageMagick/ImageMagick#1270
bmwiedemann added a commit to bmwiedemann/Enlightenment-Themes that referenced this pull request Jan 26, 2020
to not embed timestamps in PNG output.
See https://reproducible-builds.org/ for why this is good.

Needed because of declined
ImageMagick/ImageMagick#1270

This PR was done while working on reproducible builds for openSUSE.
@bmwiedemann
Copy link
Author

Please reconsider this patch. The lack of it is still causing us a lot of work with default-unreproducible .png file output.

@urban-warrior
Copy link
Member

urban-warrior commented Jan 26, 2020

We agree with your patch and will apply it.

urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this pull request Jan 26, 2020
urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this pull request Jan 26, 2020
urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this pull request Jan 26, 2020
bmwiedemann added a commit to bmwiedemann/openSUSE that referenced this pull request Jan 30, 2020
https://build.opensuse.org/request/show/767667
by user pgajdos + dimstar_suse
- version update to 7.0.9.19
  * Alpha draw primitive no longer returns a parser exception.
  * Support 32-bit tiled TIFF images.
  * New -connected-component options (reference
    https://imagemagick.org/script/connected-components.php).
  * Make PNG creation reproducible (reference
    ImageMagick/ImageMagick#1270).
  * Refactor uninitialize variable patch for -fx "while(,)" expression.
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 9, 2020
2020-02-07  7.0.9-22 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-22, GIT revision 16855:8733f3e:20200207

2020-02-03  7.0.9-22 Cristy  <quetzlzacatenango@image...>
  * More work on connect components, e.g. keep-colors, remove-colors,
    keep-topids.
  * Initialize mutex before locking if its not already initialized.
  * Support 24-bit TIFF images.

2020-02-01  7.0.9-21 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-21, GIT revision 16823:290cb93:20200201.

2020-01-27  7.0.9-21 Cristy  <quetzlzacatenango@image...>
  * Support additional connected components defines.
  * Refresh cache morphology when writing MPC images.

2020-01-26  7.0.9-19 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-19, GIT revision 16789:bac6ecc:20200126

2020-01-26  7.0.9-19 Cristy  <quetzlzacatenango@image...>
  * Make PNG creation reproducible (reference
    ImageMagick/ImageMagick#1270).
  * Refactor uninitialize variable patch for -fx "while(,)" expression.

2020-01-25  7.0.9-18 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.9-18, GIT revision 16780:08beae5:20200125

2020-01-19  7.0.9-18 Cristy  <quetzlzacatenango@image...>
  * Alpha draw primitive no longer returns a parser exception.
  * Support 32-bit tiled TIFF images.
  * New -connected-component options (reference
    https://imagemagick.org/script/connected-components.php).

    https://imagemagick.org/discourse-server/viewtopic.php?f=1&t=37391).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants