Source: jnettop 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/sbin/jnettop: https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/jnettop.html /build/1st/jnettop-0.52/game.c:49 vs. /build/2/jnettop-0.52/2nd/game.c:49 The attached patches fix this in debian/rules by passing CFLAGS to make, and adding the -ffile-prefix-map argument to CFLAGS. With these patches applied jnettop should build reproducibly on tests.reproducible-builds.org! Thanks for maintaining jnettop! live well, vagrant
From 08ee9cd447f5e322c65ef14ff38c5b21c96d8915 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagr...@reproducible-builds.org> Date: Sun, 25 Sep 2022 00:31:06 +0000 Subject: [PATCH 1/2] debian/rules: Pass CFLAGS to make. --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 2952d66..435303c 100755 --- a/debian/rules +++ b/debian/rules @@ -35,7 +35,7 @@ build-stamp: config.status dh_testdir # Add here commands to compile the package. - $(MAKE) + $(MAKE) CFLAGS="$(CFLAGS)" #/usr/bin/docbook-to-man debian/jnettop.sgml > jnettop.1 touch build-stamp -- 2.37.2
From ef4bfd21187965d9e73c0f46d7a753b4c1603bbc Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagr...@reproducible-builds.org> Date: Sun, 25 Sep 2022 00:31: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 435303c..9a947d0 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,8 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g +# Avoid embedding build path in binaries +CFLAGS += -ffile-prefix-map=$(CURDIR)=. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 -- 2.37.2
signature.asc
Description: PGP signature