Source: markdown
Version: 1.0.1-8
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: randomness toolchain
X-Debbugs-Cc: [email protected]
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
`. `'` [email protected] / chris-lamb.co.uk
`-
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) ) . ';' },