From 8a328f848b1af406cd513e4766a5ed90dc2daac6 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Wed, 27 Feb 2019 20:37:32 +0100 Subject: [PATCH] export and respect SOURCE_DATE_EPOCH to improve reproducibility of pve-docs, pve-doc-generator and pve-doc-mediawiki builds, as well as man pages generated by pve-doc-generator when called via dpkg-buildpackage. timestamps embedded in the documentation now always reflect the last changelog entry of the package to which the documentation belongs (pve-docs for html, epub and pdf, individual packages for man pages). ported from pve-docs:b965ad63ad80b5967f5bc1f0327eb548b6049045 Signed-off-by: Stoiko Ivanov --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9876e37..78a7098 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,10 @@ GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${PKGREL}_${ARCH}.deb DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb +export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp) +SOURCE_DATE_HUMAN := $(shell date -d "@${SOURCE_DATE_EPOCH}") + + all: index.html .PHONY: verify-images @@ -64,7 +68,7 @@ INDEX_INCLUDES= \ man8-index-table.adoc \ $(sort $(addsuffix .html, ${MANUAL_PAGES}) ${CHAPTER_LIST}) -ADOC_STDARG=-b $(shell pwd)/asciidoc/pmg-html -f asciidoc/asciidoc-pmg.conf -a icons -a data-uri -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}" +ADOC_STDARG=-b $(shell pwd)/asciidoc/pmg-html -f asciidoc/asciidoc-pmg.conf -a icons -a data-uri -a "date=${SOURCE_DATE_HUMAN}" -a "revnumber=${DOCRELEASE}" BROWSER?=xdg-open