2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 10:07:12 +00:00

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 <apparmor@cboltz.de>
This commit is contained in:
Christian Boltz 2012-05-09 00:41:06 +02:00
parent 1db463f4de
commit 440e9c3d5d
2 changed files with 16 additions and 3 deletions

View File

@ -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

View File

@ -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}