Bug#865623: cracklib2: please make the contents of /var/cache/cracklib/src-dicts reproducible

Chris Lamb lamby at debian.org
Fri Jun 23 08:42:01 UTC 2017


Source: cracklib2
Version: 2.9.2-5
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that cracklib2 generates /var/cache/cracklib/src-dicts with non-
reproducible output.

This is due to iterating over the filesystem (ie. in a non-deterministic
order) to populate the ${cracklib_dictpath_src} variable.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb, Debian Project Leader
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git a/debian/cracklib.conf b/debian/cracklib.conf
index 82be232..533a5c4 100644
--- a/debian/cracklib.conf
+++ b/debian/cracklib.conf
@@ -49,7 +49,7 @@
   do
     if [ -d $i ]
     then
-      for file in $(find $i -type f -print)
+      for file in $(find $i -type f -print | LC_ALL=C sort)
       do
         if $(file -z -b ${file} | grep -q "text")
         then


More information about the Reproducible-bugs mailing list