[pmg-devel] [PATCH pmg-docs 7/8] export and respect SOURCE_DATE_EPOCH

Stoiko Ivanov s.ivanov at proxmox.com
Wed Feb 27 20:37:32 CET 2019


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 <s.ivanov at proxmox.com>
---
 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
 
-- 
2.11.0




More information about the pmg-devel mailing list