Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #79590
| From | Vagrant Cascadian <vagrant@reproducible-builds.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#1033663: linux: reproducible-builds: Embedded build path in various binaries |
| Date | 2023-07-14 09:00 +0200 |
| Message-ID | <GRkWt-7GN-7@gated-at.bofh.it> (permalink) |
| References | <GeHt7-fYGQ-11@gated-at.bofh.it> <GeHt7-fYGQ-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
[Multipart message — attachments visible in raw view] - view raw
On 2023-03-29, Vagrant Cascadian wrote: > 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/. Any objections to me merging these patches? Prefer if they remain separate or squash them into a single patch? > 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
Back to linux.debian.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#1033663: linux: reproducible-builds: Embedded build path in various binaries Vagrant Cascadian <vagrant@reproducible-builds.org> - 2023-03-29 19:10 +0200
Bug#1033663: linux: reproducible-builds: Embedded build path in various binaries Vagrant Cascadian <vagrant@reproducible-builds.org> - 2023-07-14 09:00 +0200
Bug#1033663: linux: reproducible-builds: Embedded build path in various binaries Bastian Blank <waldi@debian.org> - 2023-07-14 09:40 +0200
Bug#1033663: linux: reproducible-builds: Embedded build path in various binaries Ben Hutchings <ben@decadent.org.uk> - 2023-07-14 15:10 +0200
Bug#1033663: linux: reproducible-builds: Embedded build path in various binaries Vagrant Cascadian <vagrant@reproducible-builds.org> - 2023-07-14 16:30 +0200
Processed: "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-03-12 23:20 +0100
Bug#1033663: James Addison <jay@jp-hosting.net> - 2024-03-12 23:20 +0100
Bug#1033663: marked as done (linux: reproducible-builds: Embedded build path in various binaries) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-10-06 19:20 +0200
csiph-web