Source: jhbuild
Version: 3.38.0-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

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

This is because the /usr/bin/jhbuild binary embedded the absolute
build to get it's "source" directory. A patch is attached that imports
the jhbuild module and determines this location programmatically
instead.

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


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.patch   1970-01-01 01:00:00.000000000 
+0100
--- b/debian/patches/reproducible-build.patch   2020-09-30 10:43:22.718738954 
+0100
@@ -0,0 +1,22 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2020-09-30
+
+--- jhbuild-3.38.0.orig/scripts/jhbuild.in
++++ jhbuild-3.38.0/scripts/jhbuild.in
+@@ -20,13 +20,10 @@ if USE_CHECKOUT_SRC:
+ else:
+     pkgdatadir = "@pkgdatadir@"
+     datadir = "@datadir@"
+-    srcdir = "@srcdir@"
+     if '@pythondir@' not in sys.path:
+         sys.path.insert(0, '@pythondir@')
+-    try:
+-        import jhbuild
+-    except ImportError:
+-        sys.path.insert(0, srcdir)
++    import jhbuild
++    srcdir = os.path.abspath(os.path.dirname(jhbuild.__file__))
+ 
+ builtins.__dict__['PKGDATADIR'] = pkgdatadir
+ builtins.__dict__['DATADIR'] = datadir
--- a/debian/patches/series     1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series     2020-09-30 10:28:50.211458738 +0100
@@ -0,0 +1 @@
+reproducible-build.patch

Reply via email to