Source: debian-history Severity: normal Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps timezone X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Several .pdf, .html, .txt and .epub files shipped in debian-history embed the build date: https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/amd64/diffoscope-results/debian-history.html /usr/share/doc/debian-history/docs/project-history.es.pdf 40 11·de·diciembre 40 9·de·noviembre 41 de·2021 41 de·2020 The two attached patches fix these issues, one by setting PUBDATE to use UTC in debian/rules, and the other by setting FORCE_SOURCE_DATE=1 in debian/rules, which texlive needs in order to respect SOURCE_DATE_EPOCH, which is set during debian package builds to the timestamp in the latest debian/changelog entry. https://reproducible-builds.org/docs/source-date-epoch/ These patches unfortunately do not fix all reproducibility issues in debian-history; There are randomized bookid identifiers in the .epub files I have not yet figured out how to fix, but will make it a little easier to debug the remaining issues once the patches are applied. live well, vagrant
From bbbb34abded4cd0e9206eef2ac9cd0215a0ed5d1 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagr...@debian.org> Date: Thu, 3 Dec 2020 14:06:34 -0800 Subject: [PATCH 1/2] debian/rules: Use UTC for PUBDATE. Without this, the timezone of the system can result in unreproducible builds. https://reproducible-builds.org/docs/timezones/ --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 2cdebb8..b4e2c2a 100755 --- a/debian/rules +++ b/debian/rules @@ -8,7 +8,7 @@ include /usr/share/dpkg/pkg-info.mk # version of this Debian package (debian/changelog) PUBVERSION := $(DEB_VERSION) # short date of this Debian package (debian/changelog) -PUBDATE := $(shell { date +'%Y-%m-%d' -d"@$(SOURCE_DATE_EPOCH)" ; }) +PUBDATE := $(shell { date +'%Y-%m-%d' --utc -d"@$(SOURCE_DATE_EPOCH)" ; }) export PUBVERSION export PUBDATE -- 2.20.1
From 33f260b5e63dbad4886c79616b48c415a4b292cb Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagr...@debian.org> Date: Thu, 3 Dec 2020 14:09:53 -0800 Subject: [PATCH 2/2] debian/rules: Set FORCE_SOURCE_DATE=1 in order for texlive to respect SOURCE_DATE_EPOCH for reproducible timestamps. https://reproducible-builds.org/docs/source-date-epoch/ --- debian/rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/rules b/debian/rules index b4e2c2a..92d5d65 100755 --- a/debian/rules +++ b/debian/rules @@ -12,6 +12,8 @@ PUBDATE := $(shell { date +'%Y-%m-%d' --utc -d"@$(SOURCE_DATE_EPOCH)" ; }) export PUBVERSION export PUBDATE +# Needed for texlive to respect SOURCE_DATE_EPOCH when setting date +export FORCE_SOURCE_DATE=1 ## ---------------------------------------------------------------------- ## uncomment this to turn on verbose mode -- 2.20.1
signature.asc
Description: PGP signature