forked from pool/build-compare
Accepting request 241376 from openSUSE:Tools
1 OBS-URL: https://build.opensuse.org/request/show/241376 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/build-compare?expand=0&rev=78
This commit is contained in:
commit
8255abb930
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 17 06:46:47 UTC 2014 - meissner@suse.com
|
||||||
|
|
||||||
|
- Allow file list changes where the release number is encoded
|
||||||
|
in the filename.
|
||||||
|
- compare post-update message and scripts (fixes fetchmsttfonts
|
||||||
|
constant republish) as they have the release number hardcoded.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 15 11:42:09 CEST 2014 - ohering@suse.de
|
||||||
|
|
||||||
|
- Fix shell syntax error in rpm-check.sh
|
||||||
|
- 2014.07.15
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 7 08:28:45 UTC 2014 - aj@suse.com
|
Mon Jul 7 08:28:45 UTC 2014 - aj@suse.com
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ Name: build-compare
|
|||||||
Summary: Build Result Compare Script
|
Summary: Build Result Compare Script
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: Development/Tools/Building
|
Group: Development/Tools/Building
|
||||||
Version: 2012.01.26
|
Version: 2014.07.15
|
||||||
Release: 0
|
Release: 0
|
||||||
Source1: COPYING
|
Source1: COPYING
|
||||||
Source2: same-build-result.sh
|
Source2: same-build-result.sh
|
||||||
|
11
functions.sh
11
functions.sh
@ -126,8 +126,8 @@ function cmp_spec ()
|
|||||||
QF="[%{FILENAMES} %{FILEFLAGS} %{FILESTATES} %{FILEMODES:octal} %{FILEUSERNAME} %{FILEGROUPNAME} %{FILERDEVS} %{FILEVERIFYFLAGS} %{FILELINKTOS}\n]\\n"
|
QF="[%{FILENAMES} %{FILEFLAGS} %{FILESTATES} %{FILEMODES:octal} %{FILEUSERNAME} %{FILEGROUPNAME} %{FILERDEVS} %{FILEVERIFYFLAGS} %{FILELINKTOS}\n]\\n"
|
||||||
# ??? what to do with FILEPROVIDE and FILEREQUIRE?
|
# ??? what to do with FILEPROVIDE and FILEREQUIRE?
|
||||||
|
|
||||||
check_header $oldrpm > $file1
|
check_header $oldrpm | sed -e "s,-$release1,-@RELEASE@," > $file1
|
||||||
check_header $newrpm > $file2
|
check_header $newrpm | sed -e "s,-$release2,-@RELEASE@," > $file2
|
||||||
|
|
||||||
if ! diff -au $file1 $file2; then
|
if ! diff -au $file1 $file2; then
|
||||||
rm $file1 $file2
|
rm $file1 $file2
|
||||||
@ -136,9 +136,10 @@ function cmp_spec ()
|
|||||||
|
|
||||||
# now the md5sums. if they are different, we check more detailed
|
# now the md5sums. if they are different, we check more detailed
|
||||||
# if there are different filenames, we will already have aborted before
|
# if there are different filenames, we will already have aborted before
|
||||||
QF="[%{FILENAMES} %{FILEMD5S}\n]\\n"
|
# file flag 64 means "ghost", filter those out.
|
||||||
check_header $oldrpm > $file1
|
QF="[%{FILENAMES} %{FILEMD5S} %{FILEFLAGS}\n]\\n"
|
||||||
check_header $newrpm > $file2
|
check_header $oldrpm |grep -v " 64$"> $file1
|
||||||
|
check_header $newrpm |grep -v " 64$"> $file2
|
||||||
|
|
||||||
RES=2
|
RES=2
|
||||||
# done if the same
|
# done if the same
|
||||||
|
18
rpm-check.sh
18
rpm-check.sh
@ -402,6 +402,21 @@ check_single_file()
|
|||||||
echo "Ignore $file"
|
echo "Ignore $file"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
/var/adm/update-messages/*|/var/adm/update-scripts/*)
|
||||||
|
# encode version-release inside
|
||||||
|
oldfn=`echo "$file"|sed -e s/-$release2/-$release1/;`
|
||||||
|
|
||||||
|
# fetchmsttfonts embeds the release number in the update shell script.
|
||||||
|
echo sed -i -e "s/-$release1/-$release2/g;" "old/$oldfn"
|
||||||
|
sed -i -e "s/-$release1/-$release2/g;" "old/$oldfn"
|
||||||
|
|
||||||
|
if ! diff -u old/$oldfn new/$file; then
|
||||||
|
echo "$oldfn is not same as $file"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo "$file and $oldfn are same"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
*pdf)
|
*pdf)
|
||||||
# PDF files contain a unique ID, remove it
|
# PDF files contain a unique ID, remove it
|
||||||
# Format of the ID is:
|
# Format of the ID is:
|
||||||
@ -463,8 +478,7 @@ check_single_file()
|
|||||||
echo "" >$file1
|
echo "" >$file1
|
||||||
echo "" >$file2
|
echo "" >$file2
|
||||||
# Don't compare .build-id and .gnu_debuglink sections
|
# Don't compare .build-id and .gnu_debuglink sections
|
||||||
for section in $(objdump -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (\..*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" | tr
|
for section in $(objdump -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (\..*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" | tr "\n" " "); do
|
||||||
"\n" " "); do
|
|
||||||
objdump -s -j $section old/$file | sed "s,old/,," >> $file1
|
objdump -s -j $section old/$file | sed "s,old/,," >> $file1
|
||||||
objdump -s -j $section new/$file | sed "s,new/,," >> $file2
|
objdump -s -j $section new/$file | sed "s,new/,," >> $file2
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user