From 28e7830dca604f150c68282c8164d8627ed7b785da2d9fe5e89cc8131dfc1e2a Mon Sep 17 00:00:00 2001
From: Olaf Hering
Date: Thu, 3 Mar 2016 13:11:31 +0000
Subject: [PATCH 1/7] - Handle timestamp in dvi files - Handle Last-modified
HTML META tag - Handle yet another variant of javadoc timestamps
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=199
---
build-compare.changes | 7 +++++++
build-compare.spec | 2 +-
pkg-diff.sh | 29 +++++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/build-compare.changes b/build-compare.changes
index 9eca120..b26fc3f 100644
--- a/build-compare.changes
+++ b/build-compare.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Thu Mar 3 12:44:04 UTC 2016 - olaf@aepfle.de
+
+- Handle timestamp in dvi files
+- Handle Last-modified HTML META tag
+- Handle yet another variant of javadoc timestamps
+
-------------------------------------------------------------------
Fri Jan 1 10:11:14 UTC 2016 - schwab@suse.de
diff --git a/build-compare.spec b/build-compare.spec
index 916338e..2a9ad3d 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: 20160104T085658.0b929c8
+Version: 20160303T140910.a3e5233
Release: 0
Source1: COPYING
Source2: same-build-result.sh
diff --git a/pkg-diff.sh b/pkg-diff.sh
index 8e51a9b..9c409df 100644
--- a/pkg-diff.sh
+++ b/pkg-diff.sh
@@ -440,6 +440,31 @@ check_single_file()
perl -e "open fh, '+<', 'old/$file'; seek fh, 4, SEEK_SET; print fh '0000';"
perl -e "open fh, '+<', 'new/$file'; seek fh, 4, SEEK_SET; print fh '0000';"
;;
+ *.dvi)
+ # Opcodes 247: pre; i[1], num[4], den[4], mag[4], k[1], x[k]
+ perl -e "
+ my \$rec;
+ open fh, '+<', 'old/$file';
+ my \$dummy = read fh, \$rec, 15;
+ (\$pre, \$i, \$num, \$den, \$mag, \$k) = unpack('C2 N3 C', \$rec);
+ seek fh, 15, SEEK_SET;
+ while (\$k > 0) {
+ print fh '0';
+ \$k--;
+ }
+ "
+ perl -e "
+ my \$rec;
+ open fh, '+<', 'new/$file';
+ my \$dummy = read fh, \$rec, 15;
+ (\$pre, \$i, \$num, \$den, \$mag, \$k) = unpack('C2 N3 C', \$rec);
+ seek fh, 15, SEEK_SET;
+ while (\$k > 0) {
+ print fh '0';
+ \$k--;
+ }
+ "
+ ;;
*.bz2)
bunzip2 -c old/$file > old/${file/.bz2/}
bunzip2 -c new/$file > new/${file/.bz2/}
@@ -480,6 +505,7 @@ check_single_file()
/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 '
@@ -510,6 +537,8 @@ check_single_file()
/^<\/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/
From 6320d4fe21ee8c5e8835f81ffa9564b51c7ab525e0b0f66a75a343e2b32d5f10 Mon Sep 17 00:00:00 2001
From: Olaf Hering
Date: Fri, 4 Mar 2016 18:53:00 +0000
Subject: [PATCH 2/7] - Handle yet another variant of elc timestamps
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=200
---
build-compare.changes | 5 +++++
build-compare.spec | 2 +-
pkg-diff.sh | 7 ++++++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/build-compare.changes b/build-compare.changes
index b26fc3f..a6263e3 100644
--- a/build-compare.changes
+++ b/build-compare.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Fri Mar 4 18:50:32 UTC 2016 - olaf@aepfle.de
+
+- Handle yet another variant of elc timestamps
+
-------------------------------------------------------------------
Thu Mar 3 12:44:04 UTC 2016 - olaf@aepfle.de
diff --git a/build-compare.spec b/build-compare.spec
index 2a9ad3d..dfc430c 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: 20160303T140910.a3e5233
+Version: 20160304T195219.e59af35
Release: 0
Source1: COPYING
Source2: same-build-result.sh
diff --git a/pkg-diff.sh b/pkg-diff.sh
index 9c409df..771fd0a 100644
--- a/pkg-diff.sh
+++ b/pkg-diff.sh
@@ -597,7 +597,12 @@ check_single_file()
*.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
+ sed -i -e '
+ s|^;;; .ompiled by abuild@.* on ... ... .. ..:..:.. ....|;;; compiled by abuild@buildhost on Wed Jul 01 00:00:00 2009|
+ s|^;;; from file .*\.el|;;; from file /home/abuild/rpmbuild/BUILD/anthy-9100h/src-util/elc.8411/anthy-azik.el|
+ s|^;;; emacs version .*|;;; emacs version 21.5 (beta34) "kale" XEmacs Lucid.|
+ s|^;;; bytecomp version .*|;;; bytecomp version 2.28 XEmacs; 2009-08-09.|
+ ' $f
done
;;
/var/lib/texmf/web2c/*/*fmt |\
From 9abd4b5365a45a6435d6f3a711fbac30414895a0412f1febe79381b4994a7a1f Mon Sep 17 00:00:00 2001
From: Olaf Hering
Date: Mon, 7 Mar 2016 11:58:30 +0000
Subject: [PATCH 3/7] - 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
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=201
---
build-compare.changes | 13 ++++
build-compare.spec | 2 +-
pkg-diff.sh | 155 +++++++++++++++++++++---------------------
same-build-result.sh | 44 +++++++++---
4 files changed, 124 insertions(+), 90 deletions(-)
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%%' $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
From 08de9f49df9c32b35ad0fdd1ea6887fc905f0173e0ff8ee9b730f22dda3864ef Mon Sep 17 00:00:00 2001
From: Olaf Hering
Date: Tue, 8 Mar 2016 11:55:22 +0000
Subject: [PATCH 4/7] Remove quoting from directory arguments
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=202
---
build-compare.spec | 2 +-
same-build-result.sh | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/build-compare.spec b/build-compare.spec
index 208b620..216b1e8 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: 20160307T125659.618d059
+Version: 20160308T125206.d67251d
Release: 0
Source1: COPYING
Source2: same-build-result.sh
diff --git a/same-build-result.sh b/same-build-result.sh
index 543d0ff..a5f13bf 100644
--- a/same-build-result.sh
+++ b/same-build-result.sh
@@ -73,14 +73,14 @@ 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.
-find "$OLDDIR" -type f -name '*.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' \
+find $NEWDIRS -type f -name '*.rpm' \
-a ! -name '*src.rpm' \
-a ! -name '*.delta.rpm' \
-a ! -name '*-32bit-*' \
From 7a8cd97426361a7ea190cd5be1b2c6681fdde7a35200fbb48f828802ce3fb854 Mon Sep 17 00:00:00 2001
From: Olaf Hering
Date: Tue, 8 Mar 2016 12:48:20 +0000
Subject: [PATCH 5/7] Another quoting bug in same-build-result.sh
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=203
---
build-compare.spec | 2 +-
same-build-result.sh | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/build-compare.spec b/build-compare.spec
index 216b1e8..11bcac7 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: 20160308T125206.d67251d
+Version: 20160308T134726.8485d3c
Release: 0
Source1: COPYING
Source2: same-build-result.sh
diff --git a/same-build-result.sh b/same-build-result.sh
index a5f13bf..6636dac 100644
--- a/same-build-result.sh
+++ b/same-build-result.sh
@@ -21,6 +21,7 @@ _x() {
}
trap _x EXIT
#
+check_all=
if test "$1" = "-a"
then
check_all="-a"
@@ -112,7 +113,7 @@ for opac in ${OLDRPMS[*]}; do
echo "skipping -debuginfo package"
;;
*)
- bash $CMPSCRIPT "$check_all" "$opac" "$npac" || SUCCESS=0
+ bash $CMPSCRIPT $check_all "$opac" "$npac" || SUCCESS=0
;;
esac
done
From 59c7476a621faa44636f1fe89e442ce3a4b0bca85afcb02e783ad9c93f58fff1 Mon Sep 17 00:00:00 2001
From: Olaf Hering
Date: Tue, 8 Mar 2016 16:49:47 +0000
Subject: [PATCH 6/7] - Handle /var/adm/update-messages in scripts and filelist
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=204
---
build-compare.changes | 5 +++++
build-compare.spec | 2 +-
functions.sh | 2 ++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/build-compare.changes b/build-compare.changes
index da094be..89fe6f4 100644
--- a/build-compare.changes
+++ b/build-compare.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Tue Mar 8 16:48:48 UTC 2016 - olaf@aepfle.de
+
+- Handle /var/adm/update-messages in scripts and filelist
+
-------------------------------------------------------------------
Mon Mar 7 11:56:28 UTC 2016 - olaf@aepfle.de
diff --git a/build-compare.spec b/build-compare.spec
index 11bcac7..56959b7 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: 20160308T134726.8485d3c
+Version: 20160308T174907.9a42867
Release: 0
Source1: COPYING
Source2: same-build-result.sh
diff --git a/functions.sh b/functions.sh
index 437bb7c..02be91e 100644
--- a/functions.sh
+++ b/functions.sh
@@ -26,6 +26,7 @@ function trim_release_old()
sed -e "
/\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_old_regex_l\$\)/{s,$version_release_old_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_old_regex_s,@VERSION@-@RELEASE_SHORT@,g}
s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
+ s/\(\/var\/adm\/update-messages\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
"
}
function trim_release_new()
@@ -33,6 +34,7 @@ function trim_release_new()
sed -e "
/\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_new_regex_l\$\)/{s,$version_release_new_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_new_regex_s,@VERSION@-@RELEASE_SHORT@,g}
s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
+ s/\(\/var\/adm\/update-messages\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
"
}
# Get single directory or filename with long or short release string
From 9f7118010de083ad8ef7014be3bd483551470aafeb28e5cfc6177a34578b0cc0 Mon Sep 17 00:00:00 2001
From: Olaf Hering
Date: Tue, 8 Mar 2016 18:42:04 +0000
Subject: [PATCH 7/7] - Remove hacks from /var/adm/update-scripts|messages case
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=205
---
build-compare.changes | 5 +++++
build-compare.spec | 2 +-
functions.sh | 4 ++--
pkg-diff.sh | 14 ++------------
4 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/build-compare.changes b/build-compare.changes
index 89fe6f4..83f134e 100644
--- a/build-compare.changes
+++ b/build-compare.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Tue Mar 8 18:00:40 UTC 2016 - olaf@aepfle.de
+
+- Remove hacks from /var/adm/update-scripts|messages case
+
-------------------------------------------------------------------
Tue Mar 8 16:48:48 UTC 2016 - olaf@aepfle.de
diff --git a/build-compare.spec b/build-compare.spec
index 56959b7..8b61203 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: 20160308T174907.9a42867
+Version: 20160308T194108.4a952dd
Release: 0
Source1: COPYING
Source2: same-build-result.sh
diff --git a/functions.sh b/functions.sh
index 02be91e..d16b041 100644
--- a/functions.sh
+++ b/functions.sh
@@ -40,11 +40,11 @@ function trim_release_new()
# Get single directory or filename with long or short release string
function grep_release_old()
{
- grep -E "(/boot|/lib/modules|/lib/firmware|/usr/src)/[^/]*(${version_release_old_regex_l}(\$|[^/]+\$)|${version_release_old_regex_s}(\$|[^/]+\$))"
+ grep -E "(/boot|/lib/modules|/lib/firmware|/usr/src|/var/adm/update-scripts)/[^/]*(${version_release_old_regex_l}(\$|[^/]+\$)|${version_release_old_regex_s}(\$|[^/]+\$))"
}
function grep_release_new()
{
- grep -E "(/boot|/lib/modules|/lib/firmware|/usr/src)/[^/]*(${version_release_new_regex_l}(\$|[^/]+\$)|${version_release_new_regex_s}(\$|[^/]+\$))"
+ grep -E "(/boot|/lib/modules|/lib/firmware|/usr/src|/var/adm/update-scripts)/[^/]*(${version_release_new_regex_l}(\$|[^/]+\$)|${version_release_new_regex_s}(\$|[^/]+\$))"
}
function check_provides()
diff --git a/pkg-diff.sh b/pkg-diff.sh
index 933ee90..f100be0 100644
--- a/pkg-diff.sh
+++ b/pkg-diff.sh
@@ -655,19 +655,9 @@ check_single_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
+ sed -i "s/${name_ver_rel_old_regex_l}/@NAME_VER_REL@/" old/$file
+ sed -i "s/${name_ver_rel_new_regex_l}/@NAME_VER_REL@/" new/$file
;;
*.ps)
for f in "old/$file" "new/$file"; do