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

Bug#1010787: sgml-base-doc: reproducible builds: Build date embedded in documentation



Source: sgml-base-doc
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build date is embedded in various documentation:

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

  /usr/share/doc/sgml-base-doc/sgml_layout.html/ch-Other.html


  23·April·2022<br>
  vs.
  26·May·2023<br>


The attached patch fixes this in debian/rules by setting the
DEBIANDOC_DATE environment variable based on SOURCE_DATE_EPOCH.

Alternately, this variable could also be set to an empty value, which
results in no date of any kind.


With this patch applied, sgml-base-doc should build reproducibly on
tests.reproducible-builds.org!


Thanks for maintaining sgml-base-doc!


live well,
  vagrant
From af442a242fb76dce0fa1cbe81ff3585574ba53ed Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 10 May 2022 00:08:56 +0000
Subject: [PATCH] debian/rules: Set DEBIANDOC_DATE based on SOURCE_DATE_EPOCH.

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

diff --git a/debian/rules b/debian/rules
index 0714fa7..d3778ac 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,8 @@
 PACKAGE  = sgml-base-doc
 PKG_DOCS = sgml_layout.html sgml_layout.pdf sgml_layout.txt
 
+# Ensure reproducible date
+export DEBIANDOC_DATE = $(shell date --utc --date=@$(SOURCE_DATE_EPOCH) '+%Y-%m-%d')
 
 .SUFFIXES: .html .pdf .sgml .txt
 .sgml.html:
-- 
2.36.0

Attachment: signature.asc
Description: PGP signature


Reply to: