diff mbox series

[bug#70169,v3,12/13] maint: Reset CreationDate metadata on generated PDFs.

Message ID de5018de13345e9e5db5d67cde5731c942bd9ae1.1712600307.git.janneke@gnu.org
State New
Headers show
Series Reproducible `make dist' tarball in defiance of Autotools and Gettext | expand

Commit Message

Janneke Nieuwenhuizen April 8, 2024, 6:46 p.m. UTC
* doc/local.mk (.dot.pdf): Create PDF in UTC0 and reset CreationDate metadata.

Change-Id: I3873ecdeec781c30874d53d032406cbe23922a25
---
 doc/local.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/doc/local.mk b/doc/local.mk
index 569d20c5cb..72f80bb511 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -148,7 +148,11 @@  DOT_OPTIONS =					\
 	$(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.pdf:
-	$(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	$(AM_V_DOT)set -e; export TZ=UTC0;				\
+	    $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	$(AM_V_at)sed -ri					\
+	    -e 's,(/CreationDate \(D:).*\),\119700101000000),'	\
+	    "$(srcdir)/$@.tmp"
 	$(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.eps: