Bug#845055: markdown: please make the output reproducible

Chris Lamb lamby at debian.org
Sat Nov 19 21:48:56 UTC 2016


Source: markdown
Version: 1.0.1-8
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness toolchain
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that markdown generates non-reproducible output.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git a/Markdown.pl b/Markdown.pl
index cc52c66..9264381 100755
--- a/Markdown.pl
+++ b/Markdown.pl
@@ -1208,7 +1208,7 @@ sub _EncodeEmailAddress {
 
 	my $addr = shift;
 
-	srand;
+	srand ($ENV{SOURCE_DATE_EPOCH} || time);
 	my @encode = (
 		sub { '&#' .                 ord(shift)   . ';' },
 		sub { '&#x' . sprintf( "%X", ord(shift) ) . ';' },


More information about the Reproducible-bugs mailing list