Source: wit
Version: 3.01a-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 wit could not be built reproducibly.

This because the binaries and the load-titles.sh scripts (etc.)
embedded the build path.

Patch attached. It's a bit complicated due to some weirdness in
the upstream Makefile; hopefully should be documented enough.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/rules      2018-10-24 20:59:49.437323011 -0400
--- b/debian/rules      2018-10-24 22:28:23.278956670 -0400
@@ -31,13 +31,18 @@
 override_dh_auto_test:
 
 override_dh_auto_build:
-       $(MAKE) INSTALL_PATH=$(CURDIR)/debian/wit/usr HAVE_ZLIB=1
-       $(MAKE) INSTALL_PATH=$(CURDIR)/debian/wit/usr doc
+       # Build targetting /usr...
+       $(MAKE) INSTALL_PATH=/usr HAVE_ZLIB=1
+       $(MAKE) INSTALL_PATH=/usr doc
 
 override_dh_auto_install:
+       # ... and then recreate install.sh with a new INSTALL_PATH
+       rm -f templates.sed
        mkdir -p $(CURDIR)/debian/wit/usr/bin
        mkdir -p $(CURDIR)/debian/wit/usr/share
-       $(MAKE) INSTALL_PATH=$(CURDIR)/debian/wit/usr install
+       $(MAKE) install.sh INSTALL_PATH=$(CURDIR)/debian/wit/usr
+       # Manually call ./install.sh to avoid rebuilding
+       ./install.sh --make
 
 override_dh_installchangelogs:
        dh_installchangelogs doc/HISTORY.txt

Reply via email to