[DRE-commits] [ruby-rmagick] 02/03: make build reproducible
Antonio Terceiro
terceiro at moszumanska.debian.org
Tue Aug 16 14:35:11 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-rmagick.
commit afb2e39bfdbb585190b9f393b1abb1ed3e2d6fce
Author: Antonio Terceiro <terceiro at debian.org>
Date: Tue Aug 16 11:27:46 2016 -0300
make build reproducible
---
debian/changelog | 6 ++++++
.../0003-Use-deterministic-label-for-image.patch | 24 ++++++++++++++++++++++
.../patches/0004-Seed-RNG-to-0-during-builds.patch | 24 ++++++++++++++++++++++
debian/patches/series | 2 ++
4 files changed, 56 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index ec8e4eb..4be18a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,12 @@
ruby-rmagick (2.15.4+dfsg-2) UNRELEASED; urgency=medium
* Bump Standards-Version to 3.9.8 (no changes needed)
+ * Add 2 patches to make build reproducible (Closes: #795484)
+ - 0003-Use-deterministic-label-for-image.patch, based on the original
+ patch by Chris Lamb.
+ - 0004-Seed-RNG-to-0-during-builds.patch: seed random number generator
+ with 0 when SOURCE_DATE_EPOCH is set. This will also help reverse
+ dependencies that use ruby-rmagick during their own build.
-- Antonio Terceiro <terceiro at debian.org> Tue, 16 Aug 2016 11:07:56 -0300
diff --git a/debian/patches/0003-Use-deterministic-label-for-image.patch b/debian/patches/0003-Use-deterministic-label-for-image.patch
new file mode 100644
index 0000000..1cff1ff
--- /dev/null
+++ b/debian/patches/0003-Use-deterministic-label-for-image.patch
@@ -0,0 +1,24 @@
+From: Chris Lamb <lamby at debian.org>
+Date: Tue, 16 Aug 2016 11:08:42 -0300
+Subject: Use deterministic label for image
+
+this helps making the build reproducible
+
+Signed-off-by: Antonio Terceiro <terceiro at debian.org>
+---
+ doc/ex/polaroid.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/ex/polaroid.rb b/doc/ex/polaroid.rb
+index 517e3d5..80f6b5a 100644
+--- a/doc/ex/polaroid.rb
++++ b/doc/ex/polaroid.rb
+@@ -5,7 +5,7 @@ require 'date'
+ # Demonstrate the Image#polaroid method
+
+ img = Magick::Image.read('images/Flower_Hat.jpg').first
+-img[:Caption] = "\nLosha\n" + Date.today.to_s
++img[:Caption] = "\nLosha\nPlus hat"
+
+ begin
+ picture = img.polaroid do
diff --git a/debian/patches/0004-Seed-RNG-to-0-during-builds.patch b/debian/patches/0004-Seed-RNG-to-0-during-builds.patch
new file mode 100644
index 0000000..4100ecc
--- /dev/null
+++ b/debian/patches/0004-Seed-RNG-to-0-during-builds.patch
@@ -0,0 +1,24 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Tue, 16 Aug 2016 11:13:12 -0300
+Subject: Seed RNG to 0 during builds
+
+This helps making the build reproducible
+---
+ ext/RMagick/rmmain.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ext/RMagick/rmmain.c b/ext/RMagick/rmmain.c
+index 44dbed2..cec0786 100644
+--- a/ext/RMagick/rmmain.c
++++ b/ext/RMagick/rmmain.c
+@@ -1621,6 +1621,10 @@ Init_RMagick2(void)
+ SetWarningHandler(rm_warning_handler);
+
+ RB_GC_GUARD(observable);
++
++ if (getenv("SOURCE_DATE_EPOCH") != NULL) {
++ SeedPseudoRandomGenerator(0);
++ }
+ }
+
+
diff --git a/debian/patches/series b/debian/patches/series
index 50c776f..b36d194 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
0001-Bypass-version-check.patch
0002-Ignore-removed-srgb.icm-file-in-tests.patch
+0003-Use-deterministic-label-for-image.patch
+0004-Seed-RNG-to-0-during-builds.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rmagick.git
More information about the Pkg-ruby-extras-commits
mailing list