From 190e92584fa7eabe942900cdf6bd204d7984c6f67eb1d924b92b8be3e882c8b4 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 8 Nov 2016 08:08:18 +0000 Subject: [PATCH 1/4] - Ignore /etc/hosts - Ignore .gnu_debugdata section when comparing ELF files. OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=224 --- build-compare.changes | 10 ++++++++++ build-compare.spec | 2 +- pkg-diff.sh | 11 ++++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 8eba5c9..bc3bfd3 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Nov 8 08:06:30 UTC 2016 - olaf@aepfle.de + +- Ignore /etc/hosts + +------------------------------------------------------------------- +Mon Nov 7 03:54:00 UTC 2016 - ol@infoserver.lv + +- Ignore .gnu_debugdata section when comparing ELF files. + ------------------------------------------------------------------- Wed Oct 12 16:40:24 CEST 2016 - ro@suse.de diff --git a/build-compare.spec b/build-compare.spec index 7f92716..e15f274 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: 20161012T163739.10c9ac7 +Version: 20161108T090706.0636a93 Release: 0 Source1: COPYING Source2: same-build-result.sh diff --git a/pkg-diff.sh b/pkg-diff.sh index 4404967..298040a 100644 --- a/pkg-diff.sh +++ b/pkg-diff.sh @@ -735,6 +735,11 @@ check_single_file() sed -i '/^InitrdID:/s@^.*@InitrdID: something@' "old/$file" sed -i '/^InitrdID:/s@^.*@InitrdID: something@' "new/$file" ;; + */etc/hosts) + # packaged by libguestfs + sed -i '/^127.0.0.1[[:blank:]].*/127.0.0.1 hst/' "old/$file" + sed -i '/^127.0.0.1[[:blank:]].*/127.0.0.1 hst/' "new/$file" + ;; esac ftype=`/usr/bin/file old/$file | sed -e 's@^[^:]\+:[[:blank:]]*@@' -e 's@[[:blank:]]*$@@'` @@ -777,8 +782,8 @@ check_single_file() fi echo "" >$file1 echo "" >$file2 - # Don't compare .build-id and .gnu_debuglink sections - sections="$($OBJDUMP -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" | tr "\n" " ")" + # Don't compare .build-id, .gnu_debuglink and .gnu_debugdata sections + sections="$($OBJDUMP -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" -e "\.gnu_debugdata" | tr "\n" " ")" for section in $sections; do $OBJDUMP -s -j $section old/$file | sed "s,^old/,," > $file1 $OBJDUMP -s -j $section new/$file | sed "s,^new/,," > $file2 @@ -789,7 +794,7 @@ check_single_file() fi done if test -z "$elfdiff"; then - echo "$file: only difference was in build-id or gnu_debuglink, GOOD." + echo "$file: only difference was in build-id, gnu_debuglink or gnu_debugdata, GOOD." return 0 fi return 1 From 9e2b0f04d8d45c45875dfad2217f55a1b0b2da12084501b4cc0d4f9d500b3c05 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 8 Nov 2016 11:55:08 +0000 Subject: [PATCH 2/4] - Handle every path matching /share/man/ as man page OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=225 --- build-compare.changes | 1 + build-compare.spec | 2 +- pkg-diff.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index bc3bfd3..862275f 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -2,6 +2,7 @@ Tue Nov 8 08:06:30 UTC 2016 - olaf@aepfle.de - Ignore /etc/hosts +- Handle every path matching /share/man/ as man page ------------------------------------------------------------------- Mon Nov 7 03:54:00 UTC 2016 - ol@infoserver.lv diff --git a/build-compare.spec b/build-compare.spec index e15f274..5ecdaab 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: 20161108T090706.0636a93 +Version: 20161108T125335.60cbc96 Release: 0 Source1: COPYING Source2: same-build-result.sh diff --git a/pkg-diff.sh b/pkg-diff.sh index 298040a..b217372 100644 --- a/pkg-diff.sh +++ b/pkg-diff.sh @@ -636,7 +636,7 @@ check_single_file() trim_man_first_line $f done ;; - /usr/share/man/*/man*|/usr/share/man/man*|/usr/lib/texmf/doc/man/*/*) + */share/man/*|/usr/lib/texmf/doc/man/*/*) for f in old/$file new/$file; do trim_man_TH $f From 52b31cab87896198f47e8b2053c465334a98f363243356ed7be42fe1d1b63eac Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 9 Nov 2016 06:50:00 +0000 Subject: [PATCH 3/4] - Ignore /etc/ld.so.cache OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=226 --- build-compare.changes | 5 +++++ build-compare.spec | 2 +- pkg-diff.sh | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 862275f..93673e1 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 9 06:48:22 UTC 2016 - olaf@aepfle.de + +- Ignore /etc/ld.so.cache + ------------------------------------------------------------------- Tue Nov 8 08:06:30 UTC 2016 - olaf@aepfle.de diff --git a/build-compare.spec b/build-compare.spec index 5ecdaab..3f057ea 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: 20161108T125335.60cbc96 +Version: 20161109T074834.ab7f1f0 Release: 0 Source1: COPYING Source2: same-build-result.sh diff --git a/pkg-diff.sh b/pkg-diff.sh index b217372..34827c5 100644 --- a/pkg-diff.sh +++ b/pkg-diff.sh @@ -735,10 +735,14 @@ check_single_file() sed -i '/^InitrdID:/s@^.*@InitrdID: something@' "old/$file" sed -i '/^InitrdID:/s@^.*@InitrdID: something@' "new/$file" ;; + */ld.so.cache) + # packaged by libguestfs + return 0 + ;; */etc/hosts) # packaged by libguestfs - sed -i '/^127.0.0.1[[:blank:]].*/127.0.0.1 hst/' "old/$file" - sed -i '/^127.0.0.1[[:blank:]].*/127.0.0.1 hst/' "new/$file" + sed -i 's/^127.0.0.1[[:blank:]].*/127.0.0.1 hst/' "old/$file" + sed -i 's/^127.0.0.1[[:blank:]].*/127.0.0.1 hst/' "new/$file" ;; esac From ecf3198024dcafdd9c63461f81d4681046779309043fbc88996b5a7487c2f34c Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 9 Nov 2016 06:53:46 +0000 Subject: [PATCH 4/4] - Ignore /etc/machine-id OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=227 --- build-compare.changes | 1 + build-compare.spec | 2 +- pkg-diff.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 93673e1..7507cd1 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -2,6 +2,7 @@ Wed Nov 9 06:48:22 UTC 2016 - olaf@aepfle.de - Ignore /etc/ld.so.cache +- Ignore /etc/machine-id ------------------------------------------------------------------- Tue Nov 8 08:06:30 UTC 2016 - olaf@aepfle.de diff --git a/build-compare.spec b/build-compare.spec index 3f057ea..6248830 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: 20161109T074834.ab7f1f0 +Version: 20161109T075305.eed6e97 Release: 0 Source1: COPYING Source2: same-build-result.sh diff --git a/pkg-diff.sh b/pkg-diff.sh index 34827c5..8b63216 100644 --- a/pkg-diff.sh +++ b/pkg-diff.sh @@ -735,7 +735,7 @@ check_single_file() sed -i '/^InitrdID:/s@^.*@InitrdID: something@' "old/$file" sed -i '/^InitrdID:/s@^.*@InitrdID: something@' "new/$file" ;; - */ld.so.cache) + */ld.so.cache|*/etc/machine-id) # packaged by libguestfs return 0 ;;