From 440e9c3d5dd9bb1c53b8d81a0e39ce67ef26cd78 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Wed, 9 May 2012 00:41:06 +0200 Subject: [PATCH] various changes in building techdoc.tex: - make table of contents, footnotes etc. clickable hyperlinks - use timestamp of techdoc.tex (instead of build time) as creationdate in the PDF metadata - don't include build date on first page of the PDF - make clean: - delete techdoc.out (created by pdftex) - fix deletion of techdoc.txt (was techdo_r_.txt) The initial target was to get reproduceable PDF builds (therefore the timestamp-related changes), the other things came up during discussing this patch with David Haller. The only remaining difference in the PDF from build to build is the /ID line. This line can't be controlled in pdflatex and is now filtered out by build-compare in the openSUSE build service (bnc#760867). Credits go to David Haller for writing large parts of this patch (but he didn't notice the techdo_r_.txt ;-) Signed-Off-By: Christian Boltz --- parser/Makefile | 5 +++-- parser/techdoc.tex | 14 +++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/parser/Makefile b/parser/Makefile index c5b55d558..0a3122680 100644 --- a/parser/Makefile +++ b/parser/Makefile @@ -118,7 +118,8 @@ po/${NAME}.pot: ${SRCS} ${HDRS} $(MAKE) -C po ${NAME}.pot NAME=${NAME} SOURCES="${SRCS} ${HDRS}" techdoc.pdf: techdoc.tex - while pdflatex $< ${BUILD_OUTPUT} || exit 1 ; \ + timestamp=$(shell date "+%Y%m%d%H%M%S+02'00'" -r $< );\ + while pdflatex "\def\fixedpdfdate{$$timestamp}\input $<" ${BUILD_OUTPUT} || exit 1 ; \ grep -q "Label(s) may have changed" techdoc.log; \ do :; done @@ -302,7 +303,7 @@ clean: _clean rm -f $(NAME)*.tar.gz $(NAME)*.tgz rm -f af_names.h rm -f cap_names.h - rm -rf techdoc.aux techdoc.log techdoc.pdf techdoc.toc techdor.txt techdoc/ + rm -rf techdoc.aux techdoc.out techdoc.log techdoc.pdf techdoc.toc techdoc.txt techdoc/ $(MAKE) -s -C $(AAREDIR) clean $(MAKE) -s -C po clean $(MAKE) -s -C tst clean diff --git a/parser/techdoc.tex b/parser/techdoc.tex index d7e4f9180..024e898e6 100644 --- a/parser/techdoc.tex +++ b/parser/techdoc.tex @@ -5,6 +5,17 @@ \usepackage{url} %\usepackage{times} +\usepackage[pdftex, + pdfauthor={Andreas Gruenbacher and Seth Arnold}, + pdftitle={AppArmor Technical Documentation},% +\ifx\fixedpdfdate\@empty\else + pdfcreationdate={\fixedpdfdate}, + pdfmoddate={\fixedpdfdate}, +\fi + pdfsubject={AppArmor}, + pdfkeywords={AppArmor} +]{hyperref} + \hyphenation{App-Armor} \hyphenation{name-space} @@ -14,7 +25,8 @@ \author{Andreas Gruenbacher and Seth Arnold \\ \url{{agruen,seth.arnold}@suse.de} \\ SUSE Labs / Novell} -%\date{} +% don't include the (build!) date +\date{} \begin{document}