diff --git a/build-compare.changes b/build-compare.changes index 7986ebd..6b8871c 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon May 7 14:50:43 UTC 2012 - aj@suse.de + +- Further handling of pdf files (bnc#760867). + +------------------------------------------------------------------- +Mon May 7 11:30:28 UTC 2012 - aj@suse.de + +- Handle /ID in pdf files (bnc#760867). + ------------------------------------------------------------------- Wed Apr 4 18:25:48 UTC 2012 - reddwarf@opensuse.org diff --git a/rpm-check.sh b/rpm-check.sh index 0fc7dca..5d4f4d0 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -1,6 +1,6 @@ #! /bin/bash # -# Copyright (c) 2009, 2010, 2011 SUSE Linux Product GmbH, Germany. +# Copyright (c) 2009, 2010, 2011, 2012 SUSE Linux Product GmbH, Germany. # Licensed under GPL v2, see COPYING file for details. # # Written by Michael Matz and Stephan Coolo @@ -402,6 +402,19 @@ check_single_file() echo "Ignore $file" return 0 ;; + *pdf) + # PDF files contain a unique ID, remove it + # Format of the ID is: + # /ID [<9ACE247A70CF9BEAFEE15E116259BD6D> <9ACE247A70CF9BEAFEE15E116259BD6D>] + # pdftex creates also: + # /CreationDate (D:20120103083206Z) + # /ModDate (D:20120103083206Z) + for f in old/$file new/$file; do + sed -i -e 's%/ID \?\[ \?<[^>]\+> <[^>]\+> \?\]%/IDrandom%g' $f + sed -i -e 's%/CreationDate (D:.*)%/CreationDate (D: XXX)%g' $f + sed -i -e 's%/ModDate (D:.*)%/ModDate (D: XXX)%g' $f + done + ;; esac ftype=`/usr/bin/file old/$file | cut -d: -f2-`