Source: checkpw
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 built from a different path for
/usr/bin/checkpw:

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

The attached patch to debian/rules fixes this by adding
-ffile-prefix-map to CFLAGS.

Alternately, updating to a newer debhelper compat level might fix this.

According to my local tests, with this patch applied, and the patch
submitted in 2015 for bug #777299, checkpw should build reproducibly on
tests.reproducible-builds.org!

Thanks for maintaining checkpw!

live well,
  vagrant
From d8bc459cbc3076dec093f7bd5b3db31a27999fdf Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 27 Sep 2022 22:47:32 +0000
Subject: [PATCH 2/2] debian/rules: Add -ffile-prefix-map to CFLAGS to avoid
 embedding build paths.

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

diff --git a/debian/rules b/debian/rules
index f5b7c42..13274a9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,8 @@
 
 CC =gcc
 CFLAGS =-g -O2 -Wall
+# Avoid embedding build paths for reproducible builds
+CFLAGS += -ffile-prefix-map=$(CURDIR)=.
 LDFLAGS =
 STRIP =strip
 
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to