Debian Bug report logs - #1020743
pure-ftpd: reproducible-builds: Embedded build path in various binaries

Package: src:pure-ftpd; Maintainer for src:pure-ftpd is Stefan Hornburg (Racke) <racke@linuxia.de>;

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Sun, 25 Sep 2022 22:00:02 UTC

Severity: normal

Tags: patch

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Stefan Hornburg (Racke) <racke@linuxia.de>:
Bug#1020743; Package src:pure-ftpd. (Sun, 25 Sep 2022 22:00:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Stefan Hornburg (Racke) <racke@linuxia.de>. (Sun, 25 Sep 2022 22:00:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: pure-ftpd: reproducible-builds: Embedded build path in various binaries
Date: Sun, 25 Sep 2022 14:57:50 -0700
[Message part 1 (text/plain, inline)]
Source: pure-ftpd
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build path is embedded in various binaries:

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

  /usr/bin/pure-pw

  /build/1st/pure-ftpd-1.0.50/src/alt_arc4random.c:149
  vs.
  /build/2/pure-ftpd-1.0.50/2nd/src/alt_arc4random.c:149

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

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

Thanks for maintaining pure-ftpd!

live well,
  vagrant
[0001-debian-rules-Add-ffile-prefix-map-to-CFLAGS-to-avoid.patch (text/x-diff, inline)]
From 80d366799f5a4484582092e88315cd63d041454e Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 25 Sep 2022 21:51:30 +0000
Subject: [PATCH] debian/rules: Add -ffile-prefix map to CFLAGS 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 5efcf37..305ee2c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-cfgflags=--sysconfdir=/etc/pure-ftpd CFLAGS="-O2 -DMAX_USER_LENGTH=128U -g"
+cfgflags=--sysconfdir=/etc/pure-ftpd CFLAGS="-O2 -DMAX_USER_LENGTH=128U -g -ffile-prefix-map=$(CURDIR)=."
 optflags=--with-everything --with-largefile --with-pam --with-privsep --with-tls --with-rfc2640
 bin=pure-pw pure-statsdecode pure-pwconvert
 sbin=pure-authd pure-certd pure-ftpwho pure-uploadscript pure-quotacheck pure-ftpd pure-mrtginfo
-- 
2.37.2

[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 13:28:02 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.