From 59627a57a05a2e59d1b31ac7e7615aa8c44f8a28a7eca2599aacfca6ad3ae099 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 15 Jul 2014 09:52:38 +0000 Subject: [PATCH 1/3] Accepting request 241031 from home:olh:branches:openSUSE:Tools - Fix shell syntax error in rpm-check.sh [ 1141s] compare /.build.oldpackages/libvlccore7-2.1.5-214.1.x86_64.rpm /usr/src/packages/RPMS/x86_64/libvlccore7-2.1.5-214.2.x86_64.rpm [ 1144s] tr: missing operand [ 1144s] Try `tr --help' for more information. [ 1144s] /usr/lib/build/rpm-check.sh: line 431: \n: command not found [ 1144s] WARNING: no idea about /usr/lib64/libvlccore.so.7.0.0 OBS-URL: https://build.opensuse.org/request/show/241031 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=143 --- build-compare.changes | 5 +++++ rpm-check.sh | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 8928b4a..fe238e0 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 15 11:42:09 CEST 2014 - ohering@suse.de + +- Fix shell syntax error in rpm-check.sh + ------------------------------------------------------------------- Mon Jul 7 08:28:45 UTC 2014 - aj@suse.com diff --git a/rpm-check.sh b/rpm-check.sh index 4779958..58d824a 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -463,8 +463,7 @@ check_single_file() echo "" >$file1 echo "" >$file2 # 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 -"\n" " "); do + 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 objdump -s -j $section old/$file | sed "s,old/,," >> $file1 objdump -s -j $section new/$file | sed "s,new/,," >> $file2 done From 06e44f70d509697089e49ba2073480e50d4932978bab28a41ad0bb5c387279f2 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 15 Jul 2014 10:03:12 +0000 Subject: [PATCH 2/3] - 2014.07.15 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=144 --- build-compare.changes | 1 + build-compare.spec | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build-compare.changes b/build-compare.changes index fe238e0..53cde58 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -2,6 +2,7 @@ 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 diff --git a/build-compare.spec b/build-compare.spec index 086e88a..5fcf883 100644 --- a/build-compare.spec +++ b/build-compare.spec @@ -20,7 +20,7 @@ Name: build-compare Summary: Build Result Compare Script License: GPL-2.0+ Group: Development/Tools/Building -Version: 2012.01.26 +Version: 2014.07.15 Release: 0 Source1: COPYING Source2: same-build-result.sh From 5f0dcc813104c36256ccbba30acab89efa4a2128cdd31c12219a8162b768bb74 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 17 Jul 2014 18:31:37 +0000 Subject: [PATCH 3/3] Accepting request 241368 from home:msmeissn:branches:openSUSE:Tools - 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. OBS-URL: https://build.opensuse.org/request/show/241368 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=145 --- build-compare.changes | 8 ++++++++ functions.sh | 13 +++++++------ rpm-check.sh | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 53cde58..edc9e0c 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +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 diff --git a/functions.sh b/functions.sh index 48ac53d..1ad1bcf 100644 --- a/functions.sh +++ b/functions.sh @@ -125,9 +125,9 @@ function cmp_spec () # Also FILELANGS (or?) QF="[%{FILENAMES} %{FILEFLAGS} %{FILESTATES} %{FILEMODES:octal} %{FILEUSERNAME} %{FILEGROUPNAME} %{FILERDEVS} %{FILEVERIFYFLAGS} %{FILELINKTOS}\n]\\n" # ??? what to do with FILEPROVIDE and FILEREQUIRE? - - check_header $oldrpm > $file1 - check_header $newrpm > $file2 + + check_header $oldrpm | sed -e "s,-$release1,-@RELEASE@," > $file1 + check_header $newrpm | sed -e "s,-$release2,-@RELEASE@," > $file2 if ! diff -au $file1 $file2; then rm $file1 $file2 @@ -136,9 +136,10 @@ function cmp_spec () # now the md5sums. if they are different, we check more detailed # if there are different filenames, we will already have aborted before - QF="[%{FILENAMES} %{FILEMD5S}\n]\\n" - check_header $oldrpm > $file1 - check_header $newrpm > $file2 + # file flag 64 means "ghost", filter those out. + QF="[%{FILENAMES} %{FILEMD5S} %{FILEFLAGS}\n]\\n" + check_header $oldrpm |grep -v " 64$"> $file1 + check_header $newrpm |grep -v " 64$"> $file2 RES=2 # done if the same diff --git a/rpm-check.sh b/rpm-check.sh index 58d824a..0494b71 100644 --- a/rpm-check.sh +++ b/rpm-check.sh @@ -402,6 +402,21 @@ check_single_file() echo "Ignore $file" 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 files contain a unique ID, remove it # Format of the ID is: