forked from pool/build-compare
This commit is contained in:
parent
a55ee69057
commit
5185dca9cb
@ -1,3 +1,28 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 23 15:30:30 CEST 2009 - aj@suse.de
|
||||
|
||||
- Update version number.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 21 16:41:39 CEST 2009 - aj@suse.de
|
||||
|
||||
- Handle emacs bytecompiled files.
|
||||
- Handle /usr/share/man/man3/*3pm perl man pages.
|
||||
- Handle /var/adm/perl-modules/*.
|
||||
- Handle fonts.dir, fonts.scale and encoding.dir.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 21 13:02:36 CEST 2009 - aj@suse.de
|
||||
|
||||
- Add return value for .a case so that it can succeed.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 20 15:50:46 CEST 2009 - aj@suse.de
|
||||
|
||||
- Fix typo in same-build-results.sh
|
||||
- Ignore javadoc build stamp in javadoc html files.
|
||||
- Use jar,fastjar or unzip to extract jar files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 15 13:31:30 CEST 2009 - coolo@novell.com
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package build-compare (Version 2009.01.27)
|
||||
# spec file for package build-compare (Version 2009.07.23)
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -23,8 +23,8 @@ License: GPL v2 or later
|
||||
Group: Development/Tools/Building
|
||||
AutoReqProv: on
|
||||
Summary: Build Result Compare Script
|
||||
Version: 2009.01.27
|
||||
Release: 10
|
||||
Version: 2009.07.23
|
||||
Release: 1
|
||||
Source: same-build-result.sh
|
||||
Source1: rpm-check.sh
|
||||
Source2: COPYING
|
||||
|
124
rpm-check.sh
124
rpm-check.sh
@ -4,7 +4,8 @@
|
||||
# Licensed under GPL v2, see COPYING file for details.
|
||||
#
|
||||
# Written by Michael Matz and Stephan Coolo
|
||||
#
|
||||
# Enhanced by Andreas Jaeger
|
||||
|
||||
RPM="rpm -qp --nodigest --nosignature"
|
||||
|
||||
check_all=
|
||||
@ -32,6 +33,62 @@ if test ! -f $newrpm; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#usage unjar <file>
|
||||
function unjar()
|
||||
{
|
||||
local file
|
||||
file=$1
|
||||
|
||||
if [[ $(type -p fastjar) ]]; then
|
||||
UNJAR=fastjar
|
||||
elif [[ $(type -p jar) ]]; then
|
||||
UNJAR=jar
|
||||
elif [[ $(type -p unzip) ]]; then
|
||||
UNJAR=unzip
|
||||
else
|
||||
echo "ERROR: jar, fastjar, or unzip is not installed (trying file $file)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $UNJAR in
|
||||
jar|fastjar)
|
||||
# echo jar -xf $file
|
||||
${UNJAR} -xf $file
|
||||
;;
|
||||
unzip)
|
||||
unzip -oqq $file
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# list files in directory
|
||||
#usage unjar_l <file>
|
||||
function unjar_l()
|
||||
{
|
||||
local file
|
||||
file=$1
|
||||
|
||||
if [[ $(type -p fastjar) ]]; then
|
||||
UNJAR=fastjar
|
||||
elif [[ $(type -p jar) ]]; then
|
||||
UNJAR=jar
|
||||
elif [[ $(type -p unzip) ]]; then
|
||||
UNJAR=unzip
|
||||
else
|
||||
echo "ERROR: jar, fastjar, or unzip is not installed (trying file $file)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $UNJAR in
|
||||
jar|fastjar)
|
||||
${UNJAR} -tf $file
|
||||
;;
|
||||
unzip)
|
||||
unzip -l $file
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
filter_disasm()
|
||||
{
|
||||
sed -e 's/^ *[0-9a-f]\+://' -e 's/\$0x[0-9a-f]\+/$something/' -e 's/callq *[0-9a-f]\+/callq /' -e 's/# *[0-9a-f]\+/# /' -e 's/\(0x\)\?[0-9a-f]\+(/offset(/' -e 's/[0-9a-f]\+ </</' -e 's/^<\(.*\)>:/\1:/' -e 's/<\(.*\)+0x[0-9a-f]\+>/<\1 + ofs>/'
|
||||
@ -175,6 +232,7 @@ check_single_file()
|
||||
echo "mono files unhandled ($file)"
|
||||
return 1;;
|
||||
*.a)
|
||||
echo "$file is .a"
|
||||
flist=`ar t new/$file`
|
||||
pwd=$PWD
|
||||
fdir=`dirname $file`
|
||||
@ -188,6 +246,7 @@ check_single_file()
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
;;
|
||||
*.tar|*.tar.bz2|*.tar.gz|*.tgz|*.tbz2)
|
||||
flist=`tar tf new/$file`
|
||||
@ -210,10 +269,10 @@ check_single_file()
|
||||
return $ret;;
|
||||
*.zip|*.jar)
|
||||
cd old
|
||||
unzip -l ./$file > flist
|
||||
unjar_l ./$file > flist
|
||||
sed -i -e "s, [0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] , date ," flist
|
||||
cd ../new
|
||||
unzip -l ./$file > flist
|
||||
unjar_l ./$file > flist
|
||||
sed -i -e "s, [0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] , date ,; " flist
|
||||
cd ..
|
||||
if ! cmp -s old/flist new/flist; then
|
||||
@ -225,9 +284,9 @@ check_single_file()
|
||||
pwd=$PWD
|
||||
fdir=`dirname $file`
|
||||
cd old/$fdir
|
||||
unzip -o -qq `basename $file`
|
||||
unjar `basename $file`
|
||||
cd $pwd/new/$fdir
|
||||
unzip -o -qq `basename $file`
|
||||
unjar `basename $file`
|
||||
cd $pwd
|
||||
local ret=0
|
||||
for f in $flist; do
|
||||
@ -256,8 +315,59 @@ check_single_file()
|
||||
return $?
|
||||
;;
|
||||
/usr/share/locale/*/LC_MESSAGES/*.mo|/usr/share/locale-bundle/*/LC_MESSAGES/*.mo)
|
||||
sed -i -e "s,POT-Creation-Date: ....-..-.. ..:..+....,POT-Creation-Date: 1970-01-01 00:00+0000," old/$file
|
||||
sed -i -e "s,POT-Creation-Date: ....-..-.. ..:..+....,POT-Creation-Date: 1970-01-01 00:00+0000," new/$file
|
||||
for f in old/$file new/$file; do
|
||||
sed -i -e "s,POT-Creation-Date: ....-..-.. ..:..+....,POT-Creation-Date: 1970-01-01 00:00+0000," $f
|
||||
done
|
||||
;;
|
||||
/usr/share/javadoc/*/*.html|/usr/share/javadoc/*/*/*.html)
|
||||
# There are more timestamps in html, so far we handle only some primitive versions.
|
||||
for f in old/$file new/$file; do
|
||||
# Javadoc:
|
||||
sed -i -e "s,^<!-- Generated by javadoc (build .......) on ... ... .. ..:..:.. UTC .... -->,^<!-- Generated by javadoc (build 1.6.0_0) on Sun Jul 01 00:00:00 UTC 2000 -->," $f
|
||||
sed -i -e 's|^<!-- Generated by javadoc on ... ... .. ..:..:.. UTC ....-->$|<!-- Generated by javadoc on Sun Jul 01 00:00:00 UTC 2000-->|' $f
|
||||
sed -i -e 's|<META NAME="date" CONTENT="20..-..-..">|<META NAME="date" CONTENT="1970-01-01">|' $f
|
||||
# Gjdoc HtmlDoclet:
|
||||
sed -i -e 's|Generated by Gjdoc HtmlDoclet 0...., part of <a href="http://www.gnu.org/software/classpath/cp-tools/" title="" target="_top">GNU Classpath Tools</a>, on .* .., 20.. ..:..:.. ..m. GMT.|Generated by Gjdoc.|' $f
|
||||
done
|
||||
;;
|
||||
*/fonts.scale|*/fonts.dir|*/encodings.dir)
|
||||
for f in old/$file new/$file; do
|
||||
# sort files before comparing
|
||||
sort $f > $f.tmp
|
||||
mv $f.tmp $f
|
||||
done
|
||||
;;
|
||||
/var/adm/perl-modules/*)
|
||||
for f in old/$file new/$file; do
|
||||
sed -i -e 's|^=head2 ... ... .. ..:..:.. ....: C<Module>|=head2 Wed Jul 1 00:00:00 2009: C<Module>|' $f
|
||||
done
|
||||
;;
|
||||
/usr/share/man/man3/*3pm)
|
||||
for f in old/$file new/$file; do
|
||||
sed -i -e 's| 3 "20..-..-.." "perl v5....." "User Contributed Perl Documentation"$| 3 "2009-01-01" "perl v5.10.0" "User Contributed Perl Documentation"|' $f
|
||||
done
|
||||
;;
|
||||
*.elc)
|
||||
# emacs lisp files
|
||||
for f in old/$file new/$file; do
|
||||
sed -i -e 's|Compiled by abuild@.* on ... ... .. ..:..:.. 20..$|compiled by abuild@buildhost on Wed Jul 01 00:00:00 2009|' $f
|
||||
done
|
||||
;;
|
||||
/var/lib/texmf/web2c/*/*fmt)
|
||||
# same of these are gzip compressed
|
||||
for f in old/$file new/$file; do
|
||||
fftype=`/usr/bin/file $f | cut -d: -f2-`
|
||||
case $fftype in
|
||||
*gzip\ compressed\ data*)
|
||||
gunzip -cd $f > $f.tmp
|
||||
mv $f.tmp $f
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
# date is of variable length, e.g. 2009.7.21
|
||||
sed -i -e 's|(format=[a-z]*tex 20..\.[0-9]*\.[0-9]*)|(format=luatex 2009.1.1)|' $f
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -72,6 +72,6 @@ if [ -n "${NEWRPMS[0]}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo compare validated built as indentical !
|
||||
echo compare validated built as identical !
|
||||
exit 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user