Source: autoclass
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The build path is triggers different buildid in /usr/bin/autoclass:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/autoclass.html

  ... Build·ID:·f5e1b2ff65fbb0f313e8226b27292971816a02ad
  vs.
  ... Build·ID:·22e32d5a1dcc2e0b76bf97d7607bc09be61dbbd1

The attached patch fixes this by passing -ffile-prefix-map to CFLAGS in
debian/rules, and passing CFLAGS to make.

Alternately (maybe even preferably), updating to "dh" build system and
updating debhelper compat level might also fix the issue.

With this patch applied, autoclass should build reproducibly on
tests.reproducible-builds.org!


live well,
  vagrant
From c0fc985e2f2d58efef2e89bd5d90bdf8f66e137b Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Sun, 22 May 2022 01:27:31 +0000
Subject: [PATCH] debian/rules: Pass -ffile-prefix-map via CFLAGS to make.

Without this argument, the build path gets embedded in the binaries.

https://reproducible-builds.org/docs/build-path/
---
 debian/rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 9cb0546..ccf2f2e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@
 # Note: when changing the debhelper compatibility level, also update
 # the dependency in debian/control (e.g. "debhelper (>= 7)")
 
-CFLAGS = -Wall -g
+CFLAGS = -Wall -g -ffile-prefix-map=$(CURDIR)=.
 INSTALL = install
 INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
 INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
@@ -65,7 +65,7 @@ build-stamp:
 	dh_testdir
 
 	# Add here commands to compile the package.
-	(cd prog; $(MAKE) $(MAKEFLAGS))
+	(cd prog; $(MAKE) $(MAKEFLAGS) CFLAGS="$(CFLAGS)")
 
 	# assemble changelog in reverse chronological order
 	-rm changelog
-- 
2.36.1

Attachment: signature.asc
Description: PGP signature

Reply via email to