Bug#1033663: linux: reproducible-builds: Embedded build path in various binaries

Vagrant Cascadian vagrant at reproducible-builds.org
Wed Mar 29 17:58:57 BST 2023


Source: linux
Severity: normal
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-rules.d-tools-bpf-bpftool-Makefile-Pass-ffile.patch
Type: text/x-diff
Size: 1006 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20230329/b1eeb47a/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-debian-rules.d-tools-power-cpupower-Makefile-Pass-ff.patch
Type: text/x-diff
Size: 1088 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20230329/b1eeb47a/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-debian-rules.d-tools-power-x86-Makefile-Add-ffile-pr.patch
Type: text/x-diff
Size: 1575 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20230329/b1eeb47a/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-debian-rules.d-tools-hv-Makefile-Add-ffile-prefix-ma.patch
Type: text/x-diff
Size: 678 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20230329/b1eeb47a/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20230329/b1eeb47a/attachment.sig>


More information about the Reproducible-bugs mailing list