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

Bug#1033663: marked as done (linux: reproducible-builds: Embedded build path in various binaries)



Your message dated Sun, 06 Oct 2024 17:10:12 +0000
with message-id <E1sxUlo-00D3Al-Uv@fasolo.debian.org>
and subject line Bug#1033663: fixed in linux 6.11.2-1
has caused the Debian Bug report #1033663,
regarding linux: reproducible-builds: Embedded build path in various binaries
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1033663: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033663
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: linux
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 various binaries:

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

  /usr/sbin/bpftool

  /build/1st/linux-6.1.20/tools/lib/bpf/libbpf.c:805
  vs.
  /build/2/linux-6.1.20/2nd/tools/lib/bpf/libbpf.c:805  

This *seems* like a regression from earlier versions, though I have not
tracked down when the tools started embedding the build paths...

The attached patches fix this for some of the binary packages and
corresponding dbgsym packages (bpftool, hyperv-daemons, *cpupower*) by
explicitly passing the -ffile-prefix-map argument (to avoid embedding
the build path) in the CFLAGS or EXTRA_CFLAGS variables in
debian/rules.d/.

I unsuccessfully tried applying similar patches for other tools packages
(rtla, perf, usbip) but was not able to convince the tools to take the
passed flags...

It would, of course, be better to figure out a way to get the various
tools to respect the default CFLAGS, as -ffile-prefix-map is included in
the default CFLAGS.

Unfortunately, these patches do not fix all reproducibility issues, but
applying these patches could reduce some of the noise and make it easier
to debug the remaining issues.

Thanks for maintaining linux!

live well,
  vagrant
From 7dcacfb3415c5ec4caea8933dd2c12fb401bea52 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 28 Mar 2023 14:49:01 -0700
Subject: [PATCH 1/4] debian/rules.d/tools/bpf/bpftool/Makefile: Pass
 -ffile-prefix-map via EXTRA_CFLAGS.

---
 debian/rules.d/tools/bpf/bpftool/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules.d/tools/bpf/bpftool/Makefile b/debian/rules.d/tools/bpf/bpftool/Makefile
index 17c27c104..9d3017e42 100644
--- a/debian/rules.d/tools/bpf/bpftool/Makefile
+++ b/debian/rules.d/tools/bpf/bpftool/Makefile
@@ -5,7 +5,7 @@ MAKE_BPFTOOL += prefix=/usr
 MAKE_BPFTOOL += mandir=/usr/share/man
 MAKE_BPFTOOL += V=1
 MAKE_BPFTOOL += ARCH=$(KERNEL_ARCH)
-MAKE_BPFTOOL += EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)'
+MAKE_BPFTOOL += EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS) -ffile-prefix-map=$(top_srcdir)=.'
 MAKE_BPFTOOL += EXTRA_LDFLAGS='$(LDFLAGS)'
 
 # dynamically linking with libbfd is not allowed in Debian
-- 
2.39.2

From cb11c490a41a0afbdeb00f272fa8a71cc3c69be1 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 28 Mar 2023 15:48:05 -0700
Subject: [PATCH 2/4] debian/rules.d/tools/power/cpupower/Makefile: Pass
 -ffile-prefix-map via MAKE_CPUPOWER CFLAGS.

---
 debian/rules.d/tools/power/cpupower/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules.d/tools/power/cpupower/Makefile b/debian/rules.d/tools/power/cpupower/Makefile
index e4bd5202d..28ccf7004 100644
--- a/debian/rules.d/tools/power/cpupower/Makefile
+++ b/debian/rules.d/tools/power/cpupower/Makefile
@@ -1,6 +1,6 @@
 include $(top_rulesdir)/Makefile.inc
 
-MAKE_CPUPOWER := CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) O=$(CURDIR) CPUFREQ_BENCH=false V=true mandir=/usr/share/man
+MAKE_CPUPOWER := CFLAGS='$(CFLAGS) -ffile-prefix-map=$(top_srcdir)=. $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) O=$(CURDIR) CPUFREQ_BENCH=false V=true mandir=/usr/share/man
 
 MAKE_CPUPOWER += DEBUG=$(if $(filter noopt,$(DEB_BUILD_OPTIONS)),true,)
 
-- 
2.39.2

From 2cf67982526879524548e37df0efac5f8b37e0d3 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 28 Mar 2023 16:57:01 -0700
Subject: [PATCH 3/4] debian/rules.d/tools/power/x86/*/Makefile: Add
 -ffile-prefix-map to CFLAGS.

---
 debian/rules.d/tools/power/x86/turbostat/Makefile              | 2 ++
 debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/debian/rules.d/tools/power/x86/turbostat/Makefile b/debian/rules.d/tools/power/x86/turbostat/Makefile
index eb5124d3a..019fcbde6 100644
--- a/debian/rules.d/tools/power/x86/turbostat/Makefile
+++ b/debian/rules.d/tools/power/x86/turbostat/Makefile
@@ -7,3 +7,5 @@ include $(top_rulesdir)/Makefile.inc
 CPPFLAGS += -I"$(top_srcdir)/tools/include" -DMSRHEADER='"$(top_srcdir)/arch/x86/include/asm/msr-index.h"' -DINTEL_FAMILY_HEADER='"$(top_srcdir)/arch/x86/include/asm/intel-family.h"'
 
 LDLIBS += -lcap -lrt
+
+CFLAGS += -ffile-prefix-map=$(top_srcdir)=.
diff --git a/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile b/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile
index b9ec56c89..a86da0f1e 100644
--- a/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile
+++ b/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile
@@ -5,3 +5,5 @@ installdir = /usr/sbin
 include $(top_rulesdir)/Makefile.inc
 
 CPPFLAGS += -I"$(top_srcdir)/tools/include" -DMSRHEADER='"$(top_srcdir)/arch/x86/include/asm/msr-index.h"'
+
+CFLAGS += -ffile-prefix-map=$(top_srcdir)=.
-- 
2.39.2

From 36e49dee5adf4ba4b566cb87bea35dd0158f8ff3 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 28 Mar 2023 21:44:05 -0700
Subject: [PATCH 4/4] debian/rules.d/tools/hv/Makefile: Add -ffile-prefix-map
 to CFLAGS.

---
 debian/rules.d/tools/hv/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rules.d/tools/hv/Makefile b/debian/rules.d/tools/hv/Makefile
index 5f00f5513..ed8ed967d 100644
--- a/debian/rules.d/tools/hv/Makefile
+++ b/debian/rules.d/tools/hv/Makefile
@@ -14,4 +14,6 @@ installdir = /usr/sbin
 
 include $(top_rulesdir)/Makefile.inc
 
+CFLAGS += -ffile-prefix-map=$(top_srcdir)=.
+
 endif
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: linux
Source-Version: 6.11.2-1
Done: Ben Hutchings <benh@debian.org>

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

Debian distribution maintenance software
pp.
Ben Hutchings <benh@debian.org> (supplier of updated linux 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, 06 Oct 2024 01:00:02 +0200
Source: linux
Architecture: source
Version: 6.11.2-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Changed-By: Ben Hutchings <benh@debian.org>
Closes: 1033663 1081550 1081837 1082296 1082903
Changes:
 linux (6.11.2-1) unstable; urgency=medium
 .
   * New upstream stable update:
     https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.1
     https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.11.2
 .
   [ Ben Hutchings ]
   * Revert "perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date" which is
     no longer useful
   * Fix some reproducibility issues (Closes: #1033663):
     - d/rules.real: Fix missing -ffile-prefix-map options for user-space
     - linux-perf: Remove remaining source filenames from executable
     - linux-perf: Work around gcc bug with -ffile-prefix-map and assembly
       sources
     - Documentation: Use relative source filenames in ABI documentation
     - kbuild, bpf: Fix BTF reproducibility
     - d/rules.real: Add -fdebug-prefix-map option for assembly sources in
       kernel
   * d/rules.real: Try harder to set the locale to C.UTF-8
   * udeb: Delete obsolete configuration for armel/marvell
   * udeb: Delete obsolete configuration for ide{-core,}-modules, ipv6-modules
   * udeb: Delete obsolete rtc-modules from kernel-image Provides
   * udeb: Fold i2c-modules into kernel-image (fixes FTBFS on alpha, sparc64)
   * udeb: Fold event-modules and mouse-modules into input-modules
   * udeb: Fold efi-modules into kernel-image
   * [arm64,armhf] udeb: Fold leds-modules into kernel-image
   * [amd64] udeb: Fold acpi-modules into kernel-image
   * [powerpc*] udeb: Fold fancontrol-modules into kernel-image
   * [alpha] udeb: Fold srm-modules into kernel-image
   * udeb: Fold crc-modules into kernel-image
   * [arm64,armhf] udeb: Add all watchdog drivers to kernel-image
     (Closes: #1081550)
   * Remove d/b/genorig.py in favour of uscan:
     - d/salsa-ci.yml: In extract-source, use origtagz instead of genorig.py
     - d/README.source: Document running uscan instead of genorig.py
     - d/rules: Expect orig tarballs to be in ../ and never in ../orig/
 .
   [ Salvatore Bonaccorso ]
   * net/netfilter/ipvs: Enable IP_VS_TWOS as module (Closes: #1082903)
   * libcpupower: Update symbols file for changes in 6.11.2-1~exp1.
 .
   [ Josua Mayer ]
   * [arm64] Enable drivers for AM64 SoC on HummingBoard-T (Closes: #1081837)
   * [arm64] udeb: Add kernel modules for I2C, USB and Ethernet on TI AM64
   * [arm64] udeb: Add kernel modules for RTC
 .
   [ Jair Gonzalez ]
   * [amd64] arch/x86: Enable CONFIG_ADDRESS_MASKING
     (Linear Address Masking support) (Closes: #1082296)
 .
   [ Uwe Kleine-König ]
   * [armhf] Enable support for GPIOs, i2c, spi and G-sensor for Terasic's
     DE10-nano board.
Checksums-Sha1:
 d54c19c850d5e4fa8002f96241c473b13d01b11a 204440 linux_6.11.2-1.dsc
 8ed4fbba100c1cdbebdc84f1f2a5853c82444d9a 149878272 linux_6.11.2.orig.tar.xz
 aa4df08554bf8ba2e8c5a76b987a30b24b0ac574 1578116 linux_6.11.2-1.debian.tar.xz
 a7ac2fdbe352f7e02fdcae0d0d02bbe3c066aeb0 8367 linux_6.11.2-1_source.buildinfo
Checksums-Sha256:
 ebb12ab170bd55662f788a6d47fcc2a7d3e7a7c50c201f07aebf7c8492a0153f 204440 linux_6.11.2-1.dsc
 fc2fd8334f3c9fc8246aae523df6a7326472608574dcd1bc454498de148bc148 149878272 linux_6.11.2.orig.tar.xz
 a95b377ec756b729ca6f26ad5ec4568c312af311a130a2ec824041b1197d9a7c 1578116 linux_6.11.2-1.debian.tar.xz
 7f142a701fe3ade29c5cba847f92f06ccffd6e1798c22b27619eaf9efad31913 8367 linux_6.11.2-1_source.buildinfo
Files:
 153aa6a395394521ab92a6bea67a0cb5 204440 kernel optional linux_6.11.2-1.dsc
 87290b9e10d0d93585ae2d501bae442b 149878272 kernel optional linux_6.11.2.orig.tar.xz
 79244d54eb4de2063de22b7b4f7e91d5 1578116 kernel optional linux_6.11.2-1.debian.tar.xz
 bd9ec28d0f12c098e263b25565179f89 8367 kernel optional linux_6.11.2-1_source.buildinfo

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

iQIzBAEBCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAmcCsX0ACgkQ57/I7JWG
EQnZZQ//fhddOXIPia6m5yykH+EfOv3oFw0XA0wPbXiV3q7ibS+8p0RbqKf+m+HJ
XEd/oosFdwRdhA8mFYIV0GTxtVMlcKwGMk+4egvqsq27FWN0fqr+c/klHB3BfG4Q
qDGPfRP8Bil0aO2HXMMF0BU4svTd884KewgGgOGiTMiwEFjqNLKRLOVEAfHgFl+w
oETJTa6zixfgZwawJ+ANmhc5BJo4A6wCNz8uxpE+TsBhhG0+TbqJnwrHEMegTM7V
Z0UgngOzwIrIsVOeTNY+lpmPiKpt0WK/qB+DC1kXxUTjSK4TwtEMLzSTnNYoZztR
zdS1U0oiEIxae7u66xwJoomhUH7LwcEAGM211xMa1wO2BayZMlYvDyBP4eTZGM4B
NZqicGHEqAoz6oLcjxqpYME9ScKGFyHQhJLaIvhMEMgrXl8ytPSUivHeJ7wbJAH4
xgOpRBT2PmK2l0FJTReFEon6O+4o4n3tx6nKTkchmj885IPW+GqYh2tI8xIr+A4R
Jkk0rIKTw21rWvMdwhjy5w7jTFewwr3uuDigoiSRkf5zkcgQFXDITmB2XaAV9TkA
M4/8NdKniS1KgSiDZcZrY4OavFL8PQhTd5GzTWxCkSY0pL/AxaoNHuQApsTo9RPu
mrlJXwWP0e/kDHHIMEy6GFQMLTje2CE5Kg36OrpVWvtQYsBte7k=
=c2XJ
-----END PGP SIGNATURE-----

Attachment: pgp9RUvu6V1AH.pgp
Description: PGP signature


--- End Message ---

Reply to: