Bug#1030708: gap-browse: please make the build reproducible

Chris Lamb lamby at debian.org
Mon Feb 6 17:06:42 GMT 2023


Source: gap-browse
Version: 1.8.18-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

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

This is because the call to gac in debian/rules did not inherit
the contents of CFLAGS which, amongst other things, contains the
correct -ffile-prefix-map switch to ensure that the binary does
not embed the current build path.

A patch is attached that uses /usr/share/dpkg/default.mk to get the
variable, which also means that we can drop the manual call to
parse/generate SOURCE_DATE_EPOCH.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/rules	2023-02-06 08:37:28.267047143 -0800
--- b/debian/rules	2023-02-06 09:02:23.149981770 -0800
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 # Copyright 2022 Joachim Zobel <jz-2017 at heute-morgen.de>
 
-export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog -SDate)" +%s)
+include /usr/share/dpkg/default.mk
 export FORCE_SOURCE_DATE = 1
 export LC_ALL = C
 
@@ -29,8 +29,8 @@
 override_dh_auto_configure: ;
 
 override_dh_auto_build: 
-	/usr/bin/gac -d -o bin/$(DEB_BUILD_GAP_INFO_ARCH)/ncurses.so src/ncurses.c \
-									 -L "-lpanel -lncurses"
+	/usr/bin/gac -d -p "$(CFLAGS)" -o bin/$(DEB_BUILD_GAP_INFO_ARCH)/ncurses.so src/ncurses.c \
+									 -L "$(LDFLAGS) -lpanel -lncurses"
 
 execute_after_dh_auto_build: doc;
 


More information about the Reproducible-bugs mailing list