Debian Bug report logs - #1021893
device-tree-compiler: reproducible builds: Embeds build time in in various binaries

version graph

Package: src:device-tree-compiler; Maintainer for src:device-tree-compiler is Héctor Orón Martínez <zumbi@debian.org>;

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

Date: Sun, 16 Oct 2022 18:33:01 UTC

Severity: normal

Tags: patch

Fixed in version device-tree-compiler/1.6.1-4

Done: Vagrant Cascadian <vagrant@debian.org>

Bug is archived. No further changes may be made.

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, Héctor Orón Martínez <zumbi@debian.org>:
Bug#1021893; Package src:device-tree-compiler. (Sun, 16 Oct 2022 18:33: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, Héctor Orón Martínez <zumbi@debian.org>. (Sun, 16 Oct 2022 18:33: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: device-tree-compiler: reproducible builds: Embeds build time in in various binaries
Date: Sun, 16 Oct 2022 11:29:04 -0700
[Message part 1 (text/plain, inline)]
Source: device-tree-compiler
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build time is embedded in various binaries:

  https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/device-tree-compiler.html

  /usr/bin/convert-dtsv0

  /build/1st/device-tree-compiler-1.6.1/srcpos.c:101
  vs.
  /build/2/device-tree-compiler-1.6.1/2nd/srcpos.c:101

The attached patch to debian/rules fixes this by passing the default
CFLAGS via EXTRA_CFLAGS, which includes the -ffile-prefix-map compiler
option.

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

Thanks for maintaining device-tree-compiler!

live well,
  vagrant
[0001-debian-rules-Pass-default-CFLAGS-via-EXTRA_CFLAGS.patch (text/x-diff, inline)]
From 77ddff89156eb55a550238a490e58023476c8efa Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sun, 16 Oct 2022 18:02:45 +0000
Subject: [PATCH] debian/rules: Pass default CFLAGS via EXTRA_CFLAGS.

commit 13c4c940e65039052b5be499a848aaa9ffaffaa7 "Enable pylibfdt build
(Closes: #877125)" introduced a regression by removing the default CFLAGS.

This triggered reproducible builds issues with embedded build paths,
because -ffile-prefix-map was no longer getting passed to the
compiler.

The pylibfdt build system ignores CFLAGS, but respects EXTRA_CFLAGS,
so pass all CFLAGS via EXTRA_CFLAGS.
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index b146728..5aae1d5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,7 +15,7 @@ export CC = $(DEB_HOST_GNU_TYPE)-gcc
 endif
 
 include /usr/share/dpkg/buildflags.mk
-EXTRA_CFLAGS = -Wno-error
+EXTRA_CFLAGS = $(CFLAGS) -Wno-error
 CPPFLAGS += -I libfdt -I .
 
 %:
-- 
2.37.2

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

Information forwarded to debian-bugs-dist@lists.debian.org, Héctor Orón Martínez <zumbi@debian.org>:
Bug#1021893; Package src:device-tree-compiler. (Sun, 16 Oct 2022 19:24:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Extra info received and forwarded to list. Copy sent to Héctor Orón Martínez <zumbi@debian.org>. (Sun, 16 Oct 2022 19:24:04 GMT) (full text, mbox, link).


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

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: 1021893@bugs.debian.org
Subject: Re: device-tree-compiler: reproducible builds: Embeds build time in in various binaries
Date: Sun, 16 Oct 2022 12:21:26 -0700
[Message part 1 (text/plain, inline)]
Control: tags 1021893 pending

On 2022-10-16, Vagrant Cascadian wrote:
> The build time is embedded in various binaries:
>
>   https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/device-tree-compiler.html
>
>   /usr/bin/convert-dtsv0
>
>   /build/1st/device-tree-compiler-1.6.1/srcpos.c:101
>   vs.
>   /build/2/device-tree-compiler-1.6.1/2nd/srcpos.c:101
>
> The attached patch to debian/rules fixes this by passing the default
> CFLAGS via EXTRA_CFLAGS, which includes the -ffile-prefix-map compiler
> option.
...
> From: Vagrant Cascadian <vagrant@reproducible-builds.org>
> Date: Sun, 16 Oct 2022 18:02:45 +0000
> Subject: [PATCH] debian/rules: Pass default CFLAGS via EXTRA_CFLAGS.

Pushed to git:

  https://salsa.debian.org/crosstoolchain-team/device-tree-compiler/-/commit/95182ef710c6027f1d9796b0fb3124b43bead2e7

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

Added tag(s) pending. Request was from Vagrant Cascadian <vagrant@reproducible-builds.org> to 1021893-submit@bugs.debian.org. (Sun, 16 Oct 2022 19:24:04 GMT) (full text, mbox, link).


Reply sent to Vagrant Cascadian <vagrant@debian.org>:
You have taken responsibility. (Sun, 16 Oct 2022 21:36:03 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer. (Sun, 16 Oct 2022 21:36:03 GMT) (full text, mbox, link).


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

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 1021893-close@bugs.debian.org
Subject: Bug#1021893: fixed in device-tree-compiler 1.6.1-4
Date: Sun, 16 Oct 2022 21:34:20 +0000
Source: device-tree-compiler
Source-Version: 1.6.1-4
Done: Vagrant Cascadian <vagrant@debian.org>

We believe that the bug you reported is fixed in the latest version of
device-tree-compiler, 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 1021893@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vagrant Cascadian <vagrant@debian.org> (supplier of updated device-tree-compiler 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: Sun, 16 Oct 2022 14:10:24 -0700
Source: device-tree-compiler
Architecture: source
Version: 1.6.1-4
Distribution: unstable
Urgency: medium
Maintainer: Héctor Orón Martínez <zumbi@debian.org>
Changed-By: Vagrant Cascadian <vagrant@debian.org>
Closes: 1021893
Changes:
 device-tree-compiler (1.6.1-4) unstable; urgency=medium
 .
   * debian/rules: Pass default CFLAGS via EXTRA_CFLAGS. (Closes: #1021893)
     Fixes reproducible builds with differing build paths.
   * debian/control: Update Standards-Version to 4.6.1.
Checksums-Sha1:
 80ae6b7ed13ec5d8801bde0f6f366244b24e4aea 1881 device-tree-compiler_1.6.1-4.dsc
 e4b0690f609cfc40d723b9c309f1cf5df3b85f3a 15820 device-tree-compiler_1.6.1-4.debian.tar.xz
 d42d0f912c0169ffbddb890ba885f7094ad0d501 10167 device-tree-compiler_1.6.1-4_arm64.buildinfo
Checksums-Sha256:
 07ce787cb26d0bce7ec12c745b592bd98c6a5b21cf4fc8a1a657c2d75b14e61d 1881 device-tree-compiler_1.6.1-4.dsc
 dfed92335802cfad4903a79f817eaa40b00a8e8795700ba623420e3115db3925 15820 device-tree-compiler_1.6.1-4.debian.tar.xz
 8ac4143e861af036d5d40b6f88d50709c63d41fc012f79b45da9ccc4194120fe 10167 device-tree-compiler_1.6.1-4_arm64.buildinfo
Files:
 493948e61ea619c7378eec243291bed7 1881 devel optional device-tree-compiler_1.6.1-4.dsc
 d43dcd08c72464cb4c1bee1f16f69c71 15820 devel optional device-tree-compiler_1.6.1-4.debian.tar.xz
 33d369fe9a4f013066eca0e77a6c5568 10167 devel optional device-tree-compiler_1.6.1-4_arm64.buildinfo

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

iIkEARYKADEWIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCY0x1/xMcdmFncmFudEBk
ZWJpYW4ub3JnAAoJENxRj8h/lxaq6H8BANvLk3I+0oAnM5oSKzCSO31pi1epiSSM
PVaIt5gsehYrAP0fTnIVJU0Q/E49dqYSqK68K5WBLx3JJlCH3nc2iLzgAQ==
=aJ6z
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 19 Nov 2022 07:29:55 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: Wed May 17 12:43:52 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.