[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1020798: netkit-rsh: reproducible-builds: Embedded build paths in binaries



Source: netkit-rsh
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/netkit-rsh.html

  /usr/sbin/in.rlogind

  /build/1st/netkit-rsh-0.17/rlogind/network.c
  vs.
  /build/2/netkit-rsh-0.17/2nd/rlogind/network.c

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

Alternately, updating to use dh and a recent debhelper compat version
might also fix this.

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

Thanks for maintaining netkit-rsh!

live well,
  vagrant
From 6529f07eacdf749b1a5390933f8ac3a91093b664 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 26 Sep 2022 21:40:41 +0000
Subject: [PATCH] debian/rules: Add -ffile-prefix-map to CFLAGS to avoid
 embedding the 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 8049402..42ca247 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-export CFLAGS += -Ddebian -DFSUID_HACK -D_GNU_SOURCE
+export CFLAGS += -Ddebian -DFSUID_HACK -D_GNU_SOURCE -ffile-prefix-map=$(CURDIR)=.
 
 %:
 	dh $@ --buildsystem=cmake
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature


Reply to: