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

Bug#1010828: bbrun: reproducible-builds: embedded build paths in /usr/bin/bbrun



Source: bbrun
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 /usr/bin/bbrun:

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

  /build/1st/bbrun-1.6/bbrun/bbrun.c:59
  vs.
  /build/2/bbrun-1.6/2nd/bbrun/bbrun.c:59

The attached patches fix this by patching the Makefile to accept an
EXTRA_CFLAGS variable, and then adjusting debian/rules to pass the
default CFLAGS via the EXTRA_CFLAGS variable.

The default CFLAGS include the -ffile-prefix-map argument which is used
to avoid embedding the absolute path in compiled files.


With these patches applied, bbrun should build reproducibly on
tests.reproducible-builds.org!


live well,
  vagrant
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 10 May 2022 22:11:56 +0000
X-Dgit-Generated: 1.6-9~20220510~0 4fb14836754865a2aaa98583c317a4cc51a84298
Subject: bbrun/Makefile: Allow passing EXTRA_CFLAGS.


---

--- bbrun-1.6.orig/bbrun/Makefile
+++ bbrun-1.6/bbrun/Makefile
@@ -11,7 +11,7 @@ OBJS   = bbrun.o \
 all: bbrun
 
 .c.o:
-	$(CC) -g -c -O2 -std=gnu89 -Wall $< -o $*.o $(CFLAGS)
+	$(CC) -g -c -O2 -std=gnu89 -Wall $< -o $*.o $(CFLAGS) $(EXTRA_CFLAGS)
 
 bbrun: $(OBJS)
 	$(CC) -Wall -g -o bbrun $^ $(LIBDIR) $(LIBS)
From 9afb47e8065156467fbcf4f9e5ced3c11121a6d9 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 10 May 2022 22:13:30 +0000
Subject: [PATCH 2/4] debian/rules: Pass CFLAGS via EXTRA_CFLAGS variable in
 dh_auto_build.

---
 debian/rules | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/rules b/debian/rules
index 2c653ec..6dbcea3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,3 +5,6 @@
 
 override_dh_auto_install:
 	dh_install
+
+override_dh_auto_build:
+	dh_auto_build -- EXTRA_CFLAGS="$(CFLAGS)"
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


Reply to: