Your message dated Wed, 29 Apr 2015 16:08:47 +0000
with message-id <[email protected]>
and subject line Bug#782890: fixed in ruby-prawn 2.0.1+dfsg-1
has caused the Debian Bug report #782890,
regarding ruby-prawn: please make gradient keys deterministic
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
782890: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782890
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ruby-prawn
Version: 1.3.0
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: toolchain randomness
Hi!
While working on the “reproducible builds” effort [1], we have noticed
that Prawn is generating PDF with undeterministic keys for gradients.
With the attached patch, Prawn will use an internal Hash with an
incremental index starting at 1 instead of the undetermistic #hash
method for gradient keys.
[1]: https://wiki.debian.org/ReproducibleBuilds
--
Lunar .''`.
[email protected] : :Ⓐ : # apt-get install anarchism
`. `'`
`-
From 43eb75dc02b386c32c876164c74d326911a7f0f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <[email protected]>
Date: Sun, 19 Apr 2015 16:03:41 +0200
Subject: [PATCH 1/2] Use deterministic keys for gradients
Add 0700_use_deterministic_keys_for_gradients.patch to make
Prawn build PDF in a deterministic manner when they use gradients.
---
debian/changelog | 7 ++++
...0700_use_deterministic_keys_for_gradients.patch | 40 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 48 insertions(+)
create mode 100644 debian/patches/0700_use_deterministic_keys_for_gradients.patch
diff --git a/debian/changelog b/debian/changelog
index 07178a4..eef987e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ruby-prawn (1.3.0+dfsg-1.0~reproducible1) UNRELEASED; urgency=low
+
+ * Add 0700_use_deterministic_keys_for_gradients.patch to make
+ Prawn build PDF in a deterministic manner when they use gradients.
+
+ -- Jérémy Bobbio <[email protected]> Sun, 19 Apr 2015 14:25:51 +0200
+
ruby-prawn (1.3.0+dfsg-1) unstable; urgency=medium
* Imported Upstream version 1.3.0+dfsg
diff --git a/debian/patches/0700_use_deterministic_keys_for_gradients.patch b/debian/patches/0700_use_deterministic_keys_for_gradients.patch
new file mode 100644
index 0000000..c198848
--- /dev/null
+++ b/debian/patches/0700_use_deterministic_keys_for_gradients.patch
@@ -0,0 +1,40 @@
+Description: Use deterministic values for gradients
+ Previously, Prawn used #hash for gradients. Unfortunately, this uses
+ #object_id internally and prevent Prawn to create PDF using gradients
+ in a reproducible manner.
+ .
+ We now instead use an internal Hash with an incremental index starting
+ at 1.
+Author: Jérémy Bobbio <[email protected]>
+
+Index: git/lib/prawn/graphics/patterns.rb
+===================================================================
+--- git.orig/lib/prawn/graphics/patterns.rb 2015-04-19 15:15:52.112246285 +0200
++++ git/lib/prawn/graphics/patterns.rb 2015-04-19 15:47:30.755127617 +0200
+@@ -60,7 +60,7 @@
+ end
+
+ def gradient_registry_key(gradient)
+- if gradient[1].is_a?(Array) # axial
++ key = if gradient[1].is_a?(Array) # axial
+ [
+ map_to_absolute(gradient[0]),
+ map_to_absolute(gradient[1]),
+@@ -74,7 +74,16 @@
+ gradient[3],
+ gradient[4], gradient[5]
+ ]
+- end.hash
++ end
++ unless @gradient_key_registry
++ @gradient_key_registry ||= {}
++ @gradient_key_index = 1
++ end
++ unless @gradient_key_registry.include?(key)
++ @gradient_key_registry[key] = @gradient_key_index
++ @gradient_key_index += 1
++ end
++ @gradient_key_registry[key]
+ end
+
+ def gradient_registry
diff --git a/debian/patches/series b/debian/patches/series
index 9be8a9d..3ddcfe4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
0405_use_system_fonts_manual.patch
0500_disable_tests_using_removed_files.patch
0600_replace_require_relative_manual.patch
+0700_use_deterministic_keys_for_gradients.patch
--
1.9.1
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Source: ruby-prawn
Source-Version: 2.0.1+dfsg-1
We believe that the bug you reported is fixed in the latest version of
ruby-prawn, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Cédric Boutillier <[email protected]> (supplier of updated ruby-prawn package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 29 Apr 2015 16:32:11 +0200
Source: ruby-prawn
Binary: ruby-prawn ruby-prawn-doc
Architecture: source all
Version: 2.0.1+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Ruby Extras Maintainers
<[email protected]>
Changed-By: Cédric Boutillier <[email protected]>
Description:
ruby-prawn - fast, nimble PDF generation library for Ruby
ruby-prawn-doc - fast, nimble PDF generation library for Ruby (documentation)
Closes: 782890 782891
Changes:
ruby-prawn (2.0.1+dfsg-1) unstable; urgency=medium
.
[ Jérémy Bobbio ]
* Add 0700_use_deterministic_keys_for_gradients.patch to make
Prawn build PDF in a deterministic manner when they use gradients.
(Closes: #782890)
* Make the package build reproducibly:
- Add 0800_enable_manual_to_be_built_reproducibly.patch
to allow the manual last update to be set using an environment
variable. (Closes: #782891)
- Set the build date in debian/rules.
.
[ Cédric Boutillier ]
* Imported Upstream version 2.0.1+dfsg
* Refresh patches
* Update homepage to prawnpdf.org
* Bump Standards-Version to 3.9.6 (no changes needed)
* Update versions of ruby-pdf-inspector and ruby-pdf-core in dependencies
* Enable autopkg-pkg-ruby auto-package-test suite
Checksums-Sha1:
c2fca63c0ee12beff81c4fd9d62ca378bb0e4928 2039 ruby-prawn_2.0.1+dfsg-1.dsc
0d60216269bc4112518f620c116de1dbd150c6e5 697011
ruby-prawn_2.0.1+dfsg.orig.tar.gz
b506c72e05515375168d3a46130ddb0d214ee98f 20860
ruby-prawn_2.0.1+dfsg-1.debian.tar.xz
2ddf5c2ffd23ff0608cad4b916c870028023a5cd 296136 ruby-prawn_2.0.1+dfsg-1_all.deb
8fd8872c33955205edf41299a5c236c8f713bae9 375778
ruby-prawn-doc_2.0.1+dfsg-1_all.deb
Checksums-Sha256:
06209972b5f35f7a26710c88061f31d9a06c359a457b23ffd907b8975299331b 2039
ruby-prawn_2.0.1+dfsg-1.dsc
eb74df3da0942136b8eeb2ab229d0bc4c223782f3472829f935be69aa0ed2f52 697011
ruby-prawn_2.0.1+dfsg.orig.tar.gz
3a77ecd61b173ea109da48a32ab7addc2660030cbbd03cf4a55450ad20d5fc1c 20860
ruby-prawn_2.0.1+dfsg-1.debian.tar.xz
3669356aeffe11333a48646bec3b9d4ba0066db967af5eadfd525decc4389903 296136
ruby-prawn_2.0.1+dfsg-1_all.deb
ab7625033a48d3059d346c61df3afa9b0db5a346a7c96f43f7ad21bef5db725c 375778
ruby-prawn-doc_2.0.1+dfsg-1_all.deb
Files:
97142beb40f06d073a193259de9c2625 2039 ruby optional ruby-prawn_2.0.1+dfsg-1.dsc
5faa6fd7da4f65114c508915d4795325 697011 ruby optional
ruby-prawn_2.0.1+dfsg.orig.tar.gz
b8ab802c30dcb88f4f9e0e4883d72f5a 20860 ruby optional
ruby-prawn_2.0.1+dfsg-1.debian.tar.xz
bfa3c200ad1f602c32e680c2e2663c66 296136 ruby optional
ruby-prawn_2.0.1+dfsg-1_all.deb
cfcf89338fbaf9478dd97c41f67419b5 375778 doc optional
ruby-prawn-doc_2.0.1+dfsg-1_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBCAAGBQJVQOxnAAoJEImvgrc5zSF6q6kIAIT0lSsiXkYP8m38yySJULys
2Nwxyu+UPz3QIDp2rXKOw6bmHR/w1TheOKvru2Arreb46XHhndkE9bmYjqnprk5f
znAn5TqhSQVn2LNfqNcG7A+PO9o9F5EEAvlfy7L/wlunKjbfU8AEI4MKJAFEebtM
AuEFNoTjbTltGrpHmEZmZwzPNtZl0sqVxBMXElUCo36+IRXfDkS3gwW8PXsy+mRN
t8rTMuXUkLk/yQRHaFyMUDOpFYlAMwTB5vwav9w3w9uSL2Z78f5iiwycm3N3Kq+7
DBL0hxvxGWVpOKt7v3xFhIHWcqgSj47hAav0KFlJFLO/r2mySrZ34M1yKYJhqYQ=
=5GlD
-----END PGP SIGNATURE-----
--- End Message ---