diff --git a/build-compare.changes b/build-compare.changes index a6263e3..da094be 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Mar 7 11:56:28 UTC 2016 - olaf@aepfle.de + +- Whitespace in javadoc case +- Whitespace changes in html case +- Move case kde/gtk html up in the case list +- Move case rdoc html up in the case list +- Add option -a to same-build-result.sh and loop through all rpms +- Rework sorting of rpm files in same-build-result.sh +- Better diagnostic if number of subpackages changes +- Create tmpfiles earlier in same-build-result.sh +- Handle all javadoc html files + ------------------------------------------------------------------- Fri Mar 4 18:50:32 UTC 2016 - olaf@aepfle.de diff --git a/build-compare.spec b/build-compare.spec index dfc430c..208b620 100644 --- a/build-compare.spec +++ b/build-compare.spec @@ -21,7 +21,7 @@ Summary: Build Result Compare Script License: GPL-2.0+ Group: Development/Tools/Building Url: https://github.com/openSUSE/build-compare -Version: 20160304T195219.e59af35 +Version: 20160307T125659.618d059 Release: 0 Source1: COPYING Source2: same-build-result.sh diff --git a/pkg-diff.sh b/pkg-diff.sh index 771fd0a..933ee90 100644 --- a/pkg-diff.sh +++ b/pkg-diff.sh @@ -499,73 +499,85 @@ check_single_file() sed -i -e "s,POT-Creation-Date: ....-..-.. ..:..+....,POT-Creation-Date: 1970-01-01 00:00+0000," $f done ;; - /usr/share/doc/packages/*/*.html|\ - /usr/share/doc/packages/*/*/*.html|\ - /usr/share/doc/*/html/*.html|\ - /usr/share/doc/kde/HTML/*/*/*.html) - for f in old/$file new/$file; do + */rdoc/files/*.html) + # ruby documentation + # Mon Sep 20 19:02:43 +0000 2010 + for f in old/$file new/$file; do + sed -i -e 's%[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+ +0000 201[0-9]%Mon Sep 20 19:02:43 +0000 2010%g' $f + done + strip_numbered_anchors + ;; + /usr/share/doc/kde/HTML/*/*/index.cache|/usr/share/doc/kde/HTML/*/*/*/index.cache|\ + /usr/share/gtk-doc/html/*/*.html|/usr/share/gtk-doc/html/*/*.devhelp2) + # various kde and gtk packages + strip_numbered_anchors + ;; + /usr/share/doc/packages/*/*.html|\ + /usr/share/doc/packages/*/*/*.html|\ + /usr/share/doc/*/html/*.html|\ + /usr/share/doc/kde/HTML/*/*/*.html) + for f in old/$file new/$file; do sed -i -e ' - s|META NAME="Last-modified" CONTENT="[^"]\+"|META NAME="Last-modified" CONTENT="Thu Mar 3 10:32:44 2016"| - s||| - s| - # - # - # - # - sed -i -e ' - /^/{ - : next - n - /^<\/head>/{ - b end_head - } - s/^// - t next - s/^\(\)/\1 some-date-removed-by-build-compare \5/ - t next - s/^\(\)/\1 some-date-removed-by-build-compare \3/ - t next - s/^// - b next - } - : end_head + s|META NAME="Last-modified" CONTENT="[^"]\+"|META NAME="Last-modified" CONTENT="Thu Mar 3 10:32:44 2016"| + s||| + s| + # + # + # + # + sed -i -e ' + /^/{ + : next + n + /^<\/head>/{ + b end_head + } + s/^// + t next + s/^\(\)/\1 some-date-removed-by-build-compare \5/ + t next + s/^\(\)/\1 some-date-removed-by-build-compare \3/ + t next + s/^// + b next + } + : end_head + ' $f + # Gjdoc HtmlDoclet: + sed -i -e 's%Generated by Gjdoc HtmlDoclet [0-9,.]*, part of GNU Classpath Tools, on .*, 20.. [0-9]*:..:.. \(a\|p\)\.m\. GMT.%Generated by Gjdoc.%' $f + sed -i -e 's%, on [A-Z][a-z]* [0-9]*, 20?? [0-9]*:??:?? \(a|p\)\.m\. GMT.

%, on January 1, 2009 0:00:00 a.m. GMT.

%' $f + sed -i -e 's%\), on [a-zA-Z]* [0-9][0-9], 20.. [0-9]*:..:.. \(a\|p\)\.m\. GMT.

%%' $f + # deprecated-list is randomly ordered, sort it for comparison + case $f in + */deprecated-list.html) + sort -o $f $f + ;; + esac + done + ;; + /usr/share/javadoc/gjdoc.properties |\ + /usr/share/javadoc/*/gjdoc.properties) + for f in old/$file new/$file; do + sed -i -e 's|^#[A-Z][a-z]\{2\} [A-Z][a-z]\{2\} [0-9]\{2\} ..:..:.. GMT 20..$|#Fri Jan 01 11:27:36 GMT 2009|' $f + done + ;; */fonts.scale|*/fonts.dir|*/encodings.dir) for f in old/$file new/$file; do # sort files before comparing @@ -624,25 +636,12 @@ check_single_file() sed -i -e 's|built by abuild@[a-z0-9]* on ... ... [0-9]* [0-9]*:[0-9][0-9]:[0-9][0-9] .* 20[0-9][0-9]|built by abuild@build42 on Thu May 6 11:21:17 UTC 2010|' $f done ;; - /usr/share/doc/kde/HTML/*/*/index.cache|/usr/share/doc/kde/HTML/*/*/*/index.cache|\ - /usr/share/gtk-doc/html/*/*.html|/usr/share/gtk-doc/html/*/*.devhelp2) - # various kde and gtk packages - strip_numbered_anchors - ;; */created.rid) # ruby documentation # file just contains a timestamp and nothing else, so ignore it echo "Ignore $file" return 0 ;; - */rdoc/files/*.html) - # ruby documentation - # Mon Sep 20 19:02:43 +0000 2010 - for f in old/$file new/$file; do - sed -i -e 's%[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+ +0000 201[0-9]%Mon Sep 20 19:02:43 +0000 2010%g' $f - done - strip_numbered_anchors - ;; */Linux*Env.Set.sh) # LibreOffice files, contains: # Generated on: Mon Apr 18 13:19:22 UTC 2011 diff --git a/same-build-result.sh b/same-build-result.sh index d41e108..543d0ff 100644 --- a/same-build-result.sh +++ b/same-build-result.sh @@ -14,7 +14,19 @@ CMPSCRIPT=${0%/*}/pkg-diff.sh SCMPSCRIPT=${0%/*}/srpm-check.sh -check_all=1 +file1=`mktemp` +file2=`mktemp` +_x() { + rm -f ${file1} ${file2} +} +trap _x EXIT +# +if test "$1" = "-a" +then + check_all="-a" + shift +fi +# OLDDIR="$1" shift NEWDIRS="$*" @@ -32,7 +44,9 @@ fi if test `find $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm' | wc -l` != `find $OLDDIR -name '*.rpm' -and ! -name '*.delta.rpm' | wc -l`; then echo "different number of subpackages" - find $OLDDIR $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm' + find $OLDDIR -name '*.rpm' -and ! -name '*.delta.rpm' -print0 | xargs -0 rpm -qp --qf '%{NAME}\n' | sort > ${file1} + find $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm' -print0 | xargs -0 rpm -qp --qf '%{NAME}\n' | sort > ${file2} + diff -u ${file1} ${file2} exit 1 fi @@ -59,8 +73,22 @@ bash $SCMPSCRIPT "$osrpm" "$nsrpm" || exit 1 # problem: a package can contain both noarch and arch subpackages, so we have to # take care of proper sorting of NEWRPMS, e.g. noarch/x.rpm and x86_64/w.rpm since OLDRPMS # has all the packages in a single directory and would sort this as w.rpm, x.rpm. -OLDRPMS=($(find "$OLDDIR" -type f -name \*rpm -a ! -name \*src.rpm -a ! -name \*.delta.rpm|sort|grep -v -- -32bit-|grep -v -- -64bit-|grep -v -- '-x86-.*\.ia64\.rpm')) -NEWRPMS=($(find $NEWDIRS -type f -name \*rpm -a ! -name \*src.rpm -a ! -name \*.delta.rpm|sort --field-separator=/ --key=7|grep -v -- -32bit-|grep -v -- -64bit-|grep -v -- '-x86-.*\.ia64\.rpm')) +find "$OLDDIR" -type f -name '*.rpm' \ + -a ! -name '*src.rpm' \ + -a ! -name '*.delta.rpm' \ + -a ! -name '*-32bit-*' \ + -a ! -name '*-64bit-*' \ + -a ! -name '*-x86-*.ia64.rpm' \ + > ${file1} +find "$NEWDIRS" -type f -name '*.rpm' \ + -a ! -name '*src.rpm' \ + -a ! -name '*.delta.rpm' \ + -a ! -name '*-32bit-*' \ + -a ! -name '*-64bit-*' \ + -a ! -name '*-x86-*.ia64.rpm' \ + > ${file2} +OLDRPMS=($( sort --field-separator=/ --key=` sed -n '1s@[^/]@@gp' ${file1} | wc -c ` ${file1} )) +NEWRPMS=($( sort --field-separator=/ --key=` sed -n '1s@[^/]@@gp' ${file2} | wc -c ` ${file2} )) # Get version-release from first RPM and keep for rpmlint check # Remember to quote the "." for future regexes @@ -84,11 +112,7 @@ for opac in ${OLDRPMS[*]}; do echo "skipping -debuginfo package" ;; *) - bash $CMPSCRIPT "$opac" "$npac" || SUCCESS=0 - if test $SUCCESS -eq 0 -a -z "$check_all"; then - echo "differences between $opac and $npac" - exit 1 - fi + bash $CMPSCRIPT "$check_all" "$opac" "$npac" || SUCCESS=0 ;; esac done @@ -110,8 +134,6 @@ fi if test -n "$OTHERDIR"; then if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then - file1=`mktemp` - file2=`mktemp` echo "comparing $OLDDIR/rpmlint.log and $OTHERDIR/rpmlint.log" # Sort the files first since the order of messages is not deterministic # Remove release from files