Source: libctl
Version: 4.5.0-3
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

Hi,

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

This is because it embeds the absolute build directory via a LOCALEDIR 
definition:

│ │ │ │ │ -  0x000a98c0 00000000 00000000 2f627569 6c642f31 ......../build/1
│ │ │ │ │ -  0x000a98d0 73742f67 7069636b 2d302e32 2e367e72 st/gpick-0.2.6~r
│ │ │ │ │ -  0x000a98e0 63312f64 65626961 6e2f6770 69636b2f c1/debian/gpick/
│ │ │ │ │ -  0x000a98f0 7573722f 73686172 652f6c6f 63616c65 usr/share/locale
│ │ │ │ │ -  0x000a9900 00000000 00000000 6661696c 65642074 ........failed t
│ │ │ │ │ +  0x000a98c0 00000000 00000000 2f627569 6c642f32 ......../build/2
│ │ │ │ │ +  0x000a98d0 2f677069 636b2d30 2e322e36 7e726331 /gpick-0.2.6~rc1
│ │ │ │ │ +  0x000a98e0 2f326e64 2f646562 69616e2f 67706963 /2nd/debian/gpic
│ │ │ │ │ +  0x000a98f0 6b2f7573 722f7368 6172652f 6c6f6361 k/usr/share/loca
│ │ │ │ │ +  0x000a9900 6c650000 00000000 6661696c 65642074 le......failed t

A patch is attached -- very much a proof of concept -- that hacks the
upstream SConscript file to obey the LOCALEDIR UNIX environment
variable; Scons seems to have it's own idea of what an environment is
which I don't immediately grok. (Maybe you can do it via the command-
line in debian/rules but I can't quite figure that out.)

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/rules      2020-04-13 10:37:35.383164699 +0100
--- b/debian/rules      2020-04-13 11:34:40.945648240 +0100
@@ -15,6 +15,10 @@
 override_dh_auto_configure:
        LIBS="-lm" dh_auto_configure -- --enable-shared
 
+override_dh_installexamples:
+       dh_installexamples
+       sed -i -e 's@$(CURDIR)/.@/usr/share/libctl@g' 
debian/libctl-doc/usr/share/doc/libctl-dev/examples/example.scm
+
 override_dh_installdocs-arch:
        dh_installdocs
        mkdir -p debian/libctl-dev/usr/share/doc/libctl-dev

Reply via email to