Source: quelcom 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 in /usr/lib/quelcom: https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/quelcom.html /usr/lib/quelcom/libqextra.so /build/1st/quelcom-0.4.0/lib/qexception.cc:7 vs. /build/2/quelcom-0.4.0/2nd/lib/qexception.cc:7 The attached patches fix this by modifying the upstream makefiles to append EXTRA_CXXLAGS to CFLAGS, converting debian/rules to dh, and passing EXTRA_CXXFLAGS in debian/rules in a dh_auto_build phase. This passes the default CXXFLAGS from dpkg-buildflags, which includes the -ffile-prefix-map argument to avoid embedding the absolute path in compiled files. With these patches applied, quelcom should build reproducibly on tests.reproducible-builds.org! live well, vagrant
From 051bea5271ccb4de5a86d7dfc6e3337e8347e212 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagrant@reproducible-builds.org> Date: Fri, 13 May 2022 18:02:46 +0000 Subject: [PATCH 1/7] debian/rules: Convert to "dh". --- debian/rules | 67 ++++++++++------------------------------------------ 1 file changed, 12 insertions(+), 55 deletions(-) diff --git a/debian/rules b/debian/rules index 3c8c350..11c79ee 100755 --- a/debian/rules +++ b/debian/rules @@ -1,41 +1,16 @@ #!/usr/bin/make -f -# $Id: rules 784 2012-01-17 09:28:07Z aqua $ -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +%: + dh $@ -# To resolve shlib dependencies at runtime, we need to take the annoying step -# of wrapping the executables in a shell script that can add a private library -# path to $LD_LIBRARY_PATH, then invoke the real binary from /usr/lib/quelcom/. -# This seemed the least odious of the available options. - -build: build-stamp build-indep -build-arch: build-stamp -build-indep: build-stamp -build-stamp: - dh_testdir - # stripping is disabled during the build so that it can - # be done (or not) by dh_strip - $(MAKE) PREFIX=/usr STRIP=/bin/true - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - $(MAKE) clean +dh_clean: + dh_clean # Clean up the HTML docs rm -rf doc/quelcom doc/html - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs +override_dh_auto_install: # binaries go to /usr/lib/quelcom for use by the wrapper - $(MAKE) \ + dh_auto_install -- \ PREFIX=$(CURDIR)/debian/quelcom/usr \ INFODIR=$(CURDIR)/debian/quelcom/usr/share/info \ BINDIR=$(CURDIR)/debian/quelcom/usr/lib/quelcom \ @@ -52,30 +27,12 @@ install: build # be given a more suitable name later on mv doc/quelcom doc/html -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs ChangeLog +override_dh_installdocs: dh_installdocs README doc/html doc/quelcom.txt - dh_installexamples - dh_install - dh_installinfo + +override_dh_installman: dh_installman debian/manpages/* - dh_link - dh_strip - dh_compress - dh_fixperms - dh_makeshlibs - dh_installdeb - LD_LIBRARY_PATH="$(CURDIR)/debian/quelcom/usr/lib/quelcom" dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +override_dh_shlibdeps: + dh_shlibdeps + LD_LIBRARY_PATH="$(CURDIR)/debian/quelcom/usr/lib/quelcom" dh_shlibdeps -- 2.30.2
From 61675b60ff40aaa1c73d66ace7c82c71de0ba70f Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagrant@reproducible-builds.org> Date: Fri, 13 May 2022 18:07:26 +0000 Subject: [PATCH 2/7] Adjust makefiles to add EXTRA_CXXFLAGS to CXXFLAGS. --- bin/makefile | 2 +- lib/makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/makefile b/bin/makefile index 42fe86e..e857ea8 100644 --- a/bin/makefile +++ b/bin/makefile @@ -13,7 +13,7 @@ all: $(BINTARGETS) # if you don't want to include native language support (=get quelcom messages # in a different language than english) remove -DNLS and -DLOCALEDIR... below # -CXXFLAGS=-g -DNLS -Wall -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" -DLOCALEDIR=\"$(LOCALEDIR)\" -I./../lib +CXXFLAGS=-g -DNLS -Wall -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" -DLOCALEDIR=\"$(LOCALEDIR)\" -I./../lib $(EXTRA_CXXFLAGS) LDFLAGS=-g -lm -L./../lib diff --git a/lib/makefile b/lib/makefile index 1e87ecf..a6bd92c 100644 --- a/lib/makefile +++ b/lib/makefile @@ -7,7 +7,7 @@ all: $(LIBTARGETS) # if you don't want to include native language support (=get quelcom messages # in a different language than english) remove -DNLS below # -CXXFLAGS=-g -DNLS -Wall -fPIC +CXXFLAGS=-g -DNLS -Wall -fPIC $(EXTRA_CXXFLAGS) LDFLAGS=-g -lm MP3LIB=qmp3 qmp3frameheader qtag qreport -- 2.30.2
From cbc293a247eb26e973d5cf2f2abfaffe9f7973dd Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagrant@reproducible-builds.org> Date: Fri, 13 May 2022 18:09:59 +0000 Subject: [PATCH 3/7] debian/rules: Pass CFLAGS as EXTRA_CFLAGS in dh_auto_build override. --- debian/rules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/rules b/debian/rules index 11c79ee..22af3c6 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,9 @@ %: dh $@ +override_dh_auto_build: + dh_auto_build -- EXTRA_CXXFLAGS="$(CXXFLAGS)" + dh_clean: dh_clean # Clean up the HTML docs -- 2.30.2
Attachment:
signature.asc
Description: PGP signature