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

Bug#983902: sendmail: reproducible builds: embeds build path in site.config.m4 documentation files



Source: sendmail
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 the site.config.m4 files shipped in the
documentation of sendmail-doc and sendmail-base packages:

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

  /usr/share/doc/sendmail-base/site.config.m4.gz

  define(`confOPTIMIZE',··`-g·-O2·-ffile-prefix-map=/build/1st/sendmail-8.15.2=.·-fstack-pro..
  vs.
  define(`confOPTIMIZE',··`-g·-O2·-ffile-prefix-map=/build/2/sendmail-8.15.2/2nd=.·-fstack-pro...


The attached patch fixes this by replacing the build path with
"BUILDPATH" in debian/rules before installing the documentation.

With this patch applied, sendmail should become reproducible.


Thanks for maintaining sendmail!


live well,
  vagrant
From 3d28d581a7b6de3be07e13b75b093f535bb71a41 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Wed, 3 Mar 2021 02:17:36 +0000
Subject: [PATCH] debian/rules: Avoid embedding the build path in
 site.config.m4.

The site.config.m4 file is shipped in sendmail-doc and sendmail-base,
but should have the build path removed in the shipped file.

https://tests.reproducible-builds.org/debian/issues/unstable/records_build_flags_issue.html
---
 debian/rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rules b/debian/rules
index 0c4fe82..f7b2405 100755
--- a/debian/rules
+++ b/debian/rules
@@ -203,6 +203,8 @@ override_dh_auto_install-arch:
 	#--------------------------------------------------------------------
 
 override_dh_installdocs-indep:
+	# Avoid recording the build path in the documentation
+	sed -i -e "s,prefix-map=$(CURDIR),prefix-map=BUILDPATH,g" debian/build/site.config.m4
 	dh_installdocs -p${DEB_SOURCE_PACKAGE}-doc --doc-main-package=${DEB_SOURCE_PACKAGE}-doc -A $(DEB_SRCDIR)/README
 	dh_installdocs -N${DEB_SOURCE_PACKAGE}-doc -A $(DEB_SRCDIR)/README
 
-- 
2.30.1

Attachment: signature.asc
Description: PGP signature


Reply to: