Source: sprai
Version: 0.9.9.23+dfsg-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
sprai could not be built reproducibly.

This is because it embedded the build path in the binary, and the root
cause of this was because the upstream build system was not respecting
dpkg-buildflags.

Patch attached that fixes this.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/patches/cflags.patch       1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/cflags.patch       2020-04-11 19:24:35.361790449 +0100
@@ -0,0 +1,27 @@
+Description: Make the build reproducible
+Author: Chris Lamb <[email protected]>
+Last-Update: 2020-04-11
+
+--- sprai-0.9.9.23+dfsg.orig/makefile
++++ sprai-0.9.9.23+dfsg/makefile
+@@ -38,16 +38,16 @@ check_circularity.pl \
+ all: $(COMPILED)
+ 
+ bfmt72s: bfmt72s.c
+-      $(CC) -Wall -O3 -g -o $@ $<
++      $(CC) -Wall -O3 -g $(CFLAGS) -o $@ $<
+ 
+ nss2v_v3: nss2v_v3.c
+-      $(CC) -Wall -O3 -g -o $@ $<
++      $(CC) -Wall -O3 -g $(CFLAGS) -o $@ $<
+ 
+ myrealigner: myrealigner.c
+-      $(CC) -Wall -O3 -g -o $@ $^
++      $(CC) -Wall -O3 -g $(CFLAGS) -o $@ $^
+ 
+ m52bfmt7: m52bfmt7.c
+-      $(CC) -Wall -O3 -g -o $@ $<
++      $(CC) -Wall -O3 -g $(CFLAGS) -o $@ $<
+ 
+ 
+ install: $(COMPILED) $(SCRIPTS)
--- a/debian/patches/series     2020-04-11 19:13:38.925486011 +0100
--- b/debian/patches/series     2020-04-11 19:24:35.365790510 +0100
@@ -1,3 +1,4 @@
 libexec.patch
 example-specs.patch
 makefile.patch
+cflags.patch
--- a/debian/rules      2020-04-11 19:13:38.925486011 +0100
--- b/debian/rules      2020-04-11 19:23:53.109145637 +0100
@@ -1,5 +1,8 @@
 #!/usr/bin/make -f
 
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
 %:
        dh $@
 

Reply via email to