From 4ab63ccd3a6ed5e11fa616fafc9915ef694e8775 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 4 Jan 2014 16:30:49 +0100 Subject: [PATCH 1/3] deterministically build crypt.pdf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This entails: • Using pdflatex to influence the modification/creation timestamp in the resulting PDF • Replacing the unique ID with 0/0 • Using the timestamp from crypt.tex instead of the current date/time See also http://superuser.com/a/130804 This change is necessary because for Multi-Arch Debian packages, non-arch-dependent files need to have the same checksum, which is not guaranteed without this commit. See http://bugs.debian.org/734109 --- makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 36e0da5..f322ebf 100644 --- a/makefile +++ b/makefile @@ -373,14 +373,24 @@ doxy: #delete it if we are rebuilding it. docs: crypt.tex rm -f doc/crypt.pdf $(LEFTOVERS) + cp crypt.tex crypt.bak + touch --reference=crypt.tex crypt.bak + (echo "\\def\\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -d @$$(stat --format=%Y crypt.tex) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > crypt-deterministic.tex + echo "\\pdfinfo{" >> crypt-deterministic.tex + echo "/CreationDate (\fixedpdfdate)" >> crypt-deterministic.tex + echo "/ModDate (\fixedpdfdate) }" >> crypt-deterministic.tex + cat crypt.tex >> crypt-deterministic.tex + mv crypt-deterministic.tex crypt.tex + touch --reference=crypt.bak crypt.tex echo "hello" > crypt.ind latex crypt > /dev/null latex crypt > /dev/null makeindex crypt.idx > /dev/null perl fixupind.pl - latex crypt > /dev/null - dvipdf crypt + pdflatex crypt + sed -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' crypt.pdf mv -ivf crypt.pdf doc/crypt.pdf + mv crypt.bak crypt.tex rm -f $(LEFTOVERS) docdvi: crypt.tex From a3811e200014c662d2cc013ebfd002fc45f56b89 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 6 Jan 2014 16:25:54 +0100 Subject: [PATCH 2/3] add -b flag to sed that enables binary processing (required on windows) --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index f322ebf..9247e86 100644 --- a/makefile +++ b/makefile @@ -388,7 +388,7 @@ docs: crypt.tex makeindex crypt.idx > /dev/null perl fixupind.pl pdflatex crypt - sed -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' crypt.pdf + sed -b -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' crypt.pdf mv -ivf crypt.pdf doc/crypt.pdf mv crypt.bak crypt.tex rm -f $(LEFTOVERS) From 460bcfe31b77a6a6667cdd3b62f5874e85b05280 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 6 Jan 2014 16:26:17 +0100 Subject: [PATCH 3/3] remove crypt.lof from the repository --- crypt.lof | 24 ------------------------ makefile | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 crypt.lof diff --git a/crypt.lof b/crypt.lof deleted file mode 100644 index ba16c2d..0000000 --- a/crypt.lof +++ /dev/null @@ -1,24 +0,0 @@ -\addvspace {10\p@ } -\addvspace {10\p@ } -\contentsline {figure}{\numberline {2.1}{\ignorespaces Load And Store Macros}}{9}{figure.2.1} -\contentsline {figure}{\numberline {2.2}{\ignorespaces Rotate Macros}}{9}{figure.2.2} -\addvspace {10\p@ } -\contentsline {figure}{\numberline {3.1}{\ignorespaces Built--In Software Ciphers}}{19}{figure.3.1} -\contentsline {figure}{\numberline {3.2}{\ignorespaces Twofish Build Options}}{21}{figure.3.2} -\addvspace {10\p@ } -\contentsline {figure}{\numberline {4.1}{\ignorespaces Built--In Software Hashes}}{59}{figure.4.1} -\addvspace {10\p@ } -\addvspace {10\p@ } -\contentsline {figure}{\numberline {6.1}{\ignorespaces List of Provided PRNGs}}{84}{figure.6.1} -\addvspace {10\p@ } -\addvspace {10\p@ } -\addvspace {10\p@ } -\contentsline {figure}{\numberline {9.1}{\ignorespaces DSA Key Sizes}}{121}{figure.9.1} -\addvspace {10\p@ } -\contentsline {figure}{\numberline {10.1}{\ignorespaces List of ASN.1 Supported Types}}{129}{figure.10.1} -\addvspace {10\p@ } -\addvspace {10\p@ } -\contentsline {figure}{\numberline {12.1}{\ignorespaces RSA/DH Key Strength}}{151}{figure.12.1} -\contentsline {figure}{\numberline {12.2}{\ignorespaces ECC Key Strength}}{151}{figure.12.2} -\addvspace {10\p@ } -\addvspace {10\p@ } diff --git a/makefile b/makefile index 9247e86..fc28c9a 100644 --- a/makefile +++ b/makefile @@ -255,7 +255,7 @@ TIMINGS=demos/timing.o TESTS=demos/test.o #Files left over from making the crypt.pdf. -LEFTOVERS=*.dvi *.log *.aux *.toc *.idx *.ilg *.ind *.out +LEFTOVERS=*.dvi *.log *.aux *.toc *.idx *.ilg *.ind *.out *.lof #Compressed filenames COMPRESSED=crypt-$(VERSION).tar.bz2 crypt-$(VERSION).zip