Source: elph
Version: 1.0.1-2
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 elph could not be built reproducibly.

This was because the upstream Makefile was not respecting CXXFLAGS and
thus was missing the -fdebug-prefix-map GCC argument.

Patch attached which, as a side-effect, also actually enables the
hardening features [1] that were not being enabled that the "export
DEB_BUILD_MAINT_OPTIONS = hardening=+all" was attempting to do. :)

 [0] https://reproducible-builds.org/
 [1] https://wiki.debian.org/Hardening


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/reproduciblebuild.patch    1969-12-31 16:00:00.000000000 
-0800
--- b/debian/patches/reproduciblebuild.patch    2019-10-08 15:37:18.238576901 
-0700
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2019-10-08
+
+--- elph-1.0.1.orig/sources/Makefile
++++ elph-1.0.1/sources/Makefile
+@@ -9,7 +9,7 @@ SYSTYPE :=     $(shell uname)
+ # C compiler
+ 
+ CXX      := g++
+-CXXLAGS  = -Wall ${SEARCHDIRS} -fno-exceptions -fno-rtti -D_REENTRANT -g
++CXXLAGS  = -Wall ${SEARCHDIRS} -fno-exceptions -fno-rtti -D_REENTRANT -g 
$(shell dpkg-buildflags --get CXXFLAGS)
+ 
+ %.o : %.c
+       ${CXX} ${CXXLAGS} -c $< -o $@
--- a/debian/patches/series     2019-10-08 15:32:38.788241091 -0700
--- b/debian/patches/series     2019-10-08 15:37:17.282568578 -0700
@@ -1 +1,2 @@
 toplevelmakefile.patch
+reproduciblebuild.patch

Reply via email to