Bug#1032409: esda: please make the build reproducible

Chris Lamb lamby at debian.org
Mon Mar 6 09:28:40 GMT 2023


Source: esda
Version: 2.4.3-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: buildpath filesystem
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
esda could not be built reproducibly.

There were actually two issues I needed to address:

 * The documentation embedded the full build path, ironically because
   esda was incorrectly passing a directory to env.doc2path, a
   path-related utility. This second parameter is actually a boolean
   argument, and the attempt to make the path relative was actually
   being interpreted as a boolean — specifically, that it should be an
   absolute pathname.

 * debian/rules calls out to jdupes, but this utility cleans up
   duplicates depending on the underlying filesystem order.

Patch attached for both issues.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/003.reproducible.build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/003.reproducible.build.patch	2023-03-06 09:15:52.266432442 +0000
@@ -0,0 +1,17 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2023-03-06
+
+--- esda-2.4.3.orig/docs/conf.py
++++ esda-2.4.3/docs/conf.py
+@@ -285,8 +285,8 @@ numpydoc_xref_ignore = {'type', 'optiona
+ 
+ # This is processed by Jinja2 and inserted before each notebook
+ nbsphinx_prolog = r"""
+-{% set docname = env.doc2path(env.docname, base='docsrc/') %}
+-{% set fullpath = env.doc2path(env.docname, base='tree/master/docsrc/') %}
++{% set docname = env.doc2path(env.docname, base=False) %}
++{% set fullpath = env.doc2path(env.docname, base=False) %}
+ 
+ .. only:: html
+ 
--- a/debian/patches/series	2023-03-06 08:53:52.520261028 +0000
--- b/debian/patches/series	2023-03-06 09:15:51.282406397 +0000
@@ -1,2 +1,3 @@
 002.disable.function.error.patch
 001.fix-build-sphinx-doc.path
+003.reproducible.build.patch
--- a/debian/rules	2023-03-06 08:53:52.520261028 +0000
--- b/debian/rules	2023-03-06 09:22:36.242239555 +0000
@@ -23,7 +23,8 @@
 endif
 
 # Fix duplicate-files
-	jdupes -rl debian/python-esda-doc/usr/share/doc/python-esda-doc/html/
+	find -type f -print0 debian/python-esda-doc/usr/share/doc/python-esda-doc/html/ | \
+		sort -z | xargs -0r jdupes -Ol 
 
 # Fix privacy-breach-generic
 	find debian/python-esda-doc/ -name '*.html' -exec sed -i 's|src="https://||g' {} \;


More information about the debian-science-maintainers mailing list