Source: rig
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 embedded in /usr/bin/rig:

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

  /build/1st/rig-1.11/rig.cc:303
  vs.
  /build/2/rig-1.11/2nd/rig.cc:303

The attached patch to the upstream Makefile fixes this by passing
-ffile-prefix-map argument to the CXX call.

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

Thanks for maintaining rig!

live well,
  vagrant
From 60d3e87df657bbb1ffa55ed7bea6fabde2a6ca88 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Mon, 26 Sep 2022 00:52:09 +0000
Subject: [PATCH] Makefile: Pass -ffile-prefix-map to CXX call to avoid
 embedding build paths.

https://reproducible-builds.org/docs/build-path/
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f41c173..b4bb6f2 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ CXX=g++
 
 all: rig rig.6
 rig: rig.cc
-	${CXX} -O2 -g rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
+	${CXX} -O2 -g -ffile-prefix-map=$(CURDIR)=. rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
 
 rig.6: rig.6.in
 	sed s@DATADIR@"$(DATADIR)"@g < rig.6.in > rig.6
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to