Debian Bug report logs - #1020754
shapetools: reproducible-builds: Embedded build path in sttk.h

Package: src:shapetools; Maintainer for src:shapetools is Matthias Klose <doko@debian.org>;

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

Date: Mon, 26 Sep 2022 00:30:01 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, Matthias Klose <doko@debian.org>:
Bug#1020754; Package src:shapetools. (Mon, 26 Sep 2022 00:30:03 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, Matthias Klose <doko@debian.org>. (Mon, 26 Sep 2022 00:30:03 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: shapetools: reproducible-builds: Embedded build path in sttk.h
Date: Sun, 25 Sep 2022 17:27:25 -0700
[Message part 1 (text/plain, inline)]
Source: shapetools
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/include/sttk.h:

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

  #define·ST_ENV_DEFAULT»  "/build/1st/shapetools-1.4pl6/debian/tmp/usr"
  vs.
  #define·ST_ENV_DEFAULT»  "/build/2/shapetools-1.4pl6/2nd/debian/tmp/usr"

The attached patch fixes this in debian/rules by removing the build path
and debian/tmp from sttk.h. It is unclear to me if it would be better to
replace it with a placeholder value, or to leave the debian/tmp part; it
really depends how this define is used.

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

Thanks for maintaining shapetools!

live well,
  vagrant
[0001-debian-rules-Remove-build-path-from-sttk.h.patch (text/x-diff, inline)]
From 57526fa7f4a3f45661247021c4cceb6a919de4b7 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 26 Sep 2022 00:11:40 +0000
Subject: [PATCH 1/2] debian/rules: Remove build path from sttk.h.

https://reproducible-builds.org/docs/build-path/
---
 debian/rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rules b/debian/rules
index f7df25f..268b2e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -363,6 +363,8 @@ binary-arch: build install
 	dh_installchangelogs -p$(p_atfs) CHANGES-1.4
 	dh_strip -a -X.a
 	dh_compress -a
+	# Remove build path for reproducible builds
+	sed -i -e "s,$(CURDIR)/debian/tmp,,g" debian/atfs-dev/usr/include/sttk.h
 	dh_fixperms -a
 	LD_LIBRARY_PATH=$(d_atfslib)/usr/lib:$$LD_LIBRARY_PATH \
 		dh_makeshlibs -V -p$(p_atfslib)
-- 
2.30.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:27:58 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.