Debian Bug report logs - #1021456
bwbasic: reproducible-builds: build path embedded in /usr/bin/bwbasic

Package: src:bwbasic; Maintainer for src:bwbasic is Debian QA Group <packages@qa.debian.org>;

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

Date: Sat, 8 Oct 2022 22:09: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, Debian QA Group <packages@qa.debian.org>:
Bug#1021456; Package src:bwbasic. (Sat, 08 Oct 2022 22:09: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, Debian QA Group <packages@qa.debian.org>. (Sat, 08 Oct 2022 22:09: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: bwbasic: reproducible-builds: build path embedded in /usr/bin/bwbasic
Date: Sat, 08 Oct 2022 15:04:54 -0700
[Message part 1 (text/plain, inline)]
Source: bwbasic
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/bwbasic:

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

  /build/1st/bwbasic-2.20pl2/bwbasic.c:118
  vs.
  /build/2/bwbasic-2.20pl2/2nd/bwbasic.c:118

The attached patches fix this by adjusting the upstream Makefile to use
the default CFLAGS (by appending the arguments), and disables format
string hardening which causes build failures (and was previously
ignored, as CFLAGS was not used).

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

Thanks for maintaining bwbasic!

live well,
  vagrant
[0001-Makefile.in-Use-CFLAGS-from-the-environment-and-pass.patch (text/x-diff, inline)]
From 3ef0221a1b4ecc8842c613e406b9f4af6926d9c0 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 2 May 2022 15:48:14 +0000
Subject: [PATCH 1/4] Makefile.in: Use CFLAGS from the environment and pass
 CFLAGS to CC calls.

---
 Makefile.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 9d12d0b..fea9b5f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,7 +14,7 @@ DEFS = @DEFS@
 
 # Revised by JBV
 #CFLAGS = -O
-CFLAGS = -g -ansi
+CFLAGS += -g -ansi
 
 # Revised by JBV
 #LDFLAGS = -s
@@ -58,11 +58,11 @@ DISTFILES=	$(CFILES) $(HFILES) $(MISCFILES)
 all: bwbasic bwbasic.1 renum
 
 bwbasic:	$(OFILES)
-		$(CC) $(OFILES) -lm -o $@ $(LDFLAGS)
+		$(CC) $(CFLAGS) $(OFILES) -lm -o $@ $(LDFLAGS)
 
 # Added by JBV
 renum:
-	$(CC) renum.c -g -o renum
+	$(CC) $(CFLAGS) renum.c -g -o renum
 
 # Added by Vince Mulhollon
 bwbasic.1: bwbasic.doc
-- 
2.37.2

[0002-debian-rules-Disable-format-hardening.patch (text/x-diff, inline)]
From 2ec1c3e99f1b03ec7aea4c74e193d307aa9c6ad5 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 2 May 2022 15:49:29 +0000
Subject: [PATCH 2/4] debian/rules: Disable format hardening.

This was effectively ignored before and causes build failures.
---
 debian/rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rules b/debian/rules
index 2f89281..bccd746 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,6 @@
 #!/usr/bin/make -f
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-format
+
 %:
 	dh $@ --without autoreconf
-- 
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 12:42:49 2023; Machine Name: bembo

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.