Source: ldaptor
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: environment fileordering

Dear maintainer,

while working on the “reproducible builds” effort [1], we have noticed
that ldaptor could not be built reproducibly.

This is due to different content of the documentation created by Epydoc.
The attached patch ensures stable sorted order for the list of input
files fed into Epydoc, and it also moves a list out of the global scope that
captures the home directory set during the build in a string. This would
otherwise have been added to the documentation.
Once applied, ldaptor can be built reproducibly in our current experimental
framework.

Thanks for considering the patch.
Best regards,
Sascha

[1]: https://wiki.debian.org/ReproducibleBuilds
Description: make build reproducible
 This patch addresses nondeterminism in Epydoc input that influences the
 reproducibility of the ldaptor package build.
 In particular, this patch uses a stable sorted order for the list of input
 files fed into Epydoc, and it also moves a list out of the global scope that
 captures the home directory set during the build in a string. This would
 otherwise have been added to the documentation.
Author: Sascha Steinbiss <[email protected]>
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -137,6 +137,6 @@
 	        -o api \
 		--name Ldaptor \
 		--url http://www.inoi.fi/open/trac/ldaptor/ \
-		$$(find ../ldaptor \( -name SCCS -prune \) -o -name '*.py' -a ! -regex '.*/webui/.*' -a ! -regex '.*/test/web/.*' -a ! -regex '.*/test/test_webui\.py' -a ! -regex '.*/test/mockweb\.py' -a ! -name 'weave.py' -print)
+		$$(find ../ldaptor \( -name SCCS -prune \) -o -name '*.py' -a ! -regex '.*/webui/.*' -a ! -regex '.*/test/web/.*' -a ! -regex '.*/test/test_webui\.py' -a ! -regex '.*/test/mockweb\.py' -a ! -name 'weave.py' -print | LC_ALL=C sort)
 
 .PHONY: api
--- a/ldaptor/config.py
+++ b/ldaptor/config.py
@@ -121,11 +121,6 @@
                },
     }
 
-CONFIG_FILES = [
-    '/etc/ldaptor/global.cfg',
-    os.path.expanduser('~/.ldaptor/global.cfg'),
-    ]
-
 __config = None
 
 def loadConfig(configFiles=None,
@@ -134,6 +129,10 @@
     Load configuration file.
     """
     global __config
+    CONFIG_FILES = [
+        '/etc/ldaptor/global.cfg',
+        os.path.expanduser('~/.ldaptor/global.cfg'),
+    ]
     if __config is None or reload:
         x = ConfigParser.SafeConfigParser()
         x.optionxform = InsensitiveString
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to