forked from pool/build-compare
Accepting request 298179 from openSUSE:Tools
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/298179 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/build-compare?expand=0&rev=88
This commit is contained in:
commit
24ba64deb0
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 13 08:55:39 UTC 2015 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- 2015.04.13
|
||||||
|
- Show hint if pkg-diff.sh returns non-zero
|
||||||
|
- Adjust intending in same-build-result.sh
|
||||||
|
- Handle /usr/src/packages/OTHER
|
||||||
|
- Handle "setuid directory"
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 20 18:58:22 UTC 2015 - olaf@aepfle.de
|
Fri Mar 20 18:58:22 UTC 2015 - olaf@aepfle.de
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ Summary: Build Result Compare Script
|
|||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: Development/Tools/Building
|
Group: Development/Tools/Building
|
||||||
Url: https://github.com/openSUSE/build-compare
|
Url: https://github.com/openSUSE/build-compare
|
||||||
Version: 2015.03.20
|
Version: 2015.04.13
|
||||||
Release: 0
|
Release: 0
|
||||||
Source1: COPYING
|
Source1: COPYING
|
||||||
Source2: same-build-result.sh
|
Source2: same-build-result.sh
|
||||||
|
@ -689,7 +689,7 @@ check_single_file()
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
directory|setuid,\ directory|sticky,\ directory)
|
directory|setuid\ directory|setuid,\ directory|sticky,\ directory)
|
||||||
# tar might package directories - ignore them here
|
# tar might package directories - ignore them here
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
@ -76,18 +76,19 @@ for opac in ${OLDRPMS[*]}; do
|
|||||||
oname=`$rpmqp $opac`
|
oname=`$rpmqp $opac`
|
||||||
nname=`$rpmqp $npac`
|
nname=`$rpmqp $npac`
|
||||||
if test "$oname" != "$nname"; then
|
if test "$oname" != "$nname"; then
|
||||||
echo "names differ: $oname $nname"
|
echo "names differ: $oname $nname"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
case "$opac" in
|
case "$opac" in
|
||||||
*debuginfo*)
|
*debuginfo*)
|
||||||
echo "skipping -debuginfo package"
|
echo "skipping -debuginfo package"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
bash $CMPSCRIPT "$opac" "$npac" || SUCCESS=0
|
bash $CMPSCRIPT "$opac" "$npac" || SUCCESS=0
|
||||||
if test $SUCCESS -eq 0 -a -z "$check_all"; then
|
if test $SUCCESS -eq 0 -a -z "$check_all"; then
|
||||||
|
echo "differences between $opac and $npac"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -98,43 +99,52 @@ if [ -n "${NEWRPMS[0]}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Compare rpmlint.log files
|
# Compare rpmlint.log files
|
||||||
OTHERDIR=/home/abuild/rpmbuild/OTHER
|
if test -d /home/abuild/rpmbuild/OTHER; then
|
||||||
|
OTHERDIR=/home/abuild/rpmbuild/OTHER
|
||||||
if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then
|
elif test -d /usr/src/packages/OTHER; then
|
||||||
file1=`mktemp`
|
OTHERDIR=/usr/src/packages/OTHER
|
||||||
file2=`mktemp`
|
else
|
||||||
echo "comparing $OLDDIR/rpmlint.log and $OTHERDIR/rpmlint.log"
|
echo "no OTHERDIR"
|
||||||
# Sort the files first since the order of messages is not deterministic
|
OTHERDIR=
|
||||||
# Remove release from files
|
|
||||||
sort -u $OLDDIR/rpmlint.log|sed -e "s,$ver_rel1,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1
|
|
||||||
sort -u $OTHERDIR/rpmlint.log|sed -e "s,$ver_rel2,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2
|
|
||||||
if ! cmp -s $file1 $file2; then
|
|
||||||
echo "rpmlint.log files differ:"
|
|
||||||
diff -u $file1 $file2 |head -n 20
|
|
||||||
SUCCESS=0
|
|
||||||
fi
|
|
||||||
rm $file1 $file2
|
|
||||||
elif test -e $OTHERDIR/rpmlint.log; then
|
|
||||||
echo "rpmlint.log is new"
|
|
||||||
SUCCESS=0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
appdatas=`cd $OTHERDIR && find . -name *-appdata.xml`
|
if test -n "$OTHERDIR"; then
|
||||||
for xml in $appdatas; do
|
if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then
|
||||||
# compare appstream data
|
file1=`mktemp`
|
||||||
if test -e $OLDDIR/$xml -a -e $OTHERDIR/$xml; then
|
file2=`mktemp`
|
||||||
file1=$OLDDIR/$xml
|
echo "comparing $OLDDIR/rpmlint.log and $OTHERDIR/rpmlint.log"
|
||||||
file2=$OTHERDIR/$xml
|
# Sort the files first since the order of messages is not deterministic
|
||||||
|
# Remove release from files
|
||||||
|
sort -u $OLDDIR/rpmlint.log|sed -e "s,$ver_rel1,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1
|
||||||
|
sort -u $OTHERDIR/rpmlint.log|sed -e "s,$ver_rel2,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2
|
||||||
if ! cmp -s $file1 $file2; then
|
if ! cmp -s $file1 $file2; then
|
||||||
echo "$xml files differ:"
|
echo "rpmlint.log files differ:"
|
||||||
diff -u0 $file1 $file2 |head -n 20
|
diff -u $file1 $file2 |head -n 20
|
||||||
SUCCESS=0
|
SUCCESS=0
|
||||||
fi
|
fi
|
||||||
elif test -e $OTHERDIR/$xml; then
|
rm $file1 $file2
|
||||||
echo "$xml is new"
|
elif test -e $OTHERDIR/rpmlint.log; then
|
||||||
|
echo "rpmlint.log is new"
|
||||||
SUCCESS=0
|
SUCCESS=0
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
appdatas=`cd $OTHERDIR && find . -name *-appdata.xml`
|
||||||
|
for xml in $appdatas; do
|
||||||
|
# compare appstream data
|
||||||
|
if test -e $OLDDIR/$xml -a -e $OTHERDIR/$xml; then
|
||||||
|
file1=$OLDDIR/$xml
|
||||||
|
file2=$OTHERDIR/$xml
|
||||||
|
if ! cmp -s $file1 $file2; then
|
||||||
|
echo "$xml files differ:"
|
||||||
|
diff -u0 $file1 $file2 |head -n 20
|
||||||
|
SUCCESS=0
|
||||||
|
fi
|
||||||
|
elif test -e $OTHERDIR/$xml; then
|
||||||
|
echo "$xml is new"
|
||||||
|
SUCCESS=0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if test $SUCCESS -eq 0; then
|
if test $SUCCESS -eq 0; then
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user