Source: convlit Severity: normal Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: buildpath X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
The build path is embedded in /usr/bin/clit: https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/convlit.html /build/1st/convlit-1.8/clit18/clit.c:109 vs. /build/2/convlit-1.8/2nd/clit18/clit.c:109 The first patch fixes this by passing -ffile-prefix-map to CFLAGS in debian/rules, which avoids embedding the build paths in the binaries. The second patch fixes this by completing the transition to the dh build system, which includes -ffile-prefix-map in CFLAGS by default. With these patches applied, convlit should build reproducibly on tests.reproducible-builds.org! live well, vagrant
From 3aaf27ae4627bcc32dd6e7c877f2e16891808f20 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagr...@reproducible-builds.org> Date: Mon, 16 May 2022 21:31:09 +0000 Subject: [PATCH 1/2] debian/rules: Pass -ffile-prefix-map in CFLAGS to avoid embedding build paths. https://reproducible-builds.org/docs/build-path/ --- debian/rules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/rules b/debian/rules index 60c65ac..d18f93e 100755 --- a/debian/rules +++ b/debian/rules @@ -17,6 +17,10 @@ ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) else CFLAGS += -O2 endif + +# Avoid embedding the build path for reproducible builds +CFLAGS += -ffile-prefix-map=$(CURDIR)=. + export CFLAGS -- 2.35.1
From 55cac9ca7525b81f670c5ee7df8b6145370aa8cd Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagr...@reproducible-builds.org> Date: Mon, 16 May 2022 21:36:05 +0000 Subject: [PATCH 2/2] debian/rules: Finish conversion to dh. --- debian/rules | 61 +++++++--------------------------------------------- 1 file changed, 8 insertions(+), 53 deletions(-) diff --git a/debian/rules b/debian/rules index d18f93e..40ffb83 100755 --- a/debian/rules +++ b/debian/rules @@ -11,59 +11,14 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ -CFLAGS := -Wall -g -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif +override_dh_auto_build: + dh_auto_build --sourcedir=$(CURDIR)/lib + dh_auto_build --sourcedir=$(CURDIR)/clit18 -# Avoid embedding the build path for reproducible builds -CFLAGS += -ffile-prefix-map=$(CURDIR)=. +override_dh_auto_clean: + dh_auto_clean --sourcedir=$(CURDIR)/clit18 + dh_auto_clean --sourcedir=$(CURDIR)/lib + dh_auto_clean -export CFLAGS - - -build: build-stamp -build-stamp: - dh_testdir - $(MAKE) -C $(CURDIR)/lib - $(MAKE) -C $(CURDIR)/clit18 - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - $(MAKE) -C $(CURDIR)/clit18 clean - $(MAKE) -C $(CURDIR)/lib clean - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_install - -binary-indep: -# do nothing - -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples +override_dh_installman: dh_installman debian/clit.1 - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install -- 2.35.1
signature.asc
Description: PGP signature