Source: cyrus-sasl2
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Timestamps are embedded in man pages generated by sphinx:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/i386/diffoscope-results/cyrus-sasl2.html

  /usr/share/man/man3/sasl.3.gz

  .TH·"SASL"·"3"·"August·23,·2022"·"2.1.27"·"Cyrus·SASL"
  vs.
  .TH·"SASL"·"3"·"July·22,·2021"·"2.1.27"·"Cyrus·SASL"

The attached patch fixes this by passing a specific date during the
build, using SOURCE_DATE_EPOCH defined from debian/changelog.

With this patch applied cyrus-sasl2 should become reproducible on
tests.reproducible-builds.org.


Thanks for maintaining cyrus-sasl2!


live well,
  vagrant
From 2591a38f60f182898679f2a6f5f7f17e72009fc6 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Mon, 27 Sep 2021 01:27:09 +0000
Subject: [PATCH 2/2] Makefile.am: Set date in man pages.

The build date is embedded in the man pages by default. Pass arguments
to sphinx to use the date defined in SOURCE_DATE_EPOCH.

https://reproducible-builds.org/docs/source-date-epoch/
---
 Makefile.am | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 25694a8..c2a86fc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -180,6 +180,12 @@ GENERATED_RSTS =
 
 SPHINX_OPTS = -d $(SPHINX_CACHE) -n -q
 
+# Pass date defined in SOURCE_DATE_EPOCH for reproducible builds:
+# https://reproducible-builds.org/docs/source-date-epoch/
+SOURCE_DATE_EPOCH ?= $(shell date -d "$$(dpkg-parsechangelog -S Date)" +%s)
+BUILD_DATE=$(shell LC_ALL=C date -u --iso-8601 -d "@$(SOURCE_DATE_EPOCH)")
+SPHINX_OPTS += -D today=$(BUILD_DATE)
+
 ## detect when source directory is not build directory (i.e. VPATH
 ## build), and clone the docsrc tree into the build directory, so
 ## that we have a single "source directory" for sphinx-build to use.
-- 
2.33.0

Attachment: signature.asc
Description: PGP signature

Reply via email to