961747">

Debian Bug report logs - #961747
libstatgrab: Fix reproducibility issues in example Makefile

version graph

Package: src:libstatgrab; Maintainer for src:libstatgrab is Bartosz Fenski <fenio@debian.org>;

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

Date: Thu, 28 May 2020 18:03:02 UTC

Severity: wishlist

Tags: patch

Found in version libstatgrab/0.91-1

Fixed in version libstatgrab/0.92.1-1.1

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

Bug is archived. No further changes may be made.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, vagrant@debian.org, Bartosz Fenski <fenio@debian.org>:
Bug#961747; Package src:libstatgrab. (Thu, 28 May 2020 18:03:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to vagrant@debian.org, Bartosz Fenski <fenio@debian.org>. (Thu, 28 May 2020 18:03: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: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libstatgrab: Fix reproducibility issues in example Makefile
Date: Thu, 28 May 2020 10:59:17 -0700
[Message part 1 (text/plain, inline)]
Source: libstatgrab
Version: 0.91-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: usrmerge buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The example Makefile shipped in libstatgrab-dev changes depending on the
build path and if the system was build with a merged /usr
(a.k.a. usrmerge) filesystem layout.

The attached patches fix these issues, though it might be worth
considering dropping the example Makefile from the package entirely; the
end-user would have to regenerate it themselves in order for it to be
functional.


live well,
  vagrant

[0001-Fix-varying-paths-in-example-Makefile.patch (text/x-diff, inline)]
From 9e8f7ff6e357ca9d97d7be3d4a1087e06d9bd61e Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Thu, 28 May 2020 17:43:55 +0000
Subject: [PATCH 1/2] Fix varying paths in example Makefile.

Pass values for various binaries to configure to ensure reproducible
builds when built on a usrmerged system.
---
 debian/rules | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/debian/rules b/debian/rules
index 3cc4d57..dad932a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,3 +5,14 @@
 
 %:
 	dh $@ --with autoreconf
+
+override_dh_auto_configure:
+	# Ensure consistant paths for binaries to ensure reproducible
+	# builds on usrmerge vs. non-usrmerge systems.
+	dh_auto_configure -- \
+		GREP=/bin/grep \
+		EGREP="/bin/grep -E" \
+		FGREP="/bin/grep -F" \
+		MKDIR_P="/bin/mkdir -p" \
+		SED=/bin/sed \
+		SHELL=/bin/sh
-- 
2.20.1

[0002-Remove-build-paths-from-example-Makefile-to-ensure-r.patch (text/x-diff, inline)]
From 549a33130543cd93a83d50f285dda208a7896408 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Thu, 28 May 2020 17:46:48 +0000
Subject: [PATCH 2/2] Remove build paths from example Makefile to ensure
 reproducible builds.

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

diff --git a/debian/rules b/debian/rules
index dad932a..dbdb749 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,3 +16,13 @@ override_dh_auto_configure:
 		MKDIR_P="/bin/mkdir -p" \
 		SED=/bin/sed \
 		SHELL=/bin/sh
+
+override_dh_install:
+	# Clean up embedded build paths in order to ensure reproducible builds.
+	sed -i -e "s,-fdebug-prefix-map=$(CURDIR)=\.,,g" \
+		-e "s,-ffile-prefix-map=$(CURDIR)=\.,,g" \
+		-e "s,abs_.*$(CURDIR).*,,g" \
+		-e "s,$(CURDIR).*missing --run,,g" \
+		-e "s,$(CURDIR),./,g" \
+		$(CURDIR)/examples/Makefile
+	dh_install
-- 
2.20.1

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Bartosz Fenski <fenio@debian.org>:
Bug#961747; Package src:libstatgrab. (Sun, 03 Jan 2021 21:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Extra info received and forwarded to list. Copy sent to Bartosz Fenski <fenio@debian.org>. (Sun, 03 Jan 2021 21:39:03 GMT) (full text, mbox, link).


Message #10 received at 961747@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: 961747@bugs.debian.org
Subject: Re: libstatgrab: Fix reproducibility issues in example Makefile
Date: Sun, 03 Jan 2021 13:37:28 -0800
[Message part 1 (text/plain, inline)]
On 2020-05-28, Vagrant Cascadian wrote:
> The example Makefile shipped in libstatgrab-dev changes depending on the
> build path and if the system was build with a merged /usr
> (a.k.a. usrmerge) filesystem layout.
>
> The attached patches fix these issues, though it might be worth
> considering dropping the example Makefile from the package entirely; the
> end-user would have to regenerate it themselves in order for it to be
> functional.

On further consideration, I think the better option is to ship
Makefile.in and Makefile.am instead of the generated Makefile, allowing
someone wishing to use the example to regenerate the Makefile to match
thier system. Patch attached.

Is it too late to consider uploading soon for inclusion in bullseye?  If
you are ok with it but do not have the time, would you be ok with an
NMU?


Thanks for maintaining libstatgrab!


live well,
  vagrant
[0001-libstatgrab-dev.examples-Install-Makefile.am-and-Mak.patch (text/x-diff, inline)]
From 1731bb3e8cc43ec7b23e5bb4efaef0a391060fd0 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 3 Jan 2021 21:15:18 +0000
Subject: [PATCH] libstatgrab-dev.examples: Install Makefile.am and Makefile.in
 instead of Makefile. (Closes: #961747)

The example Makefile embeds build paths that are not likely to be
present on the end-user system, and possibly binary paths that may be
different on a usrmerge system, thus requiring the end-user to
regenerate the file from the Makefile.in or Makefile.am in order to
function correctly.
---
 debian/libstatgrab-dev.examples | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/libstatgrab-dev.examples b/debian/libstatgrab-dev.examples
index 44f63b7..e846f57 100644
--- a/debian/libstatgrab-dev.examples
+++ b/debian/libstatgrab-dev.examples
@@ -1,2 +1,2 @@
 examples/*.c
-examples/Makefile
+examples/Makefile.*
-- 
2.20.1

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Bartosz Fenski <fenio@debian.org>:
Bug#961747; Package src:libstatgrab. (Thu, 01 Dec 2022 23:45:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Extra info received and forwarded to list. Copy sent to Bartosz Fenski <fenio@debian.org>. (Thu, 01 Dec 2022 23:45:03 GMT) (full text, mbox, link).


Message #15 received at 961747@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: 961747@bugs.debian.org
Subject: Re: libstatgrab: Fix reproducibility issues in example Makefile
Date: Thu, 01 Dec 2022 15:42:49 -0800
[Message part 1 (text/plain, inline)]
Control: tags 961747 pending

On 2021-01-03, Vagrant Cascadian wrote:
> On 2020-05-28, Vagrant Cascadian wrote:
>> The example Makefile shipped in libstatgrab-dev changes depending on the
>> build path and if the system was build with a merged /usr
>> (a.k.a. usrmerge) filesystem layout.
>>
>> The attached patches fix these issues, though it might be worth
>> considering dropping the example Makefile from the package entirely; the
>> end-user would have to regenerate it themselves in order for it to be
>> functional.
>
> On further consideration, I think the better option is to ship
> Makefile.in and Makefile.am instead of the generated Makefile, allowing
> someone wishing to use the example to regenerate the Makefile to match
> thier system. Patch attached.

I have uploaded an NMU to DELAYED/10 fixing this issue:

diff -Nru libstatgrab-0.92.1/debian/changelog libstatgrab-0.92.1/debian/changelog
--- libstatgrab-0.92.1/debian/changelog	2021-12-27 22:53:19.000000000 -0800
+++ libstatgrab-0.92.1/debian/changelog	2022-12-01 15:36:31.000000000 -0800
@@ -1,3 +1,11 @@
+libstatgrab (0.92.1-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * libstatgrab-dev.examples: Install Makefile.am and Makefile.in instead
+    of Makefile. (Closes: #961747)
+
+ -- Vagrant Cascadian <vagrant@reproducible-builds.org>  Thu, 01 Dec 2022 15:36:31 -0800
+
 libstatgrab (0.92.1-1) unstable; urgency=medium
 
   * The Akamai Technologies paid volunteer days release.
diff -Nru libstatgrab-0.92.1/debian/libstatgrab-dev.examples libstatgrab-0.92.1/debian/libstatgrab-dev.examples
--- libstatgrab-0.92.1/debian/libstatgrab-dev.examples	2005-10-09 09:57:47.000000000 -0700
+++ libstatgrab-0.92.1/debian/libstatgrab-dev.examples	2022-12-01 15:36:31.000000000 -0800
@@ -1,2 +1,2 @@
 examples/*.c
-examples/Makefile
+examples/Makefile.*


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Added tag(s) pending. Request was from Vagrant Cascadian <vagrant@reproducible-builds.org> to 961747-submit@bugs.debian.org. (Thu, 01 Dec 2022 23:45:03 GMT) (full text, mbox, link).


Reply sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
You have taken responsibility. (Mon, 12 Dec 2022 00:45:03 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer. (Mon, 12 Dec 2022 00:45:03 GMT) (full text, mbox, link).


Message #22 received at 961747-close@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 961747-close@bugs.debian.org
Subject: Bug#961747: fixed in libstatgrab 0.92.1-1.1
Date: Mon, 12 Dec 2022 00:40:12 +0000
Source: libstatgrab
Source-Version: 0.92.1-1.1
Done: Vagrant Cascadian <vagrant@reproducible-builds.org>

We believe that the bug you reported is fixed in the latest version of
libstatgrab, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 961747@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vagrant Cascadian <vagrant@reproducible-builds.org> (supplier of updated libstatgrab package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 01 Dec 2022 15:36:31 -0800
Source: libstatgrab
Architecture: source
Version: 0.92.1-1.1
Distribution: unstable
Urgency: medium
Maintainer: Bartosz Fenski <fenio@debian.org>
Changed-By: Vagrant Cascadian <vagrant@reproducible-builds.org>
Closes: 961747
Changes:
 libstatgrab (0.92.1-1.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * libstatgrab-dev.examples: Install Makefile.am and Makefile.in instead
     of Makefile. (Closes: #961747)
Checksums-Sha1:
 ad38ffd1c51b89404e15fbb7f95157c7d261f87f 1494 libstatgrab_0.92.1-1.1.dsc
 95d5107a50c67ef2c14ef0223a2ff21ba9d7f5e5 4056 libstatgrab_0.92.1-1.1.debian.tar.xz
Checksums-Sha256:
 cbed53e6101b935ace6d0e6aa5a0c654bff5bed0f0ff64da443b548c5fede4fe 1494 libstatgrab_0.92.1-1.1.dsc
 5837f95175491511c5601cfcd06917eec0e34b7b2aeec4e3b02cfe8e67c73659 4056 libstatgrab_0.92.1-1.1.debian.tar.xz
Files:
 36138707752fb5ac820a6efcaf404d67 1494 libs optional libstatgrab_0.92.1-1.1.dsc
 3ea5f12b042579493bb735335c6ab72f 4056 libs optional libstatgrab_0.92.1-1.1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iJYEARYKAD4WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCY4k7cSAcdmFncmFudEBy
ZXByb2R1Y2libGUtYnVpbGRzLm9yZwAKCRDcUY/If5cWqkL/AP9+X/+URkFFws7+
1WXsIccnaKcUhuHttnRBN6gwGVeC8QEA396hpFC33GMlseTbx5XMF7M0d+LE71he
MgE7LVW9Ngg=
=+88U
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 14 Jan 2023 07:26:36 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Feb 3 11:32:15 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General 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.