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

The buildid varies when build from different build paths:

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

The attached patch to debian/rules fixes this by passing the default
CFLAGS to make via the CCOPTIONS variable.

According to my local tests, with this patch applied, nitpic should build
reproducibly on tests.reproducible-builds.org!

Thanks for maintaining nitpic!

live well,
  vagrant
From a0f279bbd9c86d8cde731500b4aa249132a74dd8 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Sun, 9 Oct 2022 02:16:50 +0000
Subject: [PATCH] debian/rules: Pass -ffile-prefix-map to make via CCOPTIONS
 variable to avoid embedding build path.

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

diff --git a/debian/rules b/debian/rules
index 664269e..fa81626 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,7 @@ export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SD
 build: build-arch
 build-indep:
 build-arch: checkdir Makefile
-	$(MAKE)
+	$(MAKE) CCOPTIONS="-ffile-prefix-map=$(CURDIR)=."
 
 clean: checkdir Makefile
 	$(MAKE) clean
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to